BrandonFors/pandas-github-issues huggingface dataset:
REGR: MultiIndex.join does not work for ea dtypes
State: closed

- [x] closes #49277 (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.

This can not fall through for regular ea dtypes, rather go through object path

Labels:
name: Regression
description: Functionality that used to work in a prior pandas version
name: Index
description: Related to the Index class or subclasses
name: NA - MaskedArrays
description: Related to pd.NA and nullable extension arrays

Comments:
good to merge @mroeschke ?
Thanks @phofl 
Oops, something went wrong applying the patch ... Please have a look at my logs.
DEPR: tz arg in Period.to_timestamp
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: Deprecate
description: Functionality to remove in pandas

Comments:
Thanks @jbrockmendel
DOC: Updates to documentation
State: closed

- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added an entry in the latest `pandas/core/frame.py` file.
- [ ] closes #48674 

index constructor updates to the frame.py file to indicate index alignment.


Labels:
name: Docs

Comments:
Thanks for the pull request. Could you please review the CI failures?
> Thanks for the pull request. Could you please review the CI failures?

Okay, Thank you @mroeschke. I will review and reopen the pull request after making the requested changes
@mroeschke All ci checks are successful now and review has been implemented. Thank you for the feedback.
Great, thanks @minat-hub
PERF: GH28635 Add ASV benchmark for resample after groupby
State: closed

- [x] closes #28635 (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: Groupby
name: Resample
description: resample method
name: Benchmark
description: Performance (ASV) benchmarks

Comments:
> What is the runtime of the benchmark? We aim for something like 20ms in general

The code as I had first submitted it took 100ms per tested function for one run on my machine, I reduced the size of the dataset so that it is below 20ms now on my machine [1]. Of course my machine is not necessarily representative... If this is not the right aproach, anything I should be doing differently?


```
asv run -e -E existing -b groupby.Resample --durations

[25.00%] ··· Running (groupby.Resample.time_resample--)..
[75.00%] ··· groupby.Resample.time_resample                                       16.2±0.4ms
[100.00%] ··· groupby.Resample.time_resample_multiindex                           16.9±0.5ms
[100.00%] ·· =========================================== ================
                              benchmark                   total duration 
             ------------------------------------------- ----------------
              groupby.Resample.time_resample_multiindex       508ms      
                    groupby.Resample.time_resample            508ms      
                                total                         1.02s      
             =========================================== ================

```

Great, thx
thx @krasch
DOC: Removed parenthesis from .loc,.iloc,.at,.iat
State: closed

- [ ] closes #49254 
- Removed parenthesis from **.loc**, **.iloc**, **.at**, **.iat** under `Selection`, `Selection by Label` and `Selection by Position`.


Labels:
name: Docs
name: Indexing
description: Related to indexing on series/frames, not to indexes themselves

Comments:
Sure...looks like something went wrong while doing it and I am not sure
what I did. I will be careful next time. 👍

On Mon, 24 Oct, 2022, 11:15 Patrick Hoefler, ***@***.***>
wrote:

> ***@***.**** commented on this pull request.
>
> Hi, thanks for your contribution. Please don't open a new pr for every
> change, you can just edit your existing pr
>
> —
> Reply to this email directly, view it on GitHub
> <https://github.com/pandas-dev/pandas/pull/49272#pullrequestreview-1152560714>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AKIWLY75SVJ3GFVQ4PE5U5DWEYPAJANCNFSM6AAAAAARMUBSSY>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>

What should I do next? 
Thank you @rhshadrach and @phofl for your feedback and guidance. Appreciated!!!
Now, I am thinking there are no pending actions from me with the message below.
*--------------------------------*
 #**Development**
Successfully merging this pull request may close these issues.

https://github.com/pandas-dev/pandas/issues/49254
Thanks for taking care of this @EleekaN.

I guess this PR just removes the `()` after `.loc`... Even if it's not technically correct as @mroeschke I'm fine with it. But feel free to close @mroeschke if you prefer to be strict.

@EleekaN do you want to open a PR or an issue to add the suggested examples? Thanks!
Hi @datapythonista  and @mroeschke ......thank you for your time and for sharing your thoughts on my PR. 
I would really love to update what is requested; probably I will raise a separate issue on this. 
So, I guess we can close this PR without merging.
DEPR: enforce deprecation of slice_shift
State: closed

- [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/v2.0.0.rst` file if fixing a bug or adding a new feature.

Deprecation introduced in #37601

Labels:
name: Deprecate
description: Functionality to remove in pandas

Comments:
thx @lukemanley (could you update the deprecation issue?)
TST: un-xfail clipboard test on mac
State: closed

- [x] closes #48721 (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:
thx @jbrockmendel
TST: repr of Arrow-backed object (GH #48238)
State: closed

- [x] closes #48238 
- [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).
- [N/A] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [N/A] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

The actual issue in https://github.com/pandas-dev/pandas/issues/48238 was fixed already, only test is needed - I basically just stole the test from https://github.com/pandas-dev/pandas/issues/48238#issuecomment-1287213150. 

Also, this is my first time contributing here so sorry if I get the process wrong. Thanks!

Labels:

Comments:
Not sure what to do about the failing CI jobs since they don't seem to be coming from the file I touched :-( 
Ah so I ran into this same issue in https://github.com/pandas-dev/pandas/pull/48258. I think there's some cached state in the testing causing unrelated tests to fail.

Would be very welcome for you to dig into why this is happening, but I would say this isn't a `good first issue` necessarily. Let me know if you'd like to continue otherwise I recommend tackling a separate issue.
Okay, I don’t think I’m the best person to tackle the broken CI issue unfortunately, as I’m not super knowledgeable about advanced aspects of GHA or whatever else could be causing cache problems.
Thanks for letting me know @a-reich. I'll close this pull request for now then to maybe let another user tackle this if interested. Can reopen if you are interested in tackling this issue again
DEPR: kind kwarg in Index.get_slice_bound, Index.slice_indexer, Index.slice_locs
State: closed

- [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/v2.0.0.rst` file if fixing a bug or adding a new feature.

Deprecation introduced in #41378

Labels:
name: Deprecate
description: Functionality to remove in pandas

Comments:
Thanks @lukemanley
Improve error message about duplicate columns in df.explode
State: closed

- [ ] closes #xxxx (Replace xxxx with the GitHub issue number)
- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [ ] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

This is an attempt to improve the error message happening when exploding a column in a data frame with duplicate columns. 

As a newbie with pandas, it was really confusing to me why this happens – I was looking for a key inside the exploded column that would cause a duplicate. Eventually, I had to go to the source code to understand that it was not related. 

If listing the duplicate columns is too much/not a standard practice, I would vote for changing it at least to something like `data frame columns must be unique`.



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

Comments:
Is this pull request associated with an existing issue?
I haven't seen an issue like that reported.
I've committed the suggested changes, thank you!
Thanks @a-mroz
DOC: Done the changes as specified in issue#49254
State: closed

- [ ] closes #49254


Labels:

Comments:
Should also change the doc under the **Selection by label** and **Selection by position** sections. See **Documentation problem** #49254 
Thanks for the PR! Can you make the title more descriptive here? Ideally, when a maintainer reads just the title, they'd like to have a good sense of what the PR is doing overall. This makes navigating the PR queue a lot easier for us. In this PR, I only know that it solves some issue with a code, which doesn't tell me much. Of course I can go look that issue up, but the goal is for me to get a sense of what this is doing without having to look it up.

A suggestion would be something along the lines of `DOC: Remove parentheses after loc, iloc, at, iat`
Thank you for your feedback. I have applied the changes, hope it looks good
this time.


On Mon, 24 Oct, 2022, 00:04 Richard Shadrach, ***@***.***>
wrote:

> Thanks for the PR! Can you make the title more descriptive here? Ideally,
> when a maintainer reads just the title, they'd like to have a good sense of
> what the PR is doing overall. This makes navigating the PR queue a lot
> easier for us. In this PR, I only know that it solves some issue with a
> code, which doesn't tell me much. Of course I can go look that issue up,
> but the goal is for me to get a sense of what this is doing without having
> to look it up.
>
> A suggestion would be something along the lines of DOC: Remove
> parentheses after loc, iloc, at, iat
>
> —
> Reply to this email directly, view it on GitHub
> <https://github.com/pandas-dev/pandas/pull/49263#issuecomment-1288171986>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AKIWLY3KFLOCG7VT75C3XL3WEWAJPANCNFSM6AAAAAARMJVSZI>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>

Ah, my apologies! I wasn't specific enough - I had meant the title at the top:

![image](https://user-images.githubusercontent.com/45562402/197509408-285a40aa-58a8-4a81-aa47-60d8087ad63f.png)

This can be edited at any point by clicking the button on the very right of this screen shot. But your new open PR looks good! I wouldn't change anything at this point.
BUG: groupby.nth should be a filter
State: closed

- [x] closes #13666 (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: Bug
name: Groupby

Comments:
Thanks @mroeschke - ready for another look.
Hmm I'm not sure I agree with this approach - doesn't this introduce an even larger inconsistency now between nth / first / last? Do we have other groupby functions that work this way?
> Hmm I'm not sure I agree with this approach - doesn't this introduce an even larger inconsistency now between nth / first / last? Do we have other groupby functions that work this way?

`first` and `last` are reductions - they return 1 value per group. `nth` on the other hand can also return zero or multiple rows. It is because of this I think we should be treating `nth` as a filtration. The other filtrations, `head`, `tail`, and `filter` all behave as in this PR, namely they merely filter the rows from the input object. In particular, `groupby(...).head()` now behaves the same as `groupby(...).nth([0, 1, 2, 3, 4])`.
Yea I definitely see the argument. I think I'm +/-0 . IIUC this makes nth closer to filtering on rank, but with a predetermined option for a tiebreaker
> IIUC this makes nth closer to filtering on rank

nth goes off of the input order, making it somewhat different from rank.
Awesome work @rhshadrach
DEPR: enforce deprecation MultiIndex.is_lexsorted and MultiIndex.lexsort_depth
State: closed

- [x] Added an entry in the latest `doc/source/whatsnew/v2.0.0.rst` file if fixing a bug or adding a new feature.

Deprecation introduced in #38701

Labels:
name: Deprecate
description: Functionality to remove in pandas

Comments:
> Doc build fails

fixed and now green. thx
thx @lukemanley (can you update deprecations issue?)
DEPR: disallow non-keyword arguments
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: Deprecate
description: Functionality to remove in pandas

Comments:
Thanks @jbrockmendel
DEPR: drop setting categorical codes
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: Deprecate
description: Functionality to remove in pandas

Comments:
Thanks @jbrockmendel
DEPR: enforce deprecation of Categorical.replace
State: closed

- [x] Added an entry in the latest `doc/source/whatsnew/v2.0.0.rst` file if fixing a bug or adding a new feature.

Deprecation added in #44929

Labels:
name: Deprecate
description: Functionality to remove in pandas

Comments:
thx @lukemanley (can you update deprecations issue)
DEPR: is_categorical
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: Deprecate
description: Functionality to remove in pandas

Comments:
needs rebase, otherwise lgtm
thx @jbrockmendel (could you update the deprecations issue?)
DEPR: Enforce deprecation of mad and tshift
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.
- [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

Comments:
thx @rhshadrach (could you update the deprecation issue?)
Done.
DEPR: DataFrame.median/mean with numeric_only=None and dt64 columns
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: Deprecate
description: Functionality to remove in pandas
name: DataFrame
description: DataFrame data structure
name: Reduction Operations
description: sum, mean, min, max, etc.
name: Nuisance Columns
description: Identifying/Dropping nuisance columns in reductions, groupby.add, DataFrame.apply

Comments:
Thanks @jbrockmendel - I've updated #30228
BUG: UndefinedVariableError in DataFrame.query with classname
State: closed

- [x] closes #48694
- [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/v1.5.2.rst` file if fixing a bug or adding a new feature.

xref #47859

Labels:
name: expressions
description: pd.eval, query
name: Stale

Comments:
The doc build error may possibly be related? https://github.com/pandas-dev/pandas/actions/runs/3303682683/jobs/5451910616
Thanks for the feedback @mroeschke.
I see a lot of exceptions in `user_guide/enhancingperf.rst`, but I was able to build it locally without any error. Any advice how I can figure this out?
Did you build the docs locally with the `--warnings-are-errors` flag?
I used both `--warnings-are-errors --single user_guide/enhancingperf.rst`, didn't throw any error.
From the logs it appears that the errors are not just in `--single user_guide/enhancingperf.rst` so maybe try building the entire dogs with the `--warnings-are-errors` flag
I was able to replicate the error in the docs with that. But not able to identify why it's throwing `ValueError` in the docs, but not in the terminal for the exact same thing.
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.
Should also fix ~#49248~ #50442 
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.