BrandonFors/pandas-github-issues huggingface dataset:
Typing: More precise NaT stub
State: closed

- marked arguments in dunder methods positional only
  (important for subclassing and protocols)
- added `Period`, `np.datetime64` and `np.timedelta64` as compatible for `__add__` and `__sub__`
- added `np.datetime64` and `np.timedelta64`  as compatible with `__floordiv__` and `__truediv__`
- reworked comparisons:
  - removed protocol and use plain definition
  - changed return type from `bool` to `Literal[False]`
  - added `Self` to comparable types, so that `pd.NaT > pd.NaT` is considered valid


- [x] closes #60003 (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
- [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: Missing-data
description: np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
name: Typing
description: type annotations, mypy/pyright type checking

Comments:
Thanks @randolf-scholz
Fix Styler docstring
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.


Labels:
name: Docs
name: Styler
description: conditional formatting using DataFrame.style

Comments:
Thanks @albertvillanova
REGR: groupby.value_counts with all NA values
State: closed

- [x] closes #59989 (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.


Labels:
name: Bug
name: Groupby
name: Regression
description: Functionality that used to work in a prior pandas version
name: Algos
description: Non-arithmetic algos: value_counts, factorize, sorting, isin, clip, shift, diff

Comments:
Thanks @rhshadrach
[pre-commit.ci] pre-commit autoupdate
State: closed

<!--pre-commit.ci start-->
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.5.0 → v0.6.9](https://github.com/astral-sh/ruff-pre-commit/compare/v0.5.0...v0.6.9)
- [github.com/jendrikseipp/vulture: v2.11 → v2.13](https://github.com/jendrikseipp/vulture/compare/v2.11...v2.13)
- [github.com/pre-commit/pre-commit-hooks: v4.6.0 → v5.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.6.0...v5.0.0)
- [github.com/sphinx-contrib/sphinx-lint: v0.9.1 → v1.0.0](https://github.com/sphinx-contrib/sphinx-lint/compare/v0.9.1...v1.0.0)
- [github.com/pre-commit/mirrors-clang-format: v18.1.8 → v19.1.1](https://github.com/pre-commit/mirrors-clang-format/compare/v18.1.8...v19.1.1)
<!--pre-commit.ci end-->

Note: pyupgrade 3.17 needs to be coordinated with an upgrade in mypy & pyright

Labels:
name: Code Style
description: Code style, linting, code_checks

Comments:
/preview
/preview
Website preview of this PR available at: https://pandas.pydata.org/preview/pandas-dev/pandas/59998/
BUG: fix #59965 skipna=True operations don't skip NaN in FloatingArrays
State: closed

    - Issue: The skipna was not properly handled for BaseMaskedArray
    - Fix: Added mask for NA values
    - Test: Added test to series/test_reductions since the test uses

- [X] closes #59965
- [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).

Labels:
name: Missing-data
description: np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
name: NA - MaskedArrays
description: Related to pd.NA and nullable extension arrays
name: Stale
name: Reduction Operations
description: sum, mean, min, max, etc.

Comments:
Apologies @cooolheater - based on the discussion in the linked issue, I think we have to hold off making changes here until a consensus is reached on how to handle various NA values across pandas. There is already a PDEP in progress for this, but it will likely be quite some time until we're ready for this change.
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 PR, but since there's still discussion about the expected behavior going to close this PR in the meantime
Typing: Added missing methods to `NaTType` stub
State: closed

- [x] closes #59996
- [ ] [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.
- [ ] 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: Missing-data
description: np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
name: Typing
description: type annotations, mypy/pyright type checking

Comments:
Thanks @randolf-scholz
enhancement on times.py
State: closed

- [ ] closes #59931  (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.


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.
Enhancements in numeric.py for 0x,0o,0b
State: closed

- [x] closes #59207 (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.


Labels:

Comments:
Thanks for the PR, but before adding functionality the core team usually needs to discuss in the issue whether the feature is work including. Going to close this PR since it's a little too early for an implementation but we can reopen if there's positive interest in this feature
Fix: Change None values to NaN in combine_first method for better handling of missing data
State: closed

### Description

This pull request addresses issue #58977 by improving the handling of missing data in the `combine_first` method. The changes ensure that `None` values are replaced with `NaN`, which allows for better integration with other Pandas functions that expect `NaN` values.

### Related Issue
- Fixes #58977

### Checklist

- [x] Tests added and passed if fixing a bug or adding a new feature
- [x] All code checks passed

Labels:

Comments:
Thanks for the PR but it appears this PR has gone stale and requires unit tests and a whatsnew entry. Closing but feel to reopen a new pull request if interested in continuing
DOC: Fix typos in plotting.table
State: closed

Fix typos in pandas.plotting.table docstring.

- [ ] 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
- [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.


Labels:
name: Docs

Comments:
Thanks @StefRe
Programming Language :: Python :: 3.13 added to pyproject.toml
State: closed

- [ ] closes #59978 (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.


Labels:
name: Docs

Comments:
Thanks @nahcol10
BUG: fix to_numeric raises TypeError for Timedelta and Timestamp scalar
State: closed

- [x] closes #59944 (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
- [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.
- [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: Bug
name: Dtype Conversions
description: Unexpected or buggy dtype conversions
name: Timedelta
description: Timedelta data type
name: Timestamp
description: pd.Timestamp and associated methods

Comments:
Thanks @yuanx749
Shiny new feature
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.


Labels:

Comments:
Thanks for the PR, but it's unclear what this PR addresses. I would recommend opening a PR in your own repo first if practicing the contributing flow so closing
DOC: Fix title capitalization in documentation files (#32550)
State: closed

Corrected title capitalization in various .rst files to match the standard of capitalizing only the first word, unless a term like DataFrame or Series is involved.

Ran the  script to find and
correct heading issues in the following files:
- doc/source/user_guide/timedeltas.rst
- doc/source/whatsnew/v0.7.0.rst
- doc/source/whatsnew/v0.23.4.rst
- (… and so on)

Fixes part of issue #32550.

- [ ] closes #32550 


Labels:
name: Docs

Comments:
Thanks @steeleelliott03
BUG: fix #59950 handle duplicate column names in dataframe queries
State: closed

### Issue Description

When calling `DataFrame.query()` on a DataFrame with duplicate column names, an unexpected `TypeError` is raised due to a change introduced in pandas 2.2.1. The root cause is the `self.dtypes[k]` returning a Series for duplicate column names instead of a single value, leading to a failure in the query evaluation.

### Changes Made

- Fixed an issue where `Dataframe.query()` would throw an unexpected error

- The error was caused by `self.dtypes[k]`

- Adjusted the behavior to match the behavior prior to pandas version

- Added tests to ensure that `Dataframe.query()` works as expected

## PR Checklist

- [x] closes #59950
- [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.


Labels:
name: expressions
description: pd.eval, query

Comments:
Thanks @miguelcsx
Install ADBC drivers from conda instead of pip
State: closed


Labels:

Comments:
Hmm looks like the postgres driver has noarch packages on conda forge but the sqllite driver does not have windows packages on conda forge

https://anaconda.org/conda-forge/adbc-driver-postgresql
https://anaconda.org/conda-forge/libadbc-driver-sqlite
Ah...that's right. I forgot about that issue upstream

https://github.com/apache/arrow-adbc/issues/1149

Let's close for now and revisit after that gets resolved
BUG: Fix SparseFrameAccessor.to_dense return type
State: closed

- [x] closes #59913
- [x] Tests added and passed
- [x] All code checks passed
- [x] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file

Labels:
name: Sparse
description: Sparse Data Type
name: Subclassing
description: Subclassing pandas objects

Comments:
pre-commit.ci autofix
Thanks @janezd
BUG: fix treatment of NaNs when .apply() function is used on categorical columns.
State: closed

- [x] closes #59938
- [x] [Tests added and passed] (modified existing test function to accommodate change for `NaN` in cat columns)
- [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.


Labels:
name: Categorical
description: Categorical Data Type
name: Apply
description: Apply, Aggregate, Transform, Map

Comments:
RFR and looking forward to any suggested edits @mroeschke 
Thanks @saldanhad
BUG: fix nbsp for html formatting
State: closed

- [x] closes #59876
- [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).

Fixes:
- Modified :class:HTMLFormatter._write_cell to escape regular spaces as &nbsp;, ensuring multiple spaces are preserved in the HTML output.


Labels:
name: Output-Formatting
description: __repr__ of pandas objects, to_string

Comments:
Hi @mroeschke, Since the this issue is related to the float formatting, I included the test cases for `nbsp` in the same test function. Request you to please review. Thanks! 
Thanks @saldanhad
Fix API: astype method fails to raise errors for category data type
State: closed

- [x] closes #59899 (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
- [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.


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.
DOCS: fix docstring validation errors for pandas.Series #59595
State: closed

Fixes the following issues from #59595 

-i "pandas.Series.sparse.fill_value SA01" \
-i "pandas.Series.str.match RT03" \ 

- [x] Partially addresses #59595 
- [ ] [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).
- [ ] 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: Stale

Comments:
I am a new contributor looking to make my first PR. I have fixed the merge conflict with the previously added solution for sparse.fill_value docstring by keeping both our additions to the "See Also" section, and have added the extended description to the str.match docstring fixing that docstring.
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: PeriodIndex.to_datetime inconsistent with its docstring
State: closed

- [x] closes #59371
- [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).
- [ ] 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:

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.
@mroeschke Hey sorry, I'm coming back to this after a break. Can you please reopen? I merged in the main branch, and there are no review comments.
Handling conversion of empty categorical with dtype_backend='pyarrow'
State: closed

- [x] closes #59934
- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests)
- [x] Added an entry in the latest `doc/source/whatsnew/v3.0.0.rst` file if fixing a bug or adding a new feature.

Following up on comments in #59935

Labels:

Comments:
Closing. Ref: https://github.com/pandas-dev/pandas/pull/59935#issuecomment-2392181218
Update html.py
State: closed

Adding a mathjax_ignore as a bug fix to ensure that proper formatting is performed

- [X] closes #59884  (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).
- [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: Bug
name: Output-Formatting
description: __repr__ of pandas objects, to_string
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.
Closing as stale. If you'd like to continue, address the requests above, merge main, and we can reopen!
Update hist.py
State: closed

Minor improvement, allowing inference of the xlabel for a histgram plotted using a Series.

Reduces these lines of code:
```
ax=ds.hist()
ax.set(
    xlabel=ds.name,
)
``` 
to 
```
ds.hist()
``` 
---
- [NA] closes #xxxx (Replace xxxx with the GitHub issue number)
- [NA] [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
- [NA] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [NA] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [NA] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.


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.
No worries. If anyone stumbles on this, there is a wrapper package called `roux` which implements this shortcut.
Demo: https://github.com/rraadd88/roux/blob/323b076ee5649cfcb7b99a1ba5be700a2a9cf0db/examples/roux_viz_ds.ipynb
Bugfix/apply inconsistent with categorical data
State: closed

Previously, the apply method set na_action="ignore" for categorical data to maintain backward compatibility. With the changes introduced in [#51645](https://github.com/pandas-dev/pandas/pull/51645), this is no longer needed. Removing the redundant parameter simplifies the codebase and ensures consistency with the updated default behavior.


Labels:

Comments:
Thanks for the PR but it looks like this issue was address by another contributor already so closing