CommencezCommencez gratuitement

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".

Cette activité fait partie du cours

Introduction to Data Science in Python

Voir le cours

Instructions de l’exercice

  • Import the pandas module under the alias pd.
  • Load the CSV "credit_records.csv" into a DataFrame called credit_records.
  • Display the first five rows of credit_records using the .head() method.

Exercice interactif pratique

Essayez cet exercice en complétant ce code d’exemple.

# 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(____)
Modifier et exécuter le code