04pallav
9/11/2017 - 10:21 PM

Value count code for all columns

Value count code for all columns

def valcounts(x):
    print x.name
    print '-------------------------------------'
    print x.value_counts(dropna=False)
    print '-------------------------------------'
data.apply(valcounts, axis=0)

#### will give the count in each categorical variables
def valcounts(x):
    print x.name
    print '-------------------------------------'
    print x.value_counts(dropna=False).count()
    print '-------------------------------------'