Let´s say I have a DataFrame df_a and another one df_b.
I want to replace lines 42 to 51 of df_a with the corresponding rows of df_b (same number of rows, but more columns as df_a).
My current code is
df_a.loc[45:52,:] = df_b.loc[45:52,"Column A":"Column D"]
where "Column A":"Column D" matches the total number of columns of df_a.
I´m getting an unintented result where all selected terms in df_a get replaced by nan instead of df_b values. Does anyone know an easy way to do it?