BrandonFors/pandas-github-issues huggingface dataset:
Upgraded README.md
State: closed

Enhanced readability of the file's content

- [x] 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.


Labels:

Comments:
Thanks but I don't think this improves the readability of this file much so closing
CI: Add testing for Window ARM
State: closed

We added wheel support for `win_arm64` in https://github.com/pandas-dev/pandas/pull/61463, so we might as well be regularly testing this platform on CI.

Additionally "pins" the runner images we use to test Windows and Mac

Labels:
name: CI
description: Continuous Integration

Comments:
Darn micromamba doesnt support `win_arm64` so I guess this is a non-starter
BUG: If both index and axis are passed to DataFrame.drop, raise a clear error
State: closed

- [x] closes #61823

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

Comments:
pre-commit.ci autofix
@camriddell I have made the changes.
Can @rhshadrach take a look and provide some guidance? If we want to maintain backwards compat. then this is likely the final form of this PR.

However there is a deeper issue that is not present in either (thanks for finding these @khemkaran10) [DataFrame.reindex](https://github.com/pandas-dev/pandas/blob/bc6ad140daf230c470fef92bec598831d4f94a16/pandas/core/generic.py#L5368), [DataFrame.rename](https://github.com/pandas-dev/pandas/blob/bc6ad140daf230c470fef92bec598831d4f94a16/pandas/core/generic.py#L1019C13-L1022C18). Namely, those methods have a default of `axis=None` and can therefore check when that value is passed, whereas in `.drop` the axis argument defaults to `axis=0` thus making it always "set". So we can check for `axis==1` as @khemkaran10 did in the PR (or `axis != 0`). 
LGTM cc @rhshadrach 
Thanks @khemkaran10!
BUG: Fix .rolling().mean() reassignment returning NaNs (pandas-dev#61841)
State: closed


This pull request resolves a bug highlighted in issue [[#61841](https://github.com/pandas-dev/pandas/issues/61841)](https://github.com/pandas-dev/pandas/issues/61841), where reassigning the result of `.rolling().mean()` to the same column in a DataFrame results in all-NaN values after the first assignment.

#### 🔜 Root Cause:

The root cause was improper alignment when using the `step` parameter within the `Window._apply()` function. The rolling results were sliced using `self.step` before being fully aligned with the original index, which caused mismatches in the returned Series/DataFrame.

#### 🔧 Fix Implemented:

* Adjusted the logic in `Window._apply()` to apply `self.step` only after the result is completely constructed and aligned.
* Moved `Series` and `DataFrame` imports from inside a type-checking block (`if TYPE_CHECKING`) to the top of the file. This eliminates pre-commit CI errors related to inconsistent namespace usage.

#### 📄 Verification:

The fix was verified by executing:

```python
import pandas as pd
import numpy as np

df = pd.DataFrame({"Close": np.arange(1, 31)})
df = df.copy()
df["SMA20"] = df["Close"].rolling(20).mean()
df["SMA20"] = df["Close"].rolling(20).mean()
print(df.tail())
```

This now works as expected, and outputs the correct rolling mean values.

All relevant pre-commit hooks and CI checks pass after the changes.

---

Thank you for reviewing this fix!

Labels:

Comments:
Thanks for the PR, but please contain the changes to one open pull request at a time
Remove incorrect line in Series init docstring
State: closed

- [x] closes #61848
- [ ] [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.


Copied over from the issue for convenience
```
    dtype : str, numpy.dtype, or ExtensionDtype, optional
        Data type for the output Series. If not specified, this will be
        inferred from `data`.
        See the :ref:`user guide <basics.dtypes>` for more usages.
        If ``data`` is Series then is ignored.
```
The last line here is incorrect. specifying a dtype will override the default behavior. See this example
```
>>> import pandas as pd
>>> ser = pd.Series([1,2,3])
>>> ser
0    1
1    2
2    3
dtype: int64
>>> pd.Series(ser, dtype=float)
0    1.0
1    2.0
2    3.0
dtype: float64
```

Labels:
name: Docs

Comments:
thanks @petern48
BUG: Fix rolling().mean() returning NaNs on reassignment (#61841)
State: closed

### Problem

Fixes issue #61841 — calling `.rolling().mean()` twice on a copied DataFrame was returning all NaNs on the second run.

This happened due to a slicing operation (`[::self.step]`) in `_apply_columnwise`, which broke result alignment when overwriting the same column.

### Solution

Removed the `[:: self.step]` slicing from the return statement. This restores full alignment and fixes the regression.

### Test Case

Tested locally with this code:

```python
df = pd.DataFrame({"Close": list(range(1, 31))})
df = df.copy()
df["SMA20"] = df["Close"].rolling(20).mean()
df["SMA20"] = df["Close"].rolling(20).mean()
print(df.tail())
<img width="1269" height="377" alt="Screenshot 2025-07-13 201135" src="https://github.com/user-attachments/assets/c1cbe325-28c6-4a39-bf98-861492d9295c" />


Labels:

Comments:
Thanks for the PR, but please contain the changes to one open pull request at a time
DOC: Simplify pandas theme footer
State: closed

# 🎯 DOC: Simplify pandas theme footer

## 📝 Description
This pull request refactors the pandas documentation footer by tapping into the built-in templates in **pydata-sphinx-theme** v0.16. The result is a leaner, more maintainable setup with zero visual regressions—science approved!

## 🔧 Changes Made
1. **`doc/source/conf.py`**
   - Updated the copyright line to include “pandas”  
   - Swapped out custom footer bits for the theme’s built-in templates:
     ```python
     html_theme_options = {
         "footer_start": [
             "copyright",
             "pandas_footer",
             "sphinx-version",
         ],
         …
     }
     ```
2. **`doc/_templates/pandas_footer.html`**
   - Removed the now-redundant copyright snippet  
   - Kept only the NumFOCUS & OVHcloud sponsor links  
3. **`doc/source/_static/css/pandas.css`**
   - Added horizontal layout rules for the new footer items  
   - Ensured consistent spacing & alignment  
4. **`doc/source/whatsnew/v3.0.0.rst`**
   - Added a “Documentation changes” section  
   - Linked to issue [#51536](https://github.com/pandas-dev/pandas/issues/51536)

## ✅ Benefits
- **DRY**: Eliminates duplicated footer code  
- **Maintainable**: Leverages standard theme hooks  
- **Consistent**: Visual appearance remains identical  
- **Future-proof**: Automatically picks up theme updates  

---

🚀 All checks have passed and this PR is ready for merge! 🎉


Labels:

Comments:
this is AI generated?
Thanks for the PR, but we discourage the use of AI generated pull requests so closing
Create Vix
State: closed

Want backtest data Nifty 50 index data rsi

- [x] 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
- [ ] 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:

Comments:
This doesn't belong here.
DOC: Add unified code guideline document (#33851)
State: closed

### Summary

This PR addresses Issue #33851 by adding a new consolidated documentation file named `code_guidelines.md` under `doc/source/development/`. The goal is to unify coding standards and make it easier for new contributors to find all code style rules in one place.

### Key Highlights

- Combines content from:
  - `code_style.html`
  - `contributing.html#code-standards`
- Covers formatting tools (`black`, `flake8`, `isort`)
- Includes naming conventions, testing rules, and docstring format
- Improves onboarding for new contributors
- Adds references and examples

Let me know if you'd like me to update links in `index.rst` or make any changes. Happy to collaborate on refinements.


Labels:

Comments:
Hi team 👋,
This PR addresses issue #33851 by consolidating code style guidelines into one document (`code_guidelines.md`) under `doc/source/development/`. 

All checks have passed ✅. Please let me know if anything needs to be revised — happy to make changes! Thanks for reviewing 🙏

Hi team 👋,
This PR addresses issue #33851 by consolidating code style guidelines into one document (`code_guidelines.md`) under `doc/source/development/`. 

All checks have passed ✅. Please let me know if anything needs to be revised — happy to make changes! Thanks for reviewing 🙏

Thanks for the PR but this seems incorporate little to no information in the current contribution documentation. And as a reminder, we discourage the use of AI code contributions. Closing
DOC: rm excessive backtick
State: closed

- [ ] ~~closes #xxxx (Replace xxxx with the GitHub issue number)~~ only fix sphinx syntax
- [ ] [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.
---

I’m developing a new sphinx-lint rule to detect excessive backticks ([PR](https://github.com/sphinx-contrib/sphinx-lint/pull/139)), and it flagged some in the current document ([this GitHub search link](https://github.com/search?q=repo%3Apandas-dev%2Fpandas+%2F%5B%5E%60%5D%3A%28class%7Cmeth%29%3A%5C%60%5B%5E%5C%60%5Cs%5D*%5C%60%5C%60%2F&type=code) lists these occurences too).
This PR fixes detected cases.


Labels:
name: Docs

Comments:
Thanks @mattwang44
DOC: Update README.md to reference issues related to 'good first issue' and 'Docs' properly
State: closed

- [x] closes #61835 (Replace xxxx with the GitHub issue number)
- [ ] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [ ] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.


Labels:
name: Docs

Comments:
Thanks @sivasweatha
DOC: Clarify str.cat output for Index object (GH35556)
State: closed

- [x] closes #35556
- [x] Tests added and passed — *N/A (doc-only change)*
- [x] All code checks passed — *pre-commit and CI should pass*
- [x] Added type annotations — *N/A (no new code added)*
- [x] Added an entry in the latest whatsnew — *N/A (doc-only update)*

### Summary of Changes

This PR improves the docstring for `str.cat()` to clarify what happens when the caller is an `Index` and `others` is `None`.

Specifically, the doc now explains that in this case, the output is also an `Index` containing a single string, rather than a plain `str` as it is for `Series`.

### Example added:

```python
>>> idx = pd.Index(["a", "b", np.nan])
>>> idx.str.cat(sep="-")
Index(['a-b'], dtype='object')


Labels:
name: Docs

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.
TST: Fix `test_mask_stringdtype` 
State: closed

- [x] closes #61824
- [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:
name: Testing
description: pandas testing functions or related to the test suite

Comments:
Thanks again @arthurlw
BUG: Dataframe arithmatic operators don't work with Series using fill_value
State: closed

- [x] closes #61581 
- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [x] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [x] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

Removed a test which checked for expected error to be raised and a corner case. Added a test case to test multiple operators with Dataframe x Series operations while using fill_value


Labels:

Comments:
Im closing the PR for now until the additional fixes for EA are deployed
DOC: Correct error message in AbstractMethodError for methodtype argument
State: closed

Fixing an error message in the AbstractMethodError class found in pandas/errors/__init__.py.
Currently:
raise ValueError(
    f"methodtype must be one of {methodtype}, got {types} instead."
)
Here, {methodtype} and {types} are swapped.
This means if you called this error with methodtype="foo", the message would read:
methodtype must be one of foo, got {'method', 'classmethod', 'staticmethod', 'property'} instead.

That’s confusing, because the set of valid types should be listed after “must be one of”, and the invalid value you passed should be listed after “got”.


Corrected:
=======
raise ValueError(
    f"methodtype must be one of {types}, got {methodtype} instead."
)
Now, if you called this error with methodtype="foo", the message would read:
methodtype must be one of {'method', 'classmethod', 'staticmethod', 'property'}, got foo instead.

This is clearer and follows standard error message conventions.

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

Comments:
pre-commit.ci autofix
Thanks @Maaz-319 
> Thanks @Maaz-319 

Glad to contribute @mroeschke
TST: enable 2D tests for MaskedArrays, fix+test shift
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: NA - MaskedArrays
description: Related to pd.NA and nullable extension arrays

Comments:
Thanks @jbrockmendel
TST: Adding tests for validating  DataFrame.__setitem__ and .loc behavior
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).
- [ ] 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.

Following up from #61804, adding tests to test_api.py to validate the DataFrame.__setitem__ and .loc assignment from Series

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

Comments:
@WillAyd Since I have you, last follow up from the https://github.com/pandas-dev/pandas/pull/61804, Should we keep these tests? 

Last convo on this issue regarding tests was here: https://github.com/pandas-dev/pandas/pull/61804#discussion_r2193379353
I appreciate adding tests but I think this PR is superfluous - these cases are definitely covered in the existing code
> I appreciate adding tests but I think this PR is superfluous - these cases are definitely covered in the existing code

Gotcha! Thanks for the insight. Closing this ticket.
DOC: Update link to pytz documentation
State: closed

Pytz documentation:
https://pypi.org/project/pytz/

The original link does not work:
http://pytz.sourceforge.net/index.html

- [ ] 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:
@star1327p Can I take this ?
Thanks @star1327p
DOC: Clarify broadcasting behavior when using lists in DataFrame arithmetic (GH18857)
State: open

- Clarifies the behavior when using Python lists in arithmetic operations with DataFrames.
- Adds an example in `dsintro.rst` to show how adding a list returns a Series of arrays.
- Adds a note in `basics.rst` to explain that lists are not broadcasted element-wise, unlike NumPy arrays or Series.
- Fixes #18857.


Labels:
name: Docs

Comments:
@jbrockmendel Can you please help me merge this PR. I have made the changes.
BUG: DataFrame.aggregate to preserve extension dtypes with callable functions
State: open



- [x] closes #61812
- [ ] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [x] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [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: Arrow
description: pyarrow functionality
name: pyarrow dtype retention
description: op with pyarrow dtype -> expect pyarrow result

Comments:
Should I add something to the doc/source/whatsnew/vX.X.X.rst file?
I'll handle the failed build checks tomorrow
DOC: Add Raises section to pd.to_numeric docstring
State: closed

- [x ] closes #xxxx (Replace xxxx with the GitHub issue number)
- [ ] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [ x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [ ] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.


Labels:

Comments:
Thanks for the pull request, but this issue has been addressed by https://github.com/pandas-dev/pandas/pull/61868 so closing. Happy to have contributions towards any other issue labeled `good first issue`
CI: Remove PyPy references in CI testing
State: closed

We haven't had reliable PyPy testing in many years now and no one to champion supporting this platform. We only have 1 job that builds pandas with PyPy on Python 3.9 (already dropped). It's made more difficult that conda-forge no longer supports PyPy either, https://conda-forge.org/news/2024/08/14/sunsetting-pypy/ 

I don't think it's worth using resources for this job anymore. pandas can still have code for PyPy compatibility for those wanting to support PyPy independently.

Labels:
name: CI
description: Continuous Integration

Comments:
Thanks @mroeschke
DOC: update release process maintainer guide
State: closed

A small things I noticed that could use some update or clarification while releasing 2.3.1. 

cc @mroeschke can you check that this confirms with your experience when releasing 2.3.0?

Labels:
name: Docs

Comments:
@jorisvandenbossche one thing that I used to do during pre-release is ensure that the release notes between the backport and the main branch were in sync.

Discrepancies can arise if backports are missed or merge conflicts on the backport were perhaps not resolved correctly, so this used to be a beneficial check.

IIRC we had some issues with the 2.3.0 release that would have been picked up if this was done. As well as the release process instructions, I used to use a release checklist on the release issue.

Maybe, while updating the process, you could add something to "Update and clean release notes for the version to be released, including:" section?
Thanks @jorisvandenbossche
DOC: Improve clarity of GroupBy introduction sentence
State: closed

This small change clarifies the introductory sentence of the GroupBy user guide, as recommended for documentation improvements. It makes the definition of the "group by" process more direct and easier for new users to understand.

- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).

Labels:

Comments:
@Vedant-Kadam-Noobie thanks for the PR but simon and I prefer the existing phrasing.