Replies: 3 comments
-
|
Exciting idea! No clear opinion yet, just some first thoughts. I'm not sure how much we'd want to push this in the direction of a data processing library although with VegaFusion we're almost there and could support different backends similar to Ibis. It could water down the purpose of Altair as a visualization library. Would we then also want to support that intermediate results can be viewed without recalculation of everything as you would expect from a data processing library? first_df = alt.DataFrame.transform_filter().transform_pivot()....transformed_data()
first_df.head()
first_df.transform_impute().mark_bar()Right now, this seems too far for me but as I'm typing it I realise that the syntax you propose without intermediate results could be convenient and feel more natural then using |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for those thoughts @binste. Yeah, in the near/medium term I think having people use |
Beta Was this translation helpful? Give feedback.
-
|
Definitely! I think it's great to explore this further, as a mental construct to help spark ideas or even as an actual feature. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
In #3081, we are integrating VegaFusion to make it possible to extract the transformed data from an Altair Chart object. As discussed in #3081 (comment), it's even going to be possible to extract the transformed data from a chart without any marks configured. e.g:
In this case, the
Chartobject is actually being used more like a lazy DataFrame than a chart. What if we added analt.DataFrameclass that includes a subset of thealt.Chartmethods. In particular:.transform_*methods, which would return a newalt.DataFrame. And maybe we even drop thetransform_*prefix..mark_*methods, which would return a newalt.Chart.VegaFusion doesn't do this efficiently yet, but I'd also picture supporting a
.dtypesproperty that would return the output pandas data types for thealt.DataFrame. We could even use these outputdtypesfor encoding type inference (the way we currently only do for pandas DataFrames).Alternative: maybe this functionality could be combined with the existing
alt.Datasub classes, so that you could do things like:Please follow these steps to make it more efficient to respond to your feature request.
Beta Was this translation helpful? Give feedback.
All reactions