Skip to content

Commit 9af119e

Browse files
author
Pamela Wu
committed
CLN GH22985 Fixed interpolation with object error message
1 parent ce1f81f commit 9af119e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pandas/core/generic.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -6387,7 +6387,9 @@ def interpolate(self, method='linear', axis=0, limit=None, inplace=False,
63876387

63886388
if _maybe_transposed_self._data.get_dtype_counts().get(
63896389
'object') == len(_maybe_transposed_self.T):
6390-
raise TypeError("Cannot interpolate with all NaNs.")
6390+
raise TypeError("Cannot interpolate with all object-dtype columns "
6391+
"in the DataFrame. Try setting at least one "
6392+
"column to a numeric dtype.")
63916393

63926394
# create/use the index
63936395
if method == 'linear':

0 commit comments

Comments
 (0)