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

docs: create sample notebook to manipulate struct and array data #883

Merged
merged 3 commits into from
Aug 21, 2024

Conversation

chelsea-lin
Copy link
Contributor

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 bug: 357587135 🦕

@chelsea-lin chelsea-lin requested a review from jiaxunwu August 5, 2024 23:26
@chelsea-lin chelsea-lin requested review from a team as code owners August 5, 2024 23:26
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@product-auto-label product-auto-label bot added size: l Pull request size is large. api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. samples Issues that are directly related to samples. labels Aug 5, 2024
@chelsea-lin chelsea-lin requested a review from tswast August 7, 2024 16:47
@chelsea-lin chelsea-lin force-pushed the main_chelsealin_notebooks branch from cc209e0 to ccb8f48 Compare August 7, 2024 20:28
@@ -0,0 +1,658 @@
{
Copy link
Collaborator

@tswast tswast Aug 9, 2024

Choose a reason for hiding this comment

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

Line #2.    adj_scores_arr = bbq.array_agg(adj_scores.groupby(level=0))

Could we add a note about ordering? Is the original order preserved? If so, under what conditions?


Reply via ReviewNB

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added some comments in the code. Please help to double check.

@@ -0,0 +1,658 @@
{
Copy link
Collaborator

Choose a reason for hiding this comment

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

Line #2.    df['NewScores'] = adj_scores_arr

Should we call out that the index needs to be unique? My understanding is that this will do a real JOIN in the SQL, so duplicate keys in the index might cause unexpected results.


Reply via ReviewNB

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Your understanding is correct. Added more comments in the code. Please double check.

@chelsea-lin chelsea-lin force-pushed the main_chelsealin_notebooks branch from ccb8f48 to e172cf8 Compare August 13, 2024 17:55
@chelsea-lin chelsea-lin requested a review from tswast August 13, 2024 17:56
Copy link
Collaborator

@tswast tswast left a comment

Choose a reason for hiding this comment

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

Thanks!

@chelsea-lin chelsea-lin merged commit 3031903 into main Aug 21, 2024
22 of 23 checks passed
@chelsea-lin chelsea-lin deleted the main_chelsealin_notebooks branch August 21, 2024 18:05
@tswast
Copy link
Collaborator

tswast commented Aug 21, 2024

Kokoro notebook failure: FAILED notebooks/dataframes/pypi.ipynb:: - RelationError: Table schemas must be equal for set operations. I believe this is internal issue 361145903.

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. samples Issues that are directly related to samples. size: l Pull request size is large.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants