axis = 0 or index is a row, there are single or multiple rows
axis = 1 or columns are columns, it is single or multiple columns
import numpy as np
import pandas as pd
b = pd.DataFrame(
np.arange(12).reshape(3, 4),
columns=['A', 'B', 'C', 'D'],
index=['a', 'b', 'c']
)
Delete a column
b = b.drop('A', axis=1)
Delete a row
b = b.drop('a', axis=0)
Find the mean of the ranks
c = b.mean(axis=0)
c = b.mean(axis=1)
axis=0 ->
axis=1 ->
axis=0, understood as getting the index of the row, only the row can be processed, the data in the row cannot be interacted