Scatter plot lines are

I have a pandas dataframe that has the following columns of interest (21 columns in total):

  1. a timestamp which is converted using to_datetime
  2. device_id (this has multiple devices in this list)

I then do a
target = all_data.query(‘device_id == “123456”’)

this gives me a new dataframe with just that device id. The problem is when I go to create a plot with this data I get weird jagged data.


I’ve previously taking the csv file and created new csv’s based on device id and created plots without this issue:

Thus I don’t understand why I can’t take a query from a dataframe and get the same result. Maybe the issue is something else?

I’ve taken my previous code that worked on single csv file per device id and updated it to pull in a full csv file with mixed device_id’s and it does the same thing in plotly as it does in dash. Thus no real change in plot code.

I found my issue, my timestamp looked like it was sorted correctly, but it wasn’t.