#!/usr/bin/env python # coding: utf-8 # In[6]: import pandas as pd df = pd.read_csv("Meteorites.csv", thousands=",") df # How many meteorites were dated **1988**? # # In[9]: #all records from 1988 from1988 = df.loc[df.year == 1988] #how many? len(from1988) #all at once: len(df.loc[df.year == 1988]) # What is the meteorite with the most mass? # In[10]: df["mass (g)"].max() # What is the earliest recorded meteorite in the data? # In[12]: #find the first year firstYear = df.year.min() #find the names with that year df.loc[df.year == firstYear].name # What year had the most records in the data? # In[16]: #figure out the counts of all values, and get the largest df.year.value_counts().head(1) # In[19]: df.fall.value_counts().plot(kind="pie")