BaşlayınÜcretsiz Başlayın

Loading a csv file in Pandas

The capital_onebike.csv file covers the October, November and December rides of the Capital Bikeshare bike W20529.

Here are the first two columns:

Start dateEnd date...
2017-10-01 15:23:252017-10-01 15:26:26...
2017-10-01 15:42:572017-10-01 17:49:59...

Bu egzersiz

Working with Dates and Times in Python

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • Import Pandas.
  • Complete the call to read_csv() so that it correctly parses the date columns Start date and End date.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Import pandas
import ____ as pd

# Load CSV into the rides variable
rides = pd.read_csv('capital-onebike.csv', 
                    parse_dates = ____)

# Print the initial (0th) row
print(rides.iloc[0])
Kodu Düzenle ve Çalıştır