BrandonFors/pandas-github-issues huggingface dataset:
Index order fix
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: 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.
BUG/TST Added support for empty dictionary when passed to agg for gro…
State: closed

…upby

This adds consistency across empty containers when passed to agg for groupby. Also added new test to check new functionality works as expected.

- [x] closes #48581
- [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: Bug
name: Groupby
name: Apply
description: Apply, Aggregate, Transform, Map
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.
Groupby nan fix
State: closed

- [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:
name: Groupby
name: Missing-data
description: np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
name: Categorical
description: Categorical Data Type
name: Stale

Comments:
> (Replace xxxx with the GitHub issue number)

Could you do this?
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.
Closing as stale. @codestorm177 - let us know if you'd like to continue by commenting here and we'd be happy to reopen.
CI make some more hooks manual
State: closed

This was brought up by @jorisvandenbossche in Slack - `autotyping` is the slowest hook, and is really unlikely to fail for most contributions. Shall we just mark it as being in the `manual` hook-stage, so it'll still run on CI but won't slow down people's local development too much?

Similar story for `yesqa`

It may be possible to replace `flake8` with the much faster `ruff`, but that's for a separate PR

---

Durations from CI when running on all files:
```
In [30]: pd.DataFrame(res).astype({'duration': float}).sort_values('duration', ascending=False)
Out[30]:
                               id  duration
38                     autotyping     77.60
9                          flake8     74.46
17                          black     51.33
16                          yesqa     35.31
11                      pyupgrade     21.21
15                    sphinx-lint     13.14
1                         vulture      9.92
3                     cython-lint      6.54
10                          isort      6.14
5                debug-statements      5.08
0                absolufy-imports      4.83
18                     flake8-rst      3.32
8                         cpplint      1.58
2                       codespell      1.55
29          use-io-common-urlopen      1.21
19              unwanted-patterns      1.00
35      validate-errors-locations      0.85
14     rst-inline-touching-normal      0.79
36                     flake8-pyi      0.77
28           use-pd_array-in-core      0.77
13           rst-directive-colons      0.60
4     double-quote-cython-strings      0.52
7             trailing-whitespace      0.33
12                  rst-backticks      0.25
23         np-testing-array-equal      0.24
21            incorrect-backticks      0.20
31            no-return-exception      0.18
20                 cython-casting      0.15
30        no-bool-in-core-generic      0.13
26           sync-flake8-versions      0.12
24             invalid-ea-testing      0.11
22                 seed-check-asv      0.11
37             future-annotations      0.11
33        pg8000-not-installed-CI      0.11
6               end-of-file-fixer      0.10
25                   pip-to-conda      0.09
34  validate-min-versions-in-sync      0.07
27           title-capitalization      0.06
32       pandas-errors-documented      0.05
```

Labels:
name: CI
description: Continuous Integration
name: Code Style
description: Code style, linting, code_checks

Comments:
> Shall we just mark it as being in the `manual` hook-stage, so it'll still run on CI but won't slow down people's local development too much?

+1
> on all files

is it possible/reasonable to make these run only on files that a PR edits?  e.g. in my .bash_aliases i have `alias pflake="git diff --name-only | grep '\.py$' | xargs flake8"`
Not sure what you mean exactly, but when running locally, `pre-commit` already runs only on modified files, whereas in CI we run it all files

Running it only on modified files in CI would potentially leave issues unaddressed
Thanks Marco!
Docs: remove duplicated code example
State: closed

This example snippet can be deleted because it reappears further down (two code snippets below). In other words, the paragraph has two examples covering the `axis` keyword arg where only on is needed.

- [ ] 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:
thx @SebastianRoll
TST:: Fixing pytest warning
State: closed

- [x] closes #48553(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 pull request, but I didn't notice this PR and addressed this already in https://github.com/pandas-dev/pandas/pull/50354 and am working on this in https://github.com/pandas-dev/pandas/pull/50386. Sorry for the overlap but going to close this PR for now, but happy to have your contribution on other issues
Fix some cases of mypy # type: ignore
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: 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.
DOC: update documentation for CustomBusinessHour
State: closed

- [x] closes #49838
- [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

Updated documentation for `CustomBusinessHour`. Added missing parameters: `holidays`, `calendar`, and `offset`. Provided more examples.

Labels:
name: Docs

Comments:
Thank you, MarcoGorelli,  for reviewing my PR. I'll keep your comments in mind.
The cat looks cute, just a little bit sad.
😄 I didn't choose it, it's taken randomly from https://chriskuehl.github.io/shipit/ (though perhaps I should curate my own list)
fix some dosctring-RT02-error
State: closed

- [x] some #49968 
- [ ] [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.

Actually I'm not sure they're right, if someone could review and comment this, I will continue to fix the issues.

Labels:
name: Docs

Comments:
This is the functions above:

pandas.io.formats.style.Styler.format
pandas.io.formats.style.Styler.format_index
pandas.io.formats.style.Styler.relabel_index
pandas.Index.drop
pandas.Index.drop_duplicates
pandas.Index.insert
pandas.Index.repeat
pandas.Index.map
pandas.Index.intersection
thx @luke396
BUG: fixed issue where Index was being accessed with DatetimeIndex attribute
State: closed

- [x] Closes #49925 
- [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.

Changes: updated the dates method in pandas/tseries/holiday.py to include a check to prevent the DatetimeIndex attribute
from being accessed by an Index object.  The bug occurs if the holidays land outside the provided date range which results in an empty DatetimeIndex object being converted to an Index object. The updated dates method now checks if the object contains elements before allowing access to a DatetimeIndex attribute because such an object will be of type Index. Furthermore, the Index object is converted back into a DatetimeIndex object. A test was added to pandas/tests/tseries/holiday/test_holiday.py to ensure that the intended behavior is occurring. 


Labels:
name: Frequency
description: DateOffsets
name: Index
description: Related to the Index class or subclasses
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.
DEPR: deprecate Index.is_integer
State: closed

- [ ] progress towards #50042
- [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.
- [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: Deprecate
description: Functionality to remove in pandas
name: Index
description: Related to the Index class or subclasses

Comments:
Have to hold off here a bit, we want to get all deprecations enforced before adding new ones
needs a rebase, can merge afterwards
Thanks. I’ve rebased.
thx @topper-123
BUG: Make io.sql.execute raise TypeError on Engine or URI string.
State: closed

- [X] xref #50185
- [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: IO SQL
description: to_sql, read_sql, read_sql_query

Comments:
This bug does not exist in any release of pandas. It only exists in the main branch due to a PR that I created. So this version restriction would only show up in pandas 2.0. I'm not able to open a bug report issue, because the template requires me to check that this bug exists on the latest version of pandas. I discovered the bug while I was trying to complete #48576. The `pandas.io.sql.execute` method is not well-documented. The only mentioned I found is above this line: https://pandas.pydata.org/docs/user_guide/io.html?highlight=sql%20execute#engine-connection-examples. If it's ok to change the method so that it doesn't allow either an `Engine` or a `str` to be passed as the connectable, then the bug could be fixed that way instead of by using the `Result.freeze` method of sqlalchemy, which had a bug in it until version 1.4.45.
You can open an issue without using the template at the bottom of that page.

2.0 will come out early next year, the limit is still to strict for us. We updated the minimum versions a couple of months ago. 

Can we revert your initial pr if this can not get fixed otherwise?
If you need to revert PR #49531, then you will also need to revert PR #49757. I think this issue needs to be resolved in order for pandas to support sqlalchemy 2.0. I will open a general issue.
Yep please open an issue with a reproducible example. Also please link the pr that caused this there, makes investigating easier.
I have opened an issue: #50185
@phofl thanks for approving.  Is it ok to merge?  I don't have write access.
@mroeschke could you have a quick look?
Thanks @cdcadman
DEPR: deprecate Index.is_boolean
State: closed

- [ ] progress towards #50042
- [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.
- [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: Deprecate
description: Functionality to remove in pandas
name: Index
description: Related to the Index class or subclasses

Comments:
> Can you add tests as well?

I added a test in pandas/tests/indexes/common.py. Do you mean something additional?
Missed this, sorry
needs a rebase, can merge afterwards
Updated.
Thx @topper-123
BUG: isetitem coercing df columns to object
State: closed

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


Labels:
name: Indexing
description: Related to indexing on series/frames, not to indexes themselves
name: DataFrame
description: DataFrame data structure
name: NA - MaskedArrays
description: Related to pd.NA and nullable extension arrays

Comments:
Thanks @phofl
Fixed issue with writing Decimal type to excel file - Issue #49598
State: closed

- [ ] closes #49598  (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: 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.
BUG: df.setitem raising for ea bool df indexer
State: closed

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


Labels:
name: Indexing
description: Related to indexing on series/frames, not to indexes themselves
name: DataFrame
description: DataFrame data structure
name: NA - MaskedArrays
description: Related to pd.NA and nullable extension arrays

Comments:
Thanks @phofl
Hello, i am new to programming and wanted to try a pull request. i ma…
State: closed

…de some minor changes that i am not so sure if its ok, the ones i think its good are the creation of to functions "_read_option_handler" and "_read_old_header_descriptors".

Wainting for some feedback.




Labels:

Comments:
Please do one change at at time and clearly describe what you are trying to do. Also, please read our formatting guidelines and install pre-commit.

This is too large and very confusing.
ok,sorry
BUG: iloc raising for ea series
State: closed

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


Labels:
name: Indexing
description: Related to indexing on series/frames, not to indexes themselves
name: NA - MaskedArrays
description: Related to pd.NA and nullable extension arrays

Comments:
Thanks @phofl
BUG: loc for ea index raising with oob slice end
State: closed

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


Labels:
name: Indexing
description: Related to indexing on series/frames, not to indexes themselves
name: Index
description: Related to the Index class or subclasses
name: NA - MaskedArrays
description: Related to pd.NA and nullable extension arrays

Comments:
Thanks @phofl