I have a dataframe df1 like
A B
1 2 3
2 9 8
and an object ob (dtype: object)
1 5
2 4
replacing column B in the dataframe with df1['B'] = ob
doesn't work despite all columns of the dataframe are also objects as df1.dtypes
tells me and they have the same length. What am I doing wrong?