i have a dataframe of 400 x 25. i am supposed to remove ALL Nans from the dataset and then select only 3 columns to work on from the 25 columns. I have done this using:
assign back:
df = df.dropna(axis=0)
by default it's not inplace unless you say so:
df.dropna(axis=0, inplace=True)
Check the docs