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:
My guess would be that your end point gets connected to the first point. I canโt reproduce this with the following example, so you might share your data if possible.
import plotly.express as px
import pandas as pd
import random
# create data
days=7
timespan = pd.date_range('01/01/2022', periods=days, freq='D')
value = [np.random.randint(1,50) for _ in range(days)]
# create figure
fig = px.line(x=timespan, y=value)
fig.show()
'EIA/IEO.2021/LOWOILPRICE.SUP_LIQ_TOT_MBPD_TOT_MBPD.A',
'EIA/IEO.2021/HIGHOILPRICE.SUP_LIQ_TOT_MBPD_TOT_MBPD.A'
], max_nb_series=70)
fig = px.line(df, x="period", y="alt_value", color="agency_forecast",
title="hello"))```
On reading your comment; I suspect it might have something to do with the dataset being provided by EIA.
Just off the top of your head, could you think of anything that would cause a second line to be drawn connecting two points?
Thank you,