-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Labels
ApplyApply, Aggregate, Transform, MapApply, Aggregate, Transform, MapDataFrameDataFrame data structureDataFrame data structureError ReportingIncorrect or improved errors from pandasIncorrect or improved errors from pandasgood first issue
Description
Lines 735 to 745 in 3370c81
try: | |
result = super().agg() | |
except TypeError as err: | |
exc = TypeError( | |
"DataFrame constructor called with " | |
f"incompatible data and dtype: {err}" | |
) | |
raise exc from err | |
finally: | |
self.obj = obj | |
self.axis = axis |
We intercept any TypeError and reword the message to be about the DataFrame constructor. This likely made sense before, but with the code being refactored and #43741, TypeErrors can occur for many different reasons. We should just remove the except
block above.
jbrockmendel and yuvanist
Metadata
Metadata
Assignees
Labels
ApplyApply, Aggregate, Transform, MapApply, Aggregate, Transform, MapDataFrameDataFrame data structureDataFrame data structureError ReportingIncorrect or improved errors from pandasIncorrect or improved errors from pandasgood first issue