BrandonFors/pandas-github-issues huggingface dataset:
BUG: Fixed type annotations for read_sql_* functions.
State: closed

Added dict of dict type to parse_dates union for `read_sql_query` and `read_sql_table` to match valid arguments.

- [x] closes #60085 
- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [x] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [ ] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.


Labels:
name: IO SQL
description: to_sql, read_sql, read_sql_query
name: Typing
description: type annotations, mypy/pyright type checking

Comments:
I did not check off the checklist item for adding an entry to `doc/source/whatsnew/vX.X.X.rst` because I was not sure which file there to edit. If you would like me to do so, please just let me know which one, and I would be happy to.
These test failures seem to be completely unrelated to my changes (which just fixed some type annotations). Do you recommend rerunning them?
> I did not check off the checklist item for adding an entry to `doc/source/whatsnew/vX.X.X.rst`

The type-hints in the pandas repo are internal, so this is not a user-facing change. As such, it does not need any entry in the whatsnew.
Thanks @FakeNameSE
BUG: fix ValueError when printing a Series with DataFrame in its attrs
State: closed

- [x] closes #60568 (Replace xxxx with the GitHub issue number)
- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [x] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

As #60459, replace `concat` with slice to avoid the error.

Labels:
name: Output-Formatting
description: __repr__ of pandas objects, to_string
name: metadata
description: _metadata, .attrs

Comments:
Thanks @yuanx749
BUG: value_counts() check Index with PyArrow categorical columns
State: closed

- [x] closes #60563
- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests)
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [ ] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

This is my first issue, thank you in advance for your patience and feedback! 

Labels:
name: Bug
name: Algos
description: Non-arithmetic algos: value_counts, factorize, sorting, isin, clip, shift, diff
name: Categorical
description: Categorical Data Type
name: Stale
name: Arrow
description: pyarrow functionality

Comments:
This pull request is stale because it has been open for thirty days with no activity. Please [update](https://pandas.pydata.org/pandas-docs/stable/development/contributing.html#updating-your-pull-request) and respond to this comment if you're still interested in working on this.
Thanks for the pull request, but it appears to have gone stale. If interested in continuing, please merge in the main branch, address any review comments and/or failing tests, and we can reopen.
DEPR: Enforce deprecation of include_groups in groupby.apply
State: closed

- [ ] closes #xxxx (Replace xxxx with the GitHub issue number)
- [ ] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [ ] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

The PR promoting this to a FutureWarning was merged straight into 2.3.x instead of main.

https://github.com/pandas-dev/pandas/pull/59751

Labels:
name: Groupby
name: Deprecate
description: Functionality to remove in pandas
name: Apply
description: Apply, Aggregate, Transform, Map

Comments:
Thanks @rhshadrach
CLN: Remove deprecations of groupby.fillna in tests
State: closed

- [ ] closes #xxxx (Replace xxxx with the GitHub issue number)
- [ ] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [ ] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

Deprecation has already been enforced.

Labels:
name: Testing
description: pandas testing functions or related to the test suite
name: Groupby
name: Deprecate
description: Functionality to remove in pandas
name: Clean

Comments:
Thanks @rhshadrach
ENH: removed median percentile to be always included in describe GH #60550 
State: closed

- [x] closes #60550 
- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature - yes, `pandas/tests/reductions/test_describe_ndframe.py`
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [x] ~Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.~ NA
- [x] Added an entry in the latest `doc/source/whatsnew/v3.0.0.rst` file if fixing a bug or adding a new feature.


Labels:
name: Stale
name: Reduction Operations
description: sum, mean, min, max, etc.

Comments:
@mroeschke I don't think a separate test is needed as the core functionality remains the same.
> @mroeschke I don't think a separate test is needed as the core functionality remains the same.

We should have had a test that when you specify `[0.3, 0.6]` you get `0.3`, `0.5`, and `0.6`. This was missing in our test coverage. If it was there, then you would have had to modify such a test to just `0.3` and `0.6`. 

Since we're changing the behavior, I think a test needs to be added.
@mroeschke @rhshadrach thanks for the feedback, the tests are now added.
@mroeschke, I hope you were able to look into this and merge the PR?
@mroeschke please do the needful.
This pull request is stale because it has been open for thirty days with no activity. Please [update](https://pandas.pydata.org/pandas-docs/stable/development/contributing.html#updating-your-pull-request) and respond to this comment if you're still interested in working on this.
Closing as stale. If you're interesting in continuing, merge main and fix up the failing tests on the CI and we'd be more than happy to reopen!
TST: filter possible RuntimeWarning in tests
State: closed

I'm unsure why the OSX 13, Python 3.10 & 3.11 jobs are just complaining about an `invalid value in cast` from `.astype` of a ndarray of exotic types like `interval` to `str` (and then `object`), but I _think_ generally we should be safe to ignore this.

e.g. https://github.com/pandas-dev/pandas/actions/runs/12286515835/job/34286806506

Labels:
name: Warnings
description: Warnings that appear or should be added to pandas

Comments:
Going to merge to get the CI closer to green
Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

1. Checkout backport branch and update it.

```
git checkout 2.3.x
git pull
```

2. Cherry pick the first parent branch of the this PR on top of the older branch:
```
git cherry-pick -x -m1 c52846ff94d51ce5940928c199da00f403bc8138
```

3. You will likely have some merge/cherry-pick conflict here, fix them and commit:

```
git commit -am 'Backport PR #60553: TST: filter possible RuntimeWarning in tests'
```

4. Push to a named branch:

```
git push YOURFORK 2.3.x:auto-backport-of-pr-60553-on-2.3.x
```

5. Create a PR against branch 2.3.x, I would have named this PR:

> "Backport PR #60553 on branch 2.3.x (TST: filter possible RuntimeWarning in tests)"

And apply the correct labels and milestones.

Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon!

Remember to remove the `Still Needs Manual Backport` label once the PR gets merged.

If these instructions are inaccurate, feel free to [suggest an improvement](https://github.com/MeeseeksBox/MeeseeksDev).
ENH: Support NamedAggs in kwargs in Rolling/Expanding/EWM agg method
State: closed

- [x] closes #28333 
- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [x] Added an entry in the latest `doc/source/whatsnew/v3.0.0.rst` file if fixing a bug or adding a new feature.

Currently, `Rolling.agg()`, `Expanding.agg()` and `ExponentialMovingWindow.agg()` methods don't support specifying `NamedAgg`s through `**kwargs`, while `Groupby.agg()` does. This change fixes that.

Labels:
name: Groupby
name: Window
description: rolling, ewma, expanding

Comments:
Thanks @snitish
CI: Ignore prompting in test-arm when apt-get installing
State: closed

To avoid failing `test-arm` job in CircleCI

e.g. https://app.circleci.com/pipelines/github/pandas-dev/pandas/52272/workflows/b0a99609-7665-423f-a195-7154c661fdf1/jobs/242579/parallel-runs/0/steps/0-102

Labels:
name: CI
description: Continuous Integration
name: ARM
description: aarch64 architecture

Comments:
ARM test build is passing. Will do a manual backport for the 2.3.x branch
CI/TST: Use tm.external_error_raised for test_from_arrow_respecting_given_dtype_unsafe
State: closed

Appears that pyarrow changed the exception message that we were matching against, so we should be using `external_error_raised` instead 

e.g. https://github.com/pandas-dev/pandas/actions/runs/12281514975/job/34270563333?pr=60541 


Labels:
name: Testing
description: pandas testing functions or related to the test suite
name: Arrow
description: pyarrow functionality

Comments:
Looks like `test_from_arrow_respecting_given_dtype_unsafe` is passing now on `pyarrow-nightly` so merging
Use PyWeakref_GetRef and critical section in BlockValuesRefs
State: closed

- [X] Related to #59057
- [X] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).


Labels:
name: Enhancement
name: Build
description: Library building on various platforms
name: Python 3.13

Comments:
Perf impact?
IIUC we'll need to wait for the next cython release based on your PR https://github.com/cython/cython/pull/6538?
I've updated this PR so that it's not blocked on a Cython release. A review would be very helpful. The failing CI jobs seem to be unrelated: The pyodide one fails on main as well, and the manylinux one seems to be related to a docker fail, will probably be okay if rerun.
This pull request is stale because it has been open for thirty days with no activity. Please [update](https://pandas.pydata.org/pandas-docs/stable/development/contributing.html#updating-your-pull-request) and respond to this comment if you're still interested in working on this.
Can this PR be merged? Is there something else I can do to push it forward?
Thanks @lysnikolaou
Fix KeyError by adding check for _convert_dates
State: closed

Closes #60536

This PR adds a check to prevent a KeyError when renaming columns by ensuring the original column name exists in the _convert_dates dictionary before updating it.


Labels:
name: Bug
name: IO Stata
description: read_stata, to_stata
name: Stale

Comments:
> Thanks for the PR! Whenever changing behavior, please add tests.

Thank you for the review. Please guide me on which test file would be the most appropriate for adding tests for this change.


`pandas/tests/io/test_stata.py`
@rhshadrach I have added the tests, please check if they are correct.
This pull request is stale because it has been open for thirty days with no activity. Please [update](https://pandas.pydata.org/pandas-docs/stable/development/contributing.html#updating-your-pull-request) and respond to this comment if you're still interested in working on this.
Closing as stale. If you're interested in continuing, merge main and address the comments above and we'd be more than happy to reopen!
BUG: Fix DataFrame binary arithmatic operation handling of unaligned …
State: closed

…MultiIndex columns

- [ ] closes #60498
- [ ] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [x] Added an entry in the latest `doc/source/whatsnew/v3.0.0.rst` file if fixing a bug or adding a new feature.


Labels:
name: Numeric Operations
description: Arithmetic, Comparison, and Logical operations
name: MultiIndex

Comments:
This pull request is stale because it has been open for thirty days with no activity. Please [update](https://pandas.pydata.org/pandas-docs/stable/development/contributing.html#updating-your-pull-request) and respond to this comment if you're still interested in working on this.
> This pull request is stale because it has been open for thirty days with no activity. Please [update](https://pandas.pydata.org/pandas-docs/stable/development/contributing.html#updating-your-pull-request) and respond to this comment if you're still interested in working on this.

reopening
Thanks @snitish
BUG: Building pandas via pip fails in AIX due to use of lower meson version.
State: closed

Closes #60495

Log after this change for pandas build in AIX.
pip3.11 install . -v
Created wheel for pandas: filename=pandas-0+untagged.35796.gca91dd4.dirty-cp311-cp311-aix_7205_2419_64.whl size=18419603 sha256=599e0b2217ca31130ae15bc58fbeb260488a276aceb3ee6607b5e8c602031a6b
  Stored in directory: /tmp/pip-ephem-wheel-cache-0rxkiefk/wheels/b4/7d/f8/eb241896ce6eabb73cb53844efadd6cf4f368800addd37e52d
Successfully built pandas
Installing collected packages: tzdata, six, numpy, python-dateutil, pandas
  changing mode of /opt/freeware/bin/f2py to 755
  changing mode of /opt/freeware/bin/numpy-config to 755
Successfully installed numpy-2.2.0 pandas-0+untagged.35796.gca91dd4.dirty python-dateutil-2.9.0.post0 six-1.17.0 tzdata-2024.2 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv


Labels:

Comments:
@rhshadrach Some CI's are failing in many PR. So I believe this is okay.
DOC (string dtype): updated 'Working with text data' for str dtype in pandas 3.0
State: closed

Closes #60348 

This PR updates the "Working with Text Data" page in the pandas documentation to reflect the change in pandas 3.0 where "str" dtype is now the default.

Labels:
name: Docs
name: Strings
description: String extension data type and string data
name: Stale

Comments:
pre-commit.ci autofix
Hi @mroeschke, I've made some updates to the 'text.rst' file which updated 'Working with text data' for str dtype in pandas 3.0

I noticed that after updating the branch, a commit for expressions.py was added, although I have made no commits in the file. Could you please help me understand the changes and guide me through?



I have made changes according to the review, but somehow I can't revert the changes in expressions.py. Can you please help me with it?
> I have made changes according to the review, but somehow I can't revert the changes in expressions.py. Can you please help me with it?

You can open the file with an editor and manually modify the file undoing the changes. Locally, you can run

    git diff upstream/main pandas/core/computation/expressions.py

and keep making modifications until that reports no differences.

If you'd like, I can push a commit undoing the changes there.
> If you'd like, I can push a commit undoing the changes there.

It would be very helpful, Thank you.

I have made the changes as per the review, please let me know if there are any other modifications required in the documentation.
@rhshadrach, is everything alright, or are modifications needed?
This pull request is stale because it has been open for thirty days with no activity. Please [update](https://pandas.pydata.org/pandas-docs/stable/development/contributing.html#updating-your-pull-request) and respond to this comment if you're still interested in working on this.
Thanks for the pull request, but it appears to have gone stale. If interested in continuing, please merge in the main branch, address any review comments and/or failing tests, and we can reopen.
ENH: Added isascii() string method fixing issue #59091
State: closed

- [x] closes #59091
- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [x] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [x] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

This pull request introduces the isascii() string method to the pandas API, enabling users to efficiently check whether all characters in each string are ASCII. The implementation leverages the pyarrow.compute.string_is_ascii function for high-performance processing when working with Arrow-backed pandas objects. The method has been integrated into the pandas string accessor (str) via the _map_and_wrap utility, ensuring it aligns with pandas' existing API design.

Summary of Changes:

Added the isascii method to the string accessor using _map_and_wrap for dynamic registration and documentation integration.

Implemented the core logic in _str_isascii, which uses pyarrow.compute.string_is_ascii.
Added corresponding tests to verify correctness, performance, and edge cases.

Updated the whatsnew documentation to include the new feature in the upcoming version notes.

This enhancement addresses requests for additional string validation methods (closes #59091) and aligns pandas with commonly needed text processing capabilities.

Labels:
name: Strings
description: String extension data type and string data

Comments:
I think this looks good in general. I don't think the CI failures are related - can you try merging in main to see if that fixes things?
pre-commit.ci autofix
Thanks @avecasey
BUG: df.query("1 == 0.1") failed with UndefinedVariableError: name 'BACKTICK_QUOTED_STRING_1' is not defined 
State: closed

- [x] closes #60494 
- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [x] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [x] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.


Labels:
name: Stale

Comments:
This pull request is stale because it has been open for thirty days with no activity. Please [update](https://pandas.pydata.org/pandas-docs/stable/development/contributing.html#updating-your-pull-request) and respond to this comment if you're still interested in working on this.
Thanks for the pull request, but it appears to have gone stale. If interested in continuing, please merge in the main branch, address any review comments and/or failing tests, and we can reopen.
BUG: Fix pyarrow and numpy logical bug concerning bool and string
State: closed

- [ ] closes #60234 
- [ ] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [ ] Added an entry in the latest `doc/source/whatsnew/v3.0.0.rst` file if fixing a bug or adding a new feature.

Using logical operators (e.g., |, &) on non-boolean data, where this data should be cast to bool, works for most types (e.g., float, strings). However, these operations fail with pyarrow-backed strings and numpy-backed strings. 

This PR fixes the issues with pyarrow-backed string arrays by casting them into boolean arrays when they are used with logical operators. The newly implemented helper functions `convert_string_to_boolean_array` and `cast_for_logical` perform the casting, while the `ARROW_LOGICAL_FUNCS` dictionary has been modified to use these helper functions in the process of performing logical operations (see [pandas/core/arrays/arrow/array.py](https://github.com/ldlin1/pandas/commit/d97c8378a4830fde48aad1e99e60eea7a2cea5ff)).

This PR fixes the issues with numpy-backed string arrays by casting them into boolean arrays whenever they are used with boolean arrays in logical operations. This is done in the `logical_op` function (see [pandas/core/ops/array_ops.py](https://github.com/ldlin1/pandas/commit/7188634652e87c8be8e7b983565c6ee0d9970d34)).

Labels:

Comments:
Thanks for the pull request, but it appears to have gone stale. If interested in continuing, please merge in the main branch, address any review comments and/or failing tests, and we can reopen.