@dasch @run-out Yes the problem was the wrong order in my CSV.
@ab_trader thanks for the suggestion. I will check it out.

I got it to work by reversing the order in the CSV. Thanks everyone for your help:)
In case anyone wants to use my quick and dirty way:

import pandas as pd # load csv and use row 0 as headers df = pd.read_csv("file_name.csv", header = 0) # reverse data and save df=df.iloc[::-1] df.set_index('timestamp', inplace=True) df.to_csv('reversed.csv')