BrandonFors/pandas-github-issues huggingface dataset:
REG: Fix regression in assert_frame_equal for categorical and check_like
State: closed

- [x] closes #48975 (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: Testing
description: pandas testing functions or related to the test suite
name: Regression
description: Functionality that used to work in a prior pandas version

Comments:
Thanks @phofl 
cheerios 👍
DOC: Improve documented types for merge
State: closed

Correct list of supported types in docs
Remove block creating incorrect docs in merge

- [X] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).


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

Comments:
xref pandas-dev/pandas-stubs#355

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 @bashtage if you could follow up with the unit test that would be great
DOC: Update xdist to provide more speed-up options and context (#48958) (#48535)
State: closed

👋 I was working on a more elaborate solution to the question in #48535 when @mroeschke made #48958 and closed it. So I tried to incorporate his work into mine to see if you are still interested in a more verbose solution. Things that might be interesting here are:

- mentioning that pytest-xdist is in our environment and doesn't need to be installed
- explaining the other speed up options which were available in the original script
- explaining the -r summary flag and stating it's optional
- showing people how to set a seed on Windows and Unix machines in case they need help (this might be redundant, I wasn't sure).

Screenshot for illustration:
<img width="728" alt="Screenshot 2022-10-07 at 10 36 41" src="https://user-images.githubusercontent.com/6564007/194512399-897fdfef-4432-4400-a7c0-b9c71a781d94.png">


Please don't hesitate to close this if it's overkill at this point.

Labels:
name: Docs

Comments:
When demonstrating skipping tests, could we promote using e.g. `-m "not slow"` instead of `--skip-slow`? I think using `-m "not ..."` will be more flexible/scalable in the instance where we add more marks in the future and accomplishes the same test skipping.
thx @noatamir
made changes to resolve unsupported-assignment-operation from #48855
State: closed

- [x] closes #48855 partially
- [x ] Solves "made changes to resolve "unsupported-assignment-operation"



Labels:
name: Code Style
description: Code style, linting, code_checks

Comments:
Instead, could you just write a comment next to this entry in the pyproject.tomll why this is turned off?
closing this one for now, but thanks for your PR!

The ones we probably can't turn off are listed in https://github.com/pandas-dev/pandas/issues/48855
DOC: Updated Resampler.mean docstring to have its own docstring
State: closed

- [x] closes #48803 which belongs to `Contributions welcome` milestone
- [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.


By default, the `Resampler.mean` docstring is inherited from `GroupBy.mean`. As a result, unsupported parameters 'engine' and 'engine_kwargs' were created in the [API documentation](https://pandas.pydata.org/docs/reference/api/pandas.core.resample.Resampler.aggregate.html).

To do this, I defined the Mean function as a method of Resampler and wrote the docstring of the function itself.

- FYI
  - I think it is unnecessary adding this issue to Whatsnew section, so I left it.
  - I closed [previous PR](https://github.com/pandas-dev/pandas/pull/48902). This one is newly created.

Labels:
name: Docs
name: Resample
description: resample method
name: Reduction Operations
description: sum, mean, min, max, etc.

Comments:
I found that doc build error also occurs in previous commit(#48965).
when I run `python doc/make.py html` in my local computer, same error occurs.
Thanks @donghyyun
#48832: GL08 - Added missing docstrings
State: closed

## In progress

- [X] closes #48832
- [ ] ~~[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
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.
CI: Bump timeouts Python dev builds
State: closed

e.g. https://github.com/pandas-dev/pandas/actions/runs/3193038414/jobs/5211185245


Labels:
name: CI
description: Continuous Integration

Comments:
I just ran the tests (--skip-slow --skip-db) from April 1 and they took 19:30, compared to 30:06 from yesterday.  Of that half hour, 8 minutes is in tests/extension/test_arrow.py.  Not sure what to do with this, just making sure its written down.
(FWIW: The Python dev builds don't run the optional deps)

Each test in `extensions/test_arrow.py` is essentially parameterized over 37 pyarrow dtypes (plus want to test list and struct support in the future to defer nested data support to pyarrow). There may be areas where skips per dtypes is possible, but otherwise the tests are very thorough (and long) because of this.
I think the main issue is the build step. Building pandas shouldn't take 25 minutes like it does on the macOS job.
At least this gives us a buffer (other builds are at 120)

@lithomas1 any quick suggestions how we might speed things up or should that be addressed in a followup?


Try changing this line https://github.com/pandas-dev/pandas/pull/48973/files#diff-f6f33d5fc5cfd739f0d6efd63ea9dff886abe35cdfff5672e9a863ec8da8e72cR78 to 
``python -m pip install -i https://pypi.anaconda.org/scipy-wheels-nightly/simple numpy``

Numpy should be uploading Python 3.11 wheels so, we'll shave off ~5 minutes for sure from not compiling numpy. We might get a little more speed-up in the tests too from this.
ENH: Add ability to style axis names with `Styler`
State: closed

- [ ] closes #48936
    - [x] apply_index
    - [ ] format_index
- [ ] [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.
- [ ] Added documentation to Table Visualization page

cc: @attack68 

Labels:
name: Styler
description: conditional formatting using DataFrame.style
name: Stale

Comments:
I think this PR looks good but there are a few things to check off:

 - [ ] editing the styler guide documentation and any other locations for the list of CSS classes that are added in the HTML: `col_name` is a new one.
 - [ ] although we are re-using the `apply` and `applymap` methods with a small extension it is rather overkill to suggest that one would actually use a function to style these. It is probably easier just to supply a small list of styles to each name (of which there are probably a small number). In that case a simple documentation entry might help, something like:
```
styler.apply_index(lambda s: ["color: blue;", "color: red;"], names=True)
```
should suffice.
  - [ ] all other column CSS class names have `col` so I suggested sticking with the format.
  - [ ] needs a whats new and a version added for the argument, and a note about minor breaking change.
  - [ ] the copying mechanics are also changed. should review the docs there to see if it should be added.
  - [ ] the tests seem to be for multiindexes. Does it also work just in the regular index case?
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.
> 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.

Still working on this
Note to self on current progress:

- Completed implementation of https://github.com/pandas-dev/pandas/pull/48972#issuecomment-1272398597 except for checking the copy mechanics
- Need to generate and check documentation, specifically example output and style user guide (version added)
- Need to validate basic Index behavior and test completeness
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: 'Series.to_numpy(dtype=, na_value=)' behaves differently with 'pd.NA' and 'np.nan' #48951 
State: closed

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


Labels:
name: Bug
name: NA - MaskedArrays
description: Related to pd.NA and nullable extension arrays
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.
closing for now, will get back to this later
BUG: to_datetime(..., infer_datetime_format=True) fails with np.str_input
State: closed

- [x] closes #48969 (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.

I haven't added a whatsnew note as this worked fine in the last released versions, it just fixes a regression introduced between releases so makes no difference to users

Same kind of thing as https://github.com/pandas-dev/pandas/pull/45280

Labels:
name: Bug
name: Datetime
description: Datetime data dtype

Comments:
Thanks @MarcoGorelli (Finally have the walrus operator in the code base!)
> Finally have the walrus operator in the code base!

Wave of the future!
DOC: Added section on git bisect to pandas maintenance
State: closed

- [ ] closes #35685
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [x] Added an entry in the latest `doc/source/whatsnew/v1.6.0.rst` file if fixing a bug or adding a new feature.

Added section on regressions to development guide under pandas maintenance. Wasn't sure if this needs a whatsnew entry, added it anyway.

@MarcoGorelli Please let me know what you think.

Labels:
name: Docs

Comments:
@MarcoGorelli Thank you for the speedy feedback! The whatsnew entries are removed.
Thanks @seljaks
BUG: pd.compare does not recognize differences when comparing values with null Int64 data type
State: closed

in  `pd.compare` if any comparisons result in `null` values like `pd.NA`, consider the values unequal. 


- [x] closes #48939 (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: NA - MaskedArrays
description: Related to pd.NA and nullable extension arrays

Comments:
do I need to change anything or the cancelled check will be rerun?
Hi @phofl 

seems like `compare` considers all missing values the same. 
Considering this is the current behavior of the method, can we go ahead?

```Python console
In [57]: df2 = pd.DataFrame({'a': pd.Series([4, np.nan]), 'b': [3, pd.NaT] })

In [58]: df1 = pd.DataFrame({'a': pd.Series([4, pd.NaT]), 'b': [3, np.nan] })

In [59]: df1.compare(df2)
Out[59]:
Empty DataFrame
Columns: []
Index: []
```

Also, something to note - `equals` considers two `pd.NA`s the same.

```Python console
In [61]: df1 = pd.DataFrame({'a': pd.Series([4, pd.NA], dtype='Int64'), 'b': [3, pd.NA] })

In [62]: df2 = pd.DataFrame({'a': pd.Series([4, pd.NA], dtype='Int64'), 'b': [3, pd.NA] })

In [63]: df1.equals(df2)
Out[63]: True
```



Don't know why the test failed in ubuntu. the test passes for me on WSL.
Thx @vamsi-verma-s
DOC: Fixed documentation for pivot_table margins (#48916)
State: closed

The documentation for the margins parameter of pivot_table was incorrect. It said that the parameter added rows and columns, but it actually passed them to aggfunc. I used the documentation from the user guide to replace the old documentation, as well as added a sentence to the documentation for aggfunc that explained its role in calculating margins.

- [ ] 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
name: Reshaping
description: Concat, Merge/Join, Stack/Unstack, Explode

Comments:
Thanks @MatteoRaso 
No problem.
API: .astype td64->td64 give requested dtype
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: Datetime
description: Datetime data dtype
name: Dtype Conversions
description: Unexpected or buggy dtype conversions

Comments:
Thanks @jbrockmendel
REF: tighter typing in datetimelike arith methods
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: Refactor
description: Internal refactoring of code
name: Datetime
description: Datetime data dtype
name: Numeric Operations
description: Arithmetic, Comparison, and Logical operations
name: Typing
description: type annotations, mypy/pyright type checking

Comments:
Thanks @jbrockmendel
ENH: support Timedelta division with mismatched resos
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: Timedelta
description: Timedelta data type
name: Non-Nano
description: datetime64/timedelta64 with non-nanosecond resolution

Comments:
Thanks @jbrockmendel
Backport PR #48943 on branch 1.5.x (REGR: ExcelWriter.book not settable)
State: closed

Backport PR #48943: REGR: ExcelWriter.book not settable

Labels:
name: Bug
name: Regression
description: Functionality that used to work in a prior pandas version
name: IO Excel
description: read_excel, to_excel
name: Deprecate
description: Functionality to remove in pandas

Comments:
cc @rhshadrach could you have a look? The typing failure looks legit
This PR got checked with mypy 0.971; the main PR got checked with 0.981. Locally, I'm seeing the same - mypy flags this as an issue with 0.971 but not 0.981. I get the same behavior with the OP code from this issue back from 2017: https://github.com/python/mypy/issues/4165.

Since 1.5.x is pinned with mypy 0.971, I'm thinking we add a `type: ignore` for just the backport; that make sense?
Yep makes sense, thx for investigating
Removing The Show_Source Button from API pages
State: closed

- [x] closes #48715 

Made the required changes in the conf.py file.
It removes the show_source button from the API pages.



Labels:
name: Web
description: pandas website
name: Stale

Comments:
You need to create a pandas development environment with mamba, then run the `make.py` script in docs, start an http server with `python -m http.server` inside the `build` directory, and then you navigate the docs in your local instance of the docs.

Full documentation on this and more is here: https://pandas.pydata.org/docs/development/index.html
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: guess_datetime_format doesn't guess format correctly for UTC+1
State: closed

- [x] closes #48921 (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.

Haven't added a whatsnew note as this function isn't (yet) user-facing

This extra try-except adds about 9 microseconds on my laptop:

upstream/main:
```
In [2]: %%timeit
   ...: guess_datetime_format('2020-01-01 00:00:00 UTC+1')
   ...: 
   ...: 
93 µs ± 652 ns per loop (mean ± std. dev. of 7 runs, 10,000 loops each)
```
this branch:
```
In [3]: %%timeit
   ...: guess_datetime_format('2020-01-01 00:00:00 UTC+1')
   ...: 
   ...: 
102 µs ± 141 ns per loop (mean ± std. dev. of 7 runs, 10,000 loops each)
```
IMO this is negligible and worth it

Labels:
name: Bug
name: Datetime
description: Datetime data dtype

Comments:
Thanks @MarcoGorelli