BrandonFors/pandas-github-issues huggingface dataset:
TST: insert 'match' to bare pytest raises in pandas/tests/tseries/off…
State: closed

…sets/test_offsets.py

- [ ] ref https://github.com/pandas-dev/pandas/issues/30999
- [ ] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry


Labels:
name: Testing
description: pandas testing functions or related to the test suite
name: Error Reporting
description: Incorrect or improved errors from pandas

Comments:
nitpick, otherwise LGTM
Hi can you add this label 
hacktoberfest-accepted
hmm can you merge master and ping on green.
I did git reset with upstream/master and than ran pytest pandas/tests/tseries/offsets/test_offsets.py  -s. And it showed lots of Exceptions raised (293 failed) should i ignore them for now or need to fix them too along with match in pytest.raises.
@jreback 
> I did git reset with upstream/master and than ran pytest pandas/tests/tseries/offsets/test_offsets.py -s. And it showed lots of Exceptions raised (293 failed) should i ignore them for now or need to fix them too along with match in pytest.raises.
> @jreback

really? you should have none
Yes, There are and i have not even made any changes in upstream/master at that point. I am not sure whether it has something to do with my local setup or not. But if i remember correctly at start of this pull request i saw none. I will check with my local setup once again and see if i made any mistake there but i am using same docker setup.

@jreback
> Yes, There are and i have not even made any changes in upstream/master at that point. I am not sure whether it has something to do with my local setup or not. But if i remember correctly at start of this pull request i saw none. I will check with my local setup once again and see if i made any mistake there but i am using same docker setup.
> 
> @jreback

ok pls just merge master and ping on green
yeah this is actually failing, so please see if you can fixup things.
hi @jreback 
I am new to open source so earlier i only used to do **pytest {corresponding file name which i changed}** for some of my pull request raised. But as i noticed in this request that some of test cases were failing due to one of my previous PR **https://github.com/pandas-dev/pandas/pull/37027.** On that i did same basic testing which passed but caused failure in testing env. I have fixed those issues in this comment. So can you guide me (or any documentation link) what else i need to do to make sure that my changes don't cause problem later on.
Other command i found in the testing env was 
**pytest -m "not slow and not network and not clipboard" -n auto --dist=loadfile -s --strict --durations=30 --junitxml=test-data.xml pandas**. 
Is this enough for initial testing.
Sorry to bother you with this request but any help will be much appreciated.
i think master is now updated, so need to merge master and see if there is anything left to change.
> i think master is now updated, so need to merge master and see if there is anything left to change

Done with rebasing and most of test cases are done only one remaining.
thanks @krajatcl
CI: Update error message for np_dev
State: closed

https://dev.azure.com/pandas-dev/pandas/_build/results?buildId=44153&view=logs&jobId=eab14f69-13b6-5db7-daeb-7b778629410b&j=eab14f69-13b6-5db7-daeb-7b778629410b&t=ce687173-08c6-5301-838d-71b2dda24510

Labels:
name: CI
description: Continuous Integration

Comments:
thanks @dsaxton
@meeseeksdev backport 1.1.x
CI: Show ipython directive errors
State: closed

Current output of ipython directive errors in CI is essentially a blank line, so adding a bit more to try to show what error is happening.
```
(pandas-dev) ➜  ~ grep -B1 "^<<<-------------------------------------------------------------------------$" sphinx.log

<<<-------------------------------------------------------------------------
```
vs.
```
(pandas-dev) ➜  ~ grep -B10 "^<<<-------------------------------------------------------------------------$" sphinx.log


>>>-------------------------------------------------------------------------
Exception in /Users/danielsaxton/pandas/doc/source/user_guide/enhancingperf.rst at block ending on line 834
Specify :okexcept: as an option in the ipython:: block to suppress this message
  File "<ipython-input-66-d3ab2b9618fd>", line 1
    df.query("strings == "a" and nums == 1")
                          ^
SyntaxError: invalid syntax

<<<-------------------------------------------------------------------------
```

Labels:
name: Docs
name: CI
description: Continuous Integration

Comments:
ok so this is a go-forward better error message? if that is the case lgtm.
> ok so this is a go-forward better error message? if that is the case lgtm.

Yeah, saw a PR that failed this check but had to do a lot more digging to figure out what was wrong. I figure this makes it easier (ten lines is arbitrary, but should be fine usually).
ok merge away
DOC: make return type documentation of series methods consistent #35409
State: closed

- [x] closes #35409 
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`

Labels:
name: Docs

Comments:
Fix docstrings associated with Series methods for now.
Please review.

Once it passes review, I'll start working on other docstring fixes in the same way.

would love to get a hacktoberfest tag if possible. #36837
cc @simonjayhawkins ok with the text?
Thanks @junjunjunk! Very nice.
REF/CLN: pandas/io/pytables.py
State: closed

- [ ] closes #xxxx
- [ ] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

Clean-up and minor refactor of ``pandas/io/pytables.py``.
- Extract method ``_identify_group``
- Clean-up some docstrings (spacing)
- Use suppress instead of try/except/pass
- Format error message using dedent
- Remove unnecessary empty lines as they compromise readability of some blocks

Labels:
name: Refactor
description: Internal refactoring of code
name: IO HDF5
description: read_hdf, HDFStore

Comments:
thanks @ivanovmg
DOC: doc/source/whatsnew
State: closed

- [x] xref #36777 
- [ ] tests added / passed
- [x] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry


Labels:
name: Docs

Comments:
Thanks @Meghana-12 
Hey, @dsaxton @MarcoGorelli I have a small request. If you find this PR good enough to be part of hacktoberfest, could you please add the label `hacktoberfest-accepted`? 
Happy to help, let us know if you'd like any help/mentoring with other issues
DOC: blacken-docs doc/source/ecosystem.rst
State: closed

- [x] xref #36777 
- [ ] tests added / passed
- [x] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry


Labels:

Comments:
Thanks @Meghana-12 ! Minor note, but `closes #<issue number>` will cause the referenced issue to be closed when your PR is merged, which you'd only want to do if this is the _final_ PR to close that issue. It looks like there's other PRs than this one which are needed to close #36777 , so I've changed the description to `xref #<issue number>`
> Thanks @Meghana-12 ! Minor note, but `closes #<issue number>` will cause the referenced issue to be closed when your PR is merged, which you'd only want to do if this is the _final_ PR to close that issue. It looks like there's other PRs than this one which are needed to close #36777 , so I've changed the description to `xref #<issue number>`

okay, thank you! I'll remember that! 
Thanks @Meghana-12 !
REF/CLN: pandas/io/parsers.py
State: closed

- [ ] closes #xxxx
- [ ] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

Refactor/cleanup ``pandas/io/parsers.py``
- Extract method _refresh_kwargs_based_on_dialect
- Extract method _validate_skipfooter
- Drop local variable engine_specified
- Clean-up FutureWarning issue


Labels:
name: Refactor
description: Internal refactoring of code
name: IO CSV
description: read_csv, to_csv

Comments:
big picture: whats the goal?
> 
> 
> big picture: whats the goal?

Extract some methods to make any further refactoring easier.
> Extract some methods to make any further refactoring easier.

Is there further refactoring you have in mind?
> 
> 
> > Extract some methods to make any further refactoring easier.
> 
> Is there further refactoring you have in mind?

I am still trying to figure out what the code does. By making small PRs on refactoring/cleanup I get to understand it better. Probably later I will have some suggestion on the refactoring.
cc @twoertwein if any comments.
LGTM, outsourcing the dialect validation makes the constructor of `TextFileReader` easier to read.
Thanks @ivanovmg!
DOC: black enhancingperf.rst and 10min.rst code style
State: closed

ref #36777

Labels:

Comments:
@BeanNan If you add this to the flake8-rst ignore list in setup.cfg that should fix the lint error:
```
E203,  # space before : (needed for how black formats slicing)
```




> @BeanNan If you add this to the flake8-rst ignore list in setup.cfg that should fix the lint error:
> 
> ```
> E203,  # space before : (needed for how black formats slicing)
> ```

I added it, but CI still seems to have some problems
Thanks @BeanNan
REF: IndexOpsMixin wrapping
State: closed

- [ ] closes #xxxx
- [ ] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry


Labels:
name: Refactor
description: Internal refactoring of code

Comments:
gentle ping; this has become a blocker for mypy fixups
DOC: normalize usage of word "pandas"
State: closed

changes references to the library, pandas, to match the standard lowercase spelling. This changes applicable `.rst` files under the `doc/source` path.

References such as Pandas, **pandas**, *pandas*, and ``pandas`` have been replaced with pandas.

- [x] closes #32316 
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry


Labels:
name: Docs

Comments:
@dsaxton, I combed through all of `doc/source/../*.rst` which is what #32316 was referring to. I'm fairly certain this catches all remaining references.
> Interested in writing a doc linting rule such that we catch future usages of `Pandas`, etc?

I can take some time to look into doing that.

Thanks again @LeviMatus, feel free to open a PR with the linting check as a follow-up
REF: separate flex from non-flex DataFrame ops
State: closed

- [x] closes #36796
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry

Unless supporting this is intentional, in which case we should deprecate and explicitly implement flex-bool operations.

If/when this is done, we can stop passing `special` and even `cls`.

Labels:
name: Refactor
description: Internal refactoring of code
name: Numeric Operations
description: Arithmetic, Comparison, and Logical operations

Comments:
i guess technicaly this is an api change, so add a note.

cc @TomAugspurger if any comments.
I'm not sure what a "flex" method is. What's the user-facing change here?
"flex" methods are all the non-dunder arith/cmp ops: add, sub, eq, ne, ...

The user facing change is that `frame.__and__(other, axis=0, fill_value= ...)`, or other dunder methods non-idiomatically accepting kwargs.  The potential trouble is that for &|^, there are no non-dunder versions with the kwarg support.
can you rebase
> The user facing change is that frame.__and__(other, axis=0, fill_value= ...), or other dunder methods non-idiomatically accepting kwargs.

So this would break explicitly calling `frame.__and__(other, axis=0)`? I'm fine with that. I'm fine with not calling that a breaking change since dunder methods should be called by using the operators or the `operator` module.
whatsnew added, green-as-it-gets
thanks
BUG: Groupy dropped nan groups from result when grouping over single column
State: closed

- [x] closes #35646
- [x] closes #35542
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry

When grouping over 2 columns with only ``nans`` this raised an error previously. Realised this, when running tests for my fix, because this case was tests with one grouping column. Added test to cover fixed behavior for more than one column.

cc @mroeschke  Takes same path as two or more grouping columns now.

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

Comments:
@rhshadrach Thanks very much for the review. Just a couple of questions about your review above.
Could you also add a unit test for the `groupby.rolling` case here? https://github.com/pandas-dev/pandas/issues/35542#issue-672765849
@mroeschke Done
cc @rhshadrach I had time to look this through. Keys is always a list of some kind of index. But we can not import the Index class because of circular imports. I left it at ABCIndex for now. Do you have a suggestion? The return seems to be alway a Dict with arrays
looks good, can you merge master and ping on green; there maybe a conflict with another PR for whatnew, let's see.

also cc @mroeschke 
Thanks @rhshadrach  I really appreciate your help.

Type hint should work now
@phofl One tangential note: I mentioned "when dealing with circular imports" above; I should have said when importing solely for type checking, imports should go in the `if TYPE_CHECKING:` block.That is, this should be used whenever possible, even when not dealing with circular imports.
Thanks very much, that makes sense 
CI / checks are failing.  merge master and ping on green-ish
@phofl conflict needs resolved.
Done
@jreback Failure seems unrelated, because merge before that was green
merged master @jreback could be merged
LGTM. Mind merging in master one more time?
@mroeschke 
Done
lgtm can merge on green
Thanks @jreback for resolving conflicts. Resolved another. Failure seems unrelated.
thanks @phofl
TST:  Verify parsing of data with encoded special characters (16218)
State: closed



- [x] closes #16218 
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry


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

Comments:
@mroeschke do I need to merge master or is the PR good like this?
@avinashpancham could you merge master one more time? Sorry, that this has been ignored. Hopefully our flakey CI issues have been solved
Np @mroeschke, merged master and everything passes now.
Thanks @avinashpancham
PERF: Index._shallow_copy shares _cache with copies of self
State: closed

#32640 copied the cache when copying indexes. Indexes are immutable, so some refactoring allows us to __share__ the cache instead. This means potentially fewer expensive index ops.

```python
>>> idx = pd.CategoricalIndex(np.arange(100_000))
>>> copied = idx.copy()
>>> copied._cache
{}
>>> idx.get_loc(99_999)
>>> copied._cache
{'_engine': <pandas._libs.index.Int32Engine at 0x1fd3a6934c8>}  # don't need to recreate _engine on copied
```

Performance example:
```python
>>> idx = pd.CategoricalIndex(np.arange(100_000))
>>> %timeit idx._shallow_copy().get_loc(99_999)
4.09 ms ± 65 µs per loop  # master
7.71 µs ± 355 ns per loop  # this PR
```


Labels:
name: Performance
description: Memory or execution speed performance
name: Index
description: Related to the Index class or subclasses

Comments:
The issue @jreback raised means sharing ids is a bit more complicated than thought.

I've repurposed this PR to make indexes share caches, as that was planned in a follow-up, and the code for that is not that different. Sharing caches gives some performance improvements also (in different circumstances than sharing _ids, but still nice).
ping.
looks good @topper-123 
@jbrockmendel if you can just give another set of eyes here and merge when ready.
thanks @topper-123
DEPR: Deprecate use of strings denoting units with 'M', 'Y' or 'y' in pd.to_timedelta (36666)
State: closed

- [x] closes #36666
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry


Labels:
name: Timedelta
description: Timedelta data type
name: Deprecate
description: Functionality to remove in pandas

Comments:
Do we only want to deprecate variations with a space (`pd.to_timedelta("1 Y")`) or also without a space  (`pd.to_timedelta("1Y")`)
Ah I see some tests are failing. I will update the code.
All tests related to `pd.to_timedelta` are passing. The failed tests originate from another issue on master.
Updated my code and merged master. Everything passes now.
I found out that the following was also possible: `pd.to_timedelta(["1Y"])` or `pd.to_timedelta(pd.Series(["1Y"]))`. So I updated `to_timedelta` to also give depr warnings in this situation. I'm not completely happy with this added code, so any feedback is appreciated
Thanks @jreback , moved the warning to timedelta.pyx and the code is much cleaner now.
@jreback implemented all suggestions, could you have a 2nd look? CI is still failing after merging master, but that is related to other issues than introduced in this PR.
CI failed due to FATAL ERROR: Committing semi space failed. Allocation failed - process out of memory. Can someone please restart it? Thanks!

why is 'm' (lowercase) m deprecated? this is minutes as in not ambiguous.  (agree on Y, y, M)
My bad, I thought we wanted to deprecate all variations of m (lowercase and uppercase). Will revert it then.
> My bad, I thought we wanted to deprecate all variations of m (lowercase and uppercase). Will revert it then.

kk great, otherwise lgtm. ping  on green.
@jreback reverted the depr of lowercase m, merged master and CI on green.
thanks @avinashpancham very nice!
DOC: Update docs on estimated time of running full asv suite (36344)
State: closed

- [x] closes #36344 
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry


Labels:
name: Docs

Comments:
Thanks @avinashpancham!
DOC: update code style for remaining intro tutorial docs for #36777 computation.rst
State: closed

…omputation.rst #36832

- [ ] closes #xxxx
- [ ] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry


Labels:

Comments:
Yes. I got it. Thanks!
DOC: Fix extending.rst code style #36777
State: closed

ref #36777
I tried to format development/extending.rst, please review
cc @dsaxton 

Labels:

Comments:
<samp>
Commenter does not have sufficient privileges for PR 36825 in repo pandas-dev/pandas<br>

</samp>
Thanks for the PR. Can you replace "closes 36777" to "ref 36777" in your description, this is part of the issue, it will not solve it and close it.  
> Thanks for the PR. Can you replace "closes 36777" to "ref 36777" in your description, this is part of the issue, it will not solve it and close it.

I have adjusted description, take a look
Thanks @BeanNan lgtm
@BeanNan Can you merge master? Another PR was merged that also touched this file.
DOC: use black to fix code style in doc pandas-dev#36777
State: closed

Partially addresses #36777. 

Fixed the following files:
- `doc/source/development/extending.rst`
- `doc/source/user_guide/duplicates.rst`
- `doc/source/user_guide/gotchas.rst`
- `doc/source/user_guide/scale.rst`

Labels:
name: Docs

Comments:
Thanks @PrayagS 
@dsaxton Could you please add the label `hacktoberfest-accepted` if you find the PR suitable for Hacktoberfest 2020?
BUG: Raise ValueError with nan in timeaware windows
State: closed

- [x] closes #34617
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry

Raising a ValueError when NaN is in timeaware window.

cc @mroeschke 

Labels:
name: Error Reporting
description: Incorrect or improved errors from pandas
name: Window
description: rolling, ewma, expanding

Comments:
this is fine, pls merge master and ping on green.
Hello @phofl! 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 2020-10-14 19:57:10 UTC
ping @jreback green
the CI / checks are failing. ping on green-ish
@jreback 
Thats a bug on master. Looking into this right now.
> @jreback
> Thats a bug on master. Looking into this right now.

OH!
> pandas/core/dtypes/cast.py:501: error: unused 'type: ignore' comment
Fixed it, #37045
Maybe merge master once more on this PR?
thanks @phofl
Issue36124 display of int enums
State: closed

- [x] closes #36124 
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry


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

Comments:
I am getting 1 failure in CI testing with an assertion unrelated to my commit.  Seems similar the issue discovered here:

https://github.com/pandas-dev/pandas/pull/36134

Should I follow the same backport instructions?
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.
@dzimmanck can you merge master to see if there are still CI failures
Sure, I will give this a try later today.

On Sat, Nov 7, 2020, 9:42 PM Andrew Wieteska <notifications@github.com>
wrote:

> @dzimmanck <https://github.com/dzimmanck> can you merge master to see if
> there are still CI failures
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <https://github.com/pandas-dev/pandas/pull/36820#issuecomment-723534046>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AD3JLZT77VFFX6LKQIZVZADSOYVTVANCNFSM4SCIEWAA>
> .
>

OK, everything looking good now.
@dzimmanck if you can respond to the comments 
Got side tracked.  Will dial this in tomorrow.

On Wed, Feb 10, 2021, 4:37 PM Jeff Reback <notifications@github.com> wrote:

> @dzimmanck <https://github.com/dzimmanck> if you can respond to the
> comments
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <https://github.com/pandas-dev/pandas/pull/36820#issuecomment-777135884>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AD3JLZU3FXPV3VWD6VXLHNTS6MRFNANCNFSM4SCIEWAA>
> .
>

Thanks for the PR but it appears this PR has gotten stale. Let us know if you can merge master and address the comments and we'd be happy to reopen. Closing
Hi! I am having the same bug. Is there any chance this will be picked up again?
DOC: uses black to fix formatting #36777
State: closed

Fixes /docs/source/user_guide/merging.rst formatting. Passes flake8-rst test.

- [x] closes #xxxx
- [x] tests added / passed
- [x] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry

ref https://github.com/pandas-dev/pandas/issues/36777

Labels:
name: Docs

Comments:
Thanks @BrendanWilby
DOC: add example & prose of slicing with labels when index has duplicate labels 
State: closed

- [x] closes #36251

Labels:
name: Docs
name: Indexing
description: Related to indexing on series/frames, not to indexes themselves

Comments:
Can someone please review this?
would love to get a hacktoberfest tag if possible. #36837


Thanks! @dsaxton
Thanks @junjunjunk. Sorry for letting this sit for so long.