Skip to content

CLN: remove obsolete code in Categorical.fillna #19880

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

Merged
merged 7 commits into from
Mar 15, 2018
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ dist
.coverage
coverage.xml
coverage_html_report
*.pytest_cache

# OS generated files #
######################
Expand Down Expand Up @@ -90,7 +91,6 @@ scikits

# Unit / Performance Testing #
##############################
.pytest_cache/
asv_bench/env/
asv_bench/html/
asv_bench/results/
Expand Down
8 changes: 0 additions & 8 deletions pandas/core/arrays/categorical.py
Original file line number Diff line number Diff line change
Expand Up @@ -1627,14 +1627,6 @@ def fillna(self, value=None, method=None, limit=None):

values = self._codes

# Make sure that we also get NA in categories
if self.categories.dtype.kind in ['S', 'O', 'f']:
if np.nan in self.categories:
values = values.copy()
nan_pos = np.where(isna(self.categories))[0]
# we only have one NA in categories
values[values == nan_pos] = -1

# pad / bfill
if method is not None:

Expand Down