We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
sample
import polars as pl import pandas as pd import altair as alt df_pd = pd.DataFrame({'a': [1,2,3]}) print(alt.sample(df_pd, n=2)) df_pl = pl.DataFrame({'a': [1,2,3]}) print(alt.sample(df_pl, n=2))
This outputs (exact values differ between runs due to the nature of sample, but the points is - Polars.DataFrame gets transformed to PyArrow)
a 0 1 1 2 pyarrow.Table a: int64 ---- a: [[1,2]]
The docs for alt.sample say
alt.sample
Reduce the size of the data model by sampling without replacement.
so I'd have expected the input library to be preserved, and to get something like:
a 1 1 2 2 shape: (2, 1) ┌─────┐ │ a │ │ --- │ │ i64 │ ╞═════╡ │ 1 │ │ 2 │ └─────┘
5.3.0
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
What happened?
This outputs (exact values differ between runs due to the nature of
sample
, but the points is - Polars.DataFrame gets transformed to PyArrow)What would you like to happen instead?
The docs for
alt.sample
sayso I'd have expected the input library to be preserved, and to get something like:
Which version of Altair are you using?
5.3.0
The text was updated successfully, but these errors were encountered: