Articles → Pandas → Nunique Function In Dataframe In Pandas

Nunique Function In Dataframe In Pandas






Purpose





Example


import pandas as pd
import numpy as np

list = [[1,2,3], [1,np.nan,6], [7, np.nan,9]]

df = pd.DataFrame(list)

print(df.nunique())



Output


Picture showing the output of the nunique function in dataframe in pandas
Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Tuesday, May 7, 2019

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250