indexがdatetime型にしてDataFrameを作成する まずは、下記のように、indexがdatetime型にしてDataFrameを作成します。 参考:pandas.read_csv()のindex_colの指定とparse_dates=Trueで、インデックスの列をdatetime型に変換 DataFrame = pd.read_csv('in.txt', names=('Date', 'Value'), index_col='Date', parse_dates=True) DataFrame[DataFrame.index.month == 月(数字) の形式で、特定の月の行を抽出します DataFrame[DataFrame.index.month == 月(数字) の形式で、特定の月の行を抽出します。 monthには、数字で月を指定できます。 例えば、1月の行を抽出し