BrandonFors/pandas-github-issues huggingface dataset:
ENH: EA._cast_pointwise_result
State: open

- [x] closes #59895 (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.

Still have a bunch of pyarrow tests involving duration/timestamp dtypes failing.  Also need to update/remove the test files' _cast_pointwise_result methods.

xref #56430, could close that with a little effort.

I suspect a bunch of "pyarrow dtype retention" tests are solved by this, will update as I check.

Labels:

Comments:
The pyarrow duration stuff is caused by an upstream issue https://github.com/apache/arrow/issues/40620
@rhshadrach i think you had a recent issue/pr involving retaining nullable dtypes in a .map?
ENH: Warn on unused arguments to resample
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: Resample
description: resample method
name: Warnings
description: Warnings that appear or should be added to pandas

Comments:
Thanks @jbrockmendel
DOC: Sort the pandas API reference navbar in alphabetical order
State: open

- [x] closes #59164
- [ ] [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.

Changes made:
- Added JavaScript to sort only the items in each section of the sidebar and not the section headers.
- This is a re-submission of my previous pull request #62069, which was closed due to the fact that issue #59164 had a "Needs Discussion" tag. To update, the maintainer who placed the tag has acknowledged my previous PR and was okay with merging it. I've also added a comment in #59164 to answer another maintainer's question about why JavaScript was used to fix the issue instead of using Sphinx.

Labels:

Comments:
pre-commit.ci autofix
DOC: Add to_julian_date to DatetimeIndex methods listing
State: closed

First time contributor here.

- ~[ ] closes #xxxx (Replace xxxx with the GitHub issue number)~ No issue related
- ~[ ] [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.~ Nothing new
- [ ] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

Add `to_julian_date` documentation entry to `pandas.DatetimeIndex`.

Currently, it is not listed nor can be found in the documentation: https://pandas.pydata.org/docs/reference/api/pandas.DatetimeIndex.html
`pandas.Timestamp` already has it linked https://pandas.pydata.org/docs/reference/api/pandas.Timestamp.to_julian_date.html
from the time it was added v0.14.0 https://pandas.pydata.org/docs/whatsnew/v0.14.0.html

I haven't read through the contributing section, please point out if there is something missing. If it looks okay, tell me to proceed with the whatsnew task.

Docs artifact for second commit (it works): https://github.com/pandas-dev/pandas/actions/runs/16895776565/job/47865152612?pr=62090

Labels:
name: Docs

Comments:
Thanks @echedey-ls
DEPS: update python version in dockerfile
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
- [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.



commit -> https://github.com/pandas-dev/pandas/commit/7863029c3084c79b226c0a1c3daeac82929534f1
pull request -> https://github.com/pandas-dev/pandas/pull/62066

Due to the recent change of the python version 3.10 -> 3.11, the gitpod and docker deployments are failing with the following error:

```bash
meson-python: error: Unsupported Python version 3.10.8, expected >=3.11
  error: subprocess-exited-with-error
  
  × Preparing editable metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> See above for output.
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  full command: /usr/local/bin/python /usr/local/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py prepare_metadata_for_build_editable /tmp/tmpxivcdhnp
  cwd: /workspace/pandas
  Preparing editable metadata (pyproject.toml) ... error
  ```
  
Updating the 3.10.8 in the Dockerfile to 3.11.13 solves the problem.

Labels:

Comments:
Thanks @surenpoghosian
REF: split big method in pyarrow csv wrapper
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: IO CSV
description: read_csv, to_csv
name: Arrow
description: pyarrow functionality

Comments:
Thanks @jbrockmendel
DEPS: Bump meson-python, lower pin Cython
State: open

Since we recently adopted building with Cython 3 a while back, we don't want to allow users to build pandas with a Cython version lower than that

Labels:
name: Build
description: Library building on various platforms
name: Dependencies
description: Required and optional dependencies

Comments:
  pandas/_libs/tslibs/ccalendar.cp313-win_amd64.pyd.p/pandas/_libs/tslibs/ccalendar.pyx.c(9749): error C2220: the following warning is treated as an error
  pandas/_libs/tslibs/ccalendar.cp313-win_amd64.pyd.p/pandas/_libs/tslibs/ccalendar.pyx.c(9749): warning C4244: '=': conversion from 'Py_ssize_t' to 'long', possible loss of data

Is it just me or is the meson system harder to debug than the old system?
> Is it just me or is the meson system harder to debug than the old system?

Yeah there's a little more indirection than before (meson-python -> meson vs just setuptools), but I understand the "standardization" of meson/cmake is better than the wild-west of using setuptools 
I don't have a strong point of view on bumping Meson, although I think it would be good to keep the lower bound as is until a new feature is required.  (I definitely agree with un-pinning)

If we do need the 1.6 bump, you will also want to add that change to the `meson_version` key in the `project` function call in meson.build
https://github.com/mesonbuild/meson-python/issues/716 suggested to use the jinja2 FileSystemLoader instead of PackageLoader, and it seems that @WillAyd tried that in https://github.com/pandas-dev/pandas/pull/60681. @WillAyd do you remember if that worked?
> [mesonbuild/meson-python#716](https://github.com/mesonbuild/meson-python/issues/716) suggested to use the jinja2 FileSystemLoader instead of PackageLoader, and it seems that @WillAyd tried that in #60681. @WillAyd do you remember if that worked?

Just testing it out directly, seems to work fine -> https://github.com/pandas-dev/pandas/pull/62123
> Or is there a good reason to still bump that one? 

I didn't have a particular reason besides using a newer version of meson-python (which should be less consequential than bumping meson), especially for our minimum dependency build (where I should have pinned meson-python)
BUG: Preserve column names in DataFrame.from_records when nrows=0
State: closed

Follow up on #61143
- [x] closes #61140
- [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/vX.X.X.rst` file if fixing a bug or adding a new feature.


Labels:
name: DataFrame
description: DataFrame data structure

Comments:
Thanks @yuanx749
BUG: Preserve full float precision when double_precision=15 in to_jso…
State: open

…n; avoid truncation before serialization (#62072)

- [ ] 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:
Can you add tests for the fixed behavior? What is the performance impact?
BUG: Series.round with pd.NA no longer raises; coerce object+NA to nullable float and round; add test (#61712)
State: open


Summary: 
Fixes Series.round raising TypeError for object-dtype Series containing pd.NA by coercing to nullable Float64 before rounding, preserving pd.NA values.

Description:
This PR fixes an issue where calling Series.round on an object-dtype Series containing pd.NA would raise a TypeError.
The method now attempts to safely cast to the nullable Float64 dtype before rounding, preserving pd.NA values.

Includes:

Bug fix in Series.round to coerce object with pd.NA to Float64 and round as expected.

New test in test_round.py covering the case of object-dtype Series with pd.NA.

Added changelog entry in doc/source/whatsnew/v3.0.0.rst.

 closes #61712

 [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests)

 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) (N/A – no new functions/args)

 Added an entry in the latest doc/source/whatsnew/v3.0.0.rst file

Labels:

Comments:
Simpler to just operate point wise?
> Simpler to just operate point wise?

Thanks for the feedback! I went with the dtype coercion approach since it keeps the operation vectorized and avoids Python-level iteration, which I assumed would be more consistent with how similar numeric conversions are handled in Pandas.

A pointwise implementation could definitely work for handling pd.NA cases explicitly, but I was aiming to minimize performance overhead and preserve existing behavior for other object-typed numeric data. If you think a pointwise approach would be preferable for clarity or maintainability here, I’m happy to prototype it so we can compare.
The trouble with the casting approach is it only works in castable cases.  Things like Decimal objects don't fit that.
> The trouble with the casting approach is it only works in castable cases. Things like Decimal objects don't fit that.

Thanks for pointing that out, I see what you mean about the limitation with non-castable types like Decimal. That’s a good case where the dtype coercion approach wouldn’t behave correctly.

I can prototype a pointwise implementation so we can compare behavior and performance, and make sure it handles cases like Decimal properly. If the trade-offs look acceptable, we could go with that approach to ensure correctness across all object-typed inputs.

Would you prefer I push that as an additional commit here, or open a separate PR so we can compare more cleanly?
Just update this PR
BUG: Bug fix for implicit upcast to float64 for large series (more than 1000000 rows)
State: open

## PR Requirements
- [x] closes #61951
- [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/v3.0.0.rst` file if fixing a bug or adding a new feature.

## Issue Description
Performing binary operations on larger `Series` with `dtype == 'float32'` leads to unexpected upcasts to float64.
Above example prints `float32 float64`.
Using `to_numpy()` on the series before addition inhibits the implicit upcast.

## Expected Behavior
I expect above snippet to print `float32 float32`.

## Bug Fix
Changed scalar conversion logic for NumPy floating scalars to avoid automatic conversion to Python `float`. Now returns a scalar of the original NumPy dtype to preserve type and prevent unintended dtype upcasts.

Labels:

Comments:
pre-commit.ci autofix
BUG: Fix tz_localize(None) with Arrow timestamp
State: closed

- [x] closes #61780
- [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/vX.X.X.rst` file if fixing a bug or adding a new feature.


Labels:
name: Timezones
description: Timezone data dtype
name: Arrow
description: pyarrow functionality

Comments:
Thanks @yuanx749
BUG(CoW): also raise for chained assignment for .at / .iat
State: closed

Noticed while working on https://github.com/pandas-dev/pandas/issues/61368. I assume this was an oversight in the original PR https://github.com/pandas-dev/pandas/pull/49467 adding those checks. Also added some more explicit tests for all of loc/iloc/at/iat

Labels:
name: Still Needs Manual Backport
name: Copy / view semantics

Comments:
Thanks @jorisvandenbossche 
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 b84ac0ec647902b9dd0c1bcda790b289f577b617
```

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

```
git commit -am 'Backport PR #62074: BUG(CoW): also raise for chained assignment for .at / .iat'
```

4. Push to a named branch:

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

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

> "Backport PR #62074 on branch 2.3.x (BUG(CoW): also raise for chained assignment for .at / .iat)"

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).
                
Manual backport -> https://github.com/pandas-dev/pandas/pull/62115
MNT: migrate from codecs.open to open
State: closed

c.f. #61950, towards supporting Python 3.14

See [the 3.14 deprecations](https://docs.python.org/3.14/whatsnew/3.14.html#deprecated) and https://github.com/python/cpython/issues/133036 for more details.

There is one spot that was nontrivial - the use in `pandas.util._print_versions` I think was buggy - it wanted to write a file in bytes mode and also specified an encoding. `codecs.open` didn't blink at this but regular `open` is more restrictive. I think what I updated it to is correct and this is a latent bug, probably introduced a long time ago in the 2->3 transition.

- [ ] [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: Testing
description: pandas testing functions or related to the test suite

Comments:
Thanks @ngoldbaum
DOC: Sort the pandas API reference navbar in alphabetical order
State: closed

- [x] closes #59164
- [ ] [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.

Changes made:
- Added JavaScript to sort only the items in each section of the sidebar and not the section headers.

Labels:

Comments:
Thanks for the PR, but as noted in the issue it still `needs discussion` on the solution to move forward so closing
Update pytables.py to include a more thorough description of the min_itemsize variable
State: open

- [ ] 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.

I am a student contributing for the first time, none of the additions were generated with AI and this PR description is not generated by AI. 

I am addressing Issue 14601 where the current documentation for 'min_itemsize' is not thorough enough. It seems to me based on my research that the issue is that people treat it as though it counts characters instead of byte size for strings being input into a table. 

I kept the additions simple to avoid any confusion and am open to suggestions on how I can improve this contribution. If there are any specific issues please point me to the location in your contribution guide so I can better understand any errors I might have made. 


Labels:

Comments:
Let’s start with the CI failures. Can you address them?
DOC: Docstring additions for min_itemsize
State: closed

## Problem Summary

The current pandas documentation for `min_itemsize` in HDFStore methods doesn’t clearly explain that it refers to byte length, not character length. This causes confusion when working with multi-byte characters.

## Proposed Addition to HDFStore.put() and HDFStore.append() docstrings

Add this clarification to the `min_itemsize` parameter description in the appropriate methods:

```
min_itemsize : int, dict, or None, default None
    Minimum size in bytes for string columns when format='table'.
    int - Apply the same minimum size to all string columns, 
    dict - Map column names to their minimum sizes or, 
    None - use the default the sizing
    Important: This specifies the byte length after encoding, not the 
    character count. For multi-byte characters, calculate the required
    size using the encoded byte length.
    See examples below for use.
```

And adding this to the example section for each docstring:

```
    Examples:
    - ASCII 'hello' = 5 bytes
    - UTF-8 '香' = 3 bytes (though only 1 character)
    - To find byte length: len(string.encode('utf-8'))
```

## Why This Helps

- Directly addresses the confusion in issue #14601
- Provides practical guidance for users working with international text
- Keeps the explanation concise and focused
- Includes actionable examples

Labels:

Comments:
AI-generated pull requests are not welcome in this project, closing
API: make construct_array_type non-classmethod
State: closed

- [x] closes #58663 (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.
- [x] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

Makes the method robust to the possibility of keywords (e.g. na_value, storage) that determine what EA subclass you get.  StringDtype already does this.

Labels:
name: ExtensionArray
description: Extending pandas with custom dtypes or arrays.

Comments:
Thanks @jbrockmendel