BrandonFors/pandas-github-issues huggingface dataset:
CLN/PERF: remove unnecessary ensure_platform_int
State: closed

This line was added in https://github.com/pandas-dev/pandas/pull/43977, while the docstring and type information (as added in https://github.com/pandas-dev/pandas/pull/43977) indicates this is already the case.

Labels:
name: Performance
description: Memory or execution speed performance
name: 32bit
description: 32-bit systems

Comments:
we have a lot of should-be-unnecessary ensure_platform_int calls.  these should be extremely cheap, so haven't been bothering to remove.
> so haven't been bothering to remove.

And in the past I bothered making a fast-path `take_1d` which explicitly removed it. It did show up in reindex benchmarks IIRC (https://github.com/pandas-dev/pandas/pull/40246, https://github.com/pandas-dev/pandas/pull/39692)
Digging up the benchmarks. Doing one specific for take_1d:

```python
from pandas.core.array_algos.take import take_1d
arr = np.arange(10000)
idx = np.arange(100, dtype=np.intp)

In [5]: %timeit take_1d(arr, idx, allow_fill=False)
498 ns ± 0.77 ns per loop (mean ± std. dev. of 7 runs, 1000000 loops each)  # <-- master
465 ns ± 0.962 ns per loop (mean ± std. dev. of 7 runs, 1000000 loops each)  # <-- PR
```

This is of course about nanoseconds, so in absolute terms only a tiny difference. But because this function is used repeatedly in things like unstack and reindex, it does make a noticeable difference. Eg on the unstack case as used in https://github.com/pandas-dev/pandas/pull/40246, it gives ~ 3-5% difference (which is still small, but IMO worth it since this is actually removing a single line, and the constraint is explicitly documented / in the type information)
sure no objection
no objection, can you rebase
PERF: avoid copy in concatenate_array_managers if reindex already copies
State: closed

@jbrockmendel https://github.com/pandas-dev/pandas/pull/42797 added an unconditional copy, while if you reindex the arrays, you already are sure you have a copy. 

This gives a 20% improvement on some of the merge benchmarks.

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

Comments:
lgtm @jbrockmendel comment could be addressed here
DOC: follow-up to #44518, move release note
State: closed

follow-up to #44518

Labels:
name: Docs

Comments:
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 1.3.x
git pull
```

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

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

```
git commit -am 'Backport PR #44557: DOC: follow-up to #44518, move release note'
```

4. Push to a named branch:

```
git push YOURFORK 1.3.x:auto-backport-of-pr-44557-on-1.3.x
```

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

> "Backport PR #44557 on branch 1.3.x (DOC: follow-up to #44518, move release note)"

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).
TST: Avoid time dependency in GCS zip test
State: closed

- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them

To avoid CI flakiness from this test, only compare the checksum of the ZIP contents to avoid comparing the flaky last modified timestamp of the ZIP archive. IMO, the CI stability is worth the the trade off of being a little less strict here.

cc @jbrockmendel 


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

Comments:
this is fantastic
LGTM
REF: use base class for BooleanArray any/all
State: closed

#41970 moved this to the base class, so not needed here anymore

Labels:
name: Refactor
description: Internal refactoring of code
name: NA - MaskedArrays
description: Related to pd.NA and nullable extension arrays

Comments:
nice!
> docs strings the same?

Yep, just a bit more generic in the base class (also has a few more examples)
thanks @mzeitlin11
REF: deduplicate nullable arrays _cmp_method
State: closed

xref https://github.com/pandas-dev/pandas/pull/44533#discussion_r753689506, helps on a bullet in #38110


Labels:
name: Refactor
description: Internal refactoring of code
name: Numeric Operations
description: Arithmetic, Comparison, and Logical operations
name: NA - MaskedArrays
description: Related to pd.NA and nullable extension arrays

Comments:
thanks @mzeitlin11 keep em coming!
TYP: masked array mask
State: closed


Labels:
name: Numeric Operations
description: Arithmetic, Comparison, and Logical operations
name: Typing
description: type annotations, mypy/pyright type checking
name: NA - MaskedArrays
description: Related to pd.NA and nullable extension arrays
name: Stale

Comments:
This pull request is stale because it has been open for thirty days with no activity. Please update or respond to this comment if you're still interested in working on this.
@mzeitlin11 IIUC this is pretty close.  can you rebase and address comments
@mzeitlin11 can you merge main
Thanks for the pull request, but it appears to have gone stale. Feel free to reopen once the merge conflict and review has been addressed.
BUG: Index with object dtype and negative loc for insert adding none and replacing existing value
State: closed

- [x] closes #44509
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them
- [x] whatsnew entry

This behaves like np.insert, so changed the docstring. Making this compatible with list.insert would be a breaking change

Nevertheless the else block in the base implementation had a bug, so fixed that one too


Labels:
name: Bug
name: Index
description: Related to the Index class or subclasses

Comments:
thanks @phofl
COMPAT: Fix the last warning from matplotlib 3.5.0
State: closed

- [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them
- [ ] whatsnew entry


Labels:
name: Visualization
description: plotting
name: Compat
description: pandas objects compatability with Numpy or Python functions

Comments:
thanks @lithomas1 
@meeseeksdev backport 1.3.x
Something went wrong ... Please have a look at my logs.
CLN: remove is_null_datetimelike
State: closed

- [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them
- [ ] whatsnew entry

No longer needed following #44507

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

Comments:
> can u perf check things, though wouldn't anticpate any slowdowns

```
In [3]: from pandas._libs.missing import checknull
In [4]: %timeit checknull("foo")
74.2 ns ± 0.39 ns per loop (mean ± std. dev. of 7 runs, 10000000 loops each)  # <- master
73.4 ns ± 0.323 ns per loop (mean ± std. dev. of 7 runs, 10000000 loops each)  # <- PR
```
Backport PR #44530 on branch 1.3.x (Fix regression ignoring arrays in dtype check for merge_asof)
State: closed

Backport PR #44530: Fix regression ignoring arrays in dtype check for merge_asof

Labels:
name: Reshaping
description: Concat, Merge/Join, Stack/Unstack, Explode
name: Regression
description: Functionality that used to work in a prior pandas version

Comments:
Failures unrelated
DOC: 'MS' offset alias does not work as described with pd.date_range()
State: closed

- [x] closes #44146 
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them
- [NA] whatsnew entry


Labels:
name: Docs
name: Frequency
description: DateOffsets

Comments:
pls build the docs locally and see where this is going wrong: https://github.com/pandas-dev/pandas/runs/4280860460?check_suite_focus=true
> pls build the docs locally and see where this is going wrong: https://github.com/pandas-dev/pandas/runs/4280860460?check_suite_focus=true

My mistake I misaligned some text that got included in the ipython block, will be more careful next time, should be fixed now (but waiting for full build)
thanks @loicdiridollou
BUG: BooleanArray raising on comparison to string
State: closed

- [x] closes #44499
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them
- [x] whatsnew entry


Labels:
name: Bug
name: Numeric Operations
description: Arithmetic, Comparison, and Logical operations
name: replace
description: replace method
name: NA - MaskedArrays
description: Related to pd.NA and nullable extension arrays

Comments:
thanks @mzeitlin11
BUG: td64+offset
State: closed

- [ ] closes #xxxx
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them
- [x] whatsnew entry


Labels:
name: Timedelta
description: Timedelta data type

Comments:
user visible?
whatsnew added + green
Add json normalize back into doc and move read_json to pd namespace
State: closed

- [x] closes #42540 

read_json looked like it had to be used like pandas.io.json.read_json and json_normalize was missing alltogether. Maybe backporting as well?

Edit: Build Docs locally, look fine now

Labels:
name: Docs
name: IO JSON
description: read_json, to_json, json_normalize

Comments:
thanks @phofl 
@meeseeksdev backport 1.3.x
Something went wrong ... Please have a look at my logs.
Fix regression ignoring arrays in dtype check for merge_asof
State: closed

- [x] closes #42844
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them
- [x] whatsnew entry

This restores the 1.2.x behavior.

Passing an array as join key is something we don't have much test support. We have 2 tests for this which were added ages ago. We could deprecate this.

Labels:
name: Reshaping
description: Concat, Merge/Join, Stack/Unstack, Explode
name: Regression
description: Functionality that used to work in a prior pandas version

Comments:
thanks @phofl 
@meeseeksdev backport 1.3.x
Something went wrong ... Please have a look at my logs.
CLN: tighten noqas
State: closed

- [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them
- [ ] whatsnew entry


Labels:
name: Clean

Comments:
@jreback docbuild is green here
wow haven't seen green in a while
thxs!
I think we should backport the doc fix?
sure.  its just the one line
More explicit, yes

On Mon, Nov 22, 2021 at 1:31 AM Joris Van den Bossche <
***@***.***> wrote:

> ***@***.**** commented on this pull request.
> ------------------------------
>
> In pandas/core/algorithms.py
> <https://github.com/pandas-dev/pandas/pull/44529#discussion_r754089648>:
>
> > @@ -1849,5 +1849,5 @@ def union_with_duplicates(lvals: ArrayLike, rvals: ArrayLike) -> ArrayLike:
>      unique_array = ensure_wrapped_if_datetimelike(unique_array)
>
>      for i, value in enumerate(unique_array):
> -        indexer += [i] * int(max(l_count[value], r_count[value]))
> +        indexer += [i] * int(max(l_count.at[value], r_count.at[value]))
>
> Same question as in the other PR: what's the reason for this change? It
> shouldn't influence behaviour, but just being more explicit about
> label-based?
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/pandas-dev/pandas/pull/44529#pullrequestreview-812269547>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AB5UM6E44SGMZDXD67K4WKDUNIEYBANCNFSM5IM7JGYA>
> .
> Triage notifications on the go with GitHub Mobile for iOS
> <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
> or Android
> <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
>
>
Fix/26837 format array
State: closed

- [x] closes #26837
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them
- [x] whatsnew entry

The basic strategy is to move `format_array` from pandas.io.formats.format to `ExtensionArray._format_array`. By default, we convert to ndarray and then use the existing formatting mechanism on the ndarray.

Labels:
name: Refactor
description: Internal refactoring of code
name: Output-Formatting
description: __repr__ of pandas objects, to_string
name: ExtensionArray
description: Extending pandas with custom dtypes or arrays.
name: Stale

Comments:
Can we use this to render unnecessary any of the other formatting-related methods out there?  in particular im thinking of 

- DTA/TDA/PA._format_native_types 
- DTI/TDI/PI._format_with_header (matches Index._format_with_header but with different na_rep and extra kwarg)
- IntervalIndex._format_native_types (matches Index._format_native_types but with different default value for na_rep)
- IntervalIndex._format_data (`# TODO: integrate with categorical and make generic`)

I'm not sure, but it's not obvious to me. `_format_array` is designed to be generic. I would assume those are more specific and rely on some structure that can't be assumed in `_format_array`.
This pull request is stale because it has been open for thirty days with no activity. Please update or respond to this comment if you're still interested in working on this.
@TomAugspurger can you merge main
Thanks for the PR, but it appears to have gone stale. Feel free to reopen when you have time to revisit.
Comment deleted as build on Mac failed. Suggested by @marcogorelli.
State: closed

- [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them
- [ ] whatsnew entry


Labels:
name: Docs

Comments:
thx @ClaudiaSilver
COMPAT: Matplotlib 3.5.0
State: closed

- [ ] closes #44521 
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them
- [ ] whatsnew entry

Still some deprecation warnings left. Anyone want to approve for me so we can get this merged ASAP?

Labels:
name: Visualization
description: plotting
name: Compat
description: pandas objects compatability with Numpy or Python functions

Comments:
we are fully testing i assume?

can u add. what's new note for 1.3.5
re-started the timed-out build.  one question about the ax.grid(False), otherwise LGTM pending green(ish)
gets us back to green on everything except the docbuild.  @jreback good to go?
yep merge when ready
thanks @lithomas1 
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 1.3.x
git pull
```

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

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

```
git commit -am 'Backport PR #44523: COMPAT: Matplotlib 3.5.0'
```

4. Push to a named branch:

```
git push YOURFORK 1.3.x:auto-backport-of-pr-44523-on-1.3.x
```

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

> "Backport PR #44523 on branch 1.3.x (COMPAT: Matplotlib 3.5.0)"

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 u add. what's new note for 1.3.5

did we want a release note for this?
REF: remove unused allow_object kwarg from sequence_to_dt64ns
State: closed

- [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them
- [ ] whatsnew entry


Labels:
name: Refactor
description: Internal refactoring of code

Comments:
@tacaswell looks like we may need to update some of our matplotlib code?  Any suggestions?

```
    @pytest.mark.slow
    def test_axis_share_x_with_by(self):
        # GH 15079
        ax1, ax2, ax3 = self.hist_df.plot.hist(column="A", by="C", sharex=True)
    
        # share x
>       assert ax1._shared_x_axes.joined(ax1, ax2)
E       AttributeError: 'AxesSubplot' object has no attribute '_shared_x_axes'
```
TYP: Changed variable name repeats to ensured_repeats in pandas/core/indexes/multi.py
State: closed

xref #37715

Changed variable name `repeats` to `ensured_repeats` pandas/core/indexes/multi.py: 2161 and 2167
Removed type[ignore] assignment and mypy error comment. 



Labels:

Comments:
im not sure this is an improvement
Yes. It seems to be breaking the function. I'll try to find a fix, if not I will close this pr. Sorry 😔
TYP: changed variable from vals to array_vals in pandas/core/indexes/multi.py
State: closed

xref #37715

Changed variable name from vals to array_vals in pandas/core/index/multi.py: 705 and 706 
To remove type: ignore[assignment] mypy error

Changed variable name from m to mapped_result in pandas/core/index/multi.py: 3121
Removed type: ignore[assignment] mypy error in line 3126 and 3131

Labels:

Comments:
Sorry, deleting this pull request and branch. Changing variable name actually breaks the code
BUG: Period incorrectly allowing np.timedelta64('NaT')
State: closed

- [ ] closes #xxxx
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them
- [x] whatsnew entry


Labels:
name: Timedelta
description: Timedelta data type
name: Period
description: Period data type

Comments:
can you merge master
DOC: df.to_html documentation incorrectly contains min_rows optional param (release note)
State: closed

- [x] closes #44304 
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them
- [x] whatsnew entry


Labels:
name: IO HTML
description: read_html, to_html, Styler.apply, Styler.applymap

Comments:
Mentioning the failed tests in the following issue #44521 
Thanks @loicdiridollou
ENH: `Styler.to_string`
State: closed

Adds a basic method for writing `Styler` to string using the mechanics already in place and a simplified jinja2 template. 

With the development of `Styler` in the last 18 months it has moved away from being purely a tool for adding styles and colors to HTML.

The methods: `.hide`, `.format`, `.format_index`, and the planned `set_descriptors` and `aliases` kwarg for `format_index`, allow one to fully customise the displayed items of row and column indexes, index names, levels, and the data values themselves, for output to any file-format.

This is now used for output to LaTeX as well as HTML, and it seems to be a minimal addition to add a `to_string` function giving users even further capability. (e.g. #45177)


Labels:
name: Enhancement
name: IO Data
description: IO issues that don't fit into a more specific label
name: Styler
description: conditional formatting using DataFrame.style

Comments:
this is cool @attack68
(TST) Replacing Timestamp.now () in tests.
State: closed

- [x] xref #44341
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them
- [ ] whatsnew entry

Replacing Timestamp.now() in tests.
Left Timestamp.now () in the following tests:

```
scalar/timestamp/test_timestamp.py:290:        compare(Timestamp.now(), datetime.now())
scalar/timestamp/test_timestamp.py:291:        compare(Timestamp.now("UTC"), datetime.now(timezone("UTC")))
scalar/timestamp/test_timestamp.py:320:        compare(Timestamp.now(), datetime.now())
scalar/timestamp/test_timestamp.py:321:        compare(Timestamp.now("UTC"), datetime.now(tzutc()))
scalar/timestamp/test_constructors.py:480:        ts_from_method = Timestamp.now()
scalar/timestamp/test_constructors.py:484:        ts_from_method_tz = Timestamp.now(tz="US/Eastern")
```
  


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

Comments:
Hello @Mikhaylov-yv! Thanks for updating this PR. We checked the lines you've touched for [PEP 8](https://www.python.org/dev/peps/pep-0008) issues, and found:















































There are currently no PEP 8 issues detected in this Pull Request. Cheers! :beers: 

##### Comment last updated at 2021-11-20 18:47:30 UTC
Does this cover all the non-intentional cases of `now()`?
@mroeschke 

> Does this cover all the non-intentional cases of `now()`?

Yes it covers all cases.

Where I was in doubt left `now()`
@mroeschke Oh sure. But I don’t understand how to do it.
No problem can you merge master one more time @Mikhaylov-yv ?
@mroeschke yes of course. 
Thanks @Mikhaylov-yv. CI failures unrelated
TYP: changed variable new_pd_index to final_pd_index 
State: closed

xref #37715

Changed variable new_pd_index to final_pd_index in line 2099

Handled mypy type ignore[assignment] error in pandas/io/pytables.py in line 2099



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

Comments:
Hello @prithvijitguha! Thanks for updating this PR. We checked the lines you've touched for [PEP 8](https://www.python.org/dev/peps/pep-0008) issues, and found:



There are currently no PEP 8 issues detected in this Pull Request. Cheers! :beers: 

##### Comment last updated at 2021-11-17 15:43:05 UTC
Hi @MarcoGorelli Thanks for the review. Its failing one test which is similar to the test failed in another similar pull request #44231
As per this comment, https://github.com/pandas-dev/pandas/pull/44373#issuecomment-964617916 its related to pyarrow. 
What do you suggest? 🤔
It's unrelated, don't worry about it

This looks good to me, I'm just not sure about the `final_pd_index` variable name, so leaving this open in case others have comments
thanks @prithvijitguha
ERR: Raise ValueError when BaseIndexer start & end bounds are unequal length
State: closed

- [x] closes #44470
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them
- [x] whatsnew entry


Labels:
name: Window
description: rolling, ewma, expanding
name: Segfault
description: Non-Recoverable Error

Comments:
nice, looks like some failing tests :-<