I need help. I am trying to clean a very large data frame using pandas
.I have 35064 rows and 16 columns.In 20 rows I have np.nan
in 4 columns,so I want do delete these 20 rows. I wanted to replace np.nan
with 0,and after that to find indexes in each od this 4 columns that have values 0
(indexes_to_drop=df.loc[df['temp']==0].index
and after that to do
df.drop(indexes_to_drop,axis=0,inplace=True)
But I forgot that this columns contain regular 0,which I can't drop Also I would like to add for loop,because I have 4 columns. Thank you