BrandonFors/pandas-github-issues huggingface dataset:
ERR: Raise TypeError for groupby.var with timeldeta
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.


Labels:
name: Groupby

Comments:
thanks @phofl 

I have a comment about this in my notes-to-self branch to get around to fixing it.  Glad you got to it first
BUG: `MultiIndex` displays incorrectly with a long element
State: closed

- [x] Closes #52960
- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests)
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit)
- [x] Added an entry in the latest `doc/source/whatsnew/v2.1.0.rst` file

https://github.com/pandas-dev/pandas/blob/721bd7a22efbd1c57f86fd61d6f0e668b79942ae/pandas/io/formats/printing.py#L417-L420
The `if` branch as shown above may never be visited, so `head` and `tail` may not be correctly set. This pull request fixes this problem.

Labels:
name: Output-Formatting
description: __repr__ of pandas objects, to_string
name: MultiIndex

Comments:
Sure, thanks for your review! I'll make the changes ASAP.
@mroeschke Hi, I've made the unit test. However, I'm not sure if this is the correct way to do, so would you mind giving some instructions if I'm not doing correctly? Thank you very much.
Thanks @Charlie-XIAO
DEPR: require SparseDtype.fill_value be compatible with SparseDtype.subtype
State: closed

- [x] closes #23124 (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: Sparse
description: Sparse Data Type
name: Deprecate
description: Functionality to remove in pandas

Comments:
Thanks @jbrockmendel
BUG: NaT instead of error for timestamp concat with None
State: closed

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


Labels:
name: Missing-data
description: np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
name: Reshaping
description: Concat, Merge/Join, Stack/Unstack, Explode
name: Stale

Comments:
~~I missed adding an entry in the `whatsnew` file. So will add that,~~ any other suggestions?

Thanks!
Hi,
Any suggestions or changes from my side?
One check is failing. Is there anything that I'm skipping?
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.
> One check is failing. Is there anything that I'm skipping?

I think unrelated.  can you merge main and see if that does it
I'm running into issues related to #52093 - it seems like this PR has stalled, and should fix the issue we're hitting.
@jbrockmendel is there anything else needed for this PR, or can this be merged?
can you merge main and ill take another look
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.
REF: merge.py check for known arraylikes
State: closed

#48454 was going to do this as a deprecation, but before that got merged another PR accidentally made most weird-arraylikes raise (making it difficult to write a test for the deprecation).  We agreed to wait a while to see if anyone complained about that, then to change over the checks explicitly.  Among other things this will make the existing AnyArrayLike annotations in this file accurate.

Labels:
name: Refactor
description: Internal refactoring of code
name: Reshaping
description: Concat, Merge/Join, Stack/Unstack, Explode

Comments:
Thanks @jbrockmendel
DEPR: SparseArray(scalar)
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.

Better match all the other constructors.

Labels:
name: Sparse
description: Sparse Data Type
name: Deprecate
description: Functionality to remove in pandas

Comments:
Thanks @jbrockmendel
DEPS: Unpin pydata-sphinx-theme
State: closed

- [ ] closes #48988 (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.

closes #53167

Labels:
name: CI
description: Continuous Integration
name: Web
description: pandas website

Comments:
/preview
Website preview of this PR available at: https://pandas.pydata.org/preview/53029/
/preview
Website preview of this PR available at: https://pandas.pydata.org/preview/53029/
/preview
Website preview of this PR available at: https://pandas.pydata.org/preview/53029/
JFYI you can click on the link of the previous `/preview` comments, it's always the same link, and the command doesn't generate the preview, only the comment with the link for convenience. :) The preview is generated by the docs CI job directly. You don't even need the command if you don't mind typing the url with the PR number.
Ah okay sorry I thought the command also had to re-point the link to the latest web artifact.

Thanks for the prior suggestion, the version dropdown seems to work now
When you select 1.5, I'm seeing the docs for 1.5.3:

> Date: Nov 22, 2022 Version: 1.5.2

Edit: Ah, this probably isn't relevant here.
Yeah I think this is the same behavior that currently happens: https://pandas.pydata.org/pandas-docs/version/1.5/index.html

Since this fixed the doc build issue, going to merge, but happy to address any followups
CI: Add job to validate conda-forge meta.yaml
State: closed

xref https://github.com/pandas-dev/pandas/pull/52794#issuecomment-1527919521 cc @datapythonista 

Inspired by https://github.com/dask/dask/blob/main/.github/workflows/conda.yml

Labels:
name: Build
description: Library building on various platforms
name: CI
description: Continuous Integration

Comments:
Going to merge this in, but happy to address any followups
Thanks for this @mroeschke, looks great!
BUG: pd.read_sql_query - sqlalchemy uses sqlalchemy.sql.quoted_name instead of str
State: closed

- [x] closes #52816
- [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.
- [ ] 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: IO SQL
description: to_sql, read_sql, read_sql_query
name: Stale

Comments:
Do you mean this closes https://github.com/pandas-dev/pandas/issues/52816?
@rhshadrach yes, sorry I didn't use the correct reference number in the description.

Basically when we use `select` from sqlalchemy to read sql data, the column names are not str objects but rather are objects of `sqlalchemy.sql.quoted_name` subclass of str. It adds an additional dependency of sqlalchemy module in pickled dataframe.
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.
POC/DEPR: infer time objects to ArrowDtype[time]
State: closed

xref #52711 this is what I have in mind for how we would deprecate the current inference behavior with a sequence of `datetime.time` objects.  We would allow opting-in to the future behavior with `pd.set_option("future.infer_time", True)`.

I plan to update this PR to also deprecate returning object dtype from the `time` and `timetz` properties in the `.dt` accessor.  Also any relevant cases in the sql code.

If we go down this route, I would follow this with analogous PRs for datetime.date, Decimal, ... 

Labels:
name: Deprecate
description: Functionality to remove in pandas
name: Arrow
description: pyarrow functionality

Comments:
Since the string version of this is in, this POC is no longer needed.  Closing.
BUG: infer_dtype with ArrowDtype
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: Arrow
description: pyarrow functionality

Comments:
Thanks @jbrockmendel
BUG to_timedelta was raising ValueError w pd.NA
State: closed

- [x] closes ##52909
- [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: Missing-data
description: np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
name: Timedelta
description: Timedelta data type

Comments:
I think this is partially fixing #40566 - the first 3 cases on the issue description are no longer failing.

Edit: 
Now I can't see which test fails.


Thanks @MarcoGorelli for reviewing & merging. I even got a cat! :-)
Thanks @DeaMariaLeon 
Thank you for merging @mroeschke 
i think this fixed #38509 too!
REF: simplify maybe_convert_objects
State: closed

convert_timedelta/datetime/period/interval are in practice either all-True or all-False so this combines them into a single keyword convert_nonnumeric.  This will also prevent bloat if/when we add time/date/decimal/string/...

Labels:
name: Refactor
description: Internal refactoring of code
name: Internals
description: Related to non-user accessible pandas implementation

Comments:
Thanks @jbrockmendel
BUG: long int formatting with thousands separator
State: closed

The previous PR #52686 for issue #52272 had three flaws:

- it did not account for long integer display with thousands separator.
- it added tests that had nothing to do with the fix that it employed.
- a test added was specific only to the latex output.

This PR reverts the tests, and adds a more generic test which is applied to all styler output modes by default.

**The previous whatsnew for 2.1.0 is sufficient to leave in place**.


Labels:
name: Output-Formatting
description: __repr__ of pandas objects, to_string
name: Styler
description: conditional formatting using DataFrame.style

Comments:
Thanks for the follow up @attack68 !
Improve performance when selecting rows and columns
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: Indexing
description: Related to indexing on series/frames, not to indexes themselves
name: Performance
description: Memory or execution speed performance

Comments:
Thanks @phofl
PERF: add ._simple_new method to masked arrays
State: closed

Add a `._simple_new` method to `BaseMaskedArray` and child classes in order to allow instantiation without validation to get better performance when validation is not needed.

Example:

```python
>>> import pandas as pd
>>> arr = pd.array(np.arange(2), dtype="Int32")
>>> %timeit arr.reshape(-1, 1)
1.4 µs ± 12 ns per loop  # main
544 ns ± 1.87 ns per loop  # this PR
```

Motivated by performance considerations for https://github.com/pandas-dev/pandas/pull/52836.

Labels:
name: Performance
description: Memory or execution speed performance
name: Reshaping
description: Concat, Merge/Join, Stack/Unstack, Explode
name: NA - MaskedArrays
description: Related to pd.NA and nullable extension arrays

Comments:
Ping @jbrockmendel & @rhshadrach. This is currently contained in #52788 to fix a slowdown I saw when working in that PR, but can be reviewed independently. 

@topper-123 - just a conflict to resolve
I got some social obligations, so merging this, so #52788 is rebased and ready, when I'm back...
CI: Update Python version for ASVs
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.

Followup to #51133

Labels:
name: CI
description: Continuous Integration

Comments:
Thx @rhshadrach
TST: Add a test for multiindex df with na value and adding a new row
State: closed

- [X] closes #22247
- [ ] [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: Testing
description: pandas testing functions or related to the test suite

Comments:
Hi,
I am not sure why Minimum Versions check fails. Any hint?
**Edit**: I just updated my branch and it resolved the issue
Thanks @shteken
DOC: fixed wrong description of default value in docstring for pandas.Series.str.replace
State: closed

- [x] closes #52779
- [ ] [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:
thx @StefanieSenger
Added tests for period str and repr.
State: closed

- [x] closes #53000
- [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: Period
description: Period data type
name: Needs Tests
description: Unit test(s) needed to prevent regressions

Comments:
All set - Ready for review @MarcoGorelli !
Thanks @MarcoGorelli for the quick review ! We can now proceed with #51459 , I updated the PR.
STYLE: specify encodings when opening files
State: closed

- [x] closes #52997  (Replace #52997 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.



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

Comments:
let's stick to one PR, please don't open a new one which does the same thing

same comments from https://github.com/pandas-dev/pandas/pull/52997, please address them
This is my first PR so I was making mistake next time i was more carefull for making PR
this is close, a few tests left. would be great if you could finish it up, else I can add a commit on Tuesday and push this over the finish line
can i fixes that cases or you  push this over the final line???
feel free to fix
can you refer that test cases so i'll fix it?
check the failing tests in the CI logs
you'll need to fix the tests (in addition to merging upstream/main) to get this passing
i have check the circle ci to find the error and i tired on a local to fix it.
i try to fix read Binary mode error but if i remove the encoding then pre-commit command does not work it give me error massage called as "unspecified encoding"
i thought it finish it up.
PERF: faster access to the dtype for masked numeric arrays
State: closed

```python
>>> import pandas as pd
>>> arr = pd.array(np.arange(100_000), dtype="Int32")
>>> %%timeit
... arr.dtype
... del arr._cache["dtype"]
2.09 µs ± 14.2 ns per loop  # main
234 ns ± 0.237 ns per loop  # this PR
```
 
Discovered working on some performance issues with #52836.

Labels:
name: Performance
description: Memory or execution speed performance
name: NA - MaskedArrays
description: Related to pd.NA and nullable extension arrays

Comments:
nice!
thx @topper-123
Made change to .pre-commit-config.yaml file
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:
Performed the task on my local machine
BUG: PeriodDtype incorrectly caching different DateOffset freqs
State: closed

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


Labels:
name: Frequency
description: DateOffsets
name: Period
description: Period data type

Comments:
pandas/core/dtypes/dtypes.py:902: error: Incompatible types in assignment (expression has type "Dict[int, PandasExtensionDtype]", base class "PandasExtensionDtype" defined the type as "Dict[str, PandasExtensionDtype]")  [assignment]
Found 1 error in 1 file (checked 1417 source files)

This is one of the complaints I've been seeing locally for a while.  No idea why its showing up now
thanks @mroeschke