How can I delete a column which have same name with other column in pandas?

Viewed 14

Sorry if this is a repeated question but couldn't find a relative one. My question is: i have 2 columns with the same name. As you will see from the picture here

enter image description here

I would like to delete the one which have NaN values in it. But I do want to keep the second NaN column. Don't want to delete all the NaN columns! I used these but didn't work out well, at least not the output that i want. What should I use instead of "df.drop"?

df = df.drop(labels=0,axis=1) and df = df.drops(labels="NaN",axis=1)

I got this error:

enter image description here

Thank you very much

0 Answers
Related