1df.drop(df.index[-2])
2df.drop(df.index[[3, 4]])
3df.drop(['row_1', 'row_2'])
4df.drop('column_1', axis=1)
5df[df.name != 'cell']
1>>> df
2 A B C D
30 0 1 2 3
41 4 5 6 7
52 8 9 10 11
6
7Drop a row by index
8
9 df.drop([0, 1])
10 A B C D
11 2 8 9 10 11
12
13Drop columns
14
15 df.drop(columns=['B', 'C'])
16 A D
17 0 0 3
18 1 4 7
19 2 8 11