feat: add DataFrame.to_pandas_batches() to download large DataFrame objects - #136
Merged
Merged
Conversation
…n DataFrame construction
tswast
force-pushed
the
b280662868-to_pandas_batches
branch
from
October 26, 2023 16:21
68f50ef to
359a90c
Compare
tswast
force-pushed
the
b280662868-to_pandas_batches
branch
from
October 26, 2023 16:23
359a90c to
1a7b2d7
Compare
tswast
marked this pull request as ready for review
October 26, 2023 17:15
ashleyxuu
approved these changes
Oct 26, 2023
| """ | ||
| if self.index_columns: | ||
| df.set_index(list(self.index_columns), inplace=True) | ||
| df.index.names = self.index.names # type: ignore |
Contributor
There was a problem hiding this comment.
Just curious what's the error here?
Collaborator
Author
There was a problem hiding this comment.
bigframes/core/blocks.py:434: error: Incompatible types in assignment (expression has type "Sequence[Hashable]", variable has type "list[str]") [assignment]
Collaborator
Author
There was a problem hiding this comment.
Even though list[str] is a sequence of hashable objects, I think maybe type covariance can't kick in. I'll try with some casts.
Collaborator
Author
There was a problem hiding this comment.
Oh, I had it opposite. pandas says "names" is list[str], but actually I don't think that's true.
Collaborator
Author
There was a problem hiding this comment.
Filed pandas-dev/pandas-stubs#804 and commented with an explanation.
…python-bigquery-dataframes into b280662868-to_pandas_batches
ashleyxuu
pushed a commit
that referenced
this pull request
Oct 30, 2023
…e` objects (#136) Builds on https://togithub.com/googleapis/python-bigquery-dataframes/pull/132 Towards internal issue 280662868 🦕
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Builds on #132
Towards internal issue 280662868
🦕