Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLN: remove redundant clean_fill_method calls #19947

Merged
Merged
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
4 changes: 1 addition & 3 deletions pandas/core/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -4711,7 +4711,7 @@ def fillna(self, value=None, method=None, axis=None, inplace=False,
if axis is None:
axis = 0
axis = self._get_axis_number(axis)
method = missing.clean_fill_method(method)

from pandas import DataFrame
if value is None:

Expand All @@ -4732,7 +4732,6 @@ def fillna(self, value=None, method=None, axis=None, inplace=False,

# 3d
elif self.ndim == 3:

# fill in 2d chunks
result = {col: s.fillna(method=method, value=value)
for col, s in self.iteritems()}
Expand All @@ -4742,7 +4741,6 @@ def fillna(self, value=None, method=None, axis=None, inplace=False,

else:
# 2d or less
method = missing.clean_fill_method(method)
new_data = self._data.interpolate(method=method, axis=axis,
limit=limit, inplace=inplace,
coerce=True,
Expand Down