Skip to content

Commit a823f21

Browse files
DOC: fix EX03 errors in docstrings -pandas.DataFrame for idxmax, idxmin, pivot (#56830)
1 parent 600e06a commit a823f21

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

pandas/core/frame.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -9223,11 +9223,11 @@ def groupby(
92239223
You could also assign a list of column names or a list of index names.
92249224
92259225
>>> df = pd.DataFrame({
9226-
... "lev1": [1, 1, 1, 2, 2, 2],
9227-
... "lev2": [1, 1, 2, 1, 1, 2],
9228-
... "lev3": [1, 2, 1, 2, 1, 2],
9229-
... "lev4": [1, 2, 3, 4, 5, 6],
9230-
... "values": [0, 1, 2, 3, 4, 5]})
9226+
... "lev1": [1, 1, 1, 2, 2, 2],
9227+
... "lev2": [1, 1, 2, 1, 1, 2],
9228+
... "lev3": [1, 2, 1, 2, 1, 2],
9229+
... "lev4": [1, 2, 3, 4, 5, 6],
9230+
... "values": [0, 1, 2, 3, 4, 5]})
92319231
>>> df
92329232
lev1 lev2 lev3 lev4 values
92339233
0 1 1 1 1 0

pandas/core/shared_docs.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -839,7 +839,7 @@
839839
Consider a dataset containing food consumption in Argentina.
840840
841841
>>> df = pd.DataFrame({{'consumption': [10.51, 103.11, 55.48],
842-
... 'co2_emissions': [37.2, 19.66, 1712]}},
842+
... 'co2_emissions': [37.2, 19.66, 1712]}},
843843
... index=['Pork', 'Wheat Products', 'Beef'])
844844
845845
>>> df
@@ -904,7 +904,7 @@
904904
Consider a dataset containing food consumption in Argentina.
905905
906906
>>> df = pd.DataFrame({{'consumption': [10.51, 103.11, 55.48],
907-
... 'co2_emissions': [37.2, 19.66, 1712]}},
907+
... 'co2_emissions': [37.2, 19.66, 1712]}},
908908
... index=['Pork', 'Wheat Products', 'Beef'])
909909
910910
>>> df

0 commit comments

Comments
 (0)