I have a DataFrame with 1 Row and 33 Columns. I want to delete the columns where it finds a number between 0 and 30 and also nan values.
Is there any efficient way to do that?
I have a DataFrame with 1 Row and 33 Columns. I want to delete the columns where it finds a number between 0 and 30 and also nan values.
Is there any efficient way to do that?
Just wanted to try doing it:
filtered = df.loc[:, ~((df.isnull()) | (df.sum(axis=0)<=30) & (df.sum(axis=0)>=0)).iloc[0]]