BUG: interpolate gives a TypeError on empty dataframes #35598
Labels
Algos
Non-arithmetic algos: value_counts, factorize, sorting, isin, clip, shift, diff
Bug
Missing-data
np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
Regression
Functionality that used to work in a prior pandas version
Milestone
Already fixed in #35543, making an issue for linking/discussion.
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
TypeError: Cannot interpolate with all object-dtype columns in the DataFrame. Try setting at least one column to a numeric dtype.
Problem description
This is a regression, 1.0.5 handles it fine.
The problem appeared due to checking
np.all(obj.dtypes == np.dtype(object))
since the all of an empty set is TrueExpected Output
Output of
pd.show_versions()
pandas : 1.1.0
The text was updated successfully, but these errors were encountered: