Skip to content

Commit 1ad2821

Browse files
authored
DOC: avoid overriding Python built-in functions (#47631)
avoid overriding Python built-in functions
1 parent 3adfcff commit 1ad2821

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

doc/source/user_guide/groupby.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -839,10 +839,10 @@ Alternatively, the built-in methods could be used to produce the same outputs.
839839

840840
.. ipython:: python
841841
842-
max = ts.groupby(lambda x: x.year).transform("max")
843-
min = ts.groupby(lambda x: x.year).transform("min")
842+
max_ts = ts.groupby(lambda x: x.year).transform("max")
843+
min_ts = ts.groupby(lambda x: x.year).transform("min")
844844
845-
max - min
845+
max_ts - min_ts
846846
847847
Another common data transform is to replace missing data with the group mean.
848848

0 commit comments

Comments
 (0)