If I got your logic right, you can simplify it and make it much faster (because you avoid the loop and can make use of the fast C++ implementations) like this:
df_infl['resultados']= ((df_infl['infl_gen'].shift(12).div(df_infl[name_of_col_0]) - 1) * 100).fillna(0)
For a generated dataframe I get the following output:
    name_col0  infl_gen  new_column_name  resultados
0         127        52         0.000000    0.000000
1         123        68         0.000000    0.000000
2          57       144         0.000000    0.000000
3          57        88         0.000000    0.000000
4         103         4         0.000000    0.000000
5         198       177         0.000000    0.000000
6          79        43         0.000000    0.000000
7         184       183         0.000000    0.000000
8          41        85         0.000000    0.000000
9          15       100         0.000000    0.000000
10         82       105         0.000000    0.000000
11        192       102         0.000000    0.000000
12         74       144       -29.729730  -29.729730
13         53         2        28.301887   28.301887
14         21       132       585.714286  585.714286
15         59        42        49.152542   49.152542
16        161        19       -97.515528  -97.515528
17        132       158        34.090909   34.090909
18        194       110       -77.835052  -77.835052
19        193       171        -5.181347   -5.181347
new_column_name is actually the value calculated by the logic posted by Raghva. So you see both evaluate to the same result.