Pandas Question about axis = 0 and axis = 1
.sum() is applied along an axis whereas .drop() is applied to an axis.
df.isnull().sum(axis = 0) returns the sum of all null cells along axis 0 (rows/indices), meaning one value per column.
df.drop(column, axis = 1) drops column belonging to axis 1.
Basically I know in Python axis = 0 means row, and axis = 1 means the column.
df.isnull().sum(axis = 0) summarize the number of missing values in a column, but
df.drop(column, axis = 1) means to drop out a column.
So I am quite confused that when does axis = 0 means the rows and why does the second code not using axis = 0?