Skip to content

Instantly share code, notes, and snippets.

View Davisy's full-sized avatar
🎯
Focusing

Davis David Davisy

🎯
Focusing
View GitHub Profile
# Explore Location distribution
sns.catplot(x="location_type", kind="count", data=data)
# Explore Years distribution
sns.catplot(x="year", kind="count", data=data)
# Explore cellphone_access distribution
sns.catplot(x="cellphone_access", kind="count", data=data)
# Explore gender_of_respondents distribution
sns.catplot(x="gender_of_respondent", kind="count", data=data)
# Explore relationship_with_head distribution
sns.catplot(x="relationship_with_head", kind="count", data=data);
plt.xticks(
rotation=45,
horizontalalignment='right',
fontweight='light',
fontsize='x-large'
)
# Explore marital_status distribution
sns.catplot(x="marital_status", kind="count", data=data);
plt.xticks(
rotation=45,
horizontalalignment='right',
fontweight='light',
fontsize='x-large'
)
# Explore education_level distribution
sns.catplot(x="education_level", kind="count", data=data);
plt.xticks(
rotation=45,
horizontalalignment='right',
fontweight='light',
fontsize='x-large'
)
# Explore job_type distribution
sns.catplot(x="job_type", kind="count", data=data);
plt.xticks(
rotation=45,
horizontalalignment='right',
fontweight='light',
# Explore household_size distribution
plt.figure(figsize=(16, 6))
data.household_size.hist()
plt.xlabel('Household size')
# Explore age_of_respondent distribution
plt.figure(figsize=(16, 6))
data.age_of_respondent.hist()
plt.xlabel('Age of Respondent')