import csv


with open('../data/chzusdt-min1.csv', 'r', newline='') as f:
    f_csv = csv.reader(f)
    next(f_csv)
    last_id = int(next(f_csv)[0])
    f_csv = list(f_csv)
    for row in f_csv:
        if int(row[0]) - last_id != 60:
            print("Error in " + str(row[0]) + "---" + str(last_id))
        last_id = int(row[0])


# rows = []
# with open('../data/chzusdt_2000.csv', 'r') as f:
#     f_csv = csv.reader(f)
#     headers = next(f_csv)
#     for row in f_csv:
#         if len(row) > 0:
#             rows.append(row)
#
# with open('../data/chzusdt_2000.csv', 'w', newline='') as f:
#     f_csv = csv.writer(f)
#     f_csv.writerow(headers)
#     rows.reverse()
#     f_csv.writerows(rows)