BrandonFors/pandas-github-issues huggingface dataset:
DOC: Update the Numba troubleshooting URL
State: closed

DOC: Update the Numba troubleshooting URL.

Correct link:
https://numba.readthedocs.io/en/stable/user/troubleshoot.html

The old link does not work:
https://numba.pydata.org/numba-doc/latest/user/troubleshoot.html#the-compiled-code-is-too-slow

- [ ] 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 @star1327p
DOC: Correct a typo in ecosystem.md
State: closed

Correct a typo in ecosystem.md.

This is **an** community-maintained list -> This is **a** community-maintained list

- [ ] 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 @star1327p
TST/CI: xfail test_frame_setitem_dask_array_into_new_col for numpy>2.1
State: closed

Split from https://github.com/pandas-dev/pandas/pull/60847

Will be fixed in the next Dask release https://github.com/pandas-dev/pandas/pull/60847#issuecomment-2636482009

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

Comments:
`Unit Tests / Downstream Compat` is passing so merging
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 c5ea5248d8e1c3ec4e0414480e574b5f6710e377
```

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

```
git commit -am 'Backport PR #60873: TST/CI: xfail test_frame_setitem_dask_array_into_new_col for numpy>2.1'
```

4. Push to a named branch:

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

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

> "Backport PR #60873 on branch 2.3.x (TST/CI: xfail test_frame_setitem_dask_array_into_new_col for numpy>2.1)"

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).
BUG: Fix frozenset display in pprint
State: closed

- [x] closes #60690
    - Fixed in #60828 but with a bug
- [ ] [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.
    - Already added by #60828

Labels:
name: Output-Formatting
description: __repr__ of pandas objects, to_string

Comments:
Thanks @wjandrea
DOC: Update the read_csv in action in cookbook.rst
State: closed

In cookbook.rst, let's update the read_csv in action to a recently written Datacamp tutorial:
https://www.datacamp.com/tutorial/pandas-read-csv

The old link not only does not work, but also refers to pandas v0.10 (an outdated version).
https://wesmckinney.com/blog/update-on-upcoming-pandas-v0-10-new-file-parser-other-performance-wins/

- [ ] 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 @star1327p 

If you're interested, we have this issue regarding running sphinx's `linkcheck` in CI and reporting failures (similar to what you're fixing). We have a disabled job to run linkcheck but just need to write out the failures to an issue `.github/workflows/broken-linkcheck.yml` 
@mroeschke Thank you for the suggestion! However, I don't think I know enough about sphinx and CI to do so.
No worries. Thanks for all your fixes regardless!
DOC: Correct a typo in pyarrow.rst
State: closed

Correct a typo in pyarrow.rst.  
``"int64[pyarrow]""`` -> Remove the extra double quotation mark at the end.

- [ ] 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 @star1327p
Fix Error Message in .query() for DataFrame with Duplicate Column Names
State: closed

**Summary of Changes:**

- Enhanced the error messaging in the .query() method for pandas DataFrames when duplicate column names are present.
- Prior to this change, invoking .query() on a DataFrame with duplicate column names resulted in an unclear TypeError, making it difficult for users to understand the root cause.
- With this update, users will now receive a more descriptive and helpful ValueError, similar to when columns are accessed directly, with a message such as:
  `"ValueError: cannot reindex on an axis with duplicate labels"`

**Reasoning Behind the Change:**

- The current behavior of .query() did not offer clear feedback when users attempted to run queries on DataFrames with duplicate column names.
- By improving the error message, we enhance the overall user experience, making it easier for users to diagnose and resolve issues related to duplicate columns.

**Testing Approach:**

- I tested the change by creating a sample DataFrame with duplicate column names and attempted to execute a .query() operation.
- Below is the test case used:
```
import pandas as pd

# Create a DataFrame with duplicate column names
df = pd.DataFrame({
    "A": [1, 2, 3, 4, 5],
    "B": [10, 8, 6, 4, 2],
    "A": [5, 4, 3, 2, 1],  # Duplicate column name "A"
})

# Test the query functionality
try:
    result = df.query("A <= 4 and B <= 8")
    print(result)
except Exception as e:
    print(f"Error: {e}")
```

- After applying the fix, the code will raise a ValueError, indicating that queries cannot be executed due to duplicate column names, making it much easier to pinpoint the issue.

**Issue Addressed:**
- This PR resolves the issue documented in [#60863](https://github.com/pandas-dev/pandas/issues/60863), where .query() failed to provide a clear error message when used on DataFrames containing duplicate column names.

Labels:
name: Stale

Comments:
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.
Enable get-attr-with-constant (B009)
State: closed

The original reasoning to disable this rule is because `getattr` is needed to side step `mypy`, but `mypy` doesn't complain about the fix anymore.

- [ ] 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

Comments:
Thanks @tqa236
Remove unused code
State: closed

After https://github.com/pandas-dev/pandas/pull/59296 is merged, the note is no longer relevant and the function `tokenize_backtick_quoted_string` is unused

- [ ] 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: Clean

Comments:
Thanks @tqa236
Use annotations from the standard library
State: closed

This is the preferred way to annotate starting from Python 3.9. All changes are auto-fixed by `ruff`

- [ ] 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:
apparently, there are some difference between `typing.Type` and `type` when `Type[T]` works as a Generic, so I'll close the PR
> apparently, there are some difference between `typing.Type` and `type` when `Type[T]` works as a Generic, so I'll close the PR

I don't think that was your issue.  `typing.Type` is deprecated, so `Type[T]` can be replaced with `type[T]`.  Looking at the logs of the tests, you failed to get rid of all references to `type_t` throughout the source, and if you do that, you may be able to resurrect this.
thanks for the comment, @Dr-Irv. I changed and tested it locally and it leads to a lot of other errors. Fixing them all would be tough so I'll try to see if there's a way to fix a subset of that first.
Disallow empty comment
State: closed

Look like the intent of the empty comments in some places is to create a visual block of code, but this is done fairly rarely, compared to just use a new line, so I think it's reasonable to enable this rule to avoid code clutter or empty comments as the result of some massy search and replace.

- [ ] 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:
name: Code Style
description: Code style, linting, code_checks

Comments:
Thanks @tqa236
[backport 2.3.x] TST (string): from_dummies, dropna (#60818)
State: closed

(cherry picked from commit ea7ff0ea4606f47a672f75793f4ea2b3eb0b87f5)

Backport of https://github.com/pandas-dev/pandas/pull/60818

Labels:
name: Strings
description: String extension data type and string data

Comments:
There's quite a few number of failures on the 2.3 branch, but I don't think they are related to this PR.
> There's quite a few number of failures on the 2.3 branch, but I don't think they are related to this PR.

yes, and part of them will be fixed by https://github.com/pandas-dev/pandas/pull/60847, and the pyarrow-nightly failure should hopefully be fixed tomorrow when the new nightly package lands (I pushed a fix upstream to pyarrow today)
BUG: Avoid casting to float for datetimelike in min/max reductions
State: closed

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


Labels:
name: Dtype Conversions
description: Unexpected or buggy dtype conversions

Comments:
Thanks again @snitish
DOC: Update a link in cookbook.rst
State: closed

In the pandas Cookbook, the Time Series - Aggregation and plotting time series has an invalid link:
https://nipunbatra.github.io/blog/visualisation/2013/05/01/aggregation-timeseries.html

This link should be:
https://nipunbatra.github.io/blog/posts/2013-05-01-aggregation-timeseries.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:
Thanks @star1327p
TST: Remove test_pickle_generalurl_read in favor of test_request_headers
State: closed

`test_pickle_generalurl_read` appears redundant with `pandas/tests/io/test_http_headers.py::test_request_headers` where the latter uses the `httpserver` fixture and doesn't attempt to patch `urllib.request.urlopen`.

I was seeing `test_pickle_generalurl_read` being particularly slow in the cudf test suite, but best to remove this test as it's redundant.

Labels:
name: Testing
description: pandas testing functions or related to the test suite
name: IO Network
description: Local or Cloud (AWS, GCS, etc.) IO Issues

Comments:
Merging. But happy to follow up if needed
DOC: Update Bodo project description in ecosystem page
State: closed

- [x] closes #60845 (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 @ehsantn
DOC: Closed parameter not intuitively documented in DataFrame.rolling
State: closed

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

Comments:
> Thanks for the PR! In addition, can we fix some of what was introduced in #60832. It seems to me the `closed` argument does not render the way I believe was intended.
> 
> https://pandas.pydata.org/pandas-docs/dev/reference/api/pandas.core.groupby.DataFrameGroupBy.rolling.html
> 
> Sphinx needs a blank line to induce a line break in the resulting html.
> 
> ![image](https://private-user-images.githubusercontent.com/45562402/409353272-7c72ca70-4c54-4bcc-8dce-f1bade9322b6.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg2MzY1NDgsIm5iZiI6MTczODYzNjI0OCwicGF0aCI6Ii80NTU2MjQwMi80MDkzNTMyNzItN2M3MmNhNzAtNGM1NC00YmNjLThkY2UtZjFiYWRlOTMyMmI2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA0VDAyMzA0OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTQyOTAyOWNjMjc1YjgyODUzMmMxMTVjMmJlMTJhNjQwYTQ1NGJkODc1MTQ5ZGRhNTlmYTE5OWIyMGVmOTMwNzQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.Ot1oWDfuTmW-53k29QoykNt0ddK7tK1LO9zeVfViuBA)
> 
> In addition, I think the notation / language here can be tightened up.
> 
> > If `'right'`, (First, Last] the last point in the window is included in the calculations.
> 
> In the above, `(First, Last]` is inserted mid-sentence without any reference. I'd suggest
> 
> > If `right`, uses the window `(first, last]` meaning the last point is included in the calculations.

I agree with your comments and have updated the formatting as well. Thanks for pointing out the issue with the line break.
@rhshadrach are there any other changes you think should be made?
Thanks @SebastianOuslis - nice work!
DOC: Closed parameter not intuitively documented in DataFrame.rolling 
State: closed

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

Comments:
Thanks @SebastianOuslis
DOC: `pandas.DataFrame.to_html` additional description for the border parameter 
State: closed

- [x] closes #60148  (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:
bro what tf just happened.. lemme just revert that
Thanks @ShashwatAgrawal20 
Even after the change, I think the docstring is not completely correct. If the user passes "0" (as a string), the border will be present. Semantically, the goal is to omit the display of the border attribute when the value is 0.

The underlying problem lies in the code itself, but we should capture the behavior of the code in the docstring until the issue in the code is fixed.
ENH: Improved error message and raise new error for small-string NaN edge case in HDFStore.append
State: closed

Updated **pytables.py** to improve error messages caused by datatype mismatches in **HDFStore.append**. Also added **ValueError** for when the NaN representation cannot fit into the column. Modified tests concerning the improved error message and added new test for when column is type string with length <3 and as such **nan_rep** 'nan' is too big.

- [ ] closes #16300
- [ ] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests)
- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).

Labels:
name: Error Reporting
description: Incorrect or improved errors from pandas
name: IO HDF5
description: read_hdf, HDFStore

Comments:
I've removed the comments mentioned and reverted the error type. I've replaced the test with a function of 3 tests testing the following cases:

- Error on string column too small
- Error on modified nan_rep too big
- Success on small modified nan_rep in small string column

There may be some odd git stuff during me updating the main branch due to my unfamiliarity with the GitHub contribution workflow and git as a whole.
Thanks @JakeTT404 
This impacted #60795 - https://github.com/pandas-dev/pandas/pull/60795#discussion_r1943799181

Is this okay to backport to 2.3?
Yup sure OK with me
Backport PR: #60907