File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -4754,7 +4754,8 @@ def drop(
47544754 Parameters
47554755 ----------
47564756 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.
47584759 axis : {0 or 'index', 1 or 'columns'}, default 0
47594760 Whether to drop labels from the index (0 or 'index') or
47604761 columns (1 or 'columns').
@@ -4845,6 +4846,17 @@ def drop(
48454846 weight 1.0 0.8
48464847 length 0.3 0.2
48474848
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+
48484860 >>> df.drop(index='cow', columns='small')
48494861 big
48504862 lama speed 45.0
You can’t perform that action at this time.
0 commit comments