BUG: interpolate gives a TypeError on empty dataframes · Issue #35598 · pandas-dev/pandas (original) (raw)

Already fixed in #35543, making an issue for linking/discussion.


Note: Please read this guide detailing how to provide the necessary information for us to reproduce your bug.

Code Sample, a copy-pastable example

from pandas import DataFrame DataFrame().interpolate()

"Cannot interpolate with all object-dtype columns "

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 True

Expected Output

Output of pd.show_versions()

pandas : 1.1.0