Practice Problems

Lecture 12

Answer each number in a separate cell

Rename this notebook with your last name and the lecture

ex. CychB_12

1. Locating Data

  • Use pandas to read in the dataset 'Datasets/EruptionData.csv'
  • Choose a volcano that has erupted at least 10 times in the Holocene.
  • Use .loc to find the 10 most explosive eruptions from this volcano.
  • Use plt.scatter( ) to plot the start dates of the eruptions against their VEI. Use red triangles as markers.

2. Sorting and Indexing

  • Sort the dataset by elevation
  • Re-index the dataset so that the indices go from 0 to the length of the dataset

3. grouping and describing

  • Use the methods .groupby() and .describe() to find the dominant rock type in each tectonic setting. What percentage of intraplate oceanic crustal volcanoes are basaltic?

  • Use these same methods to find the primary volcano type with the lowest average elevation. Why might this type of volcano have the lowest elevation?