We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0d6cb3c commit da25b19Copy full SHA for da25b19
pandas/core/reshape/reshape.py
@@ -162,6 +162,8 @@ def _make_selectors(self):
162
self.full_shape = ngroups, stride
163
164
selector = self.sorted_labels[-1] + stride * comp_index + self.lift
165
+ if np.prod(self.full_shape) > (2 ** 31 - 1):
166
+ raise ValueError('Pivot table is too big, causing int32 overflow')
167
mask = np.zeros(np.prod(self.full_shape), dtype=bool)
168
mask.put(selector, True)
169
0 commit comments