-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Plotly Express column input formats #1767
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
Comments
A couple of additional thoughts... The following should work, and result in a data frame internally with column names "x" and "y" because the parent data frame was not provided to px.scatter(x=df.x_col, y=df.y_col) Finally, just to be explicit, we should accept the same formats wherever we accept lists of column names, like in |
This was a PR which implemented part of these requirements earlier this summer, but was held up by the then-impending repo shuffle: plotly/plotly_express#87 |
Also take a look at |
Re |
We could also accept |
It would be a way to give names to columns easily. We can also use the |
Yes, I think that |
depending on how it's implemented, the above should "just work" actually :) |
and what do you think about |
I'm less of a fan of this, partly because it's not a previously-existing convention, as far as I know, and because it shuts the door to a future type-based dispatching on Maybe we should accept |
Right now for all
px
methods,data_frame
is a required argument and the values of many kwargs are column names as strings.We should be much more flexible in what we accept, for example the following should work:
In which case we would internally build a data frame with column names "x" and "y".
In addition, the following should work:
In which case we can read the column names (and optionally index name?) from the data frame.
Finally, we should allow for mixing and matching:
The text was updated successfully, but these errors were encountered: