Skip to content

feat: add DataFrame.struct.explode to add struct subfields to a DataFrame #916

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

Merged
merged 5 commits into from
Aug 23, 2024

Conversation

tswast
Copy link
Collaborator

@tswast tswast commented Aug 22, 2024

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes internal issue b/357588240
🦕

@tswast tswast requested review from a team as code owners August 22, 2024 20:14
@tswast tswast requested a review from sycai August 22, 2024 20:14
@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. labels Aug 22, 2024
@@ -0,0 +1,36 @@
# Copyright 2023 Google LLC
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: Intentionally not 2024 because this code was pulled from a file with date marked as 2023.

df = self._parent
column_labels = bigframes.core.explode.check_column(column)

for label in column_labels:
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: Add test with multiple columns to explode.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 6d2a84e

@sycai sycai enabled auto-merge (squash) August 22, 2024 21:12
@tswast tswast disabled auto-merge August 22, 2024 22:28
@tswast tswast enabled auto-merge (squash) August 22, 2024 22:28
@tswast tswast disabled auto-merge August 23, 2024 14:21
@tswast tswast added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Aug 23, 2024
@bigframes-bot bigframes-bot removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Aug 23, 2024
@tswast tswast merged commit ad2f75e into main Aug 23, 2024
20 of 21 checks passed
@tswast tswast deleted the b357588240-DataFrame.struct.explode branch August 23, 2024 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants