Skip to content

Commit

Permalink
DOC: fix EX03 errors in docstrings -pandas.DataFrame for idxmax, idxm…
Browse files Browse the repository at this point in the history
…in, pivot (#56830)
  • Loading branch information
jordan-d-murphy authored Jan 11, 2024
1 parent 600e06a commit a823f21
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -9223,11 +9223,11 @@ def groupby(
You could also assign a list of column names or a list of index names.
>>> df = pd.DataFrame({
... "lev1": [1, 1, 1, 2, 2, 2],
... "lev2": [1, 1, 2, 1, 1, 2],
... "lev3": [1, 2, 1, 2, 1, 2],
... "lev4": [1, 2, 3, 4, 5, 6],
... "values": [0, 1, 2, 3, 4, 5]})
... "lev1": [1, 1, 1, 2, 2, 2],
... "lev2": [1, 1, 2, 1, 1, 2],
... "lev3": [1, 2, 1, 2, 1, 2],
... "lev4": [1, 2, 3, 4, 5, 6],
... "values": [0, 1, 2, 3, 4, 5]})
>>> df
lev1 lev2 lev3 lev4 values
0 1 1 1 1 0
Expand Down
4 changes: 2 additions & 2 deletions pandas/core/shared_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,7 @@
Consider a dataset containing food consumption in Argentina.
>>> df = pd.DataFrame({{'consumption': [10.51, 103.11, 55.48],
... 'co2_emissions': [37.2, 19.66, 1712]}},
... 'co2_emissions': [37.2, 19.66, 1712]}},
... index=['Pork', 'Wheat Products', 'Beef'])
>>> df
Expand Down Expand Up @@ -904,7 +904,7 @@
Consider a dataset containing food consumption in Argentina.
>>> df = pd.DataFrame({{'consumption': [10.51, 103.11, 55.48],
... 'co2_emissions': [37.2, 19.66, 1712]}},
... 'co2_emissions': [37.2, 19.66, 1712]}},
... index=['Pork', 'Wheat Products', 'Beef'])
>>> df
Expand Down

0 comments on commit a823f21

Please sign in to comment.