Not able to convert 1 min data into 2 min data for Zerodha

chart1 = tsl.get_short_length_hist_data(name=stock_name, exchange="NSE", interval="minute", oi=False)
            print(chart1)

            if chart1 is None or chart1.empty:
                print("historical data is None or empty--- Skipping----")
                continue
            logic = {'open':'first','high':'max','low':'min','close':'last','volume':'sum'}
            chart1.set_index('timestamp', inplace=True)
            chart2 = chart1.resample('2T', origin="start").agg(logic)

please check

Hi @rahulcse56 ,

The code seems to be working fine, do check again.