BrandonFors/pandas-github-issues huggingface dataset:
[minor edit] fix typo: psudocode -> pseudocode
State: closed

this PR fixes this typo spotted here:

https://github.com/pandas-dev/pandas/blob/a811388727bb0640528962191b0f4e50d8235cfd/.github/ISSUE_TEMPLATE/feature_request.yaml#L34

<!--
- [ ] 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: CI
description: Continuous Integration

Comments:
Thanks @kirisakow
ENH: Add tzdata to hard dependencies
State: closed

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


Labels:
name: Error Reporting
description: Incorrect or improved errors from pandas

Comments:
Thanks @chilin0525
EHN: `df.to_latex(escape=True)` also escape index names
State: closed

- [ ] closes #57362 (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.

Stage 3. Part of an multi-stages effort: https://github.com/pandas-dev/pandas/pull/57880#issuecomment-2003636401
Part 2 has a issue at https://github.com/pandas-dev/pandas/issues/59324
But in the process of implementing, I realized the current implementation of `df.to_latex(escape)` does not go through `styler.to_latex` but to call `styler.format_index`. This implementation follows the same flow. So maybe part 2 is not really relevant.


Labels:
name: Bug
name: IO LaTeX
description: to_latex
name: Styler
description: conditional formatting using DataFrame.style

Comments:
cc @attack68 as the codeowner of styler
Thanks @quangngd
Fix #59772: tz_aware NaT raises exception on to_numpy
State: closed

Fix error when converting tz-aware Series with NaT to NumPy array

- [x] closes #59772 
- [x] [Tests added and passed] if fixing a bug or adding a new feature
- [ ] All [code checks passed]
- [ ] Added [type annotations] 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.

Previously,  converting a Series of timezone-aware pd.NaT to a NumPy array using
.to_numpy("datetime64[ns]") would raise an exception.
It would happen because it could not be converted to datetime64 as a tz-aware value.
This is now fixed by removing the timezone localization from NaT values before the conversion.


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.
DOC: copyedit _base.py
State: closed

No need to restate the library name

- ~~[ ] 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

Comments:
Thanks @wjandrea
BUG: Raise clear error when assign is used with non-string column keys
State: closed

### What does this PR do?

Fixes confusing behavior when `.assign()` is used with non-string keys like tuples. Python raises a generic `TypeError: keywords must be strings`, which confuses users.

This PR adds a more helpful message:
> assign() only supports string column names. Use df[('C', 'one')] = ... to assign non-string column names like tuples.

### Why?

This improves the developer experience and avoids unnecessary debugging time.

### How was this fixed?

- Added `__kwargs_dict__` as a keyword-only argument for testing with tuple keys
- Added validation in `assign()` for string-only keys
- Updated existing test for compatibility
- Added new test: `test_assign_with_tuple_column_key_raises_typeerror`

### Test added

 `test_assign_with_tuple_column_key_raises_typeerror`


Labels:

Comments:
Thanks for the PR, but it appears there a lot of changes in unrelated files. Going to close this PR, but ensure that pull requests are made from the latest commit on main
BUG: pivot_table with overlapping values
State: closed

- [x] closes #57876
- [x] closes #61292
- [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: Reshaping
description: Concat, Merge/Join, Stack/Unstack, Explode

Comments:
Should I update the `doc/source/whatsnew/v2.3.0.rst` or `doc/source/whatsnew/v3.0.0.rst` file?
@it176131 - update v3.0.0. Also due to an erroneous commit with a large file, we've had to force-push to the main branch recently. You'll need to fix this up by removing the erroneous commit from your history as well. See the unexpected changes and file in the diff - those need to be reverted.

@datapythonista - if we're going to force-push to a contributors branch, I think a comment detailing what's going on would be helpful.
@rhshadrach I believe I've reverted the changes as requested. Please lmk if I did it incorrectly.

Oh, so GitHub added the image we removed to the open PRs? That explains why it was in that PR...
@rhshadrach [this check](https://github.com/pandas-dev/pandas/actions/runs/14518139891/job/40732136143?pr=61293) appears to have failed due to a timeout—is there a way to restart it?
Thanks @it176131
WEB: Update benchmarks page
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: Benchmark
description: Performance (ASV) benchmarks
name: Web
description: pandas website

Comments:
@datapythonista This is ready for another look.
ENH: Update DataFrame.to_stata to handle pd.NA and None values in strL columns
State: closed

- [x] closes #23633  (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: IO Stata
description: read_stata, to_stata

Comments:
Thanks @Danferno
DOC: Improve clarity and beginner-friendly tone in table tutorial
State: closed

This PR makes small improvements to the 01_table_oriented.rst tutorial in the getting_started/intro_tutorials section. The changes include:

Simplified explanations for importing pandas and creating DataFrames.

Improved grammar and sentence clarity.

Reworded the Series and describe() method descriptions to be more beginner-friendly.

These edits aim to enhance readability and help first-time users better understand pandas concepts.


Labels:

Comments:
Thanks for the PR, but I do not think these changes substantially improve the existing text so going to close this PR. It's best to open PRs that related to an open issue that has been triaged
Doc-groupby-ewm
State: closed

- [x] closes #61268 (Adding documentation for `groupby.ewm()`)
- [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.
- [ ] [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
- [ ] 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 this is already being addressed in https://github.com/pandas-dev/pandas/pull/61283 so closing as already being worked on
DOC: Add documentation for `groupby.ewm()`
State: closed

- [x] closes #61268
- [ ] ~[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
name: Window
description: rolling, ewma, expanding

Comments:
Thanks @arthurlw
WEB: Add pandas cookbook 3 to home page
State: closed

#61271 was hard reverted, as it contained a 1.4 Mb image which we didn't want in our git history.

Same PR here, but with the image now using 9Kb.

@WillAyd, if you check in detail, you and Matt look a bit like cartoons, hahaha. This is because I'm just using 24 colors in the image, as this makes the file size much smaller than using 256. I don't think anyone will notice, and even when paying attention to me it looks kind of cool, more than anything bad. But I'm surely happy to improve the quality of the image and have an image some Kb bigger if you prefer. Just let me know.

Labels:
name: Web
description: pandas website

Comments:
/preview
Website preview of this PR available at: https://pandas.pydata.org/preview/pandas-dev/pandas/61279/
ENH: support reading directory in read_csv
State: open

- [x] closes https://github.com/bodo-ai/Bodo-Pandas-Collaboration/issues/2
- [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: IO CSV
description: read_csv, to_csv

Comments:
FWIW I recall the team being negative in the past about supporting reading directories of files, and we document just concatting DataFrames read from a directory: https://pandas.pydata.org/docs/user_guide/cookbook.html#reading-multiple-files-to-create-a-single-dataframe. Are we sure we want to include this?
> FWIW I recall the team being negative in the past about supporting reading directories of files

Do you remember the reason? This seems like a useful thing, as I think it's common for some datasets to be split in different files with the same schema. And there is some added complexity to this, but it seems consistent with other syntactic sugar we have in IO operations such as decompressing, downloading, etc.


Note that you've got the image from Will's book in this PR, this happened when we had to hard revert it from git history.
The remaining test failures are related to S3. Not sure what the root cause is. Trying to cleanup S3-related tests a bit in https://github.com/pandas-dev/pandas/pull/61703.
i think an unrelated file got added?
DOC: Add documentation for `groupby.expanding()`
State: closed

- [x] closes #61254 
- [ ] ~[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
name: Groupby
name: Window
description: rolling, ewma, expanding

Comments:
Thanks @arthurlw - If you're interested I also think it would be good to replace `*args` and `**kwargs` throughout the public functions in the pandas API with the exact arguments that the method takes. This is more user-friendly not only for docs, but for linting and auto-completion.
Yeah I would be happy to work on replacing `*args` and `**kwargs` in public functions. I'll draft an issue and start listing down some of the public functions that need updating. Let me know if there’s a preferred place to start or if you’d prefer separate issues/PRs per module or function.
I would recommend "one" method per PR (where e.g. Series.sum and DataFrame.sum counts as 1) but no issues need to be made unless it seems uncertain whether we want to replace *args / **kwargs. The one case where we don't want to replace them is when they are passed through to a third-party (e.g. matplotlib or xlsxwriter).
Add Pandas Cookbook to Book Recommendations
State: closed

The link here is a special link used to track sales of the Pandas Cookbook through the pandas website. NumFOCUS and Packt (the publisher) have agreed that the latter will donate part of the proceeds through this link directly back to NumFOCUS

Labels:
name: Docs

Comments:
Thanks @WillAyd 
@WillAyd @mroeschke @pandas-dev/pandas-core, great to have the book added (and published), but would it makes sense to revert this commit? It's still the last one, and it increases the repo size by 1.3Mb for the book cover. We can optimize it like the other book covers, and leave it in around 10Kb with reasonable quality.

Also, the image url in the html has the wrong extension (gif), the correct one is jpeg, so the home page shows the image broken right now.

It'll surely make things a bit tricky for people who cloned the code since this was merged, but personally I think it's worth.
Ah sorry about the image size - yes can replace with an optimized one. 

> Also, the image url in the html has the wrong extension (gif), the correct one is jpeg, so the home page shows the image broken right now.

Hmm so do I need to save the file as a gif in the git repo? The other two books have that extension
The extension is irrelevant, it's just the mismatch the problem. gif allows to have smaller color palettes, which can help reduce the image size, that's why the others are gif.

The main question here is if we just fix this, and we let the 1.3Mb stay in our git history, or if we hard undo this in the commit history, avoiding the 1.3Mb, but creating a bit of trouble to few uses because rewriting git history. If people are not ok with this, then better to leave the image as it is, and just fix the extension in the html so it renders correctly.
I would be fine with a hard undo since its the HEAD of main. I don't foresee that causing too much trouble
For people who cloned or pulled the reverted commit git will error, and not sure if just require the `-f` flag to leave things back to normal, or some other trouble. But for me, still worth it.
Alternative: https://dalibornasevic.com/posts/2-permanently-remove-files-and-folders-from-a-git-repository

Not sure how intrusive that would be as opposed to just removing the last commit.
I would also support hard undoing the last commit
Done. I'll open a new PR with the changes here
Backport PR #61265: TYP: Add ignores for numpy 2.2 updates
State: closed

xref https://github.com/pandas-dev/pandas/pull/61265

Labels:
name: Code Style
description: Code style, linting, code_checks
name: Typing
description: type annotations, mypy/pyright type checking

Comments:
Ah numpy is still pinned < 2 on 2.3 so we don't need this backport
TYP: Add ignores for numpy 2.2 updates
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: Code Style
description: Code style, linting, code_checks
name: Typing
description: type annotations, mypy/pyright type checking

Comments:
Merging to get CI to green. The type ignore can be addressed in the future
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 adec21f3fa896684cad04ecf1878a9f2492370ea
```

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

```
git commit -am 'Backport PR #61265: TYP: Add ignores for numpy 2.2 updates'
```

4. Push to a named branch:

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

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

> "Backport PR #61265 on branch 2.3.x (TYP: Add ignores for numpy 2.2 updates)"

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).
API: Rename `arg` to `func` in `Series.map`
State: closed

- [X] closes #61260
- [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.

CC: @rhshadrach 

Labels:
name: Deprecate
description: Functionality to remove in pandas
name: Apply
description: Apply, Aggregate, Transform, Map
name: API - Consistency
description: Internal Consistency of API/Behavior

Comments:
Thanks @datapythonista
DEBUG: Cython failures
State: closed

Trying to get a Cython reproducer for https://github.com/pandas-dev/pandas/pull/61249

Labels:
name: Build
description: Library building on various platforms

Comments:
First piece of repro from [8837a71](https://github.com/pandas-dev/pandas/pull/61262/commits/8837a71a9797cdc82f331c1205759e473e5fa219)

```cython
cpdef timedelta debug_2():
    cdef int64_t val = -420000000000
    us, remainder = divmod(val, 1000)
    if remainder >= 500:
        us += 1
    return timedelta(microseconds=us)
```

Windows 3.13t: `datetime.timedelta(microseconds=906795)`
Other Platforms: `datetime.timedelta(days=-1, seconds=85980)`

Opened https://github.com/cython/cython/issues/6786 as a result of this investigation so closing