BrandonFors/pandas-github-issues huggingface dataset:
BUG: startswith function gives misleading results when passed a series #3485
State: closed


- [x] closes #3485
- [] 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
- [ ] whatsnew entry
``` python import pandas
d = pandas.DataFrame([['hi,hi 2'],['bye','bye 2']], columns=['one','two'])
print(d.one.str.startswith(d.two))
```

Labels:
name: Bug
name: Strings
description: String extension data type and string data
name: Stale

Comments:
Hello @oraby8! 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-10-10 09:40:33 UTC
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.
this needs tests if you would like to continue working pls ping.
Fix str dtype -> IntegerDtype conversions
State: closed

closes #25472

- [x] 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: Dtype Conversions
description: Unexpected or buggy dtype conversions
name: Strings
description: String extension data type and string data
name: ExtensionArray
description: Extending pandas with custom dtypes or arrays.

Comments:
Hello @alexreg! 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-10-19 12:23:17 UTC
Looks like all 8 failures are the same issue in essence. I'll wait for advice on how to fix that.
@jreback Thanks for reviewing. I'll have a look at your comments and see what I can do. Where do tests specific to issues go?
Okay, I think I've addressed the above issues and this solution is better. All tests should be passing now too. I just need to write tests specifically for the two issues this is closing (please point me to where they should go). Note, I'm no longer dealing with #15585, as your comment hinted I shouldn't.

Edit: Looks like all tests passed but the macOS one spuriously gave `Error: The operation was canceled.`.
i think I was trying to target too much in this PR. I'm only going to target #25472 now, which the PR in its current state definitely solves. Just not sue of the best way to write a unit test for that issue. Advice appreciated (or someone can feel free just to do it and push).
@jreback @jbrockmendel Incorporated / replied to your feedback. Hopefully everything is good to go now.
thanks @alexreg very nice!
@jreback No problem. Thanks both of you for the reviews and getting this merged.
ENH: Make it possible to change type inplace
State: closed

- [X] closes #43946
- [ ] 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
- [X] This commits adds the possibility of performing the operation of astype directly in a dataframe using the inplace parameter.


Labels:

Comments:
Closing for the reasons mentioned in #43946
[FIX] rolling to respect duplicate datetime indices on the right bound of centered windows
State: closed

….

