import pandas as pd
import csv



stream = csv.reader(open('oi_playground/ticks.csv'))
for ticks in stream:
    for tic in ticks:
        print(tic)
        tick_dict = pd.Series(tic)1 
        print(tick_dict[0]['instrument_token'])
            
    # ticks = csv.DictReader(ticks)
    # ticks_data = pd.DataFrame(ticks)
    # for index, row in ticks_data.iterrows():
    #     print(row)
    # for tick in list(ticks):
    #     print(tick)
    #     print(tick['instrument_token'])
    # print(ticks)
    # for index, tick in ticks.items():
        
        
    #     tick = dict(tick[0])
     
    #     print(tick['instrument_token'])

#     for index, row in ticks_data.iterrows():
#         print(row[0]['instrument_token'])
#         print(row['instrument_token'])
#     ticks = csv.DictReader(ticks)
#     for tick in ticks:
#         print(tick['instrument_token'])
        
#         # print(series)
#         # print(dict(tick))
#         instrument_token = tick['instrument_token']
#         tickers[instrument_token].write_tick(tick)
# print(stream)

# stream = pd.read_csv('oi_playground/ticks.csv')
# for index, row in stream.iterrows():
#     df = pd.DataFrame(row)
#     for index, row in df.iterrows():
#         print(row)
#     instrument_token = row['instrument_token']
#     tickers[instrument_token].write_tick(row)
    # time.sleep(0.001)
