Hi, I am trying to plot a dataframe, and would like some of the columns to be dashed, while the others remain solid. The columns which will be dashed will change over time, so I have a list which tracks which ones need to be dashed. In general, the code I tried was something like this:
cols = [c for c in df.columns if ‘condition’ in c]
fig = px.line(data_frame=df, line_dash=cols)
Currently, cols is a list of only one column. I am receiving the error "All arguments should have the same length. The length of argument ‘line_dash’ is 1, whereas the length of previously-processed arguments [‘index’, ‘column 1’ … etc] is 4.
I’m having trouble figuring out how to fix this - I thought line_dash indicates which data to apply a dash to, but if I have to pass the same length as my columns, that would simply make all of them dashed, no?