BrandonFors/pandas-github-issues huggingface dataset:
DEPR: accepting non-standard sequences in core.algorithms functions
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
- [ ] 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.

Allows `pd.isin(arraylike, not_arraylike)` since that is used by `pd.Series(...).isin(not_arraylike)`



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

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 @jbrockmendel
BUG: Have non nano rounding noop return copy
State: closed

Addresses https://github.com/pandas-dev/pandas/pull/52841#discussion_r1180466547

Since the original fix was backported to 2.0.1, probably should backport this too (but might be small enough to exclude a whatsnew)

Labels:
name: Non-Nano
description: datetime64/timedelta64 with non-nanosecond resolution

Comments:
thanks @mroeschke
DEPR: allowing unknowns in take
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
- [ ] 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

Comments:
What's the motivation for this change?
is_array_like is an antipattern #52834
Seems pretty heavy to deprecate this usage just to avoid `is_array_like`, especially since numpy.take will accept array-likes. Why can't we just replace `not is_array_like` with `not isinstance(..., (np.ndarray, ...))` and accept we may be calling `asarray` on more items?
> Why can't we just replace not is_array_like with not isinstance(..., (np.ndarray, ...)) and accept we may be calling asarray on more items?

That's a reasonable intuition, but np.asarray can have weird behaviors which we generally work around (but unfortunately have several slightly-different implementations of).  My thought is to avoid that by just having the user do that casting.
But we'll still allow e.g. a list in DataFrame.take and others? This seems inconsistent.
> But we'll still allow e.g. a list in DataFrame.take and others? This seems inconsistent.

This is for the first arg in take, not the indices.
I personally wouldn't expect pandas to implement taking from a general sequence (e.g. a list); I'm okay with deprecating from that perspective.
@mroeschke gentle ping on this and #52986
Thanks @jbrockmendel
Update to python 3.9 with pyupgrade
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: Clean
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.
Feel free to reopen when you have time to circle back here
STYLE: upgrade ruff
State: closed

- [x] closes #52448 
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).

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

Comments:
There are still some errors. On the latest version of ruff, codes like 
```
match = (
            r"(No such file or directory|没有那个文件或目录|" r"File o directory non esistente)"
        )
```
will raises
```
ISC001 Implicitly concatenated string literals on one line
```
Meanwhile, if we just spilt the lines like
```
match = (
            r"(No such file or directory|没有那个文件或目录|" 
            r"File o directory non esistente)"
        )
```
It will be revised automatically by the black hook.
CLN/TYP: stronger typing in safe_sort
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: Algos
description: Non-arithmetic algos: value_counts, factorize, sorting, isin, clip, shift, diff
name: Clean
name: Typing
description: type annotations, mypy/pyright type checking

Comments:
Thanks @jbrockmendel
CLN: more accurate is_scalar checks
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: Dtype Conversions
description: Unexpected or buggy dtype conversions
name: Clean

Comments:
Thanks @jbrockmendel
TST #24205: test_groupby_nth_interval created for Groupby Nth with Multindex Inverval
State: closed

- [x] closes #24205
- [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. [Not Applicable]
- [x] 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: Groupby
name: Needs Tests
description: Unit test(s) needed to prevent regressions
name: Filters
description: e.g. head, tail, nth

Comments:
The CI minimum version failed with the following message:
Error: The runner has received a shutdown signal...' in GHA. GH 45651

Since I only added a test in this PR and all other tests pass, I think the error is unrelated to the changes made.
Thanks @ltartaro!
DOC: Fix EX01 issues in docstrings
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.

Towards https://github.com/pandas-dev/pandas/issues/37875


Labels:
name: Docs

Comments:
Nice as always @DeaMariaLeon 
Thanks @mroeschke for reviewing and merging. I have some questions:

1. Do you prefer that I include more examples per PR or is "little by little" OK?
2. Should I avoid many commits and send just one? I think I should use `git rebase`.. 
> Do you prefer that I include more examples per PR or is "little by little" OK?

I am okay with more examples per PR. Personally, I would say no more than addressing 10 functions per PR

> Should I avoid many commits and send just one? I think I should use git rebase..

No need to worry about this. When your PRs are merged, the commits are squashed all together.
OK, good to know both points. 
Thanks.
ENH: Add 'truncate' option for if_exists arg for DataFrame.to_sql method
State: closed

This is my first ever PR on an open source project. This one seemed pretty small & straight forward so I gave it go.  Just merged main into the branch so it is conflict free. Please let me know if there's anything else I can do to help get this merged!

See issue #37210 for more context but this essentially gives a user the option to truncate an existing table before inserting new rows into it via the `DataFrame.to_sql` method.

- [X] closes #37210
- [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.1.0.rst` file if fixing a bug or adding a new feature.


Labels:

Comments:
Amazing!
I was wondering why truncate isn’t supported.
> Thanks for the PR, but it's preferred to use a sqlalchemy function to truncate instead of running raw SQL since it's not guaranteed for the SQL to be database dialect agnostic

Thanks @mroeschke ! I couldn't find anything in the SQLalchemy docs for truncate specifically but [they do have](https://docs.sqlalchemy.org/en/20/core/dml.html#sqlalchemy.sql.expression.delete) `.delete()` which would have the same end result of keeping the table but removing all the existing rows. Would that be acceptable function to use for the `truncate` option?
I suppose `delete` would work, but possible renaming the option to `delete_rows` would be more appropriate
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.
CLN Dont upcast where unnecessary (PDEP6 precursor)
State: closed

precursor to https://github.com/pandas-dev/pandas/pull/50626/files, trying to reduce the diff

there's some example / tests in which upcasting from int to float happens, but where it's not the purpose of what's being shown / tested. similar to https://github.com/pandas-dev/pandas/pull/50493

Labels:
name: Clean

Comments:
thx @MarcoGorelli
resampler with non_naive index test GH#25411
State: closed


- [ ] closes #25411 (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).


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

Comments:
Thanks @liang3zy22
WEB: add mastodon links
State: closed

- [x] closes #52914
- [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 [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.

Sidebar:
![Screenshot from 2023-04-26 22-24-40](https://user-images.githubusercontent.com/1196901/234743959-187edc47-4263-4072-9862-e0c1c651535b.png)

Footer:
![image](https://user-images.githubusercontent.com/1196901/234743877-fdad91bd-c8dc-4b78-a908-dd38125f4c48.png)


Labels:
name: Web
description: pandas website

Comments:
/preview
No preview found for PR #52954. Did the docs build complete?
> /preview

There was a problem with the GitHub token and previews of the last couple of days aren't available. It should be fixed now, the preview for this PR should be available when the CI rerun finishes.
@datapythonista it _could_ be, but I had some ideas around ordering:

In the api docs, the Twitter & mastodon links are currently in a different order than I put them on the web site. And the Twitter image is a (imo) distractingly bright blue — I was toying with unifying the order and appearance of the links in the api docs.

But it has been fairly difficult to build them!

Anyway, you can merge this if you like - I think it works OK — but I hadn’t just finished all my due diligence.
Sure, no rush, I was just wondering if there was a reason.

If it makes your life easier, we can also merge this now and you can work on those in a separate PR. But surely fine to continue here if you prefer.
/preview
Website preview of this PR available at: https://pandas.pydata.org/preview/52954/
Yeah you're right - this can be done incrementally - the current state is fine. I ran into another issue building the api docs, but I was able to confirm at least that the mastodon icon showed up. So this is good from my end. Will mark as ready.
Thanks @mikix
ERR: Raise a better error message with to_pydatetime and ArrowDtype(pa.date)
State: closed

- [ ] closes #52812 (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: Error Reporting
description: Incorrect or improved errors from pandas
name: Arrow
description: pyarrow functionality

Comments:
Good idea. I'll clarify that users should convert to timestamp type first
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 2.0.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 d6076947c1839469714009e8c92a6edd191db983
```

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

```
git commit -am 'Backport PR #52952: ERR: Raise a better error message with to_pydatetime and ArrowDtype(pa.date)'
```

4. Push to a named branch:

```
git push YOURFORK 2.0.x:auto-backport-of-pr-52952-on-2.0.x
```

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

> "Backport PR #52952 on branch 2.0.x (ERR: Raise a better error message with to_pydatetime and ArrowDtype(pa.date))"

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).
Type errors
State: closed

After running grep -Ern "type: ?ignore" pandas/ in the terminal, there's a list of type errors. I fixed type errors in three files:
- plotting/_matplotlib/timeseries.py
- core/methods/to_dict.py
- plotting/_matplotlib/converter.py

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

Comments:
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.
DOC: Clean up for deprecations
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: Docs

Comments:
```
2023-04-26T21:57:46.5271107Z /home/runner/work/pandas/pandas/pandas/core/indexes/base.py:docstring of pandas.core.indexes.base.Index.is_categorical:5: WARNING: Inline interpreted text or phrase reference start-string without end-string.
```
lets back port, this was deprecated in 2.0.0
CoW: Add lazy copy mechanism to DataFrame constructor for dict of Index
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.

xref https://github.com/pandas-dev/pandas/issues/48998

Labels:
name: Copy / view semantics
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.
This needs a merge of main now I merged the other PR
updated
Thanks!
will put up a follow up for the copy thing
DOC: Try building docs with sphinx-design
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:
Could be pieces from https://github.com/pandas-dev/pandas/pull/46227 that you can use
Thx, this was just meant to see what breaks, lets use the other pr then
DOC: Move ecosystem.rst to getting started section
State: closed

So it makes `ecosystem` discoverable from the docs navigation.

Also removes an unused tips.csv and `ipython_warning_is_error` (which is enforced by our build error on warnings)

Labels:
name: Docs

Comments:
Agreed with only keeping the website version of the ecosystem docs. I unioned the two and fixed the old references we had to the `rst` version
Going to merge this cleanup, but happy to address any followups
DOC: Remove 1.2 versionadded and changed
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: Docs
name: Stale

Comments:
```
023-04-26T18:50:42.6547459Z /home/runner/work/pandas/pandas/pandas/io/excel/_base.py:docstring of pandas.io.excel._base.read_excel:89: WARNING: Bullet list ends without a blank line; unexpected unindent.
2023-04-26T18:50:42.6548203Z /home/runner/work/pandas/pandas/pandas/io/excel/_base.py:docstring of pandas.io.excel._base.read_excel:90: WARNING: Block quote ends without a blank line; unexpected unindent.
```
The same errors in my last comment are appearing
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.
Feel free to reopen when you have time to circle back here
Remove compat for Python lower than 3.9
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.

cc @lithomas1 

Labels:
name: Compat
description: pandas objects compatability with Numpy or Python functions
name: Clean

Comments:
Thanks @phofl