Skip to content

Conversation

@tswast
Copy link
Collaborator

@tswast tswast commented Sep 22, 2025

This commit implements the inplace parameter for the DataFrame.drop method.

When inplace=True, the DataFrame is modified in place and the method returns None. When inplace=False (the default), a new DataFrame is returned.

Unit tests have been added to verify the functionality for both column and row dropping.

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 b/385199126 🦕

This commit implements the `inplace` parameter for the `DataFrame.drop` method.

When `inplace=True`, the DataFrame is modified in place and the method returns `None`.
When `inplace=False` (the default), a new DataFrame is returned.

Unit tests have been added to verify the functionality for both column and row dropping.
@tswast tswast requested review from a team as code owners September 22, 2025 17:17
@tswast tswast requested a review from shuoweil September 22, 2025 17:17
@product-auto-label product-auto-label bot added the size: m Pull request size is medium. label Sep 22, 2025
@product-auto-label product-auto-label bot added the api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. label Sep 22, 2025
@tswast tswast removed the request for review from shuoweil September 23, 2025 19:36
@tswast tswast requested a review from jialuoo September 23, 2025 19:38
@tswast
Copy link
Collaborator Author

tswast commented Sep 23, 2025

@jialuoo please take a look. I assigned to you because Shuowei is OOO.

In [1]: import random

In [2]: random.choice(['chelsealin', 'garrettwu', 'jialuo', 'sycai', 'tbergeron'])
Out[2]: 'jialuo'

@tswast tswast merged commit 3487f13 into main Sep 24, 2025
22 of 25 checks passed
@tswast tswast deleted the feat-inplace-param-for-drop branch September 24, 2025 14: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: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants