- I create the output folder inside the directory where the script is located
dirName = './output'
os.makedirs(dirName, exist_ok=True)
- I defined the name of the xlsx file that included the date:
from datetime import datetime
now = datetime.now()
datestr = now.strftime("%d%b%Y")
x = 'output_{}.xlsx'.format(datestr)
- This is the tricky part, since I cannot place x inside './output'
writer = pd.ExcelWriter(x, engine='xlsxwriter')
How can I create a path that includes the folder './output'
where the x object should be placed?