Skip to content
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

Add "show" support to DataFrame API #937

Closed
alamb opened this issue Aug 24, 2021 · 1 comment · Fixed by #923
Closed

Add "show" support to DataFrame API #937

alamb opened this issue Aug 24, 2021 · 1 comment · Fixed by #923
Labels
datafusion Changes in the datafusion crate enhancement New feature or request

Comments

@alamb
Copy link
Contributor

alamb commented Aug 24, 2021

Is your feature request related to a problem or challenge? Please describe what you are trying to do.
While developing projects with datafusion, often times it is useful to preview the output.

Right now it is somewhat awkward to print the results of a DataFrame to stdout as it requires something like the following from the examples

    let df = ctx
        .read_parquet(filename)?
        .select_columns(&["id", "bool_col", "timestamp_col"])?
        .filter(col("id").gt(lit(1)))?;

    let results = df.collect().await?;
    pretty::print_batches(&results)?;

Describe the solution you'd like
it would be nice to allow a user to simply call a show function

    let df = ctx
        .read_parquet(filename)?
        .select_columns(&["id", "bool_col", "timestamp_col"])?
        .filter(col("id").gt(lit(1)))?;

    df.show().await;

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

@alamb alamb added the enhancement New feature or request label Aug 24, 2021
@alamb alamb added the datafusion Changes in the datafusion crate label Aug 24, 2021
@francis-du
Copy link
Contributor

I will open an issue by myself next time, thanks for your job.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
datafusion Changes in the datafusion crate enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants