BrandonFors/pandas-github-issues huggingface dataset:
BUG: Fix calling groupBy(...).apply(func) on an empty dataframe invokes func 
State: closed

- [x] closes #47985
- [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).

Labels:
name: Bug
name: Groupby
name: Regression
description: Functionality that used to work in a prior pandas version
name: Apply
description: Apply, Aggregate, Transform, Map

Comments:
Just to be sure, the note should go in 1.5.1
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.5.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 8b0ad717d1ec54dd40136817a326b41817ffcb86
```

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

```
git commit -am 'Backport PR #48579: BUG: Fix calling groupBy(...).apply(func) on an empty dataframe invokes func '
```

4. Push to a named branch:

```
git push YOURFORK 1.5.x:auto-backport-of-pr-48579-on-1.5.x
```

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

> "Backport PR #48579 on branch 1.5.x (BUG: Fix calling groupBy(...).apply(func) on an empty dataframe invokes func )"

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).
                
Thanks @Th3nn3ss!
Add OpenSSF Scorecards GitHub Action
State: closed

Closes #48566 

As per the linked issue, this PR adds the OpenSSF Scorecards GitHub Action, which automatically checks the repo's supply-chain security processes and reports results to the repo's Security dashboard.

I have also taken the liberty of adding a [badge][1] to the README.md displaying the project's score. This badge is strictly optional and can be easily removed, just say the word!

[1]: https://openssf.org/blog/2022/09/08/show-off-your-security-score-announcing-scorecards-badges/

Labels:
name: CI
description: Continuous Integration

Comments:
@lithomas1 Done.
@mroeschke I'm not sure why the CircleCI tests are failing. Seems to be missing python tests? I've noticed a few other recent PRs with the same failures (#48658, #48621), was this solved?
> @mroeschke I'm not sure why the CircleCI tests are failing. Seems to be missing python tests? I've noticed a few other recent PRs with the same failures (#48658, #48621), was this solved?

Can you merge main?
thanks @pnacht 
This is failing on main.

Is there a quick fix? Otherwise I would propose reverting till this is fixed

https://github.com/pandas-dev/pandas/actions/runs/3092278697/jobs/5003363101
Yes, this should be quick to fix. Many apologies! I'll write a new PR with a fix in a few minutes.
@phofl Submitted the PR fixing this #48668. Truly sorry, my apologies!
TST: Testing that no warnings are emitted and that inplace fillna produces the correct result (GH48480)
State: closed

- [x] closes #48480
- [x] [Tests added and passed]
- [x] All [code checks passed]

In GH48480 it was stated that using fillna in-place on a dataframe with Nones emits a future warning. The issue was already resolved as also stated in the issue, so I included a test which tests on an example that no warning is emitted and that the result is correct.

Labels:

Comments:
thx @RaphSku
WEB: Add new footer to web
State: closed

- [X] closes #48012

Replacing current footer in the web by new standard one with copyright and OVH hosting.

Labels:
name: Web
description: pandas website

Comments:
> LGTM. Good for 1.5?

Anytime. This only affects the website, which is not part of the release. It'll be visible as soon as it's merged.
Thanks @datapythonista
DEPR: Series.astype(np.datetime64)
State: closed

- [x] closes #47844 (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: Datetime
description: Datetime data dtype
name: Dtype Conversions
description: Unexpected or buggy dtype conversions
name: Deprecate
description: Functionality to remove in pandas

Comments:
Thanks @jbrockmendel
ENH: added finalize to binary operators on DataFrame, GH28283
State: closed

- [ ] 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 if fixing a bug or adding a new feature.

Adds metadata propagation to binary operators on `pd.DataFrame`
Behavior is consistent with binary operators between two `pd.Series` i.e. if two DataFrames both have `.attrs`, result will have `.attrs` of left-hand operand.
Example:
```
import pandas as pd
left = pd.DataFrame({"A": [1]})
right = pd.DataFrame({"A": [2]})
left.attrs = {"a": 1}
right.attrs = {"b": 1}
result = left + right
assert result.attrs == left.attrs
``` 

If operands are a `pd.DataFrame` and a `pd.Series` then `result.attrs == pd.DataFrame.attrs` regardless of ordering.


Labels:
name: Numeric Operations
description: Arithmetic, Comparison, and Logical operations
name: metadata
description: _metadata, .attrs

Comments:
Thanks @seljaks
TST: remove 2D tests irrelevant for pyarrow
State: closed

Gets rid of 3367 irrelevant xfails cc @mroeschke 

Labels:
name: Testing
description: pandas testing functions or related to the test suite
name: Arrow
description: pyarrow functionality

Comments:
Could we skip them instead or leave a comment in this file that they are intentionally not implemented? Just don't want someone to try to re-address these tests in the future.
What if we better-documented the fact that these are only relevant for 2D-supporting EAs (and NDArrayBacked2DTests specifically for NDArrayBackedExtensionArray)?
> NDArrayBacked2DTests

Sure, that would work too.
added an extra comment
Thanks @jbrockmendel 

Backporting as relevant to the new ArrowExtensionArray in 1.5
to_csv_relationaldb function enhancement Issue #48545
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:

Comments:
As mentioned in https://github.com/pandas-dev/pandas/issues/48545#issuecomment-1246926701, I would be -1 for this enhancment.
Thanks for the PR, but going to close until there's enough consensus on the issue to move forward with this enhancement.
DOC: Update footer and include OVH
State: closed

- [X] xref #48012

The OVH agreement for the new hosting has been signed, adding an OVH mention to the documentation footer for 1.5, and standardizing to the agreed footer.

Note that Sphinx poor design doesn't provide a way to have the footer we want (it forces the footer to start with `© Copyright`), without creating our own template, which I'm not doing here. We can check later if this can be [addressed in the sphinx theme](https://github.com/pydata/pydata-sphinx-theme/issues/42#issuecomment-1246579580), we want to create a custom template, or if we're happy to let Sphinx force content in our footer.

Labels:
name: Docs

Comments:
Thanks @datapythonista
BUG: Changed .at to not set values that do not exist yet in a DataFrame #48323
State: closed

- [ ] closes #48323
- [ ] [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: Indexing
description: Related to indexing on series/frames, not to indexes themselves
name: Stale

Comments:
Does this overlap with https://github.com/pandas-dev/pandas/pull/48362? If so I would recommend allowing @johannes-mueller to continue with that PR first
> Does this overlap with #48362? If so I would recommend allowing @johannes-mueller to continue with that PR first

In that PR, @johannes-mueller  stated that if the behavior was made so that `.at` can't add new rows or columns that his PR shouldn't be merged because it is superfluous.  I've linked this PR to his PR so that a decision can be made on the final outcome.
> From #48542, I think this needs deprecating. It is documented in the User Guide, so it would be a breaking change.

@rhshadrach How does the deprecation process work in Pandas?  Is there something I should do, or does it just mean that someone else needs to announce the change before accepting my PR? (Note that my PR does include a change to the user guide to make it more accurate.)
> How does the deprecation process work in Pandas?

The behavior that is to be deprecated needs to raise a `FutuerWarning` with a message informing the user that the behavior will change. If possible, it is good to give alternatives (e.g. `pd.concat`) in the message. We then wait until the next major release to change the 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.
Closing as stale. @srotondo - if you'd like to pick this back up and deprecate the behavior, we can reopen.
Added test case to lock in behaviour
State: closed

* In previous versions, concatenating to empty EA was resetting type information to np.object

- [x] closes #48510  (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.
- [x] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

I wasn't sure which issue to reference since it was resolved as part of something else, so I took this one for which I only really added a test case (not the actual fix). @mroeschke would you like me to reference another issue instead (or remove this from whatsnew entirely)?

Labels:
name: Testing
description: pandas testing functions or related to the test suite
name: Reshaping
description: Concat, Merge/Join, Stack/Unstack, Explode
name: NA - MaskedArrays
description: Related to pd.NA and nullable extension arrays

Comments:
Looks to be some style issues: https://github.com/pandas-dev/pandas/actions/runs/3056453602/jobs/4930635737
Thanks @ssche
ENH: Added append functionality for DataFrame.to_json
State: closed

- [X] closes #35849
- [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/v1.5.0.rst` file if fixing a bug or adding a new feature.

Added new a new keyword argument (mode) to DataFrame.to_json(). Strictly only takes 'w' and 'a' as inputs, defaulting to 'w'. mode='a' is only supported when lines is True and orient is 'records'. This enhancement only effects to_json when a path_or_buf is supplied, otherwise it returns the json dump like expected, however, checks will occur when mode='a' regardless of whether path_or_buf is supplied. 


Labels:
name: IO JSON
description: read_json, to_json, json_normalize

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.
@mroeschke Is there anything that I need to do for this PR? or are we just waiting for the right time to merge it in? 
> @mroeschke Is there anything that I need to do for this PR? or are we just waiting for the right time to merge it in?


Looks like this needs a rebase and there are still typing errors: https://github.com/pandas-dev/pandas/actions/runs/3057060394/jobs/4931831550
@mroeschke I'm still unsure about this typing issue that it's failing. Could you help me out with that? Also, I realize I need to adjust which whatsnew file i'm changing so just let me know which one I need to add it to and I'll do that. Not sure why 1.6.0 is showing as a completely new file on my commit...
The overloads in `pandas/io/json/_json.py` need to be adjusted for `mode`.

Yeah the `v1.6.0.rst` was renamed to `v2.0.0.rst` so the 2.0 version should be added
@mroeschke Looks like that fixed the docstring issue. Now I'm just unsure of what whatsnew to put the enhancement information in. 
> Now I'm just unsure of what whatsnew to put the enhancement information in.

