-1

My data doesn't contain columns when I am adding the columns in the data using dataFrame.columns = ['XYZ','ABC'] then the 1st row is getting replaced by the column names.

1 Answers1

1

I think your issue is pretty much explained here - Adding new column to existing DataFrame in Python pandas . To keep it short: df['new_column'] = None # or any other value.

Zigfrid
  • 21
  • 5