- [x] closes #43944
- [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: Window
description: rolling, ewma, expanding

Comments:
Hello @rosagold! 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-10-09 22:56:22 UTC
lgtm. cc @mroeschke 
Excellent find and PR! Thanks @rosagold
BUG: fix Frame getitem when column keys are nested tuples
State: closed

- [x] closes #43780 
- [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
- [ ] whatsnew entry

Multi-column selection when the column labels are nested tuples, for example atomic labels of form `((1,),)` or MultiIndex having tuples at each level as reported in the issue raised error due to a condition in asarray_tuplesafe.

A key list of form `[((1,))]` converts to `[[[1]]]` through the call to np.array, resulting in ndim>2. However, only the case ndim==2 was further handled, causing a multi-dimensional array to be returned and subsequently an error.

This extends the ndim==2 condition for nested-tuple keys, but excludes multi-dimensional arrays so that errors are raised in accordance with [test_getitem_ndarray_3d](https://github.com/pandas-dev/pandas/blob/d30aeeba0c79fb8e4b651a8f528e87c3de8cb898/pandas/tests/indexing/test_indexing.py#L73).




Labels:
name: Indexing
description: Related to indexing on series/frames, not to indexes themselves
name: MultiIndex
name: Nested Data
description: Data where the values are collections (lists, sets, dicts, objects, etc.).
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.
@Svanazar can you merge master and update to comments
Hey, extremely sorry for the delay, this totally slipped my mind.  I'll be staying a bit busy this week, so is it okay if I turn this into a draft and finish it during the next week? (in case the issue doesn't get resolved by then).
I'm really sorry for the long gap.
status here?
I won't be able to work on this; really sorry for not informing earlier. Should I close the PR?
BUG: NumericIndex.append retain dtype
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
- [ ] whatsnew entry


Labels:
name: Reshaping
description: Concat, Merge/Join, Stack/Unstack, Explode
name: Index
description: Related to the Index class or subclasses

Comments:
can you add a whatsnew note, otherwise lgtm
> can you add a whatsnew note, otherwise lgtm

shouldnt need whatsnew since NumericIndex isn't exposed in a released version
Raising ValueError when xlim and ylim contain non-int and non-float dtype elements #40889
State: closed

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


Labels:
name: Bug
name: Visualization
description: plotting
name: Error Reporting
description: Incorrect or improved errors from pandas
name: Stale

Comments:
@github-actions pre-commit
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.
pls merge master and update to comments
can you merge master i think there are some comments as well
> can you merge master i think there are some comments as well

Sorry for not updating this pr for a while, while I have worked on other issues, I have been strugglig with a proper place to move my tests to. I just cant wrap my head around where the perfect spot would be. I would be very thankful for some tips. Other changes will be merged accordingly.
needs to be passing and pls merge master
> a proper place to move my tests to

grepping for .plot.line i see several in tests.plotting.frame.test_frame, that would be a good place to start
Thanks for the PR but appears to have gone stale. If interested in continuing, please merge the main branch and address the review and we can reopen.
BENCH : Added benchmark for indexing with .loc for sorted/unsorted DatetimeIndex
State: closed

- [x] closes #38690


Labels:
name: Datetime
description: Datetime data dtype
name: Indexing
description: Related to indexing on series/frames, not to indexes themselves
name: Benchmark
description: Performance (ASV) benchmarks
name: Stale

Comments:
@github-actions pre-commit
@mzeitlin11 
Please review the PR
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.
pls merge master and update to comments
@github-actions pre-commit
@sonalprabhu can you merge master again. i think this PR is failing the asv's themselves, so pls test locally.
Thanks for the PR but it appears to have gone stale. If interested in continuing please merge the main branch and address the failing benchmark  and we can reopen.
fixed rolling for a decreasing index, added a test for that
State: closed

- [x] closes #43927
- [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: Window
description: rolling, ewma, expanding

Comments:
thanks @rosagold very nice!
BUG: Fix groupby nth with axis=1
State: closed

Fixes a bug that no one has reported and probably no one cares about. But overlaps slightly with #42947, so I thought that I would make it a separate PR.

Current behaviour: `df.groupby(df.iloc[1], axis=1).nth(0)` crashes ungracefully.

Labels:
name: Bug
name: Groupby

Comments:
Hello @johnzangwill! 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-10-13 07:59:55 UTC
> also pls add a whatsnew note for 1.4, groupby bug fix section

Done
@jreback all green apart from `Python Dev / actions-310-dev (macOS-latest) (pull_request)` 60 minute timeout
> small nit, pls merge master and ping on green

Still all green apart from another quite frequent ci testing failure:

```
>           raise AssertionError(f"Caused unexpected warning(s): {repr(extra_warnings)}")
E           AssertionError: Caused unexpected warning(s): [('ResourceWarning', ResourceWarning('unclosed file <_io.BufferedRandom name=13>'), '/home/runner/work/pandas/pandas/pandas/io/formats/excel.py', 179)]
```

Which I am sure is nothing to do with my code...
thanks @johnzangwill very nice
ENH: __array_ufunc__ handle np.minimum.reduce
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

np.mimum.reduce(frame) -> return Series instead of ndarray

np.maximum.reduce(series[dt64]) -> return Timestamp instead of np.datetime64
np.maximum.reduce(series[td64]) -> return Timedelta instead of np.timedelta64
np.maximum.reduce(DTA) -> return Timestamp instead of np.datetime64
np.maximum.reduce(TDA) -> return Timedelta instead of np.timedelta64
np.maximum.reduce(DTI) -> return Timestamp instead of np.datetime64
np.maximum.reduce(TDI) -> return Timedelta instead of np.timedelta64

np.maximum.reduce(integer_array) works instead of raising NotImplementedError
np.maximum.reduce(floating_array) works instead of raising NotImplementedError
np.maximum.reduce(Series[Int]) works instead of raising NotImplementedError
np.maximum.reduce(Series[Float]) works instead of raising NotImplementedError

Ditto for np.minimum.reduce

Labels:
name: Dtype Conversions
description: Unexpected or buggy dtype conversions
name: Algos
description: Non-arithmetic algos: value_counts, factorize, sorting, isin, clip, shift, diff

Comments:
needs a whatsnew note
> needs a whatsnew note

has one
CLN: unnecessary warning-catching
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:
https://github.com/pandas-dev/pandas/pull/43919/checks?check_run_id=3832460814 :-<
BUG: np.isinf, np.isfinite, np.isnan with DTI[dt64tz]
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: Bug
name: Dtype Conversions
description: Unexpected or buggy dtype conversions

Comments:
> pandas/core/arrays/base.py:1394: error: "ExtensionArray" has no attribute "_data"  [attr-defined]

from this PR?
user facing?
> user facing?

yes, will add whatsnew
updated + green
TST : add test for groupby aggregation dtype
State: closed

- [ ] closes #32793
- [ ] 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: Testing
description: pandas testing functions or related to the test suite
name: Groupby
name: Dtype Conversions
description: Unexpected or buggy dtype conversions

Comments:
https://github.com/pandas-dev/pandas/pull/43915/checks?check_run_id=3885731836 fail, I check but I dont understand why in my code impact that.
thanks @OlivierCavadenti
TST/REF: collect/de-dup index tests
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: Testing
description: pandas testing functions or related to the test suite

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 0c87ab2651d9c6a8953614fa7944325980e295d5
```

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

```
$ git commit -am 'Backport PR #43914: TST/REF: collect/de-dup index tests'
```

4. Push to a named branch :

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

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

> "Backport PR #43914 on branch 1.3.x (TST/REF: collect/de-dup index tests)"

And apply the correct labels and milestones.

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

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

If these instruction are inaccurate, feel free to [suggest an improvement](https://github.com/MeeseeksBox/MeeseeksDev).
                
wrong version on merge, ignore
TST: Skip leaky test on Python 3.10
State: closed

- [ ] xref #41935 (we should close after updating MacPython)
- [ ] 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

This test seems to be leaking on Python 3.10, causing subsequent tests to fail with a cryptic and flaky error. Let's skip it.
This unblocks official Python 3.10 support.
I am not fixing the test since my first attempt at fixing the leakiness failed and I don't understand and don't have time to fix the problem.

If this works, we can revert #41990.

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

Comments:
Hello @lithomas1! 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-10-08 14:41:15 UTC
@github-actions pre-commit
@github-actions pre-commit
@github-actions pre-commit
We need to target 1.3.4 since we've already released Python 3.10 wheels, which means we've committed to Python 3.10 support in 1.3.x. We cannot commit to Python 3.10 support if we allow failure on the CI build. This PR takes the CI build out of allow failure by resolving the leaky test causing flaky, cryptic errors.
sounds good 
LGTM
thanks @lithomas1 very nice
@meeseeksdev backport 1.3.x
Something went wrong ... Please have  a look at my logs.
ENH: implement Index.__array_ufunc__
State: closed

Very little user-facing here, AFAICT just the iadd/isub bug in DTA/TDA

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

Comments:
> pandas/core/indexes/base.py:849: error: Variable "pandas.core.indexes.base.Index.str" is not valid as a type  [valid-type]
updated + green
ENH: Add support for more placeholders in `guess_datetime_format`
State: closed

Add support for day of week and meridiem placeholders and any
combination of placeholders supported by `strftime` that do not
correspond to a datetime attribute.

- [x] closes #43901
- [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

I'm not sure if this fix actually qualifies as a bug fix and not and enhancement.  Before, `guess_datetime_format` would output a somewhat invalid format string that included literal content from the parsed datetime such as "Tue" or "AM".


Labels:
name: Datetime
description: Datetime data dtype

Comments:
@jreback @mroeschke Made the requested changes.  Went ahead and squashed everything to have just one commit.  Though I'm not sure if reviewers typically prefer to have the commit history of the PR until final approval.
@jreback Anything else needed for this?  Not sure what happened with the cancelled github action.
@davesque sorry for the delay. Could you merge in master one more time, and then this should be good to merge.
Thanks @davesque 

(May be a performance improvement for all formats according to https://github.com/pandas-dev/pandas/pull/43900#discussion_r724457595)
ENH: implement ExtensionArray.__array_ufunc__
State: closed

This implements `ExtensionArray.__array_ufunc__` with minimal behavior changes (xref https://github.com/numpy/numpy/issues/20044 cc @shoyer).  The only real behavior change is that np.abs, np.positive, np.negative wrap TimedeltaArray instead of returning ndarray[td64]

After this comes `Index.__array_ufunc__`

Labels:
name: Compat
description: pandas objects compatability with Numpy or Python functions
name: ExtensionArray
description: Extending pandas with custom dtypes or arrays.

Comments:
> The only real behavior change is that np.abs, np.positive, np.negative wrap TimedeltaArray instead of returning ndarray[td64]


thi s is user visible right? if so pls add a whatsnew note, otherwise lgtm.
TST: slow collection in test_algos.py
State: closed

- [x] closes #43888


Labels:
name: Testing
description: pandas testing functions or related to the test suite
name: Algos
description: Non-arithmetic algos: value_counts, factorize, sorting, isin, clip, shift, diff

Comments:
Also looks to give a nice reduction in RAM (~400MB) throughout collection/running tests
nice merge on green & ready
BUG: DataFrame arithmetic with subclass where constructor is not the subclass itself
State: closed

- [x] closes #43201
- [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: Compat
description: pandas objects compatability with Numpy or Python functions

Comments:
thanks @jbrockmendel
REF: remove _get_attributes_dict
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
name: Index
description: Related to the Index class or subclasses

Comments:
nice to remove this!
Unfortunately it seems this was used by partd (dask), see dask/partd#57. So I would maybe revert this for a while to give time to have this fixed.
Annotates `indexers/utils.py` functions that don't return anything with `None`
State: closed

- [ ] does not close any issue, change is too trivial
- [ ] tests are not required for this
- [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
- [ ] nothing new

Related https://github.com/python/mypy/pull/11273


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

Comments:
thanks @sobolevn
BUG: pd.array preserve PandasArray
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
- [ ] whatsnew entry


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

Comments:
cool can you rebase
Don't suppress exception chaining for optional dependencies
State: closed

I've just been [helping someone](https://stackoverflow.com/questions/69352179/package-streamlit-app-and-run-executable-on-windows) for whom the helpful error message appears to have obscured the real cause of the problem. Specifically, Jinja2 is present, but one of *its* dependencies is not. So the error message saying "Missing optional dependency: 'Jinja2'..." is rather confusing.

Automatic exception chaining is really great for things like this - you can provide a more descriptive error message while still having the original exception details available for inspection. I'd argue that it should only be disabled (`raise ... from None`) if you're absolutely sure that there will be no useful information in the original exception.

Labels:
name: Error Reporting
description: Incorrect or improved errors from pandas
name: Dependencies
description: Required and optional dependencies

Comments:
Thanks, :crossed_fingers: that test works. I'm editing from the web interface. :slightly_smiling_face: 
close/reopen for CI
thanks @takluyver very nice!
Thanks all :slightly_smiling_face:
DOC: Include a small preview of the groupby() user guide in its API reference
State: closed


- [x] closes #43839
- [ ] 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
name: Groupby

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.
ok this is fine @tobiasmcnulty if you can merge master and make this not a draft.
thanks @tobiasmcnulty