Q:

How to create a dataframe with 31 days in July

I want to create a df which includes every day in 2019 July that looks like this:
      datetime
0   2019-07-01 00:00:00
1   2019-07-02 00:00:00
2   2019-07-03 00:00:00
3   2019-07-04 00:00:00
... 

What is the best way to do it?

A:

IIUC
m = '2019-07'
period = pd.Period(m, freq='M')
df = pd.DataFrame()
df['Date'] = pd.date_range(start=period.start_time, end=period.end_time, freq='D')

