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

feat: define list accessor for bigframes Series #946

Merged
merged 9 commits into from
Sep 5, 2024
Merged

feat: define list accessor for bigframes Series #946

merged 9 commits into from
Sep 5, 2024

Conversation

sycai
Copy link
Contributor

@sycai sycai commented Sep 3, 2024

No description provided.

@sycai sycai requested review from a team as code owners September 3, 2024 22:41
@sycai sycai requested a review from GarrettWu September 3, 2024 22:41
@product-auto-label product-auto-label bot added the size: l Pull request size is large. label Sep 3, 2024
@product-auto-label product-auto-label bot added the api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. label Sep 3, 2024
@sycai sycai requested a review from chelsea-lin September 3, 2024 22:41
@@ -161,6 +162,10 @@ def query_job(self) -> Optional[bigquery.QueryJob]:
def struct(self) -> structs.StructAccessor:
return structs.StructAccessor(self._block)

@property
def list(self) -> lists.ListAccessor:
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, please add the new accessor to docs/reference/bigframes.pandas/series.rst

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Change updated. PTAL!

@sycai sycai requested a review from chelsea-lin September 4, 2024 19:20
@sycai sycai force-pushed the b361406184 branch 5 times, most recently from ff86afd to a7442f3 Compare September 4, 2024 20:51
@sycai sycai added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Sep 4, 2024
@bigframes-bot bigframes-bot removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Sep 4, 2024
"""

def len(self):
"""
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like the doc format could be aligned with Google's style. Could you take another look at the formatting in StringMethod.str()?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call. I was not aware that the formats are different. Updated.


See Also
--------
str.len : Python built-in function returning the length of an object.
Copy link
Contributor

Choose a reason for hiding this comment

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

Also, please review the See also format in Series.case_when. Of the listed APIs, StringMethods.len seems most relevant to our current implementation. Maybe we can just keep this one and remove other two?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@sycai sycai requested a review from chelsea-lin September 5, 2024 16:53
Copy link
Contributor

@chelsea-lin chelsea-lin left a comment

Choose a reason for hiding this comment

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

Thanks!

@sycai sycai enabled auto-merge (squash) September 5, 2024 17:46
@sycai sycai merged commit 8e8279d into main Sep 5, 2024
22 of 23 checks passed
@sycai sycai deleted the b361406184 branch September 5, 2024 18:44
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: l Pull request size is large.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants