Skip to content

Commit 031ac50

Browse files
committed
STY: Apply ruff formatting to DataFrame.items docstring
1 parent 7749d9b commit 031ac50

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

pandas/core/frame.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1495,18 +1495,21 @@ def items(self) -> Iterable[tuple[Hashable, Series]]:
14951495
14961496
Examples
14971497
--------
1498-
>>> df = pd.DataFrame({'species': ['bear', 'bear', 'marsupial'],
1499-
... 'population': [1864, 22000, 80000]},
1500-
... index=['panda', 'polar', 'koala'])
1498+
>>> df = pd.DataFrame(
1499+
... {
1500+
... "species": ["bear", "bear", "marsupial"],
1501+
... "population": [1864, 22000, 80000],
1502+
... },
1503+
... index=["panda", "polar", "koala"],
1504+
... )
15011505
>>> df
15021506
species population
15031507
panda bear 1864
15041508
polar bear 22000
15051509
koala marsupial 80000
15061510
>>> for label, content in df.items():
1507-
... print(f'label: {label}')
1508-
... print(f'content: {content}', sep='\n')
1509-
...
1511+
... print(f"label: {label}")
1512+
... print(f"content: {content}", sep="\n")
15101513
label: species
15111514
content:
15121515
panda bear

0 commit comments

Comments
 (0)