Stack Exchange
Get values from a smaller DataFrame with a specified step
Supposing I have the two DataFrames shown below:
dd = pd.DataFrame([1,0, 3, 0, 5])

   0
0  1
1  0
2  3
3  0
4  5

and
df = pd.DataFrame([2,4])

   0
0  2
1  4

How can I broadcast the values of df into dd with step = 2 so I end up with
   0
0  1
1  2
2  3
3  4
4  5


dd.values[1::2] = df.values
dd now contains:
    0
0   1
1   2
2   3
3   4
4   5

Note that here step=2 condition is used. array[1::2] syntax means start from the array element with index 1, until the end, with step=2.

Another solution:
dd = pd.DataFrame([1, 0, 3, 0, 5])                                                                               
df = pd.DataFrame([2, 4])                                                                                       
dd.iloc[1::2] = df.values 
dd
# Out:
   0
0  1
1  2
2  3
3  4
4  5


Change df.index by range and fill second DataFrame:
df.index = range(1, len(dd)+1, 2)[:len(df)]
print (df)
   0
1  2
3  4

dd.loc[df.index] = df
print (dd)
   0
0  1
1  2
2  3
3  4
4  5

