BrandonFors/pandas-github-issues huggingface dataset:
DEPR: set_axis inplace keyword
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
BUG: Fixed inconsistent offset behavior for series #43784
State: closed

- [ ] closes #43784 
- [ ] [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: Datetime
description: Datetime data dtype
name: Numeric Operations
description: Arithmetic, Comparison, and Logical operations
name: Frequency
description: DateOffsets
name: Stale

Comments:
I'm not exactly sure how these extra commits got into this new PR, but I fixed the file conflicts so that those extra changes are gone.
I realize `test_shift_across_dst` in `test_offsets_properties.py` fails right now and I am working on a fix for that.
There seems to be a test failing called `test_reindexing_with_float64_NA_log` in `test_reindex.py`, but I've run this test without my code change, and it ends up failing anyways, so I don't think this change is to blame.
@mroeschke I've changed the check to take into account user-created subclasses by removing the type check in the if statement.  I've also changed the `_use_relativedelta` field in the existing subclasses to match their behavior.
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: positional arguments of read/to_state
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: Deprecate
description: Functionality to remove in pandas
name: IO Stata
description: read_stata, to_stata

Comments:
Thanks @twoertwein
BUG: #39448 fixed dropna to return copy correctly
State: closed

- [X] closes #39448 
- [ ] [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.
- [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: Missing-data
description: np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
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.
1.4.x
State: closed

fix a bug using at to setitem will raise InvalidIndexError: df.at[slice, item] = array_or_other if item existed

Labels:
name: Bug
name: Needs Info
description: Clarification about behavior needed to assess issue
name: Needs Tests
description: Unit test(s) needed to prevent regressions

Comments:
> * Why is this PR is against `1.4.x` branch and not to `main`?

I don't think you can change that after the PR is opened? so closing this one.

@agodbug please reopen PR against main. (after considering the points raised in https://github.com/pandas-dev/pandas/pull/48120#pullrequestreview-1075270081)
DOC: GH48097 remove optional from data for DatetimeIndex docs
State: closed

- [x] closes #48097 
- [ ] [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/v1.5.0.rst` file if fixing a bug or adding a new feature.

updated docstring for `DatetimeIndex` such that `data` is no longer optional in the docs 


Labels:
name: Docs
name: Datetime
description: Datetime data dtype

Comments:
Thanks @nealxm
ENH: droplevel copy keyword
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:
One merge conflict otherwise LGTM
i think CI fail is unrelated
opened #48141
Thanks for opening the issue!
Revert Interval/IntervalIndex/interval_range.inclusive deprecation
State: closed

xref https://github.com/pandas-dev/pandas/issues/47365#issuecomment-1215904502

Reverts these PRs

https://github.com/pandas-dev/pandas/pull/47775
https://github.com/pandas-dev/pandas/pull/47655
https://github.com/pandas-dev/pandas/pull/47646
https://github.com/pandas-dev/pandas/pull/47636
https://github.com/pandas-dev/pandas/pull/47637
https://github.com/pandas-dev/pandas/pull/47367
https://github.com/pandas-dev/pandas/pull/46522
https://github.com/pandas-dev/pandas/pull/46355

@phofl would appreciate a look since you did a lot of the cleanup post deprecation (and there were tons of merge conflicts reverting along the way)


Labels:
name: Interval
description: Interval data type

Comments:
Looks good, but impossible to see everything...
DEPR: inplace kwarg in set_index
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:
Just one merge conflict
Thanks @jbrockmendel
DOC: update contributing to pandas documentation
State: closed

- [x] closes #48035
- [ ] [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.

I removed the part in the [Committing your code](https://pandas.pydata.org/docs/development/contributing.html#id9) section where it is said that commit messages should include the number of the GitHub issue the commit is contributing towards. I updated the pull request template to include cross references so that it's more clear how people should make use of referencing GitHub issues.

I fixed the code snippet `git commit -m` which causes an error and updated the documentation to include both commit message versions, the one line commit message and the more detailed commit message that can be done with an editor. Let me know if you would like to keep both versions or would like further changes.

Additionally, I moved the section about the prefixes to the [Finally, make the pull request](https://pandas.pydata.org/docs/development/contributing.html#id12) section of the documentation. Let me know if the prefixes need to be updated. 


Labels:
name: Docs

Comments:
Thanks for your feedback! I addressed your comments. I previously added the line `- [ ] xref #xxxx (Replace xxxx with the Github issue number)` in `PULL_REQUEST_TEMPLATE.md` because sometimes a pull request contributes to an issue but doesn't close it such as here: https://github.com/pandas-dev/pandas/pull/44798. However, I understand your concerns and removed this line.
Thanks @marenwestermann!
revert Timestamp and Timedelta constructors typing allowing NaTType return
State: closed

Re discussion at https://github.com/pandas-dev/pandas/pull/46171#issuecomment-1216906549

Has `Timestamp` and `Timedelta` constructors return union that includes `NaTType`


Labels:
name: Missing-data
description: np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
name: Timedelta
description: Timedelta data type
name: Typing
description: type annotations, mypy/pyright type checking
name: Timestamp
description: pd.Timestamp and associated methods

Comments:
@mroeschke Not sure what to do here.  `pyright` is reporting issues in other places in the code.  See https://github.com/pandas-dev/pandas/runs/7863880652?check_suite_focus=true

I think that the level of `pyright` checking increased since the original PR was done.  Or other changes made to the code were fine without having the constructors return `NaTType` so when we declare it that way, we need to fix some other places.

On the one hand, `pyright` is picking up some potential errors. On the other hand, making this simple change means there is more work to do to fix up other parts of the code that were not touched in the original PR.

I will see if I can workaround those issues.

I think the issue is that for mypy `__new__` cannot return an object other than from the corresponding class. https://github.com/python/mypy/pull/7188 suggests that mypy supports other type annotations for `__new__` IF they are subclasses (so basically it still seems to not support them for Timestamp).

If they cannot be fixed now, it is probably best to add those files to https://github.com/pandas-dev/pandas/blob/main/pyright_reportGeneralTypeIssues.json one day when this ignore list is small enough we can add in-line ignore comments.


> I think the issue is that for mypy `__new__` cannot return an object other than from the corresponding class. [python/mypy#7188](https://github.com/python/mypy/pull/7188) suggests that mypy supports other type annotations for `__new__` IF they are subclasses (so basically it still seems to not support them for Timestamp).

Yes, that is it.
> 
> If they cannot be fixed now, it is probably best to add those files to https://github.com/pandas-dev/pandas/blob/main/pyright_reportGeneralTypeIssues.json one day when this ignore list is small enough we can add in-line ignore comments.

Thanks for this suggestion.  Will do this in next commit.


Probably the first catch of stubtest :) `tz` doesn't seem to exist at runtime: https://github.com/pandas-dev/pandas/runs/7865645731?check_suite_focus=true
> Probably the first catch of stubtest :) `tz` doesn't seem to exist at runtime: https://github.com/pandas-dev/pandas/runs/7865645731?check_suite_focus=true

Thanks for finding that.  I'll create `tz` and `tzinfo` methods for `NaTType` that return `None`

@mroeschke so this is good to go.  I don't know what to do about the failure with the CircleCI Pipeline
ENH: Add cumulative methods to ea
State: closed

- [x] closes #28385 (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 tries to finish #28509. I've reduced the scope to masked arrays and would prefer to do datetimelike as a follow up, if we want to change the behavior there. This is currently a big buggy as mentioned in https://github.com/pandas-dev/pandas/pull/28509#issuecomment-778741118
Currently, we are dispatching back to the current implementation.

I was wondering about the exact interface. Currently, you'd have to call ``_accumulate`` with the name of the function, since ``cumsum`` etc. are not really added to the interface, meaning

```
arr = pd.array([1, 2, pd.NA], dtype="Int64")
arr.cumsum()
```

raises, because the method is not registered. I this intended? 

Labels:
name: NA - MaskedArrays
description: Related to pd.NA and nullable extension arrays
name: Reduction Operations
description: sum, mean, min, max, etc.

Comments:
The failure in case of float32 is expected, it comes down to:

```
x = np.array(list(range(1, 101))) / 10
y = np.array(list(range(1, 101)), dtype="float32") / 10

a = np.cumprod(x)
b = np.cumprod(y)
```

Not related to our implementation, its a floating point precision issue. Did not come up previously, since float32 was cast to object before calling numpy
Yes, we already have tests for these cases, although not in the extension arrays folders. But this dispatches back to the original implementation, so I think this is fine? We definitely have tests hitting these cases.

The current implementation of date times is a bit buggy, so we have to decide how to move forward before implementing anything specific
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.
Sorry for the long wait, this is ready for another look
Yep the base class raises NotImplementedError
Added
Should have addressed everything
Thanks @phofl
ENH: dtype-unaware (empty) objects ("any" dtype) 
State: closed

- [ ] closes #19647
- [ ] [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: Dtype Conversions
description: Unexpected or buggy dtype conversions

Comments:
@weikhor addressing #19647 is going to be _really_ complicated, and require a consensus about API design that hasn't been achieved.
> @weikhor addressing #19647 is going to be _really_ complicated, and require a consensus about API design that hasn't been achieved.

Ok understand . thank. I will close this PR .
ENH: Support mask in unique
State: closed

- [x] closes #30037 (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.


cc @jorisvandenbossche 

Labels:
name: Algos
description: Non-arithmetic algos: value_counts, factorize, sorting, isin, clip, shift, diff
name: NA - MaskedArrays
description: Related to pd.NA and nullable extension arrays

Comments:
This probably closes https://github.com/pandas-dev/pandas/issues/30037
Would merge tomorrow if no objections
Thanks @phofl !
DEV: add gitpod actions
State: closed

xref #47790

1. Adding an action to create the base docker file. It runs when the `environment.yml` on main is updated, or at least once monthly, to catch Ubuntu security updates
2. Adding an action to create the Gitpod docker file. It runs when main is updated.

Sidenote: I'm going on a few days vacation, and will be back to test the actions next week, so I made this a draft PR for now. If someone with docker/actions experience wants to leave a quick review—awesome. When I'm back, I will be testing it with my private account until I can access a pandas docker hub account.

CC @jorisvandenbossche @mroeschke

Labels:
name: Build
description: Library building on various platforms
name: CI
description: Continuous Integration

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 @noatamir is this still active, can you merge main and change status from draft when ready for review.
Let us know when you have time to circle back to this PR and I can reopen. Closing as stale for now
DEV: Add gitpod files
State: closed

xref #47790

1. I split the Docker file into 2 Dockers
2. The base Docker includes the pandas environment, and has a new way to run Mamba in Docker, and builds on my machine (M1 mac). 
3. The `gitpod.docker` copies the base docker, which will speed things up for any Gitpod user, and includes a shallow clone of the repository (more speed). 
4. The workspace file defines some nice VS Code features, and the caches for C, C++, and the creation of `.profile` and `.bashrc`. Some things in there are finicky to order of operations (also in relation to the GitHub action which is coming in the next PR), so I recommend avoiding rearranging that file 😉 
5. I added the Gitpod files in a new library, currently under `root` because there isn't a `tools` library. Maybe in the future, we can discuss renaming `scripts` to `tools` to avoid adding another folder? I don't have a strong opinion on this, I just felt awkward about adding a folder there.

Sidenote: I'm going on a few days vacation, and will be back to test the actions next week so I made this a draft PR for now. If someone with docker/actions experience wants to leave a quick review—awesome. When I'm back, I will be testing it with my private account until I can access a pandas docker hub account.

CC @jorisvandenbossche @mroeschke 

Labels:
name: Build
description: Library building on various platforms
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.
I updated the docker files after local testing. The resulting images are on:
https://hub.docker.com/r/pythonpandas/pandas-dev
https://hub.docker.com/r/pythonpandas/pandas-gitpod

I tried to optimize using micromamba for a while, but couldn't make it work yet. For now, I prefer to have a working gitpod for the upcoming sprints. I am happy to give this another try at a later point in time. 
I am planning to merge this, so that people can test it in practice and get some experience with it. 

We can consolidate/improve the docker files in subsequent PRs (eg https://github.com/pandas-dev/pandas/pull/48108)
REGR: setting numeric value in Categorical Series with enlargement raise internal error
State: closed

- [x] closes #47677 (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.

Somehow I can not push to the branch of #47751 

@CloseChoice Feel free to continue on your branch, if you are available. Otherwise we can merge this one. 


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

Comments:
Will do
DOC: GH48019 add styler to excel
State: closed

- [x] closes #48019
- [ ] [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: IO Excel
description: read_excel, to_excel
name: Styler
description: conditional formatting using DataFrame.style

Comments:
Using scripts/validate_docstrings.py the test is passed.
> Docstring for "pandas.DataFrame.to_excel" correct. :)
Thanks @FrnRmn