GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — BigQuery: Make `RowIterator._to_dataframe_iterable` public · Issue #7339 · googleapis/google-cloud-python

BigQuery: Make RowIterator._to_dataframe_iterable public #7339

New issue
Copy link
New issue
Copy link
Closed
#10017
Closed
BigQuery: Make RowIterator._to_dataframe_iterable public#7339
#10017
Copy link
Assignees
HemangChothani
Labels
api: bigqueryIssues related to the BigQuery API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Description

@tswast
tswast
opened on Feb 13, 2019
Issue body actions

Follow-up to #7293

There are use cases where it's not ideal to download a whole table at once, but a pandas DataFrame is still desired.

Potential solution:

Make the pages member of RowIterator return a generator of a subclass of google.api_core.page_iterator.Page with a to_dataframe() method.

Reacted by pcsegal, Sharath Gururaj and Urvah Shabbir

Activity

  1. tswast
    added
    type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.
    api: bigqueryIssues related to the BigQuery API.
    on Feb 13, 2019
  2. tswast
    self-assigned this
    on Apr 9, 2019
  3. agsha commented on Nov 27, 2019

    @agsha
    agsha
    on Nov 27, 2019
    More actions

    Any updates on this?

  4. tswast commented on Dec 19, 2019

    @tswast
    tswast
    on Dec 19, 2019
    ContributorAuthor
    More actions

    We have a private method RowIterator._to_dataframe_iterable that we could make public.

    google-cloud-python/bigquery/google/cloud/bigquery/table.py

    Line 1557 in 13bd849

    def _to_dataframe_iterable(self, bqstorage_client=None, dtypes=None):

    When I originally filed this FR, I thought a per-page to_dataframe would be more appropriate, but it's actually quite difficult to override the page class with how the superclasses are structured. Plus, it wouldn't be able to take advantage of the BQ Storage API if we used the pages property.

  5. tswast
    assigned
    HemangChothani
    and unassigned
    tswast
    on Dec 19, 2019
  6. tswast
    changed the title [-]BigQuery: RowIterator.pages should allow converting each page to a pandas DataFrame, one at a time[/-] [+]BigQuery: Make `RowIterator._to_dataframe_iterable` public[/+] on Dec 19, 2019
  7. tswast commented on Dec 19, 2019

    @tswast
    tswast
    on Dec 19, 2019
    ContributorAuthor
    More actions

    @HemangChothani I think this is a good task you all. #7339 (comment)

    In addition to making it public, let's make sure we have some unit tests for using the function directly.

  8. tswast
    closed this as completedin #10017on Jan 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @HemangChothani
    HemangChothani

Labels

api: bigqueryIssues related to the BigQuery API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.