Loading a DataFrame
We're still working hard to solve the kidnapping of Bayes, the Golden Retriever. Previously, we used a license plate spotted at the crime scene to narrow the list of suspects to:
- Fred Frequentist
- Ronald Aylmer Fisher
- Gertrude Cox
- Kirstine Smith
We've obtained credit card records for all four suspects. Perhaps some of them made suspicious purchases before the kidnapping?
The records are in a CSV called "credit_records.csv".
This exercise is part of the course
Introduction to Data Science in Python
Exercise instructions
- Import the
pandasmodule under the aliaspd. - Load the CSV
"credit_records.csv"into a DataFrame calledcredit_records. - Display the first five rows of
credit_recordsusing the.head()method.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Import pandas under the alias pd
____
# Load the CSV "credit_records.csv"
credit_records = ____
# Display the first five rows of credit_records using the .head() method
print(____)