image_output_1.png
import matplotlib.pyplot as plt

import pandas as pd

import seaborn as sns

df = pd.read_csv('/kaggle/input/dataviz-facens-20182-ex3/BlackFriday.csv', delimiter=',')

fig, ax = plt.subplots(figsize=(18, 9))
plt.title('Valor Gasto por Faixa Etária', fontsize=14, fontweight='bold')
frame = plt.gca()
frame.spines['right'].set_visible(False)
frame.spines['top'].set_visible(False)
sns.violinplot(ax=ax, x='Age', y='Purchase', data=df[['Age', 'Purchase']].sort_values(by=['Age']), palette='RdBu_r')