Equivalent of `px.line(line_group=)` argument for go.Scatter( )?

In plotly.express, when making a line chart with px.line(), it is possible to specify how to group the lines with line_group='<column_name>'.

I am wondering how to achieve the same thing using the plotly.graph_objects syntax, as there is no line_group (or similar) argument for go.Scatter()?

That’s right: px.line() creates multiple go.Scatter objects under the hood. If you want to do this manually, you’ll need to create one go.Scatter object per line.