Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion pandas/core/missing.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,10 @@ def clean_fill_method(method, allow_nearest: bool = False):
valid_methods.append("nearest")
expecting = "pad (ffill), backfill (bfill) or nearest"
if method not in valid_methods:
raise ValueError(f"Invalid fill method. Expecting {expecting}. Got {method}")
raise ValueError(
f"Invalid fill method. Expecting {expecting}. Got {method}."
" Are you trying to interpolate an integer column?"
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This error seems like something which might occur more commonly in non-masked cases (from something like a typo) - maybe this is too specific (there are also other nullable types like Float which could end up here)

return method


Expand Down