Feature request: Bypass dataframes #85
Description
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
px.scatter(x=[1,2],y=[3,4])
be equivalent to
df=pandas.DataFrame({'x': [1,2], 'y': [3,4]})
px.scatter(df, x='x', y='y')
With the current Plotly API, I think the simplest alternative is
from plotly import graph_objs as go
plot([go.Scatter(x=[1,2],y=[3,4])])
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 for px
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!