How to count a number of unique values in multiple columns in Python, pandas etc. I can do for one column using "nunique" function. I need something like:
print("Number of unique values in Var1", DF.var1.nunique(),sep="= ").
For all the variables in the dataset. Something like a loop or apply function maybe. I tried a lot of things failed to get what I desired.
Thanks for the help!