✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
⚡️ Concerned about the grid? Kyle Baranko teaches how to predicting peak loads using XGBoost. Register for the August webinar!

A line graph showing unintentionally showing two lines

I’m trying to plot a timeseries data from a csv with Plotly express and for some reason, it’s showing an extra line connecting various points. I made a new column of the timestamp without the year, and had that as the x-values, as shown below:

df['Without_year'] = df.index.strftime('%m-%d %H:%M:%S')

fig = go.Figure()

fig = px.line(df_2019, x = 'Without_year',y = "values")


plotly graph