I know how to count the number of unique values in pandas series (one column in pandas dataframe).
pandas.Series.value_counts
But how do I check if they are all unique? Should I just compare value_counts with its length?
IIUC, pd.Series.is_unique
pd.Series([1, 2, 3]).is_unique True
And
pd.Series([1, 2, 2]).is_unique False
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With