visulise all distrubtuion for dataframe code example

Example 1: distribution analysis pandas

#Create a new function:
def num_missing(x):
  return sum(x.isnull())

#Applying per column:
print "Missing values per column:"
print data.apply(num_missing, axis=0) #axis=0 defines that function is to be applied on each column

#Applying per row:
print "\nMissing values per row:"
print data.apply(num_missing, axis=1).head() #axis=1 defines that function is to be applied on each row

Example 2: distribution analysis pandas

#First we import scipy function to determine the mode
from scipy.stats import mode
mode(data['Gender'])