I'm processing a file which has a date coulmn. I want to check that file contains records for the last month's all days.
That is, if I process the September file, I would like to know which contain rows for September 1st -September 30th. Check data of the previous month. Not for current month. How can I do this in Pandas?
def is_delivery_ready_to_process():
dateCols = ['Document Date']
data = pd.read_excel(os.path.join(file_path, f), parse_dates=dateCols,
dayfirst=True, sheet_name='Refined')
.....?