BrandonFors/pandas-github-issues huggingface dataset:
TST: Regression test added for Timedelta
State: closed


- [x] closes #35665 
- [x] [Tests added and passed]
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.


The commit on Mar 18 is approved. Not sure why it is showing up here... You can see it here:
https://github.com/pandas-dev/pandas/pull/46422

This PR adds a regression test for #35665 , which was caused by #38965. Please let me know if there's more I need to do! Thanks!

Labels:
name: Testing
description: pandas testing functions or related to the test suite
name: Timedelta
description: Timedelta data type
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 be stale. If interested in continuing, please merge in the main branch, address the review, and we can reopen.
BUG: DataFrame.dropna must not allow to set both how= and thresh= parameters
State: closed

- [x] closes #46575 
- [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 an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.


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

Comments:
Hello @arnaudlegout! Thanks for updating this PR. We checked the lines you've touched for [PEP 8](https://www.python.org/dev/peps/pep-0008) issues, and found:





There are currently no PEP 8 issues detected in this Pull Request. Cheers! :beers: 

##### Comment last updated at 2022-04-27 16:38:33 UTC
I added a what's new entry for this bug fix
take
@simonjayhawkins are you still waiting for something from my side, or is this PR on its way to the next release. I believe I addressed all the required changes. 
@arnaudlegout this looks fine, can you merge master and ping on green.
thanks @arnaudlegout
DOC: .bfill() (#46631)
State: closed

- [x] closes #46631 (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 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: Missing-data
description: np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate

Comments:
Thanks @kwhkim - wouldn't this be equivalent of `df.reindex(df.index[::-1]).ffill().reindex(df.index)`?
```
In [7]: df.reindex(df.index[::-1]).ffill().reindex(df.index)
Out[7]: 
                   A
2013-08-01 -1.571201
2013-08-02  2.061834
2013-08-05 -0.831290
2013-08-06  1.448895
2013-08-07  1.448895
2013-08-08 -0.258116

In [8]: df.bfill()
Out[8]: 
                   A
2013-08-01 -1.571201
2013-08-02  2.061834
2013-08-05 -0.831290
2013-08-06  1.448895
2013-08-07  1.448895
2013-08-08 -0.258116
```
Yes, I just meant that the contents are the same. Would it be better to be `df.reindex(df.index[::-1]).ffill().reindex(df.index)`? The context is talking about `df.reindex(df.index[::-1]).ffill()` so I think it might be better to change `df.bfill()` to `df.bfill().reindex(df.index[::-1])` considering the paragraph it's in.
I think just put
```
df.bfill()
```
without the comment and it'll be fine

cc @jreback , who originally wrote this example
thanks @kwhkim
homogeneous Period targets bug 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 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: Period
description: Period data type

Comments:
Hello @monishkumar9677! Thanks for opening this PR. We checked the lines you've touched for [PEP 8](https://www.python.org/dev/peps/pep-0008) issues, and found:

* In the file [`sample.py`](https://github.com/pandas-dev/pandas/blob/0e7692a7f73194a00a0475ecd58ad04bf44aeaae/sample.py):

> [Line 1:20](https://github.com/pandas-dev/pandas/blob/0e7692a7f73194a00a0475ecd58ad04bf44aeaae/sample.py#L1): [E703](https://duckduckgo.com/?q=pep8%20E703) statement ends with a semicolon
> [Line 2:16](https://github.com/pandas-dev/pandas/blob/0e7692a7f73194a00a0475ecd58ad04bf44aeaae/sample.py#L2): [E231](https://duckduckgo.com/?q=pep8%20E231) missing whitespace after ','
> [Line 23:24](https://github.com/pandas-dev/pandas/blob/0e7692a7f73194a00a0475ecd58ad04bf44aeaae/sample.py#L23): [E231](https://duckduckgo.com/?q=pep8%20E231) missing whitespace after ','
> [Line 25:23](https://github.com/pandas-dev/pandas/blob/0e7692a7f73194a00a0475ecd58ad04bf44aeaae/sample.py#L25): [E231](https://duckduckgo.com/?q=pep8%20E231) missing whitespace after ','
> [Line 27:22](https://github.com/pandas-dev/pandas/blob/0e7692a7f73194a00a0475ecd58ad04bf44aeaae/sample.py#L27): [E231](https://duckduckgo.com/?q=pep8%20E231) missing whitespace after ','
> [Line 31:23](https://github.com/pandas-dev/pandas/blob/0e7692a7f73194a00a0475ecd58ad04bf44aeaae/sample.py#L31): [E231](https://duckduckgo.com/?q=pep8%20E231) missing whitespace after ','
> [Line 37:1](https://github.com/pandas-dev/pandas/blob/0e7692a7f73194a00a0475ecd58ad04bf44aeaae/sample.py#L37): [W391](https://duckduckgo.com/?q=pep8%20W391) blank line at end of file


Thanks for the pull request but appears this is already being addressed in https://github.com/pandas-dev/pandas/pull/46668 so closing in favor of that issue.


As mentioned, please read pandas guide on writing a unit test. https://pandas.pydata.org/docs/development/contributing_codebase.html#test-driven-development-code-writing
Update __init__.py
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 an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.


Labels:

Comments:
Hello @monishkumar9677! Thanks for opening this PR. We checked the lines you've touched for [PEP 8](https://www.python.org/dev/peps/pep-0008) issues, and found:

* In the file [`pandas/errors/__init__.py`](https://github.com/pandas-dev/pandas/blob/50c736a67ef95a7a08a8add986dcc81d728e22ec/pandas/errors/__init__.py):

> [Line 11:1](https://github.com/pandas-dev/pandas/blob/50c736a67ef95a7a08a8add986dcc81d728e22ec/pandas/errors/__init__.py#L11): [W293](https://duckduckgo.com/?q=pep8%20W293) blank line contains whitespace
TYP: tighten return type in function any
State: closed

- [x] closes #44802
- [ ] [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 an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

Continuing remaining work after Pull request #44896.
`DataFrame.any` the return type should be DataFrame or Series, and for `Series.any` the return type should be Series or bool.


Labels:
name: Typing
description: type annotations, mypy/pyright type checking

Comments:
@MarcoGorelli @twoertwein 
An entry in the whatsnew is not required for this, right?
Thanks @twoertwein @MarcoGorelli for the reviews.

Waiting for more Cat GIFs. 😺 


![cat_pouncing_on_fish](https://user-images.githubusercontent.com/40866128/167255249-cad9d869-d9ba-4226-b842-5ff5e503b2b0.gif)


:smile: the gifs on approval are from https://youtu.be/2rDNJvHznrM
REGR: Replace changes the dtype of other columns
State: closed

- [ ] closes #46634 (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 an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.


Labels:
name: Regression
description: Functionality that used to work in a prior pandas version
name: replace
description: replace method

Comments:
@jbrockmendel ok here?
one possibly-missed copy, otherwise seems reasonable
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.
> one possibly-missed copy, otherwise seems reasonable

done.
Thanks @simonjayhawkins.
CI: Remove grep from asv call (using strict parameter instead)
State: closed

Looks like asv didn't fail the CI, because if requires a `--strict` parameter to do so. Adding it here. And will change this behavior in asv: https://github.com/airspeed-velocity/asv/issues/1199

Adding a failing benchmark to make sure this works as expected. Will remove if CI is red because of it.

Labels:
name: CI
description: Continuous Integration
name: Benchmark
description: Performance (ASV) benchmarks

Comments:
Looks like this is working as expected, CI will now fail if benchmarks break, without the grep hack: https://github.com/pandas-dev/pandas/runs/5817260505?check_suite_focus=true#step:6:12445
Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

1. Checkout backport branch and update it.

```
git checkout 1.4.x
git pull
```

2. Cherry pick the first parent branch of the this PR on top of the older branch:
```
git cherry-pick -x -m1 c8cbe1936d21503e82c6a9efeb133acaff4f845a
```

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

```
git commit -am 'Backport PR #46633: CI: Remove grep from asv call (using strict parameter instead)'
```

4. Push to a named branch:

```
git push YOURFORK 1.4.x:auto-backport-of-pr-46633-on-1.4.x
```

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

> "Backport PR #46633 on branch 1.4.x (CI: Remove grep from asv call (using strict parameter instead))"

And apply the correct labels and milestones.

Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon!

Remember to remove the `Still Needs Manual Backport` label once the PR gets merged.

If these instructions are inaccurate, feel free to [suggest an improvement](https://github.com/MeeseeksBox/MeeseeksDev).
BUG: Join ValueError for DataFrame list
State: closed

In the comments for `DataFrame.join()`, it says that suffixes are not supported for joining a list of DataFrame objects.

> Notes
>         -----
>         Parameters `on`, `lsuffix`, and `rsuffix` are not supported when
>         passing a list of `DataFrame` objects.

- [x] closes #46396 
- [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 an entry in the latest `doc/source/whatsnew/v1.5.0.rst` file if fixing a bug or adding a new feature.


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

Comments:
thanks @bwozniak27
BUG: added finalize to explode, GH28283
State: closed

**Progress towards #28283**

This PR gives the `explode` method the ability to propagate metadata using `__finalize__`.

- [ ] xref #28283 
- [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 an entry in the latest `doc/source/whatsnew/v1.5.0.rst` file

Contributors: 

- [Solomon Song](https://github.com/songsol1)
- [Edward Huang](https://github.com/edwhuang23)


Labels:
name: metadata
description: _metadata, .attrs

Comments:
thanks @songsol1
Fix NaN bug in ujson
State: closed

- [X] closes #46627 (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).
- [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 ports the fixes I made in ujson https://github.com/ultrajson/ultrajson/pull/514 wrt reading NaN values to pandas. 

Labels:
name: Bug
name: Missing-data
description: np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
name: IO JSON
description: read_json, to_json, json_normalize
name: Stale

Comments:
cc @WillAyd 
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.

This should still be merged and needs review.
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.
Backport PR #46602 on branch 1.4.x (CI/TST: Make test_vector_resize more deterministic)
State: closed

Backport PR #46602

(cherry picked from commit bea02f300bdf54d86aded7d5c4461dc340ddb929)

- [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).

Additionally migrates all the refactoring work done in `test_hashtables.py`


Labels:
name: Testing
description: pandas testing functions or related to the test suite
name: Algos
description: Non-arithmetic algos: value_counts, factorize, sorting, isin, clip, shift, diff

Comments:
hmm i don't think the backport is clean here
Remove references to previously-vendored Sphinx extensions
State: closed

- [ ] closes #xxxx (Replace xxxx with the Github issue number) **No issue filed**
- [ ] [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 **Not applicable**
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature. **Not applicable**


Labels:
name: Docs
name: Clean

Comments:
thanks @musicinmybrain
BUG: SeriesGroupBy apply wrong name
State: closed

- [x] closes #46369
- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [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
name: Apply
description: Apply, Aggregate, Transform, Map

Comments:
@ma3da - can you merge main.
Failure is unrelated. Will need an approval from @jreback to move forward
looks good can merge on green
Thanks @ma3da!
Add setup-conda action
State: closed

Smaller version of https://github.com/pandas-dev/pandas/pull/46493 according to suggestion in https://github.com/pandas-dev/pandas/pull/46493#issuecomment-1079541210. Should be orthogonal to https://github.com/pandas-dev/pandas/pull/46538.

- [x] closes #39175 (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 an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.


Labels:
name: CI
description: Continuous Integration

Comments:
cc @lithomas1 because you were worried about GHA capacity. I think this is fine now because of https://github.com/pandas-dev/pandas/issues/46600.
looks ok. are we backporting these @mroeschke ?
> we should be able to revert the windows or the mac changes

This is a fair point. Might be good to just do macOS in 1 PR and Windows in another PR. Having them in separate workflows might be a good idea too since the paths and setup might differ a bit

Would probably need backporting when ready.
Added back Azure CI and enabled Windows only. I left the workflow name identical for now
Can some please re-run the failed jobs?
> Can some please re-run the failed jobs?

The easiest is usually to close and reopen the PR, and everything should re-run. Let me know of that doesn't work.
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.
Merged with main and reduced number of changes in this PR. It now mainly adds new actions that can be used by the other workflows in subsequent PRs, to deduplicate workflow code.
Would it be possible to do `setup-pandas` in this PR and `run-tests` in another PR? It would help isolate the change and make it easier for review.

Also, for `setup-pandas` it would be nice to get rid of the `setup-env.sh` script since I think only the docbuild script uses that file.
> Also, for `setup-pandas` it would be nice to get rid of the `setup-env.sh` script since I think only the docbuild script uses that file.

And CircleCI. Shall I move docbuild to `setup-pandas` in this PR or in another PR?
> > Also, for `setup-pandas` it would be nice to get rid of the `setup-env.sh` script since I think only the docbuild script uses that file.
> 
> And CircleCI. Shall I move docbuild to `setup-pandas` in this PR or in another PR?

I think it would be okay to do it in this PR
Moved `setup_env` to CircleCI folder and change docbuild to use new action. Let's see if this works.
Awesome, thanks for the simplifying and the cleanup @jonashaag
DOC: Start v1.4.3 release notes
State: closed


Labels:
name: Docs

Comments:
```
2022-04-02T09:51:12.6852577Z WARNING: failed to reach any of the inventories with the following issues:
2022-04-02T09:51:12.6854196Z intersphinx inventory 'https://www.statsmodels.org/devel/objects.inv' not fetchable due to <class 'requests.exceptions.ConnectionError'>: HTTPSConnectionPool(host='www.statsmodels.org', port=443): Max retries exceeded with url: /devel/objects.inv (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f503e184f40>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))
```
TYP: fix hashable keys for pd.concat
State: closed

Could use `Any` but I think in this case the covariant `TypeVar` approach isn't ugly (I think so - happy to change to `Any`).

Labels:
name: Typing
description: type annotations, mypy/pyright type checking

Comments:
> I'm still wary about using `HashableT` as a key in `Mapping`, but I can't find a case where it doesn't work.

Was about to change it to `Any` but then mypy seems to complain about overlapping overloads (either something wrong with my setup or a mypy bug?)

> pandas/core/reshape/concat.py:65: error: Overloaded function signatures 1 and 2 overlap with incompatible return types  [misc]
> Was about to change it to `Any` but then mypy seems to complain about overlapping overloads (either something wrong with my setup or a mypy bug?)

It's neither.  The issue here is that `Mapping[Any, DataFrame]` intersects  `Iterable[Series]` .  Something that matches `Mapping[Series, DataFrame]` also matches `Iterable[Series]`  and `Mapping[Any, DataFrame]` , so you get the overlapping return types because there is an intersection in the type of the `objs` parameter.


Thank you for finding this @Dr-Irv! I guess it works with TypeVars because Series/DataFrame are not Hashable.
DOC: moved release note for #46087
State: closed

xref #46592

I'm going to merge this before all tests complete, since this PR is for main only and want to follow-up quickly  with a PR for the release date of 1.4.2 (and move another release note xref https://github.com/pandas-dev/pandas/pull/46592#issuecomment-1086173499) which will conflict with this one

Labels:
name: Docs

Comments:
Doc Build and Upload passed so merging
CI: Simplify call to asv
State: closed

The way we are calling `asv` in the CI is too complex for no reason. Removing the next unnecessary things:

- `asv check` not worth calling, since just imports the benchmarks which will be later imported anyway when calling `asv run`
- Adding the `remote` to git doesn't have any effect I think, since we don't specify the commit, and we should be running benchmarks for what's been checked out
- `asv machine` is not useful, since we won't save the results, or compare them with other runs
- `asv dev` just avoids creating environments, but we can speed up things a bit by just running each benchmark once, and not save the results, which are not used anyway
- The conditional to just run the benchmarks if the previous step build is successful, is the default. It makes sense in other parts of this file, since there are several steps depending on a build, but not in this case
- I don't think publishing the asv log makes a lot of sense. I think I added that myself in the past, but now feels just a waste of time and resources (unless someone used that artifact, then please let me know)

I'm going to see how to remove the hacky grep and just leave the asv call, but I think this needs a new asv release.

Labels:
name: CI
description: Continuous Integration
name: Benchmark
description: Performance (ASV) benchmarks

Comments:
thanks @datapythonista