Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
学ぶ What Holidays are we Considering? | Analyzing Data
Analyzing and Visualizing Real-World Data

bookWhat Holidays are we Considering?

メニューを表示するにはスワイプしてください

Interesting! We can see that the median revenue for weeks with holidays is greater than for weeks without holidays. Let's find out which holidays are included in the dataset and summarize this information in a table.

123456789
# 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') df['Date'] = pd.to_datetime(df['Date'], dayfirst = True) # Filtering to only weeks with holiday print(df.loc[df['Holiday_Flag'] == 1]['Date'].unique())
copy

So, what holidays do we have? Let's summarize this information in the table.

Dates (in the dataframe)Holiday
2010-02-12, 2011-02-11, 2012-02-10Super Bowl
2010-09-10, 2011-09-09, 2012-09-07Labor Day
2010-11-26, 2011-11-25Thanksgiving
2010-12-31, 2011-12-30Christmas

Additionally, according to the result obtained in the previous chapter, we should include one week before Christmas, too.

Dates (in the dataframe)Holiday
2010-12-24, 2011-12-23'Pre-Christmas'

すべて明確でしたか?

どのように改善できますか?

フィードバックありがとうございます!

セクション 3.  8

AIに質問する

expand

AIに質問する

ChatGPT

何でも質問するか、提案された質問の1つを試してチャットを始めてください

セクション 3.  8
some-alt