Skip to content

Allow to use custom DataFrame index and column names #7

@KIC

Description

@KIC

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:

  1. check if the index is of type Timestamp -> use as x
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions