BrandonFors/pandas-github-issues huggingface dataset:
DEPR Enforce reversion of Size color aliases
State: closed

- [ ] closes #49732 (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.

Docs and whatsnew were added in https://github.com/pandas-dev/pandas/pull/49734, let's enforce it in 2.0.0?

Labels:
name: Bug
name: Visualization
description: plotting
name: Regression
description: Functionality that used to work in a prior pandas version

Comments:
Oh I missed this, so this is the actual implementation of the keyword arguments?

If yes, lets enforce in 1.5.3, this can be considered a regression
yup - 1.5.3 sounds good! will update the whatsnew now

EDIT nvm, will wait for 1.5.3 whatsnew note
Can you update the whatsnew?
Oops, something went wrong applying the patch ... Please have a look at my logs.
cc @MarcoGorelli could you backport manually?
@meeseeksdev  backport 1.5.x
Oops, something went wrong applying the patch ... Please have a look at my logs.
> cc @MarcoGorelli could you backport manually?

yeah will do tomorrow
read_fwf docs
State: closed

- [X] Enhances #16950
- [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).

Enhanced documentation on `read_fwf`: clarifies whitespace is stripped by default and how to override via setting `delimiter`.

`pandas/io/parsers/readers.py` had no mention of delimiter option.

Labels:
name: Docs
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. Additionally if a fix is required it should probably be discussed in an issue before moving forward to closing in favor of a future issue
STYLE enable pylint: fix use-implicit-booleaness-not-comparison warnings
State: closed

Related to [#48855](https://github.com/pandas-dev/pandas/issues/48855). Enables the Pylint type "C" warning `use-implicit-booleaness-not-comparison`

- [] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).



Labels:

Comments:
sorry, this duplicates https://github.com/pandas-dev/pandas/pull/49654 , and I'm not sure it's a safe one to enable in general (it's also listed as one of the ones to not turn off in the issue)

closing for now  then
Ah my mistake, I thought I had searched through all the comments and didn't see this warning get addressed. Apologies for the duplication
DEPR: Enforce numeric_only=False in groupby sum/mean
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.

Targeting these two ops first because they're used as an example op in a lot of tests. Hoping the rest of the ops are easier. Note this doesn't check off the corresponding line in the list of deprecations.

Labels:
name: Groupby
name: Deprecate
description: Functionality to remove in pandas
name: Nuisance Columns
description: Identifying/Dropping nuisance columns in reductions, groupby.add, DataFrame.apply

Comments:
is the failed asv time_pivot_table_margins_only_column a false-positive?
Thanks @jbrockmendel - ASV failure was due to trying to take the mean of a string column; I added it to the `columns` instead. It now takes 30ms on my machine.
PERF: ArrowExtensionArray.__iter__
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).
- [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.0.0.rst` file if fixing a bug or adding a new feature.

Faster iteration through pyarrow-backed arrays.

```
from asv_bench.benchmarks.strings import Iter

dtype = "string[pyarrow]"
bench = Iter()
bench.setup(dtype)

%timeit bench.time_iter(dtype)

# 266 ms ± 6.66 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)    <- main
# 57.7 ms ± 679 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)  <- PR
```

Labels:
name: Performance
description: Memory or execution speed performance
name: Arrow
description: pyarrow functionality

Comments:
Thanks @lukemanley!
ENH: timedelta_range unit keyword
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).
- [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: Enhancement
name: Non-Nano
description: datetime64/timedelta64 with non-nanosecond resolution

Comments:
Thanks @jbrockmendel
STYLE: fix pylint redefined-outer-name warnings
State: closed

Fixed `redefined-outer-name` linting issue in the following files (Towards #49656)
- `pandas/util/_decorators.py`
- `pandas/util/_doctools.py`
- `pandas/util/_test_decorators.py`

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

Comments:
@MarcoGorelli Addressed the requested changes in `_doctools.py`. Could you please review and let me know of any required changes? Thanks in advance!
can you run the pre-commit checks? see the contributing guide for how
> can you run the pre-commit checks? see the contributing guide for how

Will do.
@MarcoGorelli I ran the pre-commit commands. The `utils/_doctools.py` had some changes which are now pushed. Let me know if there are any other needed changes.
Glad I could help. Thanks for letting me contribute!
TST: troubleshoot strict=False xfails
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: Testing
description: pandas testing functions or related to the test suite

Comments:
dont merge, i want to re-run a few times to see if the flaky fails come back
I'll mark this PR as a draft to signal not to merge
API: NumericIndex([1 2, 3]).dtype should be int64 on 32-bit systems
State: closed

- [x] closes #49813
- [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: Dtype Conversions
description: Unexpected or buggy dtype conversions
name: 32bit
description: 32-bit systems
name: Index
description: Related to the Index class or subclasses

Comments:
thanks @topper-123
Debug python same
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:
`git fetch origin main:main` seems to have fixed this
DOC: Fix indendation in docstring sort_values  'by' parameter 
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.

Current version looks like:
```
Parameters
----------
        by : str or list of str
            Name or list of names to sort by.

            - if `axis` is 0 or `'index'` then `by` may contain index
              levels and/or column labels.
            - if `axis` is 1 or `'columns'` then `by` may contain column
              levels and/or index labels.
axis : {0 or 'index', 1 or 'columns'}, default 0
     Axis to be sorted.
```



Labels:
name: Docs

Comments:
How does this render in the docs?

IMO it looks fine currently? https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.sort_values.html
> How does this render in the docs?

Indeed, this look good in the sphinx rendered version. But when I checked the text-version (inside notebook or ipython), it looks like:

![image](https://user-images.githubusercontent.com/754862/203264442-0938b93e-ebff-4986-ad4a-a75a1baae680.png)

this PR fixes the latter.

> this PR fixes the latter.

Ah okay. Could you double check the sphinx rendered version looks okay too (screenshot of a local rendered doc is fine)?
Good point, I checked and seems ok
![image](https://user-images.githubusercontent.com/754862/203976463-89ce195a-46c3-45b3-8234-50e8fa6244cd.png)

Thanks @stijnvanhoey
DOC: Fix the Styler user guide table width issues
State: closed

Not sure if this has any other unintended consequences. Note that "auto" is the default table width setting in CSS when unspecified. This was the previous setting until 1.5.0 and an update to pydata-sphinx-theme seems to have changed this setting.

Would like to check the rendered output to make sure this affects as expected.

- [x] closes #48644 


Labels:
name: Docs
name: Web
description: pandas website

Comments:
Did it work locally?
y
@meeseeksdev backport 1.5.x
@meeseeksdev backport 1.5.x
thx @attack68
WIP/CI: Build docs with single job
State: closed

The docs build in the CI is taking more than one hour, which seems too much. Based on the logs the time is spent in `waiting for workers...`, which doesn't provide much information. Running in a single job here to see if the logs provide more information on where the time is spent, and see if the job does need to take so long, or if there is any particular step responsible for most of the time.

Labels:
name: Docs
name: CI
description: Continuous Integration

Comments:
Seems like there is no single step taking a lot of time. The `Writing output` of each of the hundreds of files is taking like a second, which seems like a lot of time. But no idea what's going on in that step, and the sphinx codebase is so complex and messy that doesn't seem worth checking the details.

FWIW, it doesn't seem to save much time to use multiple workers for the docs. It's like 8 minutes difference in a one hour job.
WEB: Remove interactive terminal
State: closed

- [X] closes #47530

The terminal has always been pretty slow, and probably not very useful, and it has been broken for couple of months now. Removing it, we can consider adding it back once the project is more stable.

Labels:
name: Web
description: pandas website

Comments:
Then jupyterlite can be removed from the dependency files?
Thanks @datapythonista 
Hey folks, sorry to see that was still an issue.

FYI a few performance improvements were released as part of the latest `0.1.0b16` release which should make the kernel start faster: https://github.com/jupyterlite/jupyterlite/releases/tag/v0.1.0b16

You may want to try it on this demo site first: https://jupyterlite.github.io/demo/repl/index.html?toolbar=1&kernel=python&code=import%20pandas%20as%20pd

In case you would like to reinstate the interactive terminal on the pandas docs you could then depend on `jupyterlite==0.1.0b16`.
TST: Tests for replace method when column contains pd.NA (#47480)
State: closed

- [X] closes #47480
- [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 an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

Added tests to show BUG from issue (#47480).
Original issue was about pd.Series method (`df["A"].replace`), but pushing tests for both DataFrame and Series.

Test failing when DataFrame/Series has dtype `object` (infered when `dtype=None` on constructor).

Labels:
name: Missing-data
description: np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
name: replace
description: replace method
name: Stale

Comments:
Looks like the added tests are failing in the CI. Are you interested in contributing a fix?
Last commit seems to pass all tests.
Should I make any other changes to the code?
@phofl Now it only creates the NA mask if `arr` is a numpy.ndarray (happens when Series dtype is object. Otherwise arr is a pandas.array e.g. IntegerArray or FloatingArray. There is no ObjectArray class?).

Saw a problem after commiting:
```
    else:
        arr_nas = mask  # Avoid possibility of NameError on new_mask[~arr_nas]
```
Should change to `mask.copy()` or delete it altogether?
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.
TYP: avoid inherit_names for DatetimeIndexOpsMixin
State: closed

new version of #48015




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

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 to @jbrockmendel's #50532 this PR got much simpler :) (`freq` was causing the most changes).
thanks @twoertwein
STYLE enable pylint: overridden-final-method
State: closed

Issue #48855. This PR enables pylint type "W" warning: `overridden-final-method`
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).

The only occurrence of the warning is in `test_external_block.py`. I think it was made on purpose and disabled the warning on this line.

Labels:

Comments:
thanks @natmokval - `mypy` already deals with this one, so I think it might also make sense to keep this one off
Thanks, @MarcoGorelli . Didn't know that. I close the PR.
STYLE enable pylint: ungrouped-imports
State: closed

Issue #48855. This PR enables pylint type "C" warning: `ungrouped-imports`
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).

In two cases out of three, the warning is false-positive.

Labels:

Comments:
Thanks, @MarcoGorelli . Agree, it is better to keep `isort` deal with imports. I close the PR.
BUG: TimedeltaArray.astype(duration[{unit}][pyarrow])
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).
- [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.0.0.rst` file if fixing a bug or adding a new feature.

Fixes the following:

```
import pandas as pd

arr = pd.array([pd.Timedelta(days=1)]) 
arr.astype("duration[ns][pyarrow]")     # <- raises
```

`TypeError: Cannot convert ArrowDtype to numpy.dtype`




Labels:
name: Bug
name: Dtype Conversions
description: Unexpected or buggy dtype conversions
name: Timedelta
description: Timedelta data type
name: Arrow
description: pyarrow functionality

Comments:
Thanks @lukemanley
VIS: Add xlabel/ylabel to `plot.hist()`
State: closed

- [X] closes #49793 
- [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).
- [N/A] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [X] Added an entry in the latest `doc/source/whatsnew/v2.0.0.rst` file if fixing a bug or adding a new feature.


Labels:
name: Visualization
description: plotting

Comments:
Thanks @stefmolin
update io docs for OpenDocument Spreadsheets
State: closed

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

Labels:
name: IO Excel
description: read_excel, to_excel

Comments:
I believe this documentation is shared by `Styler.to_excel`. Can I ask double check if this write mode also supports that output method including the addition of excel colors, number formats and borders? etc.
@attack68 - not sure what you mean by "shared" here; is it that the `Styler.to_excel` docs link to this section of the documentation? I checked and that doesn't seem to be the case (but I might be missing it?).
I am of the understanding that there is no direct documentation for `Styler.to_excel` it is a shared substitution of `DataFrame.to_excel`.
```
    @doc(
        NDFrame.to_excel,
        klass="Styler",
        storage_options=_shared_docs["storage_options"],
        storage_options_versionadded="1.5.0",
    )
```
Therefore I wonder if this update to those docs will automatically apply to `Styler.to_excel` and if the alternative render engine can correctly parse styles. Lot of ifs, but worth the question.
This isn't an update to the doc strings, it's an update to the User Guide here: https://pandas.pydata.org/pandas-docs/dev/user_guide/io.html#opendocument-spreadsheets
great. my bad, thx for highlighting.
Thanks @vamsi-verma-s
TST: add tests/arrays/interval/test_constructors.py
State: closed

`IntervalArray` construction wasn't tested very well previously. This adds a `test_constructors.py` file to the `tests/arrays/interval` directory. The test file is the test file from pandas/tests/indexes/interval/test_constructors.py (after #49786) adapted to test `IntervalArray`s instead of `IntervalIndex`es.

Also preparation for fixing an issue in #49560.

Labels:
name: Testing
description: pandas testing functions or related to the test suite
name: Interval
description: Interval data type
name: Stale

Comments:
can any of this be de-duplicated with the analogous index tests?
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.
TST: test UInt64Index in tests/indexes/interval/test_constructors.py
State: closed

`UInt64Index` wasn't tested previously in the `IntervalIndex` constructor tests, this adds tests for that.

Preparation for fixing an issue in #49560.


Labels:
name: Testing
description: pandas testing functions or related to the test suite
name: Interval
description: Interval 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.
STYLE enable pylint: subprocess-run-check
State: closed

Issue #48855. This PR enables pylint type "W" warning: `subprocess-run-check`
- [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:
I think I know why the error occurs, now working on update.