-1

Hi I want to remove All nan values where all rows are NA and colums are also na for that row

for example

 L1     L2    L3    L4
 nan    1     2     na
 nan    nan   nan   nan
 1      2     3     4
 nan    nan   nan   nan
 5      6     7     8
 na      na    9     10

i.e I dont want 3, 4 row from dataframe from my above data how do i do it?

My expected output is:

 L1     L2    L3    L4
 nan    1     2     na
 1      2     3     4
 5      6     7     8
 na      na    9     10
Cyley Simon
  • 253
  • 2
  • 5
  • 17

1 Answers1

0

Check out pandas df.dropna(axis=0, how='all') https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.dropna.html

d2718nis
  • 1,279
  • 9
  • 13