starting_code.py 400 B

123456789101112131415161718192021222324
  1. import pandas as pd
  2. from matplotlib import pyplot as plt
  3. plt.style.use('fivethirtyeight')
  4. ages = [18, 19, 21, 25, 26, 26, 30, 32, 38, 45, 55]
  5. # data = pd.read_csv('data.csv')
  6. # ids = data['Responder_id']
  7. # ages = data['Age']
  8. # median_age = 29
  9. # color = '#fc4f30'
  10. # plt.legend()
  11. plt.title('Ages of Respondents')
  12. plt.xlabel('Ages')
  13. plt.ylabel('Total Respondents')
  14. plt.tight_layout()
  15. plt.show()