# Practice Problems¶

### Lecture 8¶

Answer each number in a separate cell

Rename this notebook with your last name and the lecture

ex. CychB_08
• Similar to the lecture:
• Read the file 'Datasets/seismicRecord/earthquake.txt'into a pandas DataFrame
• Change the units of the x-axis to time in minutes
• Make a plot of velocity against time
• Include a label for the x and y-axis.
• Plot the line red
• Use help() to learn about the matplotlib function title() then add this title: 'Earthquake observed at Pinyon Flat Observatory'
• Place the note at x = 4 and y = 170000
• Write the text'P-S delay interval'
• Color the text blue
• rotate the text so that it is vertical (hint: use rotation = 90)
2. Panda DataFrames

• Import the file 'Datasets/TravelTimeDelta/DeltaTime.txt' into a panda DataFrame
• Get acquainted with the DataFrame:
• print out the name of the columns
• print out the first few lines of the DataFrame
• print out the new column headers
• Convert the P wave arrival from minutes and seconds to decimal minutes. Add the P wave arrival, in decimal minutes, to the data frame
• Calculate the S wave arrival by:
1. Converting S-P to decimal minutes
2. Adding P in decimal minutes to S-P in decimal minutes