image_output_1.png
import matplotlib.pyplot as plt

import matplotlib.pyplot as plt

import seaborn as sns

import seaborn as sns
sns.set()

(sns.get_dataset_names(), len(sns.get_dataset_names()))

healthexp = sns.load_dataset('healthexp')
healthexp

top_spending_countrys = healthexp[['Country', 'Life_Expectancy']]
top_spending_countrys

Spending_USD_by_year = healthexp.groupby('Year')['Spending_USD'].sum()
Spending_USD_by_year
plt.figure(figsize=(12, 6))
sns.lineplot(x=Spending_USD_by_year.index, y=Spending_USD_by_year.values, color='blue')
plt.title('Spending_USD_by_year')
plt.xlabel('Year')
plt.ylabel('Spending_USD')
plt.show()