File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments