Skip to content

feat: Add "dayofyear" property for dt accessors #1692

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 7 commits into from
May 6, 2025
Merged

Conversation

sycai
Copy link
Contributor

@sycai sycai commented May 5, 2025

Now you can get the day of year for dates, datetimes and timestamps.

@product-auto-label product-auto-label bot added size: s Pull request size is small. api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. labels May 5, 2025
@sycai sycai marked this pull request as ready for review May 6, 2025 00:06
@sycai sycai requested review from a team as code owners May 6, 2025 00:06
@sycai sycai requested a review from jialuoo May 6, 2025 00:06
@@ -43,6 +43,10 @@ def day(self) -> series.Series:
def dayofweek(self) -> series.Series:
return self._apply_unary_op(ops.dayofweek_op)

@property
def dayofyear(self) -> series.Series:
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need a docstring?

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. Doc updated.

@product-auto-label product-auto-label bot added size: m Pull request size is medium. and removed size: s Pull request size is small. labels May 6, 2025
@sycai sycai enabled auto-merge (squash) May 6, 2025 20:06
@sycai sycai merged commit 9d4a59d into main May 6, 2025
18 of 24 checks passed
@sycai sycai deleted the sycai_dayofyear branch May 6, 2025 20:06
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.

3 participants