-
-
Notifications
You must be signed in to change notification settings - Fork 1
Feature request: Bypass dataframes #85
Comments
In this case, what would the names be in the resulting chart? just |
PS: thanks for the detailed suggestion :) |
(see also #37) |
Yes, exactly, the names would just be #37 does seem similar but seems to be asking for something even more ambitious - the ability to mix dataframe column names and direct arrays/pandas series as feature values in a single call. For this feature, the implementation seemed like it could be quite simple given the functionality that already exists: just detect if one the features is an array-like object instead of a string-like object, in which case a dataframe could be constructed on the fly and the rest of the code path could be used without alteration. |
Hmmm, interesting proposal! My biggest concern would be providing very clear error messages if we can't construct a data frame about why we can't. I can imagine people trying to pass in all sorts of stuff and being confused about why it's not working. Arrays of the wrong dimensions come to mind as a likely thing. If we do this and not #37 yet (i.e. this as a stepping-stone to #37) then we'd have to make the I'll have to think about the downsides of this approach, if any, a little bit more, but should we decide to go ahead, do you think this is something you'd be interested in contributing a PR for @malmaud ? :) |
Sure, I can just contribute the PR now so we can play with it - I don't think it will be too hard. No harm if you don't end up merging it. |
This will be implemented as part of plotly/plotly.py#1767 ... thanks for the input and patience :) |
Thanks for this fantastic package!
I'm wondering if in the spirit of this package being useful for creating exploratory graphs with minimum boilerplate, it makes sense to be able to pass in arrays in lieu of dataframe column names for the plotting function fields.
eg, let
be equivalent to
With the current Plotly API, I think the simplest alternative is
which feels verbose compared to the
px
alternative mentioned above and which would require a complete refactor if I decide my data has become rich enough that I want to start using a dataframe-based representation.As it stands, the necessity of constructing a dataframe can actually make plotly express more vebose than using
plotly
directly. It would be great forpx
to be the one-shop-stop package for exploratory plotting in Python.Seaborn, which is stated as an inspiration for this package, does support this syntax for the majority of its plotting functions.
Thanks!
The text was updated successfully, but these errors were encountered: