How to delete the last column of data of a pandas dataframe

前端 未结 8 987
耶瑟儿~
耶瑟儿~ 2021-02-02 08:52

I have some cvs data that has an empty column at the end of each row. I would like to leave it out of the import or alternatively delete it after import. My cvs data\'s have a v

8条回答
  •  无人及你
    2021-02-02 09:38

    Just to complete the accepted answer, if you have one dataframe with only two columns, and these two columns have the same name, be aware. First you need to rename one column and then drop the desirable column.

    *Edited after comment below

提交回复
热议问题