Varun

Pandas : Get unique values in columns of a Dataframe in Python

In this article we will discuss how to find unique elements in a single, multiple or each column of a dataframe. Series.unique() It returns the a numpy array of unique elements in series object. Series.unique(self) Series.nunique() Series.nunique(self, dropna=True) It returns the count of unique elements in the series object. DataFrame.nunique(self, axis=0, dropna=True) It returns the

Pandas : Get unique values in columns of a Dataframe in Python Read More »

Scroll to Top