Skip to content

Commit 9928acd

Browse files
author
Sean Sullivan
committed
Dataframe series removed inplace option for remove_unused_categories
1 parent 712a0e0 commit 9928acd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

elastic_datashader/pandas_util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def simplify_categories(
4848
df = df.copy()
4949
df[col] = df[col].map(color_key)
5050
df[col] = df[col].astype("category")
51-
df[col].cat.remove_unused_categories(inplace=True)
51+
df[col] = df[col].cat.remove_unused_categories()
5252
# at this point, categories and colors are the same thing
5353
# return a new color key that can be passed to shade()
5454
new_color_key = {x: x for x in df[col].cat.categories}

0 commit comments

Comments
 (0)