Skip to content
This repository was archived by the owner on Feb 23, 2023. It is now read-only.

Commit d4b9b26

Browse files
committed
Fix groupby-resample KeyError by adding None check.
1 parent 3a20b0e commit d4b9b26

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/core/resample.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1238,7 +1238,7 @@ def _gotitem(self, key, ndim, subset=None):
12381238

12391239
# Try to select from a DataFrame, falling back to a Series
12401240
try:
1241-
if isinstance(key, list) and self.key not in key:
1241+
if isinstance(key, list) and self.key not in key and self.key is not None:
12421242
key.append(self.key)
12431243
groupby = self._groupby[key]
12441244
except IndexError:

0 commit comments

Comments
 (0)