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)

df.nunique()



Output



Click to Enlarge


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

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250