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 replace method to DataFrame #261

Merged
merged 11 commits into from
Dec 19, 2023
Merged

feat: add replace method to DataFrame #261

merged 11 commits into from
Dec 19, 2023

Conversation

TrevorBergeron
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 #<issue_number_goes_here> 🦕

Page not found · GitHub · GitHub
Skip to content
404 “This is not the web page you are looking for”
@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 Dec 6, 2023
@TrevorBergeron TrevorBergeron marked this pull request as ready for review December 7, 2023 00:10
@TrevorBergeron TrevorBergeron requested review from a team as code owners December 7, 2023 00:10
to_replace (str, regex, list, int, float or None):
How to find the values that will be replaced.

* numeric, str or regex:
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think the bulletpoint will be rendered correctly, we should get rid of it. Could you help do a staging following the instructions: https://screenshot.googleplex.com/5MQFPth8968Qjtw.

Just like: https://screenshot.googleplex.com/BPQxVeg7D7NjjTZ

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed bullet points

Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure how the CloudRAD tool will render this. Will LGTM for this one, and we can check back if we need to re-format it.

regex=False,
):
"""
Replace values given in `to_replace` with `value`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you also help add code_samples in the docs as well? Since the person who implements the method knows more about the use cases, and we don't need to do it later in a seperate PR.

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 a few code samples



def is_patype(scalar: typing.Any, pa_type: pa.DataType) -> bool:
if pa_type == pa.time64("us"):
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing docstring here?

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 docstring

@product-auto-label product-auto-label bot added size: l Pull request size is large. and removed size: m Pull request size is medium. labels Dec 15, 2023
@TrevorBergeron TrevorBergeron merged commit 5092215 into main Dec 19, 2023
@TrevorBergeron TrevorBergeron deleted the df_replace branch December 19, 2023 19:47
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.

None yet

2 participants