BrandonFors/pandas-github-issues huggingface dataset:
DEV: adding codespace configuration
State: closed

I added the [dev container configuration](https://docs.github.com/en/codespaces/setting-up-your-project-for-codespaces/adding-a-dev-container-configuration/introduction-to-dev-containers) so a codespace opened on the pandas repo would auto-install the environment.

Labels:
name: Stale

Comments:
Seems that the `setup.sh` script needs executable permissions - `chmod +x` should do the trick. Also the `.devcontainer.json` file in the root of the repository should be replaced with this one, so you'll need to delete that file.
This pull request is stale because it has been open for thirty days with no activity. Please [update](https://pandas.pydata.org/pandas-docs/stable/development/contributing.html#updating-your-pull-request) and respond to this comment if you're still interested in working on this.
This PR conflicts with our infrastructure for using Docker with a remote session with Visual Studio Code. Since the previous comment mentioned we would need to replace one with the other, I suggest I close this one.  
@craiglpeters if there is a way to keep both, please let us know and we will re-open this PR.
BUG: fix the value error when using read_csv with "," as decimal point and pd.Float64Dtype()
State: closed

- [x] closes #52086 
- [x] [Tests added and passed]
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added [type annotations]
- [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:

Comments:
This is my first contribution so I'm still trying to find my feet. 
The current problem is after this function passes the array containing strings to _from_sequence_of_strings(), we lose track of what decimal point we should use. As a result, a latter function floatify() cannot parse the string correctly since they are trying to parse the string with ".". Is it ok if I add additional parameters to all the following functions to indicate this decimal point? Or is that inefficient too?
This needs restructuring of the casting logic. This is non-trivial. 
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.
CI: Combine unit test workflows
State: closed

Allows all unit tests jobs to be viewable in the same tab instead of 3 different tabs

Labels:
name: CI
description: Continuous Integration

Comments:
thx @mroeschke 
Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

1. Checkout backport branch and update it.

```
git checkout 2.0.x
git pull
```

2. Cherry pick the first parent branch of the this PR on top of the older branch:
```
git cherry-pick -x -m1 c9c6a1f05c657b1b4159d2f47be02e09448c1e78
```

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

```
git commit -am 'Backport PR #52694: CI: Combine unit test workflows'
```

4. Push to a named branch:

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

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

> "Backport PR #52694 on branch 2.0.x (CI: Combine unit test workflows)"

And apply the correct labels and milestones.

Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon!

Remember to remove the `Still Needs Manual Backport` label once the PR gets merged.

If these instructions are inaccurate, feel free to [suggest an improvement](https://github.com/MeeseeksBox/MeeseeksDev).
                
Can you backport? This shouldn't be relevant for the release
CI: Consolidate more comment command workflows
State: closed


Labels:
name: CI
description: Continuous Integration

Comments:
Going to merge this in, can address follow ups if needed
Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

1. Checkout backport branch and update it.

```
git checkout 2.0.x
git pull
```

2. Cherry pick the first parent branch of the this PR on top of the older branch:
```
git cherry-pick -x -m1 bcd5d25ee1ec85b5b7e77c6febf196a1fb6bf265
```

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

```
git commit -am 'Backport PR #52693: CI: Consolidate more comment command workflows'
```

4. Push to a named branch:

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

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

> "Backport PR #52693 on branch 2.0.x (CI: Consolidate more comment command workflows)"

And apply the correct labels and milestones.

Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon!

Remember to remove the `Still Needs Manual Backport` label once the PR gets merged.

If these instructions are inaccurate, feel free to [suggest an improvement](https://github.com/MeeseeksBox/MeeseeksDev).
dataframe sparse to_coo test GH#25270
State: closed


- [ ] closes #25270 (Replace xxxx with the GitHub issue number)
- [ ] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).


Labels:

Comments:
I think the new test cases and the test case above are duplicated test cases. We can merge the two cases into one. Or close this PR and the GH since it is already tested somewhat.
Thanks for the investigation @liang3zy22 but you're correct; it looks like this has already been tested so let's close to avoid duplication
REGR: Performance of DataFrame reduction ops with axis=1
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.

Siphoning off the largest impact from #52083.

```
shape = 250_000, 100
mask = pd.DataFrame(np.random.randint(0, 1, size=shape), dtype=pd.BooleanDtype())
%timeit mask.transpose()
# 4.28 s ± 12.3 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)  # <-- main
# 1.12 s ± 19.6 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)  # <-- PR
```

Labels:
name: Performance
description: Memory or execution speed performance
name: Regression
description: Functionality that used to work in a prior pandas version
name: Stale
name: Reduction Operations
description: sum, mean, min, max, etc.

Comments:
I've been thinking about this and #52083.  This is a workaround for lack of 2D support in MaskedArray (not unlike #52261).  Maybe its time to revisit actually supporting 2D in MaskedArray?
> I've been thinking about this and #52083. This is a workaround for lack of 2D support in MaskedArray (not unlike #52261). Maybe its time to revisit actually supporting 2D in MaskedArray?

Agreed this is a workaround, no opposition to 2D for masked dtypes.
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.
BUG: DataFrame.style displays wrong value for long integers #52272 FIX
State: closed

- [ ] closes #52272 
- [ ] added tests 'test_to_latex_exceeding_float_point_double' to 'test_to_latex.py' and 'test_to_html_float_point_double' to 'test_to_html.py'
- [ ] All [code checks passed]
- [ ] Added [type annotations] N/A
- [ ] Added an entry in the latest `doc/source/whatsnew/v2.1.0.rst` file 
Fix Description: Returns string if value exceeds float point double to avoid loss of precision. 

Labels:
name: Styler
description: conditional formatting using DataFrame.style

Comments:
Thanks @lusolorz
CLN: remove unneeded try/except in nanops
State: closed

Look like this try/except isn't needed, checking in CI if it verifies the result.

Labels:
name: Clean

Comments:
I rearranged it again. `if (axis is not None and values.shape[axis] == 0) or values.size == 0:` is always the same as `if values.size == 0:` AFAIKT.

So I've just added a `if values.size == 0` clause at the top and cleaned up even further, so it's quite simple now.
Thanks @topper-123
BUG: pd.NA showing up as NaN in Categorical repr
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: Bug
name: Output-Formatting
description: __repr__ of pandas objects, to_string
name: Categorical
description: Categorical Data Type
name: Stale

Comments:
I have been thinking about a change to the use of the na value in `Categorical`, and just wrote up #52687 after being reminded by this PR. This would also change the repr IMO as a consequence of the change, so I  think that would make this PR unnecessary,.
Sure, happy to see what you got. 

Feel free to take my test(or any parts of this PR) if you need 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.
Looks like this has gone stale. Closing to clear the queue but feel free to reopen if you want to continue
FYI, there is a slightly related #53190, which isn’t getting traction though…
DEPR: is_bool_dtype special-casing Index[object_all_bools]
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.
- [x] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

I'm pretty sure this is a leftover kludge from before we supported bool dtype Indexes.

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

Comments:
```
 sort whatsnew entries alphabetically....................................................................Failed
- hook id: sort-whatsnew-items
- duration: 0.05s
- exit code: 1
- files were modified by this hook
pre-commit hook(s) made changes.
If you are seeing this message in CI, reproduce locally with: `pre-commit run --all-files`.
To run `pre-commit` as part of git workflow, use `pre-commit install`.
All changes made by hooks:
diff --git a/doc/source/whatsnew/v2.1.0.rst b/doc/source/whatsnew/v2.1.0.rst
index db8e683..841419a 100644
--- a/doc/source/whatsnew/v2.1.0.rst
+++ b/doc/source/whatsnew/v2.1.0.rst
@@ -232,10 +232,10 @@ Deprecations
 - Deprecated parameter ``convert_type`` in :meth:`Series.apply` (:issue:`52140`)
 - Deprecated passing a dictionary to :meth:`.SeriesGroupBy.agg`; pass a list of aggregations instead (:issue:`50684`)
 - Deprecated the "fastpath" keyword in :class:`Categorical` constructor, use :meth:`Categorical.from_codes` instead (:issue:`20110`)
+- Deprecated the behavior of :func:`is_bool_dtype` returning ``True`` for object-dtype :class:`Index` of bool objects (:issue:`52680`)
 - Deprecated the methods :meth:`Series.bool` and :meth:`DataFrame.bool` (:issue:`51749`)
 - Deprecated unused "closed" and "normalize" keywords in the :class:`DatetimeIndex` constructor (:issue:`52628`)
 - Deprecated unused "closed" keyword in the :class:`TimedeltaIndex` constructor (:issue:`52628`)
-- Deprecated the behavior of :func:`is_bool_dtype` returning ``True`` for object-dtype :class:`Index` of bool objects (:issue:`52680`)
```
updated+green
Thanks @jbrockmendel
BUG: ArrowExtensionArray(temporal).quantile raising for non-round results
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.1.0.rst` file if fixing a bug or adding a new feature.


Fixes the following:

```
import pandas as pd

ser = pd.Series([1, 2, 3], dtype="timestamp[s][pyarrow]")

ser.quantile([0.1])  # ArrowInvalid: Float value 1.2 was truncated converting to int64
```

Labels:
name: Bug
name: Arrow
description: pyarrow functionality

Comments:
Thanks @lukemanley
BUG: tz_localize 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: Timezones
description: Timezone data dtype
name: Arrow
description: pyarrow functionality

Comments:
comment on test org, otherwise LGTM
Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

1. Checkout backport branch and update it.

```
git checkout 2.0.x
git pull
```

2. Cherry pick the first parent branch of the this PR on top of the older branch:
```
git cherry-pick -x -m1 ff8e88a05c907bd124bcfcf3c5384e16a7987cc7
```

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

```
git commit -am 'Backport PR #52677: BUG: tz_localize with ArrowDtype'
```

4. Push to a named branch:

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

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

> "Backport PR #52677 on branch 2.0.x (BUG: tz_localize with ArrowDtype)"

And apply the correct labels and milestones.

Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon!

Remember to remove the `Still Needs Manual Backport` label once the PR gets merged.

If these instructions are inaccurate, feel free to [suggest an improvement](https://github.com/MeeseeksBox/MeeseeksDev).
ENH: ValueError when to_sql() receives empty name param
State: closed

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

Comments:
Thanks for the hints. I've added a test and an entry in "what's new". If there's anything I can improve just drop me a line. I'm a bit new to this.
Thanks @StefanieSenger
Fixed import error message when extensions not built
State: closed

From a quick glance at the newcomers slack channel this is the question people ask about most often. It looks like pandas.compat indirectly imports the _libs folder via util._dectorators grabbing `cache_readonly`, so our try...except never gets the chance to run.

It would be nice to add a test for this, not sure the cleanest way how

Labels:
name: Error Reporting
description: Incorrect or improved errors from pandas

Comments:
nice, thanks

I'd never seen this message 😄 Is `--force` the best advise to give though? Isn't it ok to just recommend the incremental build?
Never used force. I can update that too
Thanks @WillAyd
PERF/REF: concat
State: closed

Motivated by #50652, which is a near-worst-case for our current concat implementation.  This gets about a 10-15% bump on the case I've been profiling (num_rows=100, num_cols=50_000, num_dfs=7).  I'm exploring other approaches that I expect to get much bigger gains from.

The big upside here is the refactor.  I find the current combine_concat_plans really hard to grok.  Getting a single "plan" upfront rather than constructing multiple plans is much simpler.

Labels:
name: Performance
description: Memory or execution speed performance
name: Reshaping
description: Concat, Merge/Join, Stack/Unstack, Explode

Comments:
Thanks @jbrockmendel
DEPS: drop np 1.20
State: closed


Labels:
name: Dependencies
description: Required and optional dependencies

Comments:
The errors seem not related. #45651
1. Could you add this to the table of updated versions in the whatsnew note for 2.1?
2. Could you change this version in `pyproject.toml` and the sdist GHA workflow?
3. It looks like there's a `try/except` in `pandas/tests/extension/base/dtype.py::BaseDtypeTests:test_check_dtype` that can be removed now based on a comment regarding numpy 1.20
```
=================================== FAILURES ===================================
_______________ TestBaseDtype.test_check_dtype[decimal128(7, 3)] _______________
[gw0] linux -- Python 3.8.0 /home/runner/micromamba/envs/test/bin/python3.8
[XPASS(strict)] decimal string repr affects numpy comparison
```
Thanks @fangchenli
BLD: remove libreduction
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: Build
description: Library building on various platforms

Comments:
Guessing the slowdown is not that great?
> Guessing the slowdown is not that great?

Neglible
Thanks @jbrockmendel
REF: lazify relativedelta imports
State: closed

In most cases we don't need it, so delay importing it until we do.

in io.stata it can be replaced with datetime.timedelta.  In the plotting code I _think_ it can be replaced with `tot_secs = (dmax-dmin).total_seconds()`, need to track down why that wasn't done in the first place.

Labels:
name: Clean

Comments:
Updated to intentionally raise
> In the plotting code I _think_ it can be replaced with `tot_secs = (dmax-dmin).total_seconds()`, need to track down why that wasn't done in the first place.

the original comes from https://github.com/pandas-dev/pandas/pull/1616/commits/d0d15b0fa69a0d464a939b757a104d57fc7b4d58, but there's no context and looks like an initial oversight to me
Thanks @jbrockmendel
BUG: Modify get_indexer_non_unique to account for nan keys
State: closed

- [x] closes #52234
- [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: Missing-data
description: np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
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.
PERF: avoid is_datetime64_any_dtype
State: closed

This was written with numpy dtypes and DatetimeTZDtype in mind, but will now catch 3rd party and ArrowDtype[timestamp] too, so will be a footgun.

Labels:
name: Performance
description: Memory or execution speed performance

Comments:
reverted deprecation, so this is just avoiding internal usages
Thanks @jbrockmendel
PERF: avoid com.is_datetime_or_timedelta_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: Performance
description: Memory or execution speed performance

Comments:
Thanks @jbrockmendel
TST: crosstab margins with ordered categorical column
State: closed

- [x] closes #25278
- [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

Comments:
Nice! Thanks @aidoskanapyanov