Home > Net >  how to shift names of pandas list on python
how to shift names of pandas list on python

Time:12-26

So what i tried to is to import a csv file using pandas but i did not get exactly what i want here is the code :

cords = ["x1" , "y1" , .... , "x68" , "y68" ]
frame = pd.read_csv("hello.csv" , names = ["session" ]   cords , sep = ';')
frame

and here is a picture of the result , shifted data

NOTE : please click on Shifted Data to see the picture

well i want the 2 column to be the session and we can see that the y68 has literally nothing if we just shift the names one step to left everything would be great! Can you please help me ?

Thank you and have a nice day !

CodePudding user response:

well using frame.columns after reading instead of names in the reading would solve the problem

  • Related