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 9e3ad63 commit 127422fCopy full SHA for 127422f
pandas/core/groupby.py
@@ -1913,7 +1913,10 @@ def size(self):
1913
"""
1914
ids, _, ngroup = self.group_info
1915
ids = _ensure_platform_int(ids)
1916
- out = np.bincount(ids[ids != -1], minlength=ngroup or None)
+ if ngroup:
1917
+ out = np.bincount(ids[ids != -1], minlength=ngroup)
1918
+ else:
1919
+ out = ids
1920
return Series(out,
1921
index=self.result_index,
1922
dtype='int64')
pandas/io/sas/sas7bdat.py
@@ -596,6 +596,7 @@ def read(self, nrows=None):
596
nrows = self.row_count
597
598
if len(self.column_types) == 0:
599
+ self.close()
600
raise EmptyDataError("No columns to parse from file")
601
602
if self._current_row_in_file_index >= self.row_count:
0 commit comments