data_range
を使うことで作成することができます。import pandas as pd
start_date = '2022-05-01'
end_date = '2022-05-31'
start_date = pd.to_datetime(start_date)
end_date = pd.to_datetime(end_date)
date_master = pd.date_range(start_date, end_date)
date_master
freq
のパラメータを使います。every_other_day = pd.date_range(start_date, end_date, freq='2D')
every_other_day
start_date = '2022-05-01'
の様にべた書きではなく、今日の日付から生成したい場合は以下です。import pandas as pd
import datetime
from dateutil.relativedelta import relativedelta
today = datetime.date.today()
#月初
beginning_of_the_month = today + relativedelta(day=1)
print(beginning_of_the_month)
#月末
end_of_month = today + relativedelta(months=+1,day=1,days=-1)
print(end_of_month)