Usually, the DataFrames have the "time" in the index. This means we always have to do something like:
df.reset_index().rename(columns={"Date": "time", "Open": 'open', "High": 'high', "Low": 'low', "Close": 'close'}),
I think some heuristics could help:
- check if the index is of type Timestamp -> use as x
- check if any other column is of type Timestamp -> use as x
Something similar should be used for the marks, i.e. use the first 4 columns for candles and the first one for a line.
At least as a user I should be able to conveniently declare my column names/index which should be used I think.
Nevertheless, I think using lightweight charts with python (notebooks) will greatly improve financial plots over mplf, plotly and others.
Usually, the DataFrames have the "time" in the index. This means we always have to do something like:
I think some heuristics could help:
Something similar should be used for the marks, i.e. use the first 4 columns for candles and the first one for a line.
At least as a user I should be able to conveniently declare my column names/index which should be used I think.
Nevertheless, I think using lightweight charts with python (notebooks) will greatly improve financial plots over mplf, plotly and others.