import pandas as pd
df= pd.read_csv("bank_marketing.csv")
df. head ()
output
Bar Chart:
import seaborn as sns
import matplotlib.pyplot as plt
sns.barplot (x='month' y= 'balance', data=df)
plt.show()
OUTPUT
Scatter plot :-
import seaborn as sns
import matplotlib.pyplot as plt
sns. scatterplot (x='age', y=' balance', hue='job', data=df)
plt. legend (b box_to_anchor=(1,1),loc=2)
plt.show()
OUTPUT
Boxplot :-
import seaborn as sns
import matplotlib.pyplot as plt
sns.boxplet (x=' age' y= 'loan', data=df)
plt.show()
Hictogram:
import seaborn as sns
import matplotlib.pyplot as pl
fig,axes = plt.subplots (2,2, figsize (10, 10))
axes [0,0]. set_title ("Age")
axes [0,0]. hist (df ['age'], bins = 7);
axes [0, 1].set_title("BALANCE");
axes [0, 1]. hist (df ['balance'], bins = 5);
axes [1,0].set_title ("housing")
axes [1,0].hist (df ['houting '], bins -6);
axes [1,1 ].set_title ("Day");
axes [1,1 ]. hist (df ['DAY'], bins = 6);