BrandonFors/pandas-github-issues huggingface dataset:
DOC: RT03 fix for read_sql method
State: closed

- [x] xref #57416  (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.
- [ ] 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: IO SQL
description: to_sql, read_sql, read_sql_query

Comments:
Thanks @YashpalAhlawat
BUG: Ensure dataframe preserves categorical indices with categorial series
State: closed

Ensure that when constructing a DataFrame with a list of Series with different CategoricalIndexes, the resulting columns are categorical.

- [x] closes #57592
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).

Labels:
name: Categorical
description: Categorical Data Type
name: DataFrame
description: DataFrame data structure
name: Constructors
description: Series/DataFrame/Index/pd.array Constructors

Comments:
Hi @mroeschke, Unit Tests failures seem unrelated (when running them locally everything is ok).
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.
Dear @mroeschke, could you please give me some feedback? I'd like to understand what's missing in my last changes.
Support structural subtyping with ExtensionArray
State: closed

- [X] closes #57633 

This is a very naive implementation. Ideally we would move a lot of the extraneous functions / attributes out of the core `ExtensionArray` class and into a better home


Labels:
name: ExtensionArray
description: Extending pandas with custom dtypes or arrays.

Comments:
> move a lot of the extraneous functions / attributes out of the core ExtensionArray class and into a better home

Can you expand on this?  Early on when implementing EAs there was an idea that it could be implemented in terms of a small number of primitives (so the EA namespace could stay small) but that idea didn't pan out.
Yea I am referring to anything that is a method on the ExtensionArray but that is not documented as part of the interface. `_values_for_json`, `_get_repr_footer`, etc... work when you use structural typing instead of nominal typing you'd have to re-implement those (see the test case)
So is the suggestion to move those things out of the EA namespace or just to document them as required?

This Protocol approach seems to make it difficult to implement default-but-overridable implementations for things.
Yea not sure yet how to best move things. Maybe that would require something like `ExtensionArrayDefaultOpsMixin`? 
> Yea not sure yet how to best move things. Maybe that would require something like ExtensionArrayDefaultOpsMixin?

This seems like a lot of effort to reinvent the idea of a subclass.  Is there any evidence that this is a pain point for 3rd parties?

I am not aware of an existing library asking for this. It would be a new feature for a library that in the future may want to implement a class in an extension without having to interact heavily with the Python runtime
Closing for now - may revisit later
Compile take functions for uint dtypes
State: closed

Not sure why this wasn't compiled before, maybe because of wheel size? We should at least compile the exact matching, not averse to skipping the cross product with different itemsizes

Labels:
name: Internals
description: Related to non-user accessible pandas implementation

