I have a dataframe like this,
tidx = pd.date_range('2022-10-01', periods=10, freq='10D')
data_frame = pd.DataFrame(1, columns=['inventory'], index=tidx)
print(data_frame)
Output:
inventory
2022-10-01 1
2022-10-11 1
2022-10-21 1
2022-10-31 1
2022-11-10 1
2022-11-20 1
2022-11-30 1
2022-12-10 1
2022-12-20 1
2022-12-30 1
I want to find the sum from 23rd to the 23rd of each month. I couldn't find a way to pass the day number to resample method. Any help is really appreciated.