dhanusharer opened a new pull request, #40768:
URL: https://github.com/apache/beam/pull/40768
Fixes #40709
### Summary of Changes
- **Dependency & Build:** Enabled `pandas>=2.2.2,<3.2` for Python `>=3.11`
while preserving `pandas<2.4` for Python 3.10 using PEP 508 environment
markers. Added `py311-pandas-30` tox environment and Gradle task.
- **Introspection Hardening:** Added defensive `hasattr()` checks in
`frame_base.py` decorators (`@args_to_kwargs`, `@populate_defaults`,
`@with_docs_from`) to prevent import-time reflection crashes when pandas 3.0
removes deprecated methods or parameters. Handled permanent Copy-on-Write
defaults.
- **DataFrames API Updates:**
- Added `removed_args=['method']` and avoided passing `method` to
`fillna()` under pandas 3.0.
- Added `removed_args=['axis']` to `groupby()` and raised clean
`NotImplementedError` for column-wise groupby.
- Guarded `first`, `last`, and `applymap` with `hasattr()` checks.
- Guarded GroupBy methods (`fillna`, `first`, `last`) with
`hasattr(DataFrameGroupBy, ...)`.
- Removed `method=None` from `_DeferredStringMethods.get_dummies` fillna
call.
- **Typehint Compatibility:** Added support for pandas 3.0 `str`,
`pd.StringDtype`, and datetime dtypes in `dtype_to_fieldtype()`.
- **Tests:** Updated `test_applymap_na_action` to skip on pandas 3.0+ and
added pandas 3.0 `ffill`/`bfill` branch to `test_fillna_columns`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]