Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
BUG in remove_unused_categories with NaNs in values #11599
Comments
jorisvandenbossche
added Bug Categorical
labels
Nov 13, 2015
jorisvandenbossche
added this to the
0.17.1
milestone
Nov 13, 2015
jreback
modified the milestone: Next Major Release, 0.17.1
Nov 13, 2015
jorisvandenbossche
referenced
this issue
Nov 18, 2015
Merged
BUG: remove_unused_categories with NaN values (GH11599) #11639
jreback
modified the milestone: 0.17.1, Next Major Release
Nov 18, 2015
jorisvandenbossche
closed this
in #11639
Nov 18, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
jorisvandenbossche commentedNov 13, 2015
From SO: http://stackoverflow.com/questions/33693601/removing-unused-categories-in-series-results-in-duplicated-categories
removed_unused_categoriesgives a wrong result when there is a NaN in the values:I think the
-1in the codes (NaN) duplicates the last item in the categories