Comments:
Seems fine. Are these actually called?
Those are more or less user facing, we end up calling them if users have uint dtypes (that's how we found this in Dask)

good to merge @WillAyd?
Yep merge away
thx
For all dtypes of the same itemsize, is it possible to e.g. view them as an int8/16/32/64, and just have one kernel that does int->int take, or is this undefined behavior?
Would still require a copy and this is a path that is very heavily used.
DOC: fix PR01/SA01 errors for pandas.tseries.offsets.*.is_(month|quarter|year)_(end|start)
State: closed

- [x] xref #57438 (Replace xxxx with the GitHub issue number)
- [x] xref #57417 (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: Datetime
description: Datetime data dtype

Comments:
/preview
Website preview of this PR available at: https://pandas.pydata.org/preview/pandas-dev/pandas/57630/
/preview
Website preview of this PR available at: https://pandas.pydata.org/preview/pandas-dev/pandas/57630/
Thanks @yuanx749
second approach to fix setitem parametrizations
State: closed

- [x] closes #56727

- [ ] All [code checks passed] Unfortunately not, maybe related to #56329

- [ ] 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: 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.
BUG: Unexpected behaviour when inserting timestamps into Series #57596
State: closed

Resolution info:

**Resolution.RESO_SEC - 3 for seconds**
**Resolution.RESO_MIN - 4 for minute**

Observation:
With the previous code, when the current entry (**resolution: 4, entry: '2024-02-24 10:08'**) has a greater resolution value than the smallest amongst previous entries (in this case **resolution: 3, entry: '2024-02-24 10:2:30'**), it is shown that the key is said to exist within the list of keys within the Series even though it shouldn't. This does not happen when a smaller or equal resolution value entry is inserted into the Series.

![Screenshot from 2024-02-26 13-14-10](https://github.com/pandas-dev/pandas/assets/122815453/0ec3fc4d-4831-47ac-9c19-c8b8fdbbaea9)

Thought process:
With the previous code, if the current entry's resolution value is greater than the smallest resolution value amongst the previous entries, the *_LocIndexer._convert_to_indexer* method will only return an empty list (output of the method *labels.get_loc(key)*), which might be causing entries with larger resolution values not being inserted into the *Series* correctly.

Potential solution:
I have changed the method *_LocIndexer._convert_to_indexer* to return the key ('2024-02-24 10:08') instead of an empty list when the resolution value is greater than the smallest resolution value.


- [x] closes #57596 
- [ ] [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/v2.2.1.rst` file if fixing a bug or adding a new feature.


Labels:

Comments:
Thanks for the contribution @wleong1. Seems like something is wrong with this PR. I think you may want to clone pandas again, and before implementing your changes create a branch in git. If you work in the main branch, things get mixed with other changes, as I think it's the case here.

I'll close this, since you'll have to create a new PR if you work work in a different branch. Please let us know if you need help.
remove check to enforce ES01 errors
State: closed

- [x] closes https://github.com/pandas-dev/pandas/issues/57440
- [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.
- [ ] 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: Code Style
description: Code style, linting, code_checks

Comments:
Thanks @jordan-d-murphy
Remove inline from khash_python
State: closed

@DeaMariaLeon noted that #57575 caused a slight regression in the benchmarks. This is the only thing from that PR that could reasonably affect performance in any way

Labels:

Comments:
can you link a benchmark?
I don't have the direct link but this is what conbench showed

![image](https://github.com/pandas-dev/pandas/assets/609873/5859a442-f3d7-4c72-8b59-570f3e68b590)

thx
Nice! @WillAyd 
![Screenshot 2024-02-26 at 16 58 43](https://github.com/pandas-dev/pandas/assets/11835246/b6dad7da-eb0a-4c68-8cf1-1816435b5173)
Doc: resolve GL08 for pandas.Timedelta.microseconds, unit & value
State: closed

- [x] xref #57443 
- [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.
- [ ] 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: Timedelta
description: Timedelta data type

Comments:
Thanks @lamdang2k
Doc: fixing RT03 errors for pandas.DataFrame.expanding
State: closed

All RT03 Errors resolved in the following cases:

1. scripts/validate_docstrings.py --format=actions --errors=RT03 pandas.DataFrame.expanding

- [x] xref https://github.com/pandas-dev/pandas/issues/57416
- [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.
- [ ] 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: Window
description: rolling, ewma, expanding

Comments:
@mroeschke merge conflicts resolved here as well

Thanks @jordan-d-murphy
DOC: Add `DataFrame.isetitem` method
State: closed

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

Comments:
You need to fix the below error for passing all the checks

2 Errors found for `pandas.DataFrame.isetitem`:
        SA01    See Also section not found
        EX01    No examples section found

Thanks @luke396
fix SA01 error for pandas.ArrowDtype
State: closed

All SA01 Errors resolved in the following cases:

1. scripts/validate_docstrings.py --format=actions --errors=SA01 pandas.ArrowDtype

- [x] xref https://github.com/pandas-dev/pandas/issues/57417
- [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.
- [ ] 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:
pre-commit.ci autofix



Thanks @jordan-d-murphy
Doc: Fix PR07 errors for pandas.DataFrame.align
State: closed

All PR07 Errors resolved in the following cases:

1. scripts/validate_docstrings.py --format=actions --errors=PR07 pandas.DataFrame.align

- [x] xref https://github.com/pandas-dev/pandas/issues/57420
- [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.
- [ ] 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:
pre-commit.ci autofix


Thanks @jordan-d-murphy
Doc: fix PR01 docstring errors for pandas.CategoricalIndex.equals and pandas.CategoricalIndex.map
State: closed

All PR01 Errors resolved in the following cases:

1. scripts/validate_docstrings.py --format=actions --errors=ES01 pandas.CategoricalIndex.equals
2. scripts/validate_docstrings.py --format=actions --errors=ES01 pandas.CategoricalIndex.map

- [x] xref https://github.com/pandas-dev/pandas/issues/57438
- [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.
- [ ] 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: Categorical
description: Categorical Data Type

Comments:
pre-commit.ci autofix


@mroeschke merge conflicts have been resolved 
Thanks @jordan-d-murphy
Doc: fix ES01 for pandas.CategoricalDtype
State: closed

All ES01 Errors resolved in the following cases:

1. scripts/validate_docstrings.py --format=actions --errors=ES01 pandas.CategoricalDtype

- [x]  xref #57440
- [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.
- [ ] 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:
pre-commit.ci autofix


Thanks for the effort here, but it was decided that ES01 is not going to be enforced so closing. Happy to have PRs on other doc issues!
Doc: resolve GL08 for pandas.core.groupby.SeriesGroupBy.value_counts
State: closed

All GL08 Errors resolved in the following cases:

1. scripts/validate_docstrings.py --format=actions --errors=GL08 pandas.core.groupby.SeriesGroupBy.value_counts

- [x] xref https://github.com/pandas-dev/pandas/issues/57443
- [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.
- [ ] 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: Groupby
name: CI
description: Continuous Integration

Comments:
pre-commit.ci autofix


updated this PR based on your feedback, @rhshadrach can you take another look?
Thanks @jordan-d-murphy
DOC: fix RT03 for CategoricalIndex.set_categories, DataFrame.astype, DataFrame.at_time and DataFrame.ewm
State: closed

Resolve all RT03 errors for the following cases:

1. scripts/validate_docstrings.py --format=actions --errors=RT03 pandas.CategoricalIndex.set_categories (already valid)
2. scripts/validate_docstrings.py --format=actions --errors=RT03 pandas.DataFrame.astype
3. scripts/validate_docstrings.py --format=actions --errors=RT03 pandas.DataFrame.at_time
4. scripts/validate_docstrings.py --format=actions --errors=RT03 pandas.DataFrame.ewm

- [ ] xref #57416 
- [ ] [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 @bergnerjonas
DOC: ES01 fix for HDFS Methods
State: closed

All ES01 Errors resolved in the following cases:

scripts/validate_docstrings.py --format=actions --errors=ES01  pandas.HDFStore.put
scripts/validate_docstrings.py --format=actions --errors=ES01  pandas.HDFStore.get
scripts/validate_docstrings.py --format=actions --errors=ES01  pandas.HDFStore.info
scripts/validate_docstrings.py --format=actions --errors=ES01  pandas.HDFStore.keys

- [x] xref #57440 
- [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.
- [ ] 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:
Thanks for the effort here, but it was decided that ES01 is not going to be enforced so closing. Happy to have PRs on other doc issues!
DOC: fix RT03 for pandas.Index.to_numpy and pandas.Categorial.set_categories 
State: closed

Resolve all errors for the following cases:

1. scripts/validate_docstrings.py --format=actions --errors=RT03 pandas.Index.to_numpy
2. scripts/validate_docstrings.py --format=actions --errors=RT03 pandas.Categorical.set_categories

Also fixes typos and wrong default value in docstring of pandas.Categorical.set_categories.

- [ ] xref #57416 
- [ ] [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 @bergnerjonas
DOC: Fixing GL08 errors for pandas.ExcelFile.sheet_names and pandas.MultiIndex.codes
State: closed

Resolved GL08 errors for the following:

1. scripts/validate_docstrings.py --format=actions --errors=GL08 pandas.ExcelFile.sheet_names
2. scripts/validate_docstrings.py --format=actions --errors=GL08 pandas.MultiIndex.codes

Ref: #57443 

- [ ] 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
- [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.
- [ ] 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: CI
description: Continuous Integration
name: IO Excel
description: read_excel, to_excel
name: MultiIndex

Comments:
Thanks @thomasdamcevski and @bergnerjonas
DOC: Whatsnew notable bugfix on groupby behavior with unobserved groups
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.

Ref: https://github.com/pandas-dev/pandas/pull/55738#issuecomment-1937085332

I made the section just focus on the unobserved fixes, leaving the dropna bugfixes where they are (they are quite minor).

cc @jorisvandenbossche 

Labels:
name: Docs
name: Groupby

Comments:
/preview
Website preview of this PR available at: https://pandas.pydata.org/preview/pandas-dev/pandas/57600/
Thanks @rhshadrach 
Thank @rhshadrach for the follow-up!