1. Learn
  2. /
  3. Courses
  4. /
  5. Data Manipulation with pandas

Exercise

List of dictionaries

You recently got some new avocado data from 2019 that you'd like to put in a DataFrame using the list of dictionaries method. Remember that with this method, you go through the data row by row.

date small_sold large_sold
"2019-11-03" 10376832 7835071
"2019-11-10" 10717154 8561348

pandas as pd is imported.

Instructions

100 XP
  • Create a list of dictionaries with the new data called avocados_list.
  • Convert the list into a DataFrame called avocados_2019.
  • Print your new DataFrame.