Tryusing.loc[row_indexer,col_indexer] =valueinstead See the caveatsinthe documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copydata_with_code['text'] = data_with_code['abstract'].fillna('') + data_with_code['comments'].fillna(