You can put it in `v2.0.0.rst`
@mroeschke Finished. Let me know if there's anything else that I need to do. 
Thanks for sticking with this @SFuller4! 
Thanks for the assistance @mroeschke! Next time should be smoother haha
REGR: groupby doesn't identify null values when sort=False
State: closed

- [x] closes #48506 (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.

No whatsnew since this regression was introduced in 1.5.0. This same change will also allow us to go forward with the cleanup in #48477 as it will no longer change behavior. I've also made sure the added test passes on 1.4.x.

Labels:
name: Bug
name: Groupby
name: Missing-data
description: np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
name: Regression
description: Functionality that used to work in a prior pandas version
name: Algos
description: Non-arithmetic algos: value_counts, factorize, sorting, isin, clip, shift, diff

Comments:
Thanks @rhshadrach 
cc @rhshadrach This caused a couple of regressions, e.g. https://asv-runner.github.io/asv-collection/pandas/#algorithms.Hashing.time_series_string

Not sure if this was slower before, because history is missing a bit obviously
Thanks @phofl - on my machine I'm seeing 2.3ms for the line `null_mask = isna(values)` whereas the whole added code is 2.58ms. My machine is likely a bit faster than the benchmark machine, so I believe this line is where most of the regression occurred. That many of the regressions don't involve null values confirms this.

I don't see a way around this op in general nor to speed it up - we could try to funnel the null values directly on the uniques / codes after factorize, but that seems like a bad idea and would only help when there aren't a lot of distinct values.

However, we should only need to perform the op when sort is False and dropna is False. I'll confirm that and post a new fix moving this upstream so we can avoid it at least some of the time.
Bug solved #48527
State: closed

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


Labels:
name: Docs

Comments:
Thanks for the contribution @thekavikumar. It makes things more clear for us, if you copy the issue title as the title of the pull request, and you replace the `#xxxx` in the in the description with the issue number (see the note next to it). Do you mind updating it please?

Also, there are 4 icons that should be updated, are you planning to add the other 2? Thank you!
Not sure what you updated, but looks like the original images already have transparent background, and the problem is in the css of a box. Closing this, I'll update the issue.
CI: Fix py311 builds different exception message
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: CI
description: Continuous Integration
name: Dependencies
description: Required and optional dependencies

Comments:
Thanks @phofl
BUG: Fix handling of Oracle Numbers in read_sql_table BUG 34988
State: closed

- [x] closes #34988 (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
- [ ] 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: IO SQL
description: to_sql, read_sql, read_sql_query
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.
change test such that it passes in headless mode (instead of xpass)
State: closed

…and xpass in non-headless mode (instead of error).

- [ ] closes #48483 
- [ ] [Tests *modified* and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests). 
- [ ] 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: Testing
description: pandas testing functions or related to the test suite
name: IO Data
description: IO issues that don't fit into a more specific label

Comments:
Hello @adrienpacifico! 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-09-12 22:49:12 UTC
Great! Thanks @adrienpacifico 
These are now xpassing for me on mac, py39
[jbrockmendel](https://github.com/jbrockmendel) and it was passing before the PR or was it xpassing? 
Sorry for the inconvenience. I guess the `strict = True` is breaking your test suite?
> I guess the strict = True is breaking your test suite?

correct
update pd.DataFrame.merge - add typing for `how` parameter
State: closed

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


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

Comments:
PR for `pandas-stubs`: https://github.com/pandas-dev/pandas-stubs/pull/289
> Thx, can you add this for join too? Additionally, I think we are typing how internally too, would be great to add this there too

For `DataFrame.join`, you probably need `MergeHow | Literal["cross"]`.

Could also use `MergeHow` in `Index.join/_join* `(in pandas/core/indexes/base.py) and for the align methods `NDFrame/DataFrame/Series.align` (in pandas/core/{generic,frame,series}.py)
MergeHow includes cross already?
> MergeHow includes cross already?

You are right :) Forget about my comment :)
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.