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

Add method field to fillna for fixed width columns #6998

Merged
merged 7 commits into from
Dec 17, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Review: use super in string.py
  • Loading branch information
isVoid committed Dec 15, 2020
commit e46ec08f67cc683520b015d91421c68d908e5456
4 changes: 2 additions & 2 deletions python/cudf/cudf/core/column/column.py
Original file line number Diff line number Diff line change
Expand Up @@ -750,13 +750,13 @@ def __setitem__(self, key, value):

self._mimic_inplace(out, inplace=True)

def fillna(self, value=None, method=None):
def fillna(self, value=None, method=None, dtype=None):
"""Fill null values with ``value``.

Returns a copy with null filled.
"""
return libcudf.replace.replace_nulls(
input_col=self, replacement=value, method=method
input_col=self, replacement=value, method=method, dtype=dtype
)

def isnull(self):
Expand Down
2 changes: 1 addition & 1 deletion python/cudf/cudf/core/column/string.py
Original file line number Diff line number Diff line change
Expand Up @@ -4933,7 +4933,7 @@ def fillna(self, fill_value, method=None):
)
if not is_scalar(fill_value):
fill_value = column.as_column(fill_value, dtype=self.dtype)
return libcudf.replace.replace_nulls(self, fill_value, dtype="object")
return super().fillna(value=fill_value, dtype="object")

def _find_first_and_last(self, value):
found_indices = self.str().contains(f"^{value}$")
Expand Down