Skip to content

Commit 78a014c

Browse files
committed
BUG: Include "dropna" in Grouper._attributes
and move dropna up out of the "generated" attribute section into the "source" attribute section
1 parent b1e295f commit 78a014c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pandas/core/groupby/grouper.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ class Grouper:
263263
_gpr_index: Index | None
264264
_grouper: Index | None
265265

266-
_attributes: tuple[str, ...] = ("key", "level", "freq", "axis", "sort")
266+
_attributes: tuple[str, ...] = ("key", "level", "freq", "axis", "sort", "dropna")
267267

268268
def __new__(cls, *args, **kwargs):
269269
if kwargs.get("freq") is not None:
@@ -287,6 +287,7 @@ def __init__(
287287
self.freq = freq
288288
self.axis = axis
289289
self.sort = sort
290+
self.dropna = dropna
290291

291292
self.grouper = None
292293
self._gpr_index = None
@@ -295,7 +296,6 @@ def __init__(
295296
self.binner = None
296297
self._grouper = None
297298
self._indexer = None
298-
self.dropna = dropna
299299

300300
@final
301301
@property

0 commit comments

Comments
 (0)