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]]:
1495
1495
1496
1496
Examples
1497
1497
--------
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
+ ... )
1501
1505
>>> df
1502
1506
species population
1503
1507
panda bear 1864
1504
1508
polar bear 22000
1505
1509
koala marsupial 80000
1506
1510
>>> 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 ")
1510
1513
label: species
1511
1514
content:
1512
1515
panda bear
You can’t perform that action at this time.
0 commit comments