BrandonFors/pandas-github-issues huggingface dataset:
REGR: loc not working with NamedTuple
State: closed

- [x] closes #48124 (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).
- [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: Indexing
description: Related to indexing on series/frames, not to indexes themselves
name: Regression
description: Functionality that used to work in a prior pandas version

Comments:
This fix might be worth repeating around here to fix the same issue for `iloc`:
https://github.com/pandas-dev/pandas/blob/a2a939e5591657d4340c0f19e8a9a068e38b7078/pandas/core/indexing.py#L1605-L1609

See https://github.com/pandas-dev/pandas/issues/48124#issuecomment-1221269105 for a reproducible example.
Not a regression, so will keep this out of this pr
Understandable, #48188 has been made to tackle the iloc issue
Committed the changes
cool. can merge on green.
CLN: Replace incorrect GH#5667 with GH#5567
State: closed

Hello!

*The checklist is not applicable here*

### Pull request overview
* Replacing `GH#5667` ina comment with `GH#5567`.

### Details
The PR #6364 closes the issue #5567, but the comment this PR introduces in `indexing.py` incorrectly refers to 5<ins>6</ins>67 instead. This code was later moved, cleaned up, etc., but the reference to the incorrect 5667 stuck around.

* Tom Aarsen

Labels:

Comments:
thx @tomaarsen
TST/CI: Fix PerformanceWarning checking for string[pyarrow]
State: closed

xref https://github.com/pandas-dev/pandas/pull/48093

Appears a PR was merged in the meantime that didn't catch this recent failure on main. Ignoring stacklevel checking for now but will add an issue after this is merged.


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

Comments:
Merging to get main back to greenish
TST: Add test for replace categorical no replacement changes dtype
State: closed

- [x] closes #46672 (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).
- [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.

This works already on 1.4.3, so no need to backport anything


Labels:
name: Testing
description: pandas testing functions or related to the test suite
name: replace
description: replace method

Comments:
Thanks @phofl
TST: catch some test warnings
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: Testing
description: pandas testing functions or related to the test suite
name: Warnings
description: Warnings that appear or should be added to pandas

Comments:
Thanks @jbrockmendel
TST: Fix interchange/plotting/groupby test warnings
State: closed

- [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).

This PR has code changes that will help remove internally generated warnings that could be hit by users (for items added in 1.5 as well) so marking as 1.5

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

Comments:
Failures look related to https://github.com/pandas-dev/pandas/pull/48278, so merging since greenish.
Thanks @mroeschke!
Backport PR #48143 on branch 1.4.x (CI: Switch to mambaforge as base image for Docker ENV build)
State: closed

Backport PR #48143

Labels:
name: CI
description: Continuous Integration

Comments:
[Build Docker Dev Environment](https://github.com/pandas-dev/pandas/runs/7922288183?check_suite_focus=true#logs) green. merging.
DOC: Add pr number to whatsnew
State: closed

#47946
#48154 

cc @simonjayhawkins 

Labels:
name: Docs

Comments:
Thanks @phofl 

will merge this straight away. cancel the backport for this and keep the issue number addition in https://github.com/pandas-dev/pandas/pull/48154
Sounds good, thx
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 1.4.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 18d9cff63167cddc8e8967393c24006c520eea81
```

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

```
git commit -am 'Backport PR #48155: DOC: Add pr number to whatsnew'
```

4. Push to a named branch:

```
git push YOURFORK 1.4.x:auto-backport-of-pr-48155-on-1.4.x
```

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

> "Backport PR #48155 on branch 1.4.x (DOC: Add pr number to whatsnew)"

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).
Backport PR #47946: REGR: fix error caused by deprecation warning in pd.merge when joining two Series
State: closed

#47946 


Labels:
name: Reshaping
description: Concat, Merge/Join, Stack/Unstack, Explode
name: Warnings
description: Warnings that appear or should be added to pandas

Comments:
cc @simonjayhawkins Added the pr number
> cc @simonjayhawkins Added the issue number

we need to do the issue number as a sperate PR against main (and either backport or sync directly with 1.4.x) so that the release notes history on the future stable docs are also correct
Yep, already prepared the pr
BUG: idxmin and idxmax raising ValueError with all nan row
State: closed

- [x] closes #48123 (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).
- [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.

The Int64 case was working before too. Just added this for consistency

Labels:
name: Timedelta
description: Timedelta data type
name: Reduction Operations
description: sum, mean, min, max, etc.

Comments:
Probably worth noting the [documentation ](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.idxmax.html) should be modified as it says an exception is raised if there is a row / column that only contains NaN / NaT / .... I don't know if this is usually done within PRs?
Not sure what this is referencing exactly, this could also mean an empty object, e.g. no values at all
Was running the wrong tests obviously. The ValueError seems to be the expected behaviour
So is it fixed? Sorry not sure I get what you meant
Raising would be expected here
Yes but a fix is still needed since integers and timedelta datatypes don't behave the same way right?
CLN: Use cython algo for groupby var with ddof != 1
State: closed

- [ ] closes #xxxx (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).
- [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 

I think you've implemented ddof on the cython level a while back. Any reasons why var is taking a different path? Results look sensible and no failing tests

Also, gives a nice speedup 

Labels:
name: Groupby
name: Clean

Comments:
We've got the numba tests that are testing consistency between numba and cython, so I think we are good. They are testing ddof 0
Thanks @phofl
REGR: fix calling numpy bitwise ufunc with Index objects
State: closed

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


Labels:
name: Regression
description: Functionality that used to work in a prior pandas version
name: Index
description: Related to the Index class or subclasses
name: ufuncs
description: __array_ufunc__ and __array_function__

Comments:
> (whether the release note should be updated as suggested is subjective. My reasoning was to match the previous note)

Yeah, in the meantime also some other entries have been added that didn't match that (although maybe mainly by me ;))  
(in general, I find that using code formatting for every casual occurrence of DataFrame, Series, Index etc (not when specifying a specific method or referring to the class API docs) makes the text much more heavier to use)
BLD: Explicitly state pip as a dependency in environment.yml
State: closed

- [x] closes #48026 
- [x] All code checks passed [here](https://github.com/pandas-dev/pandas/actions/runs/2898960589)
- [x] Explicitly add pip as a dependency in environment.yml to prevent using incorrect version of pip

Labels:
name: Dependencies
description: Required and optional dependencies

Comments:
Used this to solve it: https://github.com/conda/conda/issues/10614
CI check seems to be continously failing over [here](https://app.circleci.com/pipelines/github/pandas-dev/pandas/15057/workflows/7494a3ab-1d58-43d8-b8cb-a16d768a5763/jobs/45890). Probably #48180 might solve the issue
In the meantime is can the reviewers please rerun the failing job? Or shall I wait for the #48180 to be merged to master?
no need, someone can update the branch once the circleci issue is resolved
Ah understood! Thanks for the fast reply :)
> looks good to me on green
> 
> ![](https://camo.githubusercontent.com/b46840a2a4f50f4c0797520c32f5ada25ada96389fdf54f1d8d86978f5e102e9/68747470733a2f2f692e666c756666792e63632f425067785a6b6d7372676d6663444644434e5743336d3443573067434a4637772e676966) [ ![68747470733a2f2f692e666c756666792e63632f425067785a6b6d7372676d6663444644434e5743336d3443573067434a4637772e676966](https://camo.githubusercontent.com/b46840a2a4f50f4c0797520c32f5ada25ada96389fdf54f1d8d86978f5e102e9/68747470733a2f2f692e666c756666792e63632f425067785a6b6d7372676d6663444644434e5743336d3443573067434a4637772e676966) ](https://camo.githubusercontent.com/b46840a2a4f50f4c0797520c32f5ada25ada96389fdf54f1d8d86978f5e102e9/68747470733a2f2f692e666c756666792e63632f425067785a6b6d7372676d6663444644434e5743336d3443573067434a4637772e676966) [ ](https://camo.githubusercontent.com/b46840a2a4f50f4c0797520c32f5ada25ada96389fdf54f1d8d86978f5e102e9/68747470733a2f2f692e666c756666792e63632f425067785a6b6d7372676d6663444644434e5743336d3443573067434a4637772e676966)

@MarcoGorelli all the tests are passing now. Shall we merge it to the main now? Or shall I add something else to this PR?
BUG: ensure object dtype for strftime accessor/index method + REGR: avoid spurious warning
State: closed

- [x] closes #45858
- [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 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

Comments:
Thanks @jorisvandenbossche (failure unrelated)
DEPR: inplace kwarg in rename_axis
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: Deprecate
description: Functionality to remove in pandas

Comments:
milestoning as 1.5 (since I assume that we would have liked to have had this deprecation in before 1.5.0rc0?)
> milestoning as 1.5 (since I assume that we would have liked to have had this deprecation in before 1.5.0rc0?)

also discussion in https://github.com/pandas-dev/pandas/pull/48131#pullrequestreview-1077945769 is probably relevant to the decision here

cc @jorisvandenbossche
TYP: fix ReadPickleBuffer
State: closed

This makes ReadPickleBuffer compatible with `tempfile.NamedTemporaryFile`:

- `tempfile.NamedTemporaryFile`'s `read` does not accept `None` (luckily we call none of the Buffer classes with `None`)
- `readline` returned a `TypeVar` instead of a `bytes`


The following works now:

```py
# pyright: strict
import tempfile
from pandas._typing import ReadPickleBuffer

def read(x: ReadPickleBuffer) -> None:
    ...

with tempfile.NamedTemporaryFile(delete=False) as file:
    read(file)
```

Labels:
name: Typing
description: type annotations, mypy/pyright type checking

Comments:
Could you merge in main once more? Looked good but not sure if the pyright bump will catch anything else since the last merge here
> Could you merge in main once more? Looked good but not sure if the pyright bump will catch anything else since the last merge here

Rebased (and bumped pyright again)
Thanks @twoertwein
CI: Switch to mambaforge as  base image for Docker ENV build
State: closed

- [x] closes #48142

Labels:
name: CI
description: Continuous Integration

Comments:
Thanks @phofl 
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 1.4.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 3de21defb3d99e1cf8abf7acf6da03c5301f80ac
```

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

```
git commit -am 'Backport PR #48143: CI: Switch to mambaforge as  base image for Docker ENV build'
```

4. Push to a named branch:

```
git push YOURFORK 1.4.x:auto-backport-of-pr-48143-on-1.4.x
```

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

> "Backport PR #48143 on branch 1.4.x (CI: Switch to mambaforge as  base image for Docker ENV build)"

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).
CI: Pin conda in docker build
State: closed

- [x] xref #48142

This gets ci green for now, but have to investigate what is wrong here. The first failing build updated conda from 4.13 to 4.14 with the ``conda install mamba``  command, hence the pin there

cc @mroeschke 

Labels:
name: CI
description: Continuous Integration

Comments:
Not sure. We are using micromamba for most builds, so should not. I'll open a pr in parallel to check if we can switch to mambaforge as base image here. This should solve this.
> Not sure. We are using micromamba for most builds, so should not. I'll open a pr in parallel to check if we can switch to mambaforge as base image here. This should solve this.

Sounds good. Switching to micromamba would probably be a preferred fix here.
Yep agreed. This is only a temporary solution to get the ci passing agai anyway
#48143 uses mambaforge as base image. Gets the ci back to green too
> #48143 uses mambaforge as base image. Gets the ci back to green too

is that the preference? and close this one?
> > #48143 uses mambaforge as base image. Gets the ci back to green too
> 
> is that the preference? and close this one?

Yes, that would be my preference.
Yep, let’s merge the other pr
DEPR: Deprecate mangle_dupe_cols
State: closed

- [X] xref #47718, 48037
- [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.

Deprecating `mangle_dupe_cols`, which was never implemented, and will be replaced by a new standard argument to allow change the format of the renamed columns.

Labels:
name: IO CSV
description: read_csv, to_csv
name: IO Excel
description: read_excel, to_excel
name: Deprecate
description: Functionality to remove in pandas

Comments:
Thanks @datapythonista 
@datapythonista do you have bandwidth to enforce this deprecation?
I could take this as well next week
ENH 48030: Add rolling.prod
State: closed

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

Comments:
Hello @Mehgarg! Thanks for updating this PR. We checked the lines you've touched for [PEP 8](https://www.python.org/dev/peps/pep-0008) issues, and found:

* In the file [`pandas/core/window/rolling.py`](https://github.com/pandas-dev/pandas/blob/d4cf6fbad4981c65bf4fd3b702572c8f2e49d7af/pandas/core/window/rolling.py):

> [Line 1503:5](https://github.com/pandas-dev/pandas/blob/d4cf6fbad4981c65bf4fd3b702572c8f2e49d7af/pandas/core/window/rolling.py#L1503): [E301](https://duckduckgo.com/?q=pep8%20E301) expected 1 blank line, found 0
> [Line 1508:7](https://github.com/pandas-dev/pandas/blob/d4cf6fbad4981c65bf4fd3b702572c8f2e49d7af/pandas/core/window/rolling.py#L1508): [W291](https://duckduckgo.com/?q=pep8%20W291) trailing whitespace
> [Line 1511:89](https://github.com/pandas-dev/pandas/blob/d4cf6fbad4981c65bf4fd3b702572c8f2e49d7af/pandas/core/window/rolling.py#L1511): [E501](https://duckduckgo.com/?q=pep8%20E501) line too long (89 > 88 characters)

* In the file [`pandas/tests/window/test_rolling.py`](https://github.com/pandas-dev/pandas/blob/d4cf6fbad4981c65bf4fd3b702572c8f2e49d7af/pandas/tests/window/test_rolling.py):

> [Line 1276:89](https://github.com/pandas-dev/pandas/blob/d4cf6fbad4981c65bf4fd3b702572c8f2e49d7af/pandas/tests/window/test_rolling.py#L1276): [E501](https://duckduckgo.com/?q=pep8%20E501) line too long (96 > 88 characters)




@Mehgarg Hi There is [PEP 8] issues. Can install pre-commit to resolve this. :)
```
pip install pre-commit
pre-commit install
```
https://pre-commit.com/
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.
TYP: remove a mypy ignore from reshape/merge.py
State: closed

- [x] Related to https://github.com/pandas-dev/pandas/issues/37715
- [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:
Thank you @Moisan!
Deprecate positional arguments for read_hdf and to_hdf
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.
- [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 HDF5
description: read_hdf, HDFStore
name: Deprecate
description: Functionality to remove in pandas

Comments:
No clue what's off here, but the deprecation for read_hdf causes the test to fail