Skip to content

Commit 92139d6

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

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pandas/core/generic.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -6387,7 +6387,8 @@ 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 objects. Try setting"
6391+
"the index dtype to a numeric one.")
63916392

63926393
# create/use the index
63936394
if method == 'linear':

0 commit comments

Comments
 (0)