BrandonFors/pandas-github-issues huggingface dataset:
BUG: Frequency shift on empty DataFrame
State: closed

- [x] closes #60102 
- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests)
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).


Labels:
name: Frequency
description: DateOffsets

Comments:
> Thanks this needs a unit test and a whatsnew note in `v3.0.0.rst`

already updated. Sorry for my unfamiliarity with using Git.
Thanks @eightyseven
DOC: Document attributes of Timedelta #59698
State: closed

Part of https://github.com/pandas-dev/pandas/issues/59698

Addresses:

pandas.Timedelta

Added the missing explanations (PRO2) for min, max, and resolution.

Removed:

    i "pandas.Timedelta.resolution PR02" \
    i "pandas.Timedelta.min PR02" \
    i "pandas.Timedelta.resolution PR02" \

from code_checks.sh

Labels:
name: Docs
name: Timedelta
description: Timedelta data type

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: Update contributing docs for Windows build tools instructions
State: closed

- [x] closes #59689 

This PR is to update the documentation with the solution to the error described in Issue #59689 by adding a note in contributing_environment.rst instructing users to install MSVC v142 - VS 2019 C++ x64/x86 build tools if they encounter a cl.exe not found error ( Unknown compiler(s): [['cl.exe']]) during the build process.


Labels:
name: Docs

Comments:
Thanks @Ravenin7
Create Davita score
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 not clear what it intends to solve in the pandas project.

I would suggest opening an issue first if you'd like to contribute a feature to pandas.
BUG: fix #60128 BUG: Series.combine_first loss of precision
State: closed

- Issue: There was int64->float64->int64 conversions
- Fix: Carry out the operation without passing through float64

