Skip to content

Commit b488a9c

Browse files
committed
COMPAT: remove deprecation warnings for numpy 1.14
COMPAT: sas7bdat warning of unclosed file with 0 rows
1 parent 5e553ce commit b488a9c

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

pandas/core/groupby.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1913,7 +1913,7 @@ def size(self):
19131913
"""
19141914
ids, _, ngroup = self.group_info
19151915
ids = _ensure_platform_int(ids)
1916-
out = np.bincount(ids[ids != -1], minlength=ngroup or None)
1916+
out = np.bincount(ids[ids != -1], minlength=ngroup)
19171917
return Series(out,
19181918
index=self.result_index,
19191919
dtype='int64')

pandas/io/sas/sas7bdat.py

+1
Original file line numberDiff line numberDiff line change
@@ -596,6 +596,7 @@ def read(self, nrows=None):
596596
nrows = self.row_count
597597

598598
if len(self.column_types) == 0:
599+
self.close()
599600
raise EmptyDataError("No columns to parse from file")
600601

601602
if self._current_row_in_file_index >= self.row_count:

0 commit comments

Comments
 (0)