0

DataFrame

This is my dataframe that has column names 0 and 0. I need to change it to x and y. Is there any possible solution.

a = pd.DataFrame(array_x)
b = pd.DataFrame(array_y)
c = pd.concat([a,b],axis = 1)

This is my code

Yadhu
  • 125
  • 10

1 Answers1

0

Just assign column name to your dataframe.

like this...

c.columns = ['x','y']
patelnisheet
  • 124
  • 1
  • 3
  • 12