- [X] closes #60128
- [ ] [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: Bug
name: Dtype Conversions
description: Unexpected or buggy dtype conversions

Comments:
It seems this needs more general approach, and it would not suitable for a newbie like me. So, I'd like to just close this PR.
DOC: fix docstring of DataFrame.to_latex, double curly braces to single
State: closed

The parameters docstring of [`to_latex`](https://pandas.pydata.org/docs/dev/reference/api/pandas.DataFrame.to_latex.html) is misleading. For example, `float_format="{{:0.2f}}".format` should rather use single curly brace, as the example in the docstring

```py
>>> df = pd.DataFrame(dict(name=['Raphael', 'Donatello'],
...                        age=[26, 45],
...                        height=[181.23, 177.65]))
>>> print(df.to_latex(index=False,
...                   formatters={"name": str.upper},
...                   float_format="{:.1f}".format,
...                   ))  
\begin{tabular}{lrr}
\toprule
name & age & height \\
\midrule
RAPHAEL & 26 & 181.2 \\
DONATELLO & 45 & 177.7 \\
\bottomrule
\end{tabular}
```

This PR replaces {{}} with {} in `to_latex` 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
- [ ] 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 @yuanx749
BUG: Remove incorrect check on value label length
State: closed

Remove 32,000 limit on value limit check since this applies to the number of variable, not the length of the value labels

closes #60107

- [X] closes #60107
- [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: Bug
name: IO Stata
description: read_stata, to_stata

Comments:
Thanks @bashtage
CI: add test build with numpy 1.26 (<2)
State: closed

I removed a `numpy<2` pin in https://github.com/pandas-dev/pandas/pull/60144, but it might be good to keep testing in one of the builds with numpy 1.26 (latest <2). 
For the rest we only pin numpy to 1.23 in `ci/deps/actions-310-minimum_versions.yaml` to test the minimal supported version.



Labels:
name: CI
description: Continuous Integration
name: Stale

Comments:
As expected, currently there are a few failing tests:

```
=========================== short test summary info ============================
FAILED pandas/tests/series/indexing/test_setitem.py::TestCoercionFloat32::test_int_key[setitem-1.1-float32-False] - TypeError: Invalid value '1.1' for dtype 'float32'
FAILED pandas/tests/series/indexing/test_setitem.py::TestCoercionFloat32::test_int_key[loc-1.1-float32-False] - TypeError: Invalid value '1.1' for dtype 'float32'
FAILED pandas/tests/series/indexing/test_setitem.py::TestCoercionFloat32::test_int_key[iloc-1.1-float32-False] - TypeError: Invalid value '1.1' for dtype 'float32'
FAILED pandas/tests/series/indexing/test_setitem.py::TestCoercionFloat32::test_mask_key[setitem-1.1-float32-False] - TypeError: Invalid value '1.1' for dtype 'float32'
FAILED pandas/tests/series/indexing/test_setitem.py::TestCoercionFloat32::test_mask_key[loc-1.1-float32-False] - TypeError: Invalid value '1.1' for dtype 'float32'
FAILED pandas/tests/series/indexing/test_setitem.py::TestCoercionFloat32::test_mask_key[iloc-1.1-float32-False] - TypeError: Invalid value '1.1' for dtype 'float32'
FAILED pandas/tests/series/indexing/test_setitem.py::TestCoercionFloat32::test_series_where[1.1-float32-False] - AssertionError: Attributes of Series are different

Attribute "dtype" are different
[left]:  float64
[right]: float32
FAILED pandas/tests/series/indexing/test_setitem.py::TestCoercionFloat32::test_index_where[1.1-float32-False] - AssertionError: Index are different

Attribute "dtype" are different
[left]:  float64
[right]: float32
FAILED pandas/tests/series/indexing/test_setitem.py::TestCoercionFloat32::test_index_putmask[1.1-float32-False] - AssertionError: Index are different

Attribute "dtype" are different
[left]:  float64
[right]: float32
= 9 failed, 221589 passed, 6291 skipped, 1654 xfailed, 95 xpassed, 22 warnings in 1065.19s (0:17:45) =
```
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.
I created #61588 so we can have someone else working on this (seems like a good first issue). Closing this PR as it is stale.
[backport 2.3.x] CI: remove usage of legacy NPY_PROMOTION_STATE (#60144)
State: closed

Backport of https://github.com/pandas-dev/pandas/pull/60144

Labels:

Comments:
Failures look unrelated, Windows is failing with some XMLSyntaxError in the html tests (maybe temporary flake?). And there is one failure in the string test build that we should look into, but will do that separately.
String dtype: deprecate the pyarrow_numpy storage option
State: closed

xref https://github.com/pandas-dev/pandas/issues/54792

This old string alias `"string[pyarrow_numpy]"` is being deprecated for just `"str"` or the explicit `pd.StringDtype("pyarrow", na_value=np.nan)`

Directly using FutureWarning (it was an experimental opt-in, so not many people will already have been using it, and then we can directly remove it in pandas 3.0)

Labels:
name: Strings
description: String extension data type and string data
name: Deprecate
description: Functionality to remove in pandas

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 1908f2eb962e5c8b84483a6f0582b5e32b6f0ee8
```

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

```
git commit -am 'Backport PR #60152: String dtype: deprecate the pyarrow_numpy storage option'
```

4. Push to a named branch:

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

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

> "Backport PR #60152 on branch 2.3.x (String dtype: deprecate the pyarrow_numpy storage option)"

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/60173
CI: Add Windows wheels for the free-threaded build
State: closed

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


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

Comments:
Can we merge this? Is there anything else I'd need to do before we can do it?
Thanks @lysnikolaou
BUG: Fixes pd.merge issue with columns of dtype numpy.uintc on windows
State: closed

This PR fixes the issue encountered when using pd.merge with columns of dtype numpy.uintc on windows.
Added a relevant pytest case to validate correct behavior.

- [x] closes #58713 
- [x] [Tests added and passed
- [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: Reshaping
description: Concat, Merge/Join, Stack/Unstack, Explode
name: Window
description: rolling, ewma, expanding

Comments:
Hi @mroeschke , I have added the whatsnew note and included current issue #58713 and also issue #60091 as this PR fixes both of them. I have also added 2 more test cases which includes `np.intc` and reproducible example from issue #60091
Thanks @AbhishekChaudharii
CI: remove usage of legacy NPY_PROMOTION_STATE
State: closed

We no longer need this, see also discussion in https://github.com/pandas-dev/pandas/pull/60140.

And this fixes CI on main (tests are currently failing if you use numpy >= 2 with this env variable set)

Labels:
name: CI
description: Continuous Integration

Comments:
CI is passing, except for the pyarrow nightly build, which seems to be using numpy 1.26
Looks like I added a `numpy < 2` pin in `ci/deps/actions-311-pyarrownightly.yaml` in https://github.com/pandas-dev/pandas/pull/59046. Maybe that can be removed now.

If that works, maybe we can also remove the `nomkl` install patch as well now.
The Arrow nightly build seems a good one to use a later numpy version, but it might still be useful to test 1.26 somewhere?
This is all passing, so going to merge this to get CI green again. 

But I still think we ideally get the tests passing for numpy 1.26 as well (at some point our min version might be that version and we will test with it anyway. But will open a separate follow-up PR for that)
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 4bbb3ce5d5a7e0f24dc2d8c1faf26c3b5d55670d
```

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

```
git commit -am 'Backport PR #60144: CI: remove usage of legacy NPY_PROMOTION_STATE'
```

4. Push to a named branch:

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

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

> "Backport PR #60144 on branch 2.3.x (CI: remove usage of legacy NPY_PROMOTION_STATE)"

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/60153
CI/TST: fix parquet tz test returning pytz fixed offset (pyarrow 18)
State: closed

This should fix the parquet failures that started occurring on main. PyArrow 18 was just released, and this release did _not_ change anything regarding timezones AFAIK (but the tests were only skipping something for pyarrow<18)

Labels:
name: CI
description: Continuous Integration
name: Compat
description: pandas objects compatability with Numpy or Python functions

Comments:
The relevant builds that were failing in main (macos and arm) are passing here
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 9cd4a281c42838cd32261b92a55aed830ebeae03
```

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

```
git commit -am 'Backport PR #60143: CI/TST: fix parquet tz test returning pytz fixed offset (pyarrow 18)'
```

4. Push to a named branch:

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

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

> "Backport PR #60143 on branch 2.3.x (CI/TST: fix parquet tz test returning pytz fixed offset (pyarrow 18))"

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/60151
DOC: fix broken link on team webpage
State: closed

- [x] closes #59693 (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: Web
description: pandas website

Comments:
Thanks @KevsterAmp
CI/TST: fix tests for compat with numpy 2+ when using legacy promotion
State: closed

This is trying to fix the current failures on main.

It seems that our test runs were still using numpy 1.26 (because of some downgrade after initial env creation because of removing nomkl), but that stopped being the case some hours ago. This turns up a bunch of failures in our tests when running hem with numpy >= 2 ánd with `NPY_PROMOTION_STATE=legacy`. 

We should properly fix this situation (stop using the legacy promotion state), but this PR should already get CI green again.

Labels:
name: CI
description: Continuous Integration
name: Compat
description: pandas objects compatability with Numpy or Python functions

Comments:
This does not yet fix the macos and arm failure (those are also failing on main, and separate issues)
> This does not yet fix the macos and arm failure (those are also failing on main, and separate issues)

-> https://github.com/pandas-dev/pandas/pull/60143
> We should properly fix this situation (stop using the legacy promotion state), but this PR should already get CI green again.

Saw this randomly.  Is that hard?  I mean, I think you can just remove any setting of `NPY_PROMOTION_STATE` from CI, and if you still have issues, then you don't have to worry one way or another.

(I was planning to remove support for it in 2.2, I thought I already did in the nightlies, but maybe not.)
No idea, let's see in https://github.com/pandas-dev/pandas/pull/60144

(I was planning to open an issue about it, because in addition to CI I think there is also the discussion about "following" the new behaviour of numpy)
Well, FYI, I was planning to remove this in NumPy 2.2.  I would have guessed that I already did in the nightlies...
This is a debugging/transition feature, I suppose it is nice if you support it to some degree (since someone who uses it for testing may also use pandas), but overall...
> Well, FYI, I was planning to remove this in NumPy 2.2. I would have guessed that I already did in the nightlies...

Yeah, we already ran into `np._get_promotion_state` being removed, but that is fixed (https://github.com/pandas-dev/pandas/pull/59818). 
AFAIU the main reason we still have this env variable set is for numpy 1.26
In any case, it seems to be working fine to completely remove the usage of the env variable -> https://github.com/pandas-dev/pandas/pull/60144
Closing this in favor of https://github.com/pandas-dev/pandas/pull/60144
BUG/TST (string dtype): fix and update tests for Stata IO
State: closed

Fixing string dtype handling for writing to Stata (in case of missing values), and update the tests.


xref https://github.com/pandas-dev/pandas/issues/54792

Labels:
name: Strings
description: String extension data type and string data
name: IO Stata
description: read_stata, to_stata

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 e7d54a54da8a179fbde5878dfb4e6440d0cfbac8
```

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

```
git commit -am 'Backport PR #60130: BUG/TST (string dtype): fix and update tests for Stata IO'
```

4. Push to a named branch:

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

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

> "Backport PR #60130 on branch 2.3.x (BUG/TST (string dtype): fix and update tests for Stata IO)"

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 at https://github.com/pandas-dev/pandas/pull/60155
BUG: Assigning boolean series with logical indexer
State: closed

- [ ] closes #57338  
- [ ] [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: Indexing
description: Related to indexing on series/frames, not to indexes themselves

Comments:
I don't think the fails are related
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.
Fix BUG: DataFrame.shift with freq on empty DataFrames
State: closed

- [ ] closes #60102

This PR addresses the issue where `DataFrame.shift` with `freq` on an empty DataFrame doesn't shift the index. 

**Discussion:**
I’m a beginner, and I’m not entirely sure if my changes meet the community’s standards. If there are any areas where my modifications could be improved or aren’t quite right, I would be very grateful for any feedback you can provide. I’m eager to learn and make adjustments as needed. Thanks for your understanding!


Labels:

Comments:
I apologize for mistakenly selecting the option to request a merge. I know there are still issues with my code and it cannot be merged, but I accidentally clicked the option to request a merge.And I don't know what I can do now.