my Code is: token=256265 to_date=datetime.now() from_date=to_date-timedelta(days=20) interval="15minute" records=kite.historical_data(token, from_date, to_date, interval) df=pd.DataFrame(records) df.to_excel("Nifty15minute.xlsx")
I am getting message : "Excel does not support datetimes with " ValueError: Excel does not support datetimes with timezones. Please ensure that datetimes are timezone unaware before writing to Excel. How to resolve the matter please help.
You can go through this thread.
use this code
data['date'] = data['date'].dt.tz_localize(None)