We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
something like
def dist(x): return len(np.unique(x))
The text was updated successfully, but these errors were encountered:
len(np.unique(self.dropna())) ?
with a Cython distinct_count_level_1d function?
Sorry, something went wrong.
Maybe this should just be a groupby instance methods-- like Series now has the value_counts method so you can do:
value_counts
len(s.value_counts())
but in a groupby scenario, you could do:
s.groupby(grouper).agg(lambda x: len(x.value_counts()))
but that's a bit verbose. Maybe like
s.groupby(grouper).nunique()
ENH: add nunique function to count unique elements, GH #297
a1f7e5b
No branches or pull requests
something like
The text was updated successfully, but these errors were encountered: