import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
data = {'Division': ['Bundesliga', 'Bundesliga', 'EPL', 'EPL', 'League 1', 'Serie A', 'Serie A', 'League 1'],
'Home Corners': [5, 5, 7, 3, 10, 3, 8, 3],
'Away Corners ': [3, 5, 4, 2, 6, 3, 2, 1]}
df = pd.DataFrame(data)
# convert the data to a long format
df.set_index('Division', inplace=True)
dfl = df.stack().reset_index().rename(columns={'level_1': 'corners', 0: 'val'})
# plot
sns.boxplot('corners', 'val', data=dfl, hue='Division')
plt.legend(title='Division', bbox_to_anchor=(1.05, 1), loc='upper left')
введите описание изображения здесь