BrandonFors/pandas-github-issues huggingface dataset:
EHN: handle frozenset in pprint
State: closed

- [ ] closes #60690 (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).
- [ ] 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: Output-Formatting
description: __repr__ of pandas objects, to_string

Comments:
Only 1 test failing in the cleaning up process. Bet it would go away if we rerun it.
Please instruct of which whatsnew to add. As of the time of writing there are 2.3.0 and 3.0.0
@mroeschke whatsnew added
pre-commit.ci autofix
Thanks again @quangngd
CHORE: Enable mistakenly ignored tests
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.

While working on another issue, I came across this test that is ignored because of the wrong indentation. This PR is to enable it. Please confirm since you are the last author @jbrockmendel 


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

Comments:
Thanks @quangngd 
nice catch!
BUG: stack with empty level list
State: closed

- [ ] closes #60740
- [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.

Please instruct of which `whatsnew` to add. As of the time of writing there are 2.3.0 and 3.0.0


Labels:
name: Reshaping
description: Concat, Merge/Join, Stack/Unstack, Explode

Comments:
Thanks @quangngd
DOC: Split up the IO docs
State: closed

- [y] closes #10446
- [-] [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
- [y] 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:
Hi, bumping this... @mroeschke could this be looked at soon?
@cobaltt7 - the docs build is failing. This will need to be addressed.
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 for 47734 - df.eval can't concatenate string column and string via +
State: closed

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


Labels:
name: Stale

Comments:
will check on https://pandas.pydata.org/docs/whatsnew/v2.2.0.html#dedicated-string-data-type-backed-by-arrow-by-default
and see what needs to be updated for Unit Tests / Future infer strings to pass
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.
DOC: Move NumPy Byte Order page in gotchas.rst
State: closed

Move NumPy Byte Order page in `gotchas.rst`.

New link: https://numpy.org/doc/stable/user/byteswapping.html

Old link does not work.
https://numpy.org/doc/stable/user/basics.byteswapping.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
test_datetimes.py: fix literal string
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: Error Reporting
description: Incorrect or improved errors from pandas
name: Clean

Comments:
If you just add a whatsnew entry to 3.0.0 I think this can be merged
Not familiar with the format, let me know if this is what you mean, otherwise feel free to push to this branch.
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.
not stale
pre-commit.ci autofix
Thanks @haampie
TST (string): from_dummies, dropna
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.

Lines 3, 5, and 6 in the document Will shared last week.  I think the line 5 one (dropna) would also be solved in a different way by #60797.

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

Comments:
Thanks @jbrockmendel 
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 ea7ff0ea4606f47a672f75793f4ea2b3eb0b87f5
```

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

```
git commit -am 'Backport PR #60818: BUG(string): from_dummies, dropna'
```

4. Push to a named branch:

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

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

> "Backport PR #60818 on branch 2.3.x (BUG(string): from_dummies, dropna)"

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/60856
FIX BUG: Series constructor from dictionary drops key (index) levels when not all keys have same number of entries #60695
State: closed


This is a simple fix, the keys were dropped from uneven tuples sue to zip behavior so I changed to zip_longest.  I performance tested zip_longest and on equal length tuple pairs it actually outperforms zip - go figure.
Unit test is also added

Labels:

Comments:
I saw unit test impacts in other areas where behaviour or MultiIndex changes. I have not addressed these as I had problems getting a clean unit test run.  I'll need to pick through them carefully I think.
TST(string_dtype): Refine scope of string xfail in test_http_headers
State: closed

This xfail should really only affect fastparquet


Labels:
name: Testing
description: pandas testing functions or related to the test suite
name: Strings
description: String extension data type and string data

Comments:
Thanks @WillAyd 
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 c430c613e6c712a39d07146b8adb083d55943840
```

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

```
git commit -am 'Backport PR #60811: TST(string_dtype): Refine scope of string xfail in test_http_headers'
```

4. Push to a named branch:

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

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

> "Backport PR #60811 on branch 2.3.x (TST(string_dtype): Refine scope of string xfail in test_http_headers)"

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).
DOC: fix PR02,SA01,ES01 for pandas.tseries.offsets.BDay and pandas.tseries.offsets.BusinessDay
State: closed

fixes

```
pandas.tseries.offsets.BDay PR02,SA01,ES01
pandas.tseries.offsets.BusinessDay PR02,SA01,ES01
```

Labels:
name: Stale

Comments:
thanks @tuhinsharma121 - looks like there's a warning?
```
docstring of pandas._libs.tslibs.offsets.BusinessDay:12: WARNING: autosummary: stub file not found 'pandas.tseries.offsets.BusinessDay.offset'. Check your autosummary_generate setting.
```
@MarcoGorelli  I guess I need to add stub file for 'pandas.tseries.offsets.BusinessDay.offset'. But I am not sure how/where to add that. I believe it has something to do with `doc/source/reference` but I dont know how to proceed. If you can guide me that would be great. 
i don't know off the top of my head sorry, perhaps try to look at similar classes?
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.
DOC: Expand on different Getitem uses
State: closed

This is confusing to my students, so figured it would be helpful to call it out explicitly.

- [ ] ~~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:
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'll pick this back up soon.
Thanks @afeld and @datapythonista
TST: Add test for exceptional behavior when calling `view()` on `BaseStringArray`
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.
- [ ] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

This PR introduces additional tests for the view method of BaseStringArray, which was recently added in PR [#60713](https://github.com/pandas-dev/pandas/pull/60713). The existing test suite did not cover this method, as shown in the coverage reports below. (I also run the entire test suite locally and double checked that the line is not covered).

To verify the tests, you can run:
```bash
cd tooling/
pytest --cov=$PWD/../pandas/core/arrays/ --cov-report=xml ../pandas/tests/indexes/test_base.py::TestIndex
```
Note: Currently, running pytest from the root directory is resulting in an error in the coverage collection (regardless of which test). If you have any suggestions on how to resolve this issue, please let me know.

This PR aims to ensure that the `view` method is thoroughly tested and meets the pandas testing standards. Your feedback and suggestions are welcome.

## Coverage Before
![test_pr_60713_coverage_before_anonymized](https://github.com/user-attachments/assets/4cfa79e5-9451-432f-b177-8dc966ff6d4e)


## Coverage After
![test_pr_60713_coverage_after_anonymized](https://github.com/user-attachments/assets/98c8ca7a-dfe3-4680-b153-b5d8d57c4b52)


Thanks in advance, let me know if you need any more input from my side



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

Comments:
Thanks @MattePalte
API: ignore empty range/object dtype in Index setop operations (string dtype compat)
State: closed

Exploring one option to address https://github.com/pandas-dev/pandas/issues/60338

This makes that inserting/union etc with an empty RangeIndex or empty Index with object dtype (the types of index that get created for empty objects by default), ignores the dtype of that empty index.  
This improves the workflow of creating an empty dataframe and adding columns or resetting the index (you can see the removed xfails). Also most of the test changes are changes that are essentially reverting previous edits (typically adding an explicit `dtype=object`) to get the tests passing for infer_string, and I think almost all those test changes show a better behaviour now.



I still want to add some explicit tests for the original use case (although everything is implicitly already covered in other tests, I think)

Labels:
name: Strings
description: String extension data type and string data
name: Index
description: Related to the Index class or subclasses
name: setops
description: union, intersection, difference, symmetric_difference

Comments:
Agreed. While it's undesirable to me to ignore empty object dtype when using e.g. concat, using StringDtype should make having object dtype in the first place much more of an edge case. And the impact of this on e.g. adding columns to an empty DataFrame is worth the tradeoff.
Added a whatsnew note (for 2.3, didn't directly find a suitable existing section, but we will have to clean up that file anyway)
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 ee06e714fcb35e0b6d321b3edd454eb0e363e5e4
```

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

```
git commit -am 'Backport PR #60797: API: ignore empty range/object dtype in Index setop operations (string dtype compat)'
```

4. Push to a named branch:

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

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

> "Backport PR #60797 on branch 2.3.x (API: ignore empty range/object dtype in Index setop operations (string dtype compat))"

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/60948
BUG: fix combine_first reorders columns
State: closed

I changed an old test for the correct order of columns.

~~Note that the fix can also be done in `combine`, if it is preferred to be fixed there, since `combine_first` calls `combine`.~~

With my previous fix, a test in "Future infer strings" failed, which is the corner case when `self` is an empty dataframe. I then made the fix in `combine`.

- [x] closes #60427 (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).
- [ ] 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

Comments:
Thanks @yuanx749
DOC: Update a link in tutorials.rst
State: closed

DOC: Update a link in tutorials.rst

Statistical Data Analysis in Python, tutorial by Christopher Fonnesbeck from SciPy 2013

New link: https://github.com/fonnesbeck/statistical-analysis-python-tutorial

The old link does not work.
https://conference.scipy.org/scipy2013/tutorial_detail.php?id=109

- [ ] 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
Update boxplot.py
State: closed

Refactored the code to improve type hinting compatibility  across several functions:
- replaced the | operator with Union for Python versions before 3.10
- added more detailed error messages
- improved logging for edge cases
- redundant logic is simplified, and handling for empty arrays and invalid color arguments

Labels:

Comments:
Thanks for the pull request, but it appears to have gone stale. If interested in continuing, please merge in the main branch, address any review comments and/or failing tests, and we can reopen.
PERF: Avoid a numpy array copy in ArrowExtensionArray._to_datetimearray
State: closed

We shouldn't need to copy from the `astype` when converting a `ArrowExtensionArray` to a `DatetimeArray` or `TimedeltaArray`

Labels:
name: Performance
description: Memory or execution speed performance
name: Arrow
description: pyarrow functionality

Comments:
Thanks @mroeschke
Fix arrow groupby na
State: closed

- [x] closes #60567 
- [x] Tests added and passed
- [x] All code checks passed
- [ ] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [x] Added an entry in the latest `doc/source/whatsnew/v3.0.0.rst` file for the bug fix.


Labels:
name: Arrow
description: pyarrow functionality

Comments:
The CI is now green. @rhshadrach can you please merge this PR.
Thanks @asharmalik19
DOC: fix ES01,SA01 for pandas.tseries.offsets.CustomBusinessMonthEnd.…
State: closed

fixes

```
pandas.tseries.offsets.CustomBusinessMonthBegin.is_on_offset ES01,SA01
pandas.tseries.offsets.CustomBusinessMonthEnd.is_on_offset ES01,SA01
```

Labels:
name: Docs

Comments:
Thanks @tuhinsharma121