Skip to content

Commit 24c0028

Browse files
jbrockmendelSeeminSyed
authored andcommitted
CLN: to_dense->np.asarray (pandas-dev#32545)
1 parent bb707dd commit 24c0028

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pandas/core/arrays/categorical.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1728,7 +1728,8 @@ def fillna(self, value=None, method=None, limit=None):
17281728
# pad / bfill
17291729
if method is not None:
17301730

1731-
values = self.to_dense().reshape(-1, len(self))
1731+
# TODO: dispatch when self.categories is EA-dtype
1732+
values = np.asarray(self).reshape(-1, len(self))
17321733
values = interpolate_2d(values, method, 0, None, value).astype(
17331734
self.categories.dtype
17341735
)[0]

0 commit comments

Comments
 (0)