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: Add GeoSeries.area #1318

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
Draft

feat: Add GeoSeries.area #1318

wants to merge 9 commits into from

Conversation

arwas11
Copy link
Contributor

@arwas11 arwas11 commented Jan 23, 2025

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 #308738592 🦕

@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 Jan 23, 2025
f"GeoSeries.area is not supported. Use bigframes.bigquery.st_area(series), instead. {constants.FEEDBACK_LINK}"
),
):
bf_series.area()
Copy link
Collaborator

Choose a reason for hiding this comment

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

mypy error: "Series" not callable [operator]

Note: since .area is a "property", we don't call it as a function. We pretend it's just a normal attribute.

Suggested change
bf_series.area()
bf_series.area

A bit more about properties: https://www.pythonmorsels.com/making-read-only-attribute/ and https://realpython.com/python-property/

It's very similar to what Java calls "getter" and "setter" functions, but in this case Python allows it to look like a normal attribute.

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.

2 participants