Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lära Challenge | Becoming an Analyst
Introduction to Python for Data Analysis

book
Challenge

Uppgift

Swipe to start coding

  1. Import the pandas with the pd alias.
  2. Read the csv file.
  3. Show the first five rows of the df.

Lösning

# Import the pandas
import pandas as pd

# Read the file
df = pd.read_csv('https://codefinity-content-media.s3.eu-west-1.amazonaws.com/783d7288-e86b-4b89-9966-a2fe97995277/section_3_dataset_upd.csv')

# Show the first five fows of the df
print(df.head())

Var allt tydligt?

Hur kan vi förbättra det?

Tack för dina kommentarer!

Avsnitt 4. Kapitel 3
# Import the pandas
import ___

# Read the file
df = ___.___('https://codefinity-content-media.s3.eu-west-1.amazonaws.com/783d7288-e86b-4b89-9966-a2fe97995277/section_3_dataset_upd.csv')

# Show the first five fows of the df
___(___)

Fråga AI

expand
ChatGPT

Fråga vad du vill eller prova någon av de föreslagna frågorna för att starta vårt samtal

some-alt