Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import numpy as np
- import pandas as pd
- import seaborn as sns
- import matplotlib.pyplot as plt
- df = pd.read_csv('C:/Users/eli/Desktop/application_record.csv')
- plt.figure(figsize=(12,5))
- bottom_half_income = df.nsmallest(n=int(0.5*len(df)),columns='AMT_INCOME_TOTAL')
- box_plot = sns.boxplot(x ='NAME_FAMILY_STATUS', y = 'AMT_INCOME_TOTAL', data = bottom_half_income, hue ='FLAG_OWN_REALTY', linewidth=3)
- plt.legend(bbox_to_anchor=(1.05, 1), loc=2, borderaxespad=0.,title='FLAG_OWN_REALTY')
- plt.title('Income Totals per Family Status for Bottom Half of Earners')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement