Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 13921

Delete 2 column headers and shift the whole column row to left in dataframe

$
0
0

Delete 2 column headers and shift the whole column row to left in dataframe. Below is my dataframe.

    trash1  trash2  name    age0   john    54      1   mike    34      2   suz 56      3   tin 78      4   yan 31  

i need the final df as below

    name    age0   john    54      1   mike    34      2   suz 56      3   tin 78      4   yan 31      

I tried all the commands but its deleting the whole column. Please help me in this.


Viewing all articles
Browse latest Browse all 13921

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>