0

Please how to delete all columns name's "NaN" in Pandas DataFrame

Here image of my df

Mazouz
  • 5
  • 1
  • 1
    Have you checked how to [Delete a column from a Pandas DataFrame](https://stackoverflow.com/a/18145399/2246849)? – user2246849 Apr 30 '22 at 11:22
  • 2
    Does this answer your question? [Delete a column from a Pandas DataFrame](https://stackoverflow.com/questions/13411544/delete-a-column-from-a-pandas-dataframe) – Simon Breton Apr 30 '22 at 15:11
  • Can you create a [Minimal, Reproducible Example](https://stackoverflow.com/help/minimal-reproducible-example) of what you've tried so far, and explain what isn't working as expected? – Alicia Sykes May 01 '22 at 01:02

1 Answers1

0

Try this :

 df = df.loc[:, df.columns.notna()]
Hamza NABIL
  • 146
  • 7