File tree 1 file changed +13
-1
lines changed
1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -4754,7 +4754,8 @@ def drop(
4754
4754
Parameters
4755
4755
----------
4756
4756
labels : single label or list-like
4757
- Index or column labels to drop.
4757
+ Index or column labels to drop. A tuple will be used as a single
4758
+ label and not treated as a list-like.
4758
4759
axis : {0 or 'index', 1 or 'columns'}, default 0
4759
4760
Whether to drop labels from the index (0 or 'index') or
4760
4761
columns (1 or 'columns').
@@ -4845,6 +4846,17 @@ def drop(
4845
4846
weight 1.0 0.8
4846
4847
length 0.3 0.2
4847
4848
4849
+ >>> df.drop(index=('falcon', 'weight'))
4850
+ big small
4851
+ lama speed 45.0 30.0
4852
+ weight 200.0 100.0
4853
+ length 1.5 1.0
4854
+ cow speed 30.0 20.0
4855
+ weight 250.0 150.0
4856
+ length 1.5 0.8
4857
+ falcon speed 320.0 250.0
4858
+ length 0.3 0.2
4859
+
4848
4860
>>> df.drop(index='cow', columns='small')
4849
4861
big
4850
4862
lama speed 45.0
You can’t perform that action at this time.
0 commit comments