<jupyter_start><jupyter_text>1.Show the summary statistics of all numerical variables.<jupyter_code>data.describe()<jupyter_output><empty_output><jupyter_text>2.Identify categorical and continuous variables. Category Variable:1.	Work class2.	Marital-status3.	Occupation4.	Relationship5.	Race6.	Gender7.	Native-countryContinuous Variable:1.	Age2.	Final weight3.	Education-number4.	Capital-gain5.	Capital-loss6.	Hours-per-week7.	income<jupyter_code>data.hist(figsize=(10,8))<jupyter_output><empty_output><jupyter_text>3.For each categorical variable, print frequency and relative frequency tables.4.Draw bar plots for each categorical variable.<jupyter_code>Table_workclass = data['workclass'].value_counts()
Table_workclass.plot(kind='barh')
Table_workclass
Table_workclass = data['workclass'].value_counts()/len(data['workclass'])
Table_workclass
Table_maritalstatus = data['marital-status'].value_counts()
Table_maritalstatus.plot(kind='barh')
Table_maritalstatus
Table_maritalstatus= data['marital-status'].value_counts()/len(data['marital-status'])
Table_maritalstatus
Table_occupation = data['occupation'].value_counts()
Table_occupation.plot(kind='barh')
Table_occupation 
Table_occupation = data['occupation'].value_counts()/len(data['occupation'])
Table_occupation 
Table_relationship = data['relationship'].value_counts()
Table_relationship.plot(kind='barh')
Table_relationship 
Table_relationship = data['relationship'].value_counts()/len(data['relationship'])
Table_relationship
Table_race = data['race'].value_counts()
Table_race.plot(kind='barh')
Table_race
Table_race = data['race'].value_counts()/len(data['race'])
Table_race
Table_gender = data['gender'].value_counts()
Table_gender.plot(kind='barh')
Table_gender 
Table_gender = data['gender'].value_counts()/len(data['gender'])
Table_gender
Table_nativecountry = data['native-country'].value_counts()
Table_nativecountry.plot(kind='bar')
Table_nativecountry
Table_nativecountry = data['native-country'].value_counts()/len(data['native-country'])
Table_nativecountry<jupyter_output><empty_output><jupyter_text>5.For each continuous variable, draw histograms and distribution plots.<jupyter_code>sns.distplot(data['age'])
sns.distplot(data['fnlwgt'])
sns.distplot(data['educational-num'])
sns.distplot(data['capital-gain'])
sns.distplot(data['capital-loss'])
sns.distplot(data['hours-per-week'])
sns.distplot(data['income'])<jupyter_output><empty_output><jupyter_text>6.Draw pairwise scatterplots for continuous variables. Explain any discernable patterns?<jupyter_code>sns.pairplot(data)<jupyter_output><empty_output><jupyter_text>1. Weight and work hours are decreasing as the term of age increasing.2. Slender people(the value of fnlwgt is lower than 10000000) seems more interested in investment.3. The level of education looked unrelated to the work hours and income.4. The amount of people who have capital gain is less than the number of people who have a capital loss. 7.Draw a heatm ap for the correlations among all variables. What do you observe?<jupyter_code>corr = data.corr()
heat = sns.heatmap(corr)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12383403023480219, 'fraction_numerical': 0.011579285944033452, 'mean_word_length': 9.19672131147541, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 1, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '6', 'dir': 'jupyter-structured-clean-dedup', 'id': '548158', 'license': 'MIT', 'n_tokens_mistral': 1044, 'n_tokens_neox': 986, 'n_words': 192, 'path': 'Exploratory_Data_Analysis/US_adult.ipynb', 'repo_name': 'yanchen0615/machine-learning', 'size': '3109'}