Skip to content

Commit 2b37609

Browse files
authored
DOC: filter method example is more clear (#32690)
1 parent 059f9bf commit 2b37609

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pandas/core/generic.py

+4
Original file line numberDiff line numberDiff line change
@@ -4558,6 +4558,10 @@ def filter(
45584558
>>> df = pd.DataFrame(np.array(([1, 2, 3], [4, 5, 6])),
45594559
... index=['mouse', 'rabbit'],
45604560
... columns=['one', 'two', 'three'])
4561+
>>> df
4562+
one two three
4563+
mouse 1 2 3
4564+
rabbit 4 5 6
45614565
45624566
>>> # select columns by name
45634567
>>> df.filter(items=['one', 'three'])

0 commit comments

Comments
 (0)