Python 時系列分析 1,000本ノック
– ノック31: 時系列データの平均値 –

Python 時系列分析 1,000本ノック– ノック31: 時系列データの平均値 –
次の Python コードの出力はどれでしょうか?

Python コード:

import pandas as pd

dates = pd.date_range(
    start='2023-01-01', 
    periods=90, 
    freq='D')
data = range(90)
df = pd.DataFrame(
    data, 
    index=dates, 
    columns=['A'])
print(df.resample('M').mean())

 

回答の選択肢:

(A) 3か月の月あたりの平均値
(B) 月ごとの平均値
(C) 昨年と今年の月平均値
(D) 各月の最初の日と最後の日の平均値

Python 時系列分析 1,000本ノック– ノック32: 時系列データの和 –

Screenshot

【月1 特定テーマ講座(10月)】
Python で学ぶ 明日からできる「欠損値処理」超入門

【開催日時】 全2回(土)2026/10/17,10/31(13:30〜18:00)
【受講形式】 当日Zoom( or 復習用に後日動画視聴)
【参加費用】 2万2千円(税込み)/人