We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ee141ca commit 37b4094Copy full SHA for 37b4094
pandas/core/groupby/grouper.py
@@ -502,6 +502,7 @@ def __init__(
502
503
if observed is None:
504
warnings.warn(_observed_msg, FutureWarning, stacklevel=5)
505
+ observed = False
506
507
self.grouper, self.all_grouper = recode_for_groupby(
508
self.grouper, self.sort, observed
pandas/core/series.py
@@ -1723,7 +1723,7 @@ def groupby(
1723
sort: bool = True,
1724
group_keys: bool = True,
1725
squeeze: bool = no_default,
1726
- observed: bool = False,
+ observed: Optional[bool] = None,
1727
dropna: bool = True,
1728
) -> "SeriesGroupBy":
1729
from pandas.core.groupby.generic import SeriesGroupBy
0 commit comments