image_output_1.png
import matplotlib.pyplot as plt

import pandas as pd

import seaborn as sns

df = pd.read_csv('../input/bank-additional-full.csv', sep=';', decimal='.', header=0, names=['age', 'job', 'marital', 'education', 'default', 'housing', 'loan', 'contact', 'month', 'day_of_week', 'duration', 'campaign', 'pdays', 'previous', 'poutcome', 'emp.var.rate', 'cons.price.idx', 'cons.conf.idx', 'euribor3m', 'nr.employed', 'target'])

labels_house = ['yes', 'no', 'unknown']
sizes_house = [2175, 1839, 105]
colors_house = ['#ff6666', '#ffcc99', '#ffb3e6']
labels_loan = ['yes', 'no', 'unknown']
sizes_loan = [665, 3349, 105]
colors_loan = ['#c2c2f0', '#ffb3e6', '#66b3ff']
labels_contact = ['cellular', 'telephone']
sizes_contact = [2652, 1467]
colors_contact = ['#ff9999', '#ffcc99']
labels_default = ['no', 'unknown', 'yes']
sizes_default = [3523, 454, 142]
colors_default = ['#99ff99', '#66b3ff', '#ff6666']
plt.rcParams.update({'font.size': 15})
centre_circle = plt.Circle((0, 0), 0.5, color='black', fc='white', linewidth=0)
fig = plt.gcf()
fig.gca().add_artist(centre_circle)
centre_circle = plt.Circle((0, 0), 0.5, color='black', fc='white', linewidth=0)
fig = plt.gcf()
fig.gca().add_artist(centre_circle)
centre_circle = plt.Circle((0, 0), 0.5, color='black', fc='white', linewidth=0)
fig = plt.gcf()
fig.gca().add_artist(centre_circle)
centre_circle = plt.Circle((0, 0), 0.5, color='black', fc='white', linewidth=0)
fig = plt.gcf()
fig.gca().add_artist(centre_circle)

ldf = df[df.default == 'yes']

g = sns.catplot(x='duration', y='target', row='poutcome', kind='box', orient='h', height=2.5, aspect=5, data=df)