0

the axis=1 below is to find if there's any NaN in every row.

df.isnull().any(axis=1)

the axis=1 below is to drop column if there is missing value.

df1.dropna(axis=1, how='any')

I am so confused! usually I think axis=0 is relating to rows, axis=1 is relating to columns. Can you explain me why axis=1 is relating to row in the first example, and relating to column in the second example?

Kiko
  • 1

0 Answers0