Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to use custom DataFrame index and column names #7

Open
KIC opened this issue Nov 21, 2022 · 0 comments
Open

Allow to use custom DataFrame index and column names #7

KIC opened this issue Nov 21, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@KIC
Copy link

KIC commented Nov 21, 2022

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.

@MooneDrJune MooneDrJune added the enhancement New feature or request label Dec 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants