This repository was archived by the owner on Mar 6, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 326
fix: empty record dtypes #2147
Merged
Merged
fix: empty record dtypes #2147
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
37dab9d
fix: empty record dtypes
yokomotod 78151f1
update pandas minimum version
yokomotod a27b392
Merge branch 'main' into fix-empty-dtypes
Linchin d6ce8c1
Merge branch 'main' into fix-empty-dtypes
yokomotod ffd6e42
fix coverage
yokomotod 9f2b0ef
fix test_pandas
yokomotod bb8cd0b
Merge branch 'main' into fix-empty-dtypes
yokomotod File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,7 +21,7 @@ opentelemetry-api==1.1.0 | |
| opentelemetry-instrumentation==0.20b0 | ||
| opentelemetry-sdk==1.1.0 | ||
| packaging==24.2.0 | ||
| pandas==1.1.4 | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I confirmed that and
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for updating the constraint file! |
||
| pandas==1.3.0 | ||
| pandas-gbq==0.26.1 | ||
| proto-plus==1.22.3 | ||
| protobuf==3.20.2 | ||
|
|
||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1222,12 +1222,7 @@ def test_list_rows_nullable_scalars_extreme_dtypes_w_custom_dtype( | |
|
|
||
| # These pandas dtypes are handled by the custom dtypes. | ||
| assert df.dtypes["bool_col"].name == "boolean" | ||
| # Result is dependent upon which version of pandas is being used. | ||
| # Float64 was not introduced until pandas version 1.4. | ||
| if PANDAS_INSTALLED_VERSION >= "1.4": | ||
| assert df.dtypes["float64_col"].name == "Float64" | ||
| else: | ||
| assert df.dtypes["float64_col"].name == "string" | ||
|
Comment on lines
-1225
to
-1230
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| assert df.dtypes["float64_col"].name == "Float64" | ||
| assert df.dtypes["int64_col"].name == "Int64" | ||
| assert df.dtypes["string_col"].name == "string" | ||
|
|
||
|
|
||
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pandas-dev/pandas#41052 has released with pandas 1.3.0 (as mentioned in above issue: pandas-dev/pandas#41241 (comment))
So if we can increase minimum pandas version to 1.3.0, we don't need this workaround
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should really come up with a consistent policy across all Google packages:
CC @chalmerlowe @Linchin @shollyman @parthea
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, moving to a monorepo might help make the dependencies more consistent, ideally we might want any overlapped dependencies among the handwritten BigQuery projects to be consistent.
But just for the purpose of this PR, I think it's reasonable to increase the minimum pandas version to 1.3.0, as long as it's not breaking anything.