BrandonFors/pandas-github-issues huggingface dataset:
DOC: Fixed PR08 docstring errors in pandas.tseries
State: closed

This relates to: [27977](https://github.com/pandas-dev/pandas/issues/27977). I have fixed the doc PR08 formatting issues for:

```
pandas.tseries.offsets.CustomBusinessDay: Parameter "weekmask" description should start with a capital letter
pandas.tseries.offsets.CustomBusinessDay: Parameter "holidays" description should start with a capital letter
pandas.tseries.offsets.WeekOfMonth: Parameter "week" description should start with a capital letter
pandas.tseries.offsets.WeekOfMonth: Parameter "weekday" description should start with a capital letter
pandas.tseries.offsets.LastWeekOfMonth: Parameter "weekday" description should start with a capital letter
pandas.tseries.offsets.FY5253: Parameter "weekday" description should start with a capital letter
pandas.tseries.offsets.FY5253: Parameter "variation" description should start with a capital letter
pandas.tseries.offsets.FY5253Quarter: Parameter "weekday" description should start with a capital letter
pandas.tseries.offsets.FY5253Quarter: Parameter "qtr_with_extra_week" description should start with a capital letter
pandas.tseries.offsets.FY5253Quarter: Parameter "variation" description should start with a capital letter
pandas.tseries.offsets.CDay: Parameter "weekmask" description should start with a capital letter
pandas.tseries.offsets.CDay: Parameter "holidays" description should start with a capital letter
```

- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`

Will continue to work through all PR08 docstring errors.

Labels:
name: Docs

Comments:
Hello @jackbicknell14! 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 2019-09-27 08:45:33 UTC
Thanks @jackbicknell14 !
Bugfix/groupby datetime issue
State: closed

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


Labels:
name: Bug
name: Groupby

Comments:
Hello @sidharthann! 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 2019-10-03 05:49:18 UTC
thanks @sidharthann
DOC: update fixing unknown parameters errors (error code PR02)
State: closed

- Documentation update fixing some of the methods with a PR-2 error code which involved updating **kwds to **kwargs

- No tests required

- The data frame.plot methods now have the docstring arguments updated from **kwds to **kwargs to match the method signature and exclude them from the PR02 errors:



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

Comments:
Thanks for approving this Marc 😊. I will do this once am reunited with my laptop tomorrow evening.

Also thanks for all your advise at the Iwoca meet up last week.
Any reason why we don't change all instances of `kwds` to `kwargs` in this PR?
I'm not sure what's wrong with the CI. You'll have to debug `scripts/validate_docstring.py`. We don't want `**kwargs` to have a type in the docstring, if the script is failing because of it, it's a bug that needs to be fixed. Feels a bit weird that seems to be failing just for some of the cases.
@datapythonista can you please providing me with some guidance as I am unsure why the CI build is failing?
I have fixed the reason it was failing yesterday, it was because I had "`" before `kwargs`
@tolaa001 Thanks a lot for the contribution!
TST: un-xfail incorrectly xfailed tests for maybe_promote
State: closed

This sits on top of #28561.

Labels:
name: Testing
description: pandas testing functions or related to the test suite
name: Dtype Conversions
description: Unexpected or buggy dtype conversions

Comments:
@jreback gentle ping.  This a blocker for a collection of PRs to fix about a third of our existing xfails.
thanks @jbrockmendel
DEPR: Deprecate numpy argument in read_json
State: closed

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


Labels:
name: IO JSON
description: read_json, to_json, json_normalize
name: Deprecate
description: Functionality to remove in pandas
name: ExtensionArray
description: Extending pandas with custom dtypes or arrays.

Comments:
I think you have to catch the warnings now to prevent test failures. You can use #27103 as a reference for how this is done
Do you mean using the `@pytest.mark.filterwarnings("ignore:.*msgpack:FutureWarning")`wrapper around the test function and this snippet?
 
```python
with catch_warnings():
    filterwarnings('ignore', category=FutureWarning)
```
The context manager would be cleaner if you want to go that route
I don't understand why the tests fail here, can you point me in the right direction please?
> I don't understand why the tests fail here

In general, the test results show you every test that fails, so you can go to each one and see why each is failing.  Of course, this is not practical when there are hundreds of failures.

The reason is that there are a lot more tests that pass in `numpy=True` to `read_json` than you have accounted for with this context manager.

@WillAyd : Any thoughts on how we could apply this context manager to all of the failing tests?  Copy-pasting that setup across all of them seems a bit tedious (might need some abstracted wrapper to handle that for the time being) 🤷‍♂ 
I think if there's a way to limit the filter to the numpy argument at global scope would also work
@lucaionescu can you run `isort -rc pandas`?  i think that will fix the failing CI check
@lucaionescu  can you rebase?  theres a decent chance that the CI failures are unrelated things that have been fixed in the last few days
@lucaionescu can you rebase?
Sorry for that! I'm going to fix it ASAP 😄
@lucaionescu looks like there are no committed changes here - can you take a look?
@lucaionescu can you take a look here? Would be nice to deprecate this before 1.0
@lucaionescu can you rebase
@lucaionescu let us know if you still want to work on this. If not I can potentially take a look.

Thanks.
@alimcmaster1 yes, that would be nice. I don't know what the best way to proceed would be with the failing tests.
superseded by #30636
TST: restore type checks to maybe_promote tests
State: closed

xref #25425.  Working on fixing the xfailed tests in this file.  This is going to be a marathon.

Labels:
name: Testing
description: pandas testing functions or related to the test suite
name: Dtype Conversions
description: Unexpected or buggy dtype conversions

Comments:
Very cool - I didn't expect that the typecheck could be re-introduced so easily. Thanks for tackling this!

OTOH, most of worst tests of #23982 were turned into dummies for #25637. [As I](https://github.com/pandas-dev/pandas/pull/25637#issuecomment-504488421) [offered](https://github.com/pandas-dev/pandas/pull/25425#pullrequestreview-255888873), I can rebase #23982, so we have the same baseline of tests available (somewhere *outside* #25424).
Closing in favor of #28564.
WEB/CI: Fixing target path of the web build
State: closed

http://dev,pandas.io is currently not serving the website (http://dev,pandas.io/docs)

In the deployment of the new website, when building the web, the target default path `build` is not working as expected. The path is later expected to be `web/build`, but since the script is called from the root and not from inside web, the target path is `build/`, and the website is not copied.

This PR fixes the target path to be the correct one, and should fix http://dev,pandas.io

@TomAugspurger if you don't mind having a quick look.

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

Comments:
Thanks Tom, all working now.
ENH: Add dta 119 reading to StataReader
State: closed

Add requirements for reading 119 format files

- [X] closes #28250
- [X] tests added / passed
- [X] passes `black pandas`
- [X] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry


Labels:
name: IO Stata
description: read_stata, to_stata

Comments:
Minor code changes needed to support reading Stata DTA format 119.  The hard part is testing since this format is only used when a file has more than 32K variables, and so the test file hits this size.  This test isn't that fast (~20s).
> Hmm OK. I assume the test length is just spent in reading that many rows?

Yes, 32,999 columns. Have marked it slow. 

thanks @bashtage
Pandas.io.formats.style.Styler docstring PR02
State: closed

Solves:

- Unknown parameters {kwargs} in apply method in Styler class
- Unknown parameters {kwargs} in applymap method in Styler class
- Unknown parameters {kwargs} in where method in Styler class
- Unknown parameters {low, high}  in background_gradient method in Styler class
- Unknown parameters {kwargs} in set_properties method in Styler class
- Unknown parameters {*args, **kwargs :} in pipe method in Styler class

for issues:

pandas.io.formats.style.Styler.apply: Unknown parameters {kwargs}
pandas.io.formats.style.Styler.applymap: Unknown parameters {kwargs}
pandas.io.formats.style.Styler.where: Unknown parameters {kwargs}
pandas.io.formats.style.Styler.set_properties: Unknown parameters {kwargs}
pandas.io.formats.style.Styler.pipe: Unknown parameters {*args, **kwargs :}
pandas.io.formats.style.Styler.background_gradient: Unknown parameters {low, high}

all in #27976



Labels:
name: Docs

Comments:
thanks @Genza999 this doesn't fully close #27976 right?
> thanks @Genza999 this doesn't fully close #27976 right?

No it doesnt @jreback , it just covers a few of the issues.
REF: Parametrize value_counts tests
State: closed

Parametrizes the for loop in `test_series_groupby_value_counts`.  As a side note, this test seems to run for a pretty long time (a minute and a half); should it operate on less data perhaps?

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

Comments:
Not sure about reducing the number of cases. Looking into the history of
the test may shed some light.

On Thu, Sep 19, 2019 at 3:03 PM Daniel Saxton <notifications@github.com>
wrote:

> Parametrizes the for loop in test_series_groupby_value_counts. As a side
> note, this test seems to run for a pretty long time (a minute and a half);
> should it operate on less data perhaps?
> ------------------------------
> You can view, comment on, or merge this pull request online at:
>
>   https://github.com/pandas-dev/pandas/pull/28537
> Commit Summary
>
>    - REF: Parametrize value_counts tests
>
> File Changes
>
>    - *M* pandas/tests/groupby/test_value_counts.py
>    <https://github.com/pandas-dev/pandas/pull/28537/files#diff-0> (35)
>
> Patch Links:
>
>    - https://github.com/pandas-dev/pandas/pull/28537.patch
>    - https://github.com/pandas-dev/pandas/pull/28537.diff
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/pandas-dev/pandas/pull/28537?email_source=notifications&email_token=AAKAOIRYYZGEICZGM5XL6KTQKPLJDA5CNFSM4IYPPMYKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HMQLQSQ>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AAKAOIVFWNSFHKWE5653L4TQKPLJDANCNFSM4IYPPMYA>
> .
>

Yea a minute and a half for one test is too much. Is there a way to get it down to a few seconds and still get the same measurement?
this is a comprehensive test and is marked as slow, so perf is ok, other than @WillAyd comment lgtm.
Thanks @dsaxton
Pandas.io.formats.style.Styler.pipe docstring PR02
State: closed

Solves:

- Unknown parameters {*args, **kwargs :}

pandas.io.formats.style.Styler.pipe: Unknown parameters {*args, **kwargs :} in #27976


Labels:
name: Docs

Comments:
lgtm except merge conflict - can you fix up?
> lgtm except merge conflict - can you fix up?

Hey @WillAyd , I happened to implement the changes in this pull request in another pull request that I implemented a number of changes and it got merged before this one. For this reason I was wondering if its okay to close this PR instead.
Sure no problem
TST: Add astype_nansafe datetime tests
State: closed

Adds tests for `astype_nansafe` in situations where we can't perform a datetime casting because of a precision mismatch:

```
arr                                                                             
# array(['2018-01-01'], dtype='datetime64[D]')

arr.view(np.int32)                                                              
# array([17532,     0], dtype=int32)

arr.view(np.float32)                                                            
# array([2.4568e-41, 0.0000e+00], dtype=float32)
```

Related to https://github.com/pandas-dev/pandas/pull/28492

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

Comments:
how is this PR distinct from #28492
> how is this PR distinct from #28492

I was thinking it was worth treating separately since that PR deals with `NaT` specifically whereas this was testing other paths (non-missing values that nonetheless can't be cast) without any logic changes
i would just close this and merge #28492
CLN+TST: Catch specific exception in equals
State: closed


Labels:
name: Clean

Comments:
> Do you know generally how many more except Exceptions are left to tackle?

106 on master.  A handful of those are correct as is, not sure how many (maybe we could alias `AnyException = Exception` and so that grepping for "except Exception" doesn't turn those up?  just brainstorming)

Also a handful of `BaseException` in `test_nanops` that we _really_ shouldn't be catching.  Looks like we got rid of all the `except:`.
Is this a case where we want to be broad in what we catch? Having equality checks never raise is convenient.
> Is this a case where we want to be broad in what we catch?

That's not unreasonable.  I lean towards being specific because it surfaces other bugs (like passing MultiIndex raising the wrong exception).
I generally dislike `except Exception` - maybe we find some other case we haven't discovered but would also prefer to be explicit with that when it surfaces
k cool
BUG: wrong exception raised by Week+Day
State: closed

With that fixed, we can clean up an Exception in tseries.frequencies.

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

Comments:
Makes sense to me. Can you add a whatsnew for 1.0.0?
> Verified that this will continue to work with thing like pendulum.DateTime, which is a subclass of datetime.datetime.

Is this something we need to test more generally?
Probably not. Just had reports from them in the past.
DEV: skip pandas/__init__.py in isort's pre-commit hook
State: closed

I noticed that when you modified `pandas/__init__.py`, isort actually completely reordered it when using pre-commit hook. Apparantly, isort ignores the skip config when you explicitly pass a path to isort (pre-commit basically does `isort pandas/__init__.py` when that file changed).

See https://github.com/pre-commit/mirrors-isort/issues/9, which suggested to add this exclude to the pre-commit config (although that duplicates the "skip" information from setup.cfg)

Labels:

Comments:
Thanks for tracking this down. I wondered why the config was being ignored.
TST: suppress 1485 warnings issued by xml parser
State: closed

So we don't have to scroll through tons of 

```
pandas/tests/io/excel/test_xlrd.py::test_excel_table_sheet_by_index[.xlsm]
  /usr/local/lib/python3.7/site-packages/xlrd/xlsx.py:312: PendingDeprecationWarning: This method will be removed in future versions.  Use 'tree.iter()' or 'list(tree.iter())' instead.
    for elem in self.tree.iter() if Element_has_iter else self.tree.getiterator():
```

Labels:

Comments:
related to #27016
Thanks!
Do we know when that will be enforced? 3.9? So xlrd will be totally broken by then?
I'm not sure. It's the `getiterator` function in `xml.etree.ElementTree` which was deprecated back in `3.2`. It's at least still available in 3.8

Also I can't guarantee it will break xlrd when removed as xlrd relies on a few different underlying parsers and may fall back in case of failure. In any case it's not something that will be changed since that package isn't maintained any more
CLN: dont catch Exception when calling maybe_convert_numeric
State: closed

and parametrized one of the tests for maybe_convert_numeric

Labels:
name: Clean

Comments:
Hello @jbrockmendel! 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 2019-09-19 00:31:58 UTC
thanks @jbrockmendel
Re-implemented parametrization of test_frame_from_json_to_json
State: closed

This piece was broken off of #27838 as it made the diff much larger, so hopefully easier to digest on its own.

As is, parametrization here has brought up a lot of rough edges which are responsible for some of the complexity. These are noted with TODOs and summarized as follows (save Py35 issues, which aren't worth addressing at this point):

  - Frame order is not maintained when `numpy=False` (default) and `orient="index"`
  - On windows or 32 bit platforms it appears that `np.int64` roundtrips as `np.int32` (maybe not an issue?)
  - `orient="split"` does not preserve strings in the index if those strings are numeric, though it should be able to
  - `convert_axes` may have surprising behavior when dealing with empty DataFrames
  - DTI seem to roundtrip as strings when written with epoch format for all but `orient="split"
 
Not all of these are the same priority, but figure worth leaving as follow ups

Labels:
name: Testing
description: pandas testing functions or related to the test suite
name: IO JSON
description: read_json, to_json, json_normalize

Comments:
I'll take a look.  Thanks for separating this out.
Thanks @WillAyd
BUG/CLN: DatetimeTZDtype.construct_from_string Exception
State: closed

The bug part of this is that "dateutil/something_invalid" fails to raise on master because dateutil.tz.gettz("something_invalid") returns None instead of raising.

Labels:
name: Error Reporting
description: Incorrect or improved errors from pandas
name: Timezones
description: Timezone data dtype

Comments:
thanks @jbrockmendel
Fix traceback.format_exc(e) call
State: closed

As of https://docs.python.org/2/library/traceback.html#traceback.format_exc , format_exc() accepts an integer for traceback depth limit, not the traceback itself.

- [ ] closes #xxxx
- [ ] 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:
Interesting find. Do we even need the `try...except` now?
The docs say that format_exc signature is `traceback.format_exc(limit=None, chain=True)`.  In fact, passing `e` raises on py3 and is OK in py2
Yea change makes sense. I think can just remove the entire try...except surrounding it - @Pehat is that something you can do?
@WillAyd done, checks seem to be OK.
Cleaned up JSON test with ambiguous DTA usage
State: closed

Follow up to #27838 enabled by #28444

I created a new test specific to the handling of DTA with `dtype=X` to provide a more logical separation of concerns

Labels:
name: Testing
description: pandas testing functions or related to the test suite
name: IO JSON
description: read_json, to_json, json_normalize

Comments:
LGTM
Thanks @jbrockmendel
DOC: Adding examples to Series.eq
State: closed

Firstimer, let me know of any changes need to be done

- [ ] closes #xxxx
- [ ] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry


Labels:
name: Docs

Comments:
Hello @RanDan363! 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 2019-10-21 15:16:30 UTC
Looks like you need to run black on the changed file. Also can you post a screenshot of the new docs to be sure this is working? Should be able to generate via `python make.py --single pandas.Series.eq` from the docs folder
sorry, not sure exactly what you want me to do..
Could you briefly elaborate please?
To solve the CI problem run `black pandas/core/ops/docstrings.py` and push back up

To check the doc can you run `python make.py --single pandas.Series.eq` from the docs folder and share a screenshot of generated output that appears in docs/build/html/reference/api/pandas.core.series.Series.eq.html
is that what you meant?


"To solve the CI problem run `black pandas/core/ops/docstrings.py` and push back up

To check the doc can you run `python make.py --single pandas.Series.eq` from the docs folder and share a screenshot of generated output that appears in docs/build/html/reference/api/pandas.core.series.Series.eq.html"

[
![Screenshot from 2019-09-25 10-07-58](https://user-images.githubusercontent.com/38443741/65577867-59ae1e00-df7d-11e9-8ab7-823ffee96b43.png)
](url)
@RanDan363 can you add the `>>>` here
@RanDan363 is this still active? If so can you address comments?
TST: added a test case for special character in file name
State: closed

Added special character use case in the existing function "test_filename_with_special_chars"

- [x] closes #26074 
- [x] 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

Comments:
GH26074 Added special character use case in the existing function "test_filename_with_special_chars"
Great thanks @naveenkaushik2504 !
WEB: Deployment of development website with the docs
State: closed

After this is merged, https://dev.pandas.io will have the new website, and the dev docs will be in https://dev.pandas.io/docs


Labels:
name: Web
description: pandas website

Comments:
@pandas-dev/pandas-core merging this in couple of hours. Note that once it's merged, the dev docs will be in https://dev.pandas.io/docs and not in https://dev.pandas.io directly.
DOC: add example of pyarrow usage favored over the deprecated to_msgpack
State: closed

- [ ] closes #xxxx
    - no issue opened
- [ ] tests added / passed
    - no, only docs modified
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry


Labels:
name: Docs

Comments:
Awesome, but I don't understand what you meant by "small comment". I don't see any reviews in the PR
lgtm ping on green.
ping (is green)
TST: parametrize test_expressions
State: closed

and an unrelated excel test cleanup that slipped in somehow

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

Comments:
thanks @jbrockmendel definite improvement on the existing, I am sure you will be pushing more cleanups for this :->
Yep, plenty more of these in the pipeline.  Also want to nudge you on #28431 (blocker) and #28049 (got your OK a few days ago, just rebased)