import matplotlib
%matplotlib inline
import seaborn as sns
Let's see how data is distributed as per 'hours-per-week'
adult_data['hours-per-week'].plot.hist(bins=5)
Let's check the same for age, but with seaborn library
sns.distplot(adult_data['age'], kde=True)
Let's see the same for 'marital-status' which is categorical variable
adult_data['marital-status'].value_counts().plot( kind='bar')
Contingency Table - Let's check how data is ditributed among 'workclass' and 'marital-status' columns
pd.crosstab(index= adult_data['workclass'], columns= adult_data['marital-status'])
Scatter Plot
adult_data.plot.scatter(x='age', y='hours-per-week')
It does give us information here that these 2 variables are not related with each other but sometimes when they are related it will give us the info if they are proporatinal or inversaly proportional.
And then again chi square(categorical variables) or correlation(numeric variables) can be used to find relationship between two variables