GH-49255: [Python] Fix pandas Categorical DeprecationWarnings in tests (#50543) ### Rationale for this change pandas 3.0.0 deprecated constructing or casting to a `Categorical` with non-NA values that are not present in the specified `dtype.categories`. This surfaces as DeprecationWarnings in the PyArrow test suite when run against pandas >= 3.0 (GH-49255), in test_category and test_category_implicit_from_pandas. ### What changes are included in this PR? - test_category: remove the `cat_strings_with_na` column (relied on silent 'qux' -> NaN; redundant, cat_strings already carries nulls). - test_category_implicit_from_pandas: use explicit None (['a','b',None]) instead of out-of-category 'c'. ### Are these changes tested? Yes - test-only. Verified no DeprecationWarning under pandas 3.0.3. ### Are there any user-facing changes? No. Closes #49255. * GitHub Issue: #49255 Authored-by: GujaLomsadze <lomsadze.guja@gmail.com> Signed-off-by: Rok Mihevc <rok@mihevc.org>
Apache Arrow is a universal columnar format and multi-language toolbox for fast data interchange and in-memory analytics. It contains a set of technologies that enable data systems to efficiently store, process, and move data.
Major components of the project include:
↗: Arrow-powered API, drivers, and libraries for access to databases and query engines↗↗↗↗↗↗↗The ↗ icon denotes that this component of the project is maintained in a separate repository.
Arrow is an Apache Software Foundation project. Learn more at arrow.apache.org.
The reference Arrow libraries contain many distinct software components:
The official Arrow libraries in this repository are in different stages of implementing the Arrow format and related features. See our current feature matrix on git main.
Please read our latest project contribution guide.
If you are using AI coding tools, please review our AI-generated code guidance.
Even if you do not plan to contribute to Apache Arrow itself or Arrow integrations in other projects, we'd be happy to have you involved:
We use runs-on for managing the project self-hosted runners. We use AWS for some of the required infrastructure for the project.