BUG: Missing keys using aggregation dictionary that are unsortable raise TypeError instead of SpecificationError #39025
Labels
Bug
Error Reporting
Incorrect or improved errors from pandas
Regression
Functionality that used to work in a prior pandas version
Resample
resample method
Milestone
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
(optional) I have confirmed this bug exists on the master branch of pandas.
Note: Please read this guide detailing how to provide the necessary information for us to reproduce your bug.
Code Sample, a copy-pastable example
code sample based on test_agg_consistency in pandas/tests/resample/test_resample_api.py
Problem description
with mypy 0.790
pandas/core/aggregation.py:741: error: Value of type variable "_LT" of "sorted" cannot be "Optional[Hashable]" [type-var]
Expected Output
pandas.core.base.SpecificationError: Column(s) [2, 'bar'] do not exist
Output of
pd.show_versions()
[paste the output of
pd.show_versions()
here leaving a blank line after the details tag]The text was updated successfully, but these errors were encountered: