Skip to content

Commit 1c660f8

Browse files
committed
pandas deprecation related to categories
1 parent 5df90f8 commit 1c660f8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

dabest/_dabest_object.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -663,9 +663,9 @@ def _get_plot_data(self, x, y, all_plot_groups):
663663

664664

665665
if isinstance(plot_data[self.__xvar].dtype, pd.CategoricalDtype):
666-
plot_data[self.__xvar].cat.remove_unused_categories(inplace=True)
666+
plot_data[self.__xvar].cat.remove_unused_categories()
667667
plot_data[self.__xvar].cat.reorder_categories(
668-
all_plot_groups, ordered=True, inplace=True
668+
all_plot_groups, ordered=True
669669
)
670670
else:
671671
plot_data[self.__xvar] = pd.Categorical(

nbs/API/dabest_object.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -731,9 +731,9 @@
731731
"\n",
732732
"\n",
733733
" if isinstance(plot_data[self.__xvar].dtype, pd.CategoricalDtype):\n",
734-
" plot_data[self.__xvar].cat.remove_unused_categories(inplace=True)\n",
734+
" plot_data[self.__xvar].cat.remove_unused_categories()\n",
735735
" plot_data[self.__xvar].cat.reorder_categories(\n",
736-
" all_plot_groups, ordered=True, inplace=True\n",
736+
" all_plot_groups, ordered=True\n",
737737
" )\n",
738738
" else:\n",
739739
" plot_data[self.__xvar] = pd.Categorical(\n",

0 commit comments

Comments
 (0)