Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Вивчайте That's All? | Preprocessing Data: Part II
Analyzing and Visualizing Real-World Data

bookThat's All?

So, seems like all the columns are fine now. Let's double-check if we have converted dates properly.

123456789101112131415
# Loading the library import pandas as pd # Reading the data df = pd.read_csv('https://codefinity-content-media.s3.eu-west-1.amazonaws.com/72be5dde-f3e6-4c40-8881-e1d97ae31287/shops_data3.csv') # Displaying first four dates before converting print(df['Date'].head(4)) # Change column type df['Date'] = pd.to_datetime(df['Date'], dayfirst = True) # Displaying first four dates and dtypes of dataframe print(df['Date'].head(4)) print(df.dtypes)
copy

Yes, this time everything seems to be fine. Dtypes of the dataframe are appropriate, so we are ready to make some analysis and visualizing!

Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 2. Розділ 6

Запитати АІ

expand

Запитати АІ

ChatGPT

Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат

Awesome!

Completion rate improved to 3.45

bookThat's All?

Свайпніть щоб показати меню

So, seems like all the columns are fine now. Let's double-check if we have converted dates properly.

123456789101112131415
# Loading the library import pandas as pd # Reading the data df = pd.read_csv('https://codefinity-content-media.s3.eu-west-1.amazonaws.com/72be5dde-f3e6-4c40-8881-e1d97ae31287/shops_data3.csv') # Displaying first four dates before converting print(df['Date'].head(4)) # Change column type df['Date'] = pd.to_datetime(df['Date'], dayfirst = True) # Displaying first four dates and dtypes of dataframe print(df['Date'].head(4)) print(df.dtypes)
copy

Yes, this time everything seems to be fine. Dtypes of the dataframe are appropriate, so we are ready to make some analysis and visualizing!

Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 2. Розділ 6
some-alt