BrandonFors/pandas-github-issues huggingface dataset:
REF: de-duplicate reso-casting code
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: Refactor
description: Internal refactoring of code
name: Non-Nano
description: datetime64/timedelta64 with non-nanosecond resolution

Comments:
Could you merge in main once more (GHA was down)?

Also what order of the existing PRs should be reviewed/merged. Getting kinda lost
> Also what order of the existing PRs should be reviewed/merged

This and #48956 should be at the top of the list; not dependent on other PRs while other upcoming PRs depend on them.

The only ones where the order really matters are #48910 then #48918 then #48923.  A bunch of upcoming stuff relies on these.

#48819 is preliminary to an upcoming PR doing the same public-ifying for the array methods and accessors.

greenish
Thanks @jbrockmendel
BLD: Build arm64 wheels on CircleCI
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.

Draft pending #48945 merge.
Uploading also needs to be figuring out.
Most likely will use the Trigger CircleCI action, passing in the env vars.

Labels:
name: Build
description: Library building on various platforms

Comments:
Looks like the dependency is merged - is this ready to come out of draft status?
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.
@lithomas1 should we run the CI for this, and see if it works as expected?
This PR works(sans uploading), but we need someone to add the Anaconda upload tokens to CircleCI.
(It's probably wise to hold off on that for now, while they sort out their security breach).

@TomAugspurger Can you add me to the scipy-wheels-nightly and multibuild-wheels-staging Anaconda orgs? I am also lithomas1 on anaconda.
@lithomas1 I added you to both those.
OK, this is ready now, I will still have to add the token to CircleCI after this is merged, though.
I guess this is the first time testing Windows + ARM and looks like `test_ea_dtypes_and_scalar_operation` is failing.

Seems like this line should account for `is_platform_arm()`

```
[1, 1], dtype="int64" if not is_platform_windows() else "int32"
```
> I guess this is the first time testing Windows + ARM and looks like `test_ea_dtypes_and_scalar_operation` is failing.
> 
> Seems like this line should account for `is_platform_arm()`
> 
> ```
> [1, 1], dtype="int64" if not is_platform_windows() else "int32"
> ```

That's a Windows failure, only, and its failing on main too unfortunately, since recently. 

(I should probably document this more, but you find status of the nightly builds by going to Actions -> Wheel builder workflow -> Filter event by schedule).

From https://github.com/pandas-dev/pandas/actions/workflows/wheels.yml?query=event%3Aschedule, it's been failing since  yesterday.

I think one thing that would be nice would be to have the Wheel builders automatically open issues for failures (will add to my backlog).

This is currently running on my prs. Is this intended?
I messed up the grep expression (needed to escape brackets, PR incoming).
STYLE: Add code check to avoid returning Exceptions instead of raising
State: closed

- [x] closes #48861 (Replace xxxx with the Github issue number)
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).

Technically, code like `return variable` where variable is an exception won't be caught, but this is probably a first good step and an AST check would have the same issue with the `node.id`

Motivated by https://github.com/pandas-dev/pandas/pull/48834 https://github.com/pandas-dev/pandas/pull/48833


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

Comments:
thx @mroeschke
REF: Refactor cibuildwheel logic into pyproject.toml
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.

Preparation for adding of aarch64 wheel builds.


Labels:
name: Build
description: Library building on various platforms

Comments:
Thanks @lithomas1
REGR: ExcelWriter.book not settable
State: closed

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

Labels:
name: Bug
name: Regression
description: Functionality that used to work in a prior pandas version
name: IO Excel
description: read_excel, to_excel
name: Deprecate
description: Functionality to remove in pandas

Comments:
Thanks @rhshadrach
STYLE: Fix Pylint Style Checks For used-before-assignment
State: closed

- [ ] xref #48855 - one of many style checks, still needs work.
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [x] Moved initialization of `dispcmd`, `fd`, `new_f` outside of their respective try blocks to ensure they are defined
- [x] Added Pylint disable statements for false positive warnings for `_is_scipy_sparse`, `groupby`, and `Series`
- [x] Removed possibly undefined variable `no_mpl_message`
- [x] Moved `f.close()` to try block to ensure `f` is defined if it is called



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

Comments:
I don't know what's causing the CI testing to fail now. Do I need to change anything to fix that? 
it's unrelated, don't worry about it, let's just wait a bit to see if it looks like pylint might make a release which fixes it
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.
DOC: reverted directive for SAS logo white
State: closed

This pull requrest is related to #48790. These changes revert the directive, that don't work as expected and causes a code leak on the web page, to use a different image depending on the theme used:
- [logo_sas.svg](https://github.com/pandas-dev/pandas/blob/main/doc/source/_static/logo_sas.svg) for light theme;
- [logo_sas_white.svg](https://github.com/pandas-dev/pandas/blob/main/doc/source/_static/logo_sas_white.svg) for dark theme.

I can't figured out how to solve it, so I restored a previous version of the file (see Commits tab) and I will open an issue about this problem.


Labels:
name: Bug
name: Docs

Comments:
Thanks @lorenzovngl
DOC: Small docstring clarifications
State: closed

- [X] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).


Some small changes to docstrings that were hard to interpret when typing in pandas-stubs.

xref pandas-dev/pandas-stubs#352

Labels:
name: Docs

Comments:
Thanks @bashtage
TST: use `with` where possible instead of manual `close`
State: closed

- [ ] closes #xxxx (Replace xxxx with the Github issue number)
  - Nothing to close – just noticed these while working on #48922.
- [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
  - Only tests changed. 
- [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.
  - Nothing changed.
- [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 done (not required)

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:
Looks like there are some test failures from the CI

> would this need a whatsnew entry?

Nope
@mroeschke Rebased (#48925, #48926 conflicted...) and CI passes now.
Awesome! Thanks @akx. Object closing PRs are very much appreciated.
API: .astype to non-nano return the specified dtype
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: Non-Nano
description: datetime64/timedelta64 with non-nanosecond resolution

Comments:
Thanks @jbrockmendel
TST: Use more index_or_series
State: closed

- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).

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

Comments:
thanks @mroeschke
TST/CLN: Remove ensure_clean_path for tmp_dir fixture
State: closed

- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).

xref: #26984

Labels:
name: Testing
description: pandas testing functions or related to the test suite
name: IO HDF5
description: read_hdf, HDFStore
name: Clean

Comments:
thx @mroeschke
TST: Fail if parameterize set is empty
State: closed

https://docs.pytest.org/en/7.1.x/reference/reference.html#confval-empty_parameter_set_mark

I imagine if `pytest.mark.parameterize` is used, it is assumed that a test should be parameterized with more than 1 value, so this should prevent accidentally skipping a test if that isn't the case 

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

Comments:
thx @mroeschke
BUG: preserve DTA/TDA+timedeltalike scalar with mismatched resos
State: closed

Sits on top of #48918

Labels:
name: Datetime
description: Datetime data dtype
name: Numeric Operations
description: Arithmetic, Comparison, and Logical operations
name: Timedelta
description: Timedelta data type
name: Non-Nano
description: datetime64/timedelta64 with non-nanosecond resolution

Comments:
Looks like I accidentally opened both this and #49015 for the same bug.  After rebasing this is just an extra test that is worth keeping.
Thanks @jbrockmendel
Fix assert_almost_equal, add test
State: closed

- [ ] closes #48919 (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: Testing
description: pandas testing functions or related to the test suite
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.
fix warning no-value-for-parameter in pandas/io
State: closed

Fixed warning no-value-for-parameter raised by pylint in file pandas/io/excel/_base.py

The warnings raised by pylint while scanning tests are not yet resolved

Signed-off-by: Soumik Dutta <shalearkane@gmail.com>

- [ ] xref #48855 
- [x] All [code checks passed]

Labels:
name: Warnings
description: Warnings that appear or should be added to pandas

Comments:
Thanks @shalearkane
disable bad-super-call checking
State: closed

because super(Dataframe, df) is valid is this class

Signed-off-by: Soumik Dutta <shalearkane@gmail.com>

- [X] closes #48855 


Labels:

Comments:
thanks but there's already a PR open for this one, please choose a different error

https://github.com/pandas-dev/pandas/pull/48896
Unexpected keyword argument
State: closed

This fixed unexpected-keyword-argument warnings from pylint on one file.
The other warnings produced were already expected to be caught in tests.

- [x] xref #48855 one of many style checks, still needs work.

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

Comments:
`pre-commit` is failing because I am using [Optional type annotation](https://docs.python.org/3/library/typing.html#typing.Optional) with the older syntax `Optional[type]` as the newer syntax `type | None` is only supported on Python 3.10+
> `pre-commit` is failing because I am using [Optional type annotation](https://docs.python.org/3/library/typing.html#typing.Optional) with the older syntax `Optional[type]` as the newer syntax `type | None` is only supported on Python 3.10+

it's supported with `from __future__ import annotations`, which is at the top of the file
solved the pylint issue of  "no self argument"
State: closed

Issue number: #48855 
- [ ] xref https://github.com/pandas-dev/pandas/issues/48855 - one of many style checks, still needs work.
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [x] Added: just added the '@staticmethod' and '@classmethod' to solve it, pylint was acting up because of this.

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

Comments:
> Looks good to me pending green
> 
> ![](https://camo.githubusercontent.com/0ef58abdbf19d92d1e6d43b55172c0a2afa644306616fc4e10b6f39fa2fab60d/68747470733a2f2f692e666c756666792e63632f344872646d4777374d484c33726348334a306c434242473778686c786e5773372e676966) [ ![68747470733a2f2f692e666c756666792e63632f344872646d4777374d484c33726348334a306c434242473778686c786e5773372e676966](https://camo.githubusercontent.com/0ef58abdbf19d92d1e6d43b55172c0a2afa644306616fc4e10b6f39fa2fab60d/68747470733a2f2f692e666c756666792e63632f344872646d4777374d484c33726348334a306c434242473778686c786e5773372e676966) ](https://camo.githubusercontent.com/0ef58abdbf19d92d1e6d43b55172c0a2afa644306616fc4e10b6f39fa2fab60d/68747470733a2f2f692e666c756666792e63632f344872646d4777374d484c33726348334a306c434242473778686c786e5773372e676966) [ ](https://camo.githubusercontent.com/0ef58abdbf19d92d1e6d43b55172c0a2afa644306616fc4e10b6f39fa2fab60d/68747470733a2f2f692e666c756666792e63632f344872646d4777374d484c33726348334a306c434242473778686c786e5773372e676966)

🤣🤣Loved the cat 😺😺
Thanks @Exoutia!
API: preserve reso in Timelta(td64_obj)
State: closed

Some overlap with #48901, #48889

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

Comments:
#48961 (green except for the usual timeout) should cut a lot off the diff here
Thanks @jbrockmendel. If https://github.com/pandas-dev/pandas/pull/48910#discussion_r988417014 needs addressing in the future that would be great
TYP: Axis-related annotations
State: closed

I tried to limit `_typing.AxisInt` to `Literal[0, 1]`. That might be feasible in the future when mypy supports more literal math (e.g., `1 - Literal[0, 1] = Literal[0, 1]`), but would cause too many errors for now.

This PR adds a few Axis-related annotations but does not restrict `AxisInt` to `{0, 1}`.

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

Comments:
Thanks @twoertwein
Fix: Reanme duplicate function names in unittests
State: closed

- [ ] xref https://github.com/pandas-dev/pandas/issues/48855 - one of many style checks, still needs work.
- [ ] 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:
Hi @MarcoGorelli,

I don't get how to rerun the failed action... Do I have permission to re-trigger?

-- Flo
it's unrelated, don't worry about it
Update hist.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 [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:
improvement in documentation 
thanks but no thanks - please check the good first issues and the contributing guide for how to get started
please mark the PR as `[invalid]` to the OP gets banned from hacktoberfest for this spam
thanks
DOC: Added mean function as a method of Resampler and updated docstring
State: closed

- [x] closes #48803 
- [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.


By default, the `Resampler.mean` docstring is inherited from `GroupBy.mean`. As a result, unsupported parameters 'engine' and 'engine_kwargs' were created in the [API documentation](https://pandas.pydata.org/docs/reference/api/pandas.core.resample.Resampler.aggregate.html).

To do this, I defined the Mean function as a method of Resampler and wrote the docstring of the function itself.

FYI: I think it is unnecessary to add this issue to the Whatsnew section, so I left it.

Labels:
name: Docs
name: Resample
description: resample method

Comments:
@mroeschke 
Is there anything I missed or need to revise?
BUG: DataFrame from dict with non-nano Timedelta
State: closed

- [ ] closes #xxxx
- [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.

xref #44504

This is motivated by a branch (upcoming PR) that makes the Timedelta constructor preserve resolution when passed a np.timedelta64 object.  Without this change, test_constructor_dict_timedelta64_index fails because of a dict lookup in lib.fast_multiget.

For non-nano Timedeltas this does significantly hurt performance:

```
In [1]: import pandas as pd
In [2]: td = pd.Timedelta(days=1, minutes=3)
In [3]: td2 = td._as_unit("ms")

In [4]: %timeit hash(td)
145 ns ± 15.5 ns per loop (mean ± std. dev. of 7 runs, 10000000 loops each)  # <- main
131 ns ± 3.43 ns per loop (mean ± std. dev. of 7 runs, 10000000 loops each)  # <- PR

In [5]: %timeit hash(td2)
138 ns ± 16.8 ns per loop (mean ± std. dev. of 7 runs, 10000000 loops each)  # <- main
1.8 µs ± 42.3 ns per loop (mean ± std. dev. of 7 runs, 1000000 loops each)  # <- PR
```

I expect there's room for optimization.  Something like:


```
if self._is_in_pytimedelta_bounds() and not self._has_ns():
    return timedelta.__hash__(self)
else:
    return self._hash_version_in this_pr()
```

Labels:
name: Timedelta
description: Timedelta data type
name: DataFrame
description: DataFrame data structure
name: Non-Nano
description: datetime64/timedelta64 with non-nanosecond resolution

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