BrandonFors/pandas-github-issues huggingface dataset:
BUG: fix numpy deprecation warning for scalar datetime64 values
State: closed

This should fix the DeprecationWarning described in #22741 . Not sure if it's worth adding a test. What's the policy on things like these?

- [x] closes #22741
- [ ] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry

Labels:
name: Numeric Operations
description: Arithmetic, Comparison, and Logical operations
name: Deprecate
description: Functionality to remove in pandas

Comments:
Hello @fjetter! Thanks for submitting the PR.

 - There are no PEP8 issues in the file [`pandas/core/dtypes/cast.py`](https://github.com/fjetter/pandas/blob/dece94e2c852d6119a6c5731934dfa9cb38af339/pandas/core/dtypes/cast.py) !


i think this is covered by #22699 already
cc @TomAugspurger 
#22699 is silencing it for now. https://github.com/pandas-dev/pandas/pull/22699/files#diff-3bbe4551f20de6060dce38a95d0adc80R961 is the relevant line.
As far as testing goes, I don't think we need a new test, as this would have failed if #22699 were in already.

I don't think this needs to go in 0.23.5.
closing as stale. if you'd like to continue, pls ping.
Fixturize tests/frame/test_api and tests/sparse/frame/test_frame
State: closed

- [x] split off from #22730 
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`

`tests/frame/test_api` was easy enough to fixturize, but I ran into problems because some tests (notably those in `SharedWithSparse`) are also used in `tests/sparse/frame/test_frame`, and there, the corresponding fixtures were not available. Therefore, this PR fixturizes both modules simultaneously, which also necessitates a new `conftest.py` for the sparse tests.

Some more notes:
* happy to hear feedback on the sparse fixture names. I haven't worked with `SparseDataFrame` so far, and couldn't find much documentation for (e.g. `default_kind`), so the names I chose are best effort
* I would have loved to replace `_check_all` with parametrization, but since fixtures can't be parametrized (see pytest-dev/pytest#349), I had to replace it with direct calls.


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

Comments:
Hello @h-vetinari! Thanks for submitting the PR.

 - There are no PEP8 issues in the file [`pandas/tests/frame/test_api.py`](https://github.com/h-vetinari/pandas/blob/3c3583670880ff25476f50db8299dea966130ec0/pandas/tests/frame/test_api.py) !

 - There are no PEP8 issues in the file [`pandas/tests/sparse/frame/conftest.py`](https://github.com/h-vetinari/pandas/blob/3c3583670880ff25476f50db8299dea966130ec0/pandas/tests/sparse/frame/conftest.py) !

 - There are no PEP8 issues in the file [`pandas/tests/sparse/frame/test_frame.py`](https://github.com/h-vetinari/pandas/blob/3c3583670880ff25476f50db8299dea966130ec0/pandas/tests/sparse/frame/test_frame.py) !


lgtm @TomAugspurger is this going to completely mess up SparseEA refactor?
At a glance, it doesn't look like the merge will be *too* bad. I'd recommend merging this first.
thanks
CLN: Removes module pandas.json
State: closed

- [x] closes #19944
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry

I'm just not sure about which file should I add my changes in whatsnew, can anyone help me with that?

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

Comments:
Hello @vitoriahmc! Thanks for submitting the PR.

 - There are no PEP8 issues in the file [`pandas/__init__.py`](https://github.com/vitoriahmc/pandas/blob/58a2f585631aa9afdd2cfa990c30577f4e48ea66/pandas/__init__.py) !

 - There are no PEP8 issues in the file [`pandas/tests/api/test_api.py`](https://github.com/vitoriahmc/pandas/blob/58a2f585631aa9afdd2cfa990c30577f4e48ea66/pandas/tests/api/test_api.py) !


Thanks. We'll also want a release note in doc/source/whatsnew/v0.24.0.txt under the "removal of prior version" section. Looks good otherwise.
> Thanks. We'll also want a release note in doc/source/whatsnew/v0.24.0.txt under the "removal of prior version" section. Looks good otherwise.

I've just updated it!
thanks @vitoriahmc 

lib.py, parser.py, tslib.py are fair game as well
removing superfluous reference to axis in Series.reorder_levels docst…
State: closed

Hi,
I removed the superfluous reference to axis in Series.reorder_levels docstring.

- [ ] xref #22627
- [x] tests added / passed (doesn't apply)
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry (doesn't apply, only removed a line in the docstring)


Labels:
name: Docs

Comments:
Hello @SandrineP! Thanks for submitting the PR.

 - There are no PEP8 issues in the file [`pandas/core/series.py`](https://github.com/SandrineP/pandas/blob/f1bb2d82da19c2f4c371988a2643859e4104e272/pandas/core/series.py) !


This is good for now. I've changed the PR message to not close #22627, in case someone wants to do the refactor.
Thanks @SandrineP
DOC: Fix Series nsmallest and nlargest docstring/doctests
State: closed

- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`

Based on #22459. Fix the docstring for Series.nsmallest and Series.nlargest. I did both together since the same example could be used. I removed both from the skipped doctests in `ci/doctests.sh`.

I also found out about the "all" option for the `keep` parameter which was surprisingly not documented. 

Labels:
name: Docs

Comments:
Hello @Moisan! Thanks for updating the PR.

 - There are no PEP8 issues in the file [`pandas/core/series.py`](https://github.com/Moisan/pandas/blob/5d6d5ed08a6ec75169ecd5df8dba360a6fe41264/pandas/core/series.py) !



##### Comment last updated on September 18, 2018 at 01:46 Hours UTC
Passed on travis. Merging.
CLN/DOC: Refactor timeseries.rst intro and overview
State: closed

Refactoring `timeseries.rst` introduction and overview to give a better introduction into pandas timeseries functionality:

- Introduce a wider range of examples
- Overview all scalar and array classes, related data types, and range methods, and `NaT` in the beginning

 


Labels:
name: Docs

Comments:
<img width="777" alt="screen shot 2018-09-15 at 10 56 12 pm" src="https://user-images.githubusercontent.com/10647082/45593464-12d62300-b93c-11e8-9d13-71d3cb374ac3.png">
<img width="773" alt="screen shot 2018-09-15 at 10 56 23 pm" src="https://user-images.githubusercontent.com/10647082/45593467-18cc0400-b93c-11e8-87e6-6bd2f7dead96.png">
<img width="774" alt="screen shot 2018-09-15 at 10 56 32 pm" src="https://user-images.githubusercontent.com/10647082/45593468-1cf82180-b93c-11e8-8428-eecebade3769.png">
<img width="776" alt="screen shot 2018-09-15 at 10 56 40 pm" src="https://user-images.githubusercontent.com/10647082/45593470-208ba880-b93c-11e8-91a5-1aa4b59fdfd7.png">

Good suggestions @datapythonista. Incorporated all your comments. 
Thanks @datapythonista @WillAyd.
TST/CLN: remove duplicate data file used in tests (unicode_series.csv)
State: closed

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


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

Comments:
Hello @simonjayhawkins! Thanks for submitting the PR.

 - There are no PEP8 issues in the file [`pandas/tests/io/conftest.py`](https://github.com/simonjayhawkins/pandas/blob/edc6e9333425b2baaf566c9407acde37ecaa52ec/pandas/tests/io/conftest.py) !

 - There are no PEP8 issues in the file [`pandas/tests/io/formats/test_format.py`](https://github.com/simonjayhawkins/pandas/blob/edc6e9333425b2baaf566c9407acde37ecaa52ec/pandas/tests/io/formats/test_format.py) !

 - There are no PEP8 issues in the file [`pandas/tests/io/parser/common.py`](https://github.com/simonjayhawkins/pandas/blob/edc6e9333425b2baaf566c9407acde37ecaa52ec/pandas/tests/io/parser/common.py) !

 - There are no PEP8 issues in the file [`pandas/tests/io/parser/dtypes.py`](https://github.com/simonjayhawkins/pandas/blob/edc6e9333425b2baaf566c9407acde37ecaa52ec/pandas/tests/io/parser/dtypes.py) !


Can you open an issue for this? Not entirely clear of the context
@WillAyd 
> Can you open an issue for this? Not entirely clear of the context

there is no issue. context: just came across duplicate data file and thought it could be de-duplicated!

Some context: previously, we had a function `get_data_path` that did some black magic to get the directory of the currently running test, so we had to duplicate files for each tree that needed the file :) 

@simonjayhawkins did you notice any other duplicates?
thanks @simonjayhawkins
TST: Mock clipboard IO
State: closed

No idea if this will work on not.

Labels:
name: CI
description: Continuous Integration
name: Unreliable Test
description: Unit tests that occasionally fail

Comments:
This failed.

Unless anyone objects, I'm going to just mock the actual clipboard layer part of things.
yeah the clipboard tests are annoying 
Hello @TomAugspurger! Thanks for updating the PR.

 - There are no PEP8 issues in the file [`pandas/tests/io/test_clipboard.py`](https://github.com/TomAugspurger/pandas/blob/f1ed15bbb9cc7c92c5ebd2ac2ad6d5eaf4148f2f/pandas/tests/io/test_clipboard.py) !



##### Comment last updated on September 16, 2018 at 11:57 Hours UTC
OK, I think we're still testing things, but would appreciate a close look at the mocks.

Basic idea is to replace `get_clipboard` / `set_clipboard` with a simple dict mapping test_id -> data.

Unfortunately, we had some tests in `test_clipboard` that directly used `clipboard_get` and `clipboard_set`, so I had to directly manipulate the dict for those tests...
Moved the mock clipboard to be function-scope, rather than global.
@jreback any objections to merging? I wouldn't usually move this quickly but

a.) these tests have been failing forever
b.) It's kinda blocking https://github.com/pandas-dev/pandas/pull/22699
sure
BUG: Fix dtype inconsistency when appending to empty DataFrame
State: closed

- [ ] closes #22621
- [ ] tests added / passed
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

*edit*: currently rewriting the DataFrame.append function

Labels:
name: Reshaping
description: Concat, Merge/Join, Stack/Unstack, Explode
name: Dtype Conversions
description: Unexpected or buggy dtype conversions

Comments:
Hello @araraonline! Thanks for submitting the PR.

 - There are no PEP8 issues in the file [`pandas/core/frame.py`](https://github.com/araraonline/pandas/blob/9c87db1e82a559692c991c402cccc8e10cf33894/pandas/core/frame.py) !

 - There are no PEP8 issues in the file [`pandas/tests/frame/test_combine_concat.py`](https://github.com/araraonline/pandas/blob/9c87db1e82a559692c991c402cccc8e10cf33894/pandas/tests/frame/test_combine_concat.py) !


This is not passing some tests that I did't notice before.

Gotta see what's wrong
Got a question.

The problem ended up having a scope slightly bigger than what was mentioned in the Issue #22621

Now I'm working on a branch that fixes the dtype inconsistency when appending an array to a dframe, whether this dframe is empty or not.

Should I create a new PR?
@araraonline no you can just update this one
I'm currently working on rewriting the DataFrame.append function. When it is ready, the issue related here will be resolved
Remove --strict-data-files on pytest by default
State: closed

- closes #22683 
Explanation:
pytest gets the configuration from setup.cfg, witch forces the option "--strict-data-files" by default. This makes the test to fail on missing files that are not packaged (on pypi and in the github tarball).
Removing this line fixes the issue and the tests are skipped.

Cheers.
Elias.

Labels:

Comments:
Closing as a duplicate of https://github.com/pandas-dev/pandas/pull/22700
Remove --strict-data-files on pytest by default
State: closed

- closes #22683 
Explanation:
pytest gets the configuration from setup.cfg, witch forces the option "--strict-data-files" by default. This makes the test to fail on missing files that are not packaged (on pypi and in the github tarball).
Removing this line fixes the issue and the tests are skipped.

Adding missing newline also...

Cheers.
Elias.

Labels:

Comments:
We want strict to be the default.

Should we instead remove setup.cfg from the distributions?
> We want strict to be the default.
> 
> Should we instead remove setup.cfg from the distributions?

Assuming that the file is not being used by something else... LGTM.
Let me test without the file just in case.
BUG: Incorrect addition of Week(weekday=6) to DatetimeIndex
State: closed

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


Labels:
name: Bug
name: Datetime
description: Datetime data dtype
name: Timedelta
description: Timedelta data type

Comments:
Hello @reidy-p! Thanks for submitting the PR.

 - There are no PEP8 issues in the file [`pandas/tests/arithmetic/test_datetime64.py`](https://github.com/reidy-p/pandas/blob/bca0d9190cc776c4a0d3712910947e44f26331dd/pandas/tests/arithmetic/test_datetime64.py) !

 - There are no PEP8 issues in the file [`pandas/tseries/offsets.py`](https://github.com/reidy-p/pandas/blob/bca0d9190cc776c4a0d3712910947e44f26331dd/pandas/tseries/offsets.py) !


Great. Since CI is almost done passing, we can just remove it when merging. Thanks for following up on this!
Thanks!
TST: Test for bug fixed during #22534 discussion
State: closed

In the course of profiling #22534 a bug was found, but that PR was made redundant and the bug fixed in master.  This just adds a test for that bug.

Labels:
name: Testing
description: pandas testing functions or related to the test suite
name: Numeric Operations
description: Arithmetic, Comparison, and Logical operations

Comments:
Hello @jbrockmendel! Thanks for submitting the PR.

 - There are no PEP8 issues in the file [`pandas/tests/frame/test_arithmetic.py`](https://github.com/jbrockmendel/pandas/blob/f31407c7ad778d64e8b09a373b63513d6f45c7cf/pandas/tests/frame/test_arithmetic.py) !
DEPR: Removed styler shim
State: closed


Labels:

Comments:
Hello @TomAugspurger! Thanks for submitting the PR.

 - There are no PEP8 issues in the file [`pandas/tests/io/formats/test_style.py`](https://github.com/TomAugspurger/pandas/blob/9d496a789c62e9a1fe2f15356864843d9faf081d/pandas/tests/io/formats/test_style.py) !
DOC: Add section on MultiIndex.to_frame() ordering
State: closed

- Closes #22662 

Labels:
name: Docs
name: MultiIndex

Comments:
Hello @matthewgilbert! Thanks for submitting the PR.

 - There are no PEP8 issues in the file [`pandas/core/indexes/multi.py`](https://github.com/matthewgilbert/pandas/blob/5909f9a2313d33e4ee3c801733cc02adfb0a7a6a/pandas/core/indexes/multi.py) !


Thanks!
DOC: Fix DataFrame.to_xarray doctests and allow the CI to run it.
State: closed

- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`

Fix the docstring for DataFrame.to_xarray as described in #22459 . I removed the pandas.panel example since it was deprecated and I replaced it with a MultiIndex.

Labels:
name: Docs
name: IO Data
description: IO issues that don't fit into a more specific label
name: DataFrame
description: DataFrame data structure

Comments:
Hello @Moisan! Thanks for updating the PR.

 - There are no PEP8 issues in the file [`pandas/core/generic.py`](https://github.com/Moisan/pandas/blob/08561d2b0890e8d4e33de779e88412599a695457/pandas/core/generic.py) !



##### Comment last updated on September 14, 2018 at 20:39 Hours UTC
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/22673?src=pr&el=h1) Report
> Merging [#22673](https://codecov.io/gh/pandas-dev/pandas/pull/22673?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/73dd6ece3b66008eb8077098c101d0e300b1e714?src=pr&el=desc) will **not change** coverage.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/22673/graphs/tree.svg?width=650&token=eZ4WkYLtcO&height=150&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/22673?src=pr&el=tree)

```diff
@@           Coverage Diff           @@
##           master   #22673   +/-   ##
=======================================
  Coverage   92.17%   92.17%           
=======================================
  Files         169      169           
  Lines       50708    50708           
=======================================
  Hits        46740    46740           
  Misses       3968     3968
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.58% <ø> (ø)` | :arrow_up: |
| #single | `42.35% <ø> (ø)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/22673?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/generic.py](https://codecov.io/gh/pandas-dev/pandas/pull/22673/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZ2VuZXJpYy5weQ==) | `96.67% <ø> (ø)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/22673?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/22673?src=pr&el=footer). Last update [73dd6ec...a7ecbb2](https://codecov.io/gh/pandas-dev/pandas/pull/22673?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

Thanks!
DOC: add cross references to advanced.rst
State: closed

IMO the [MultiIndex / Advanced Indexing](http://pandas-docs.github.io/pandas-docs-travis/advanced.html)  section of the docs are a bit thin on cross references, so it's too difficult to make deeper looks into the API, when you are in doubt.

I've added cross references. They're added relatively sparingly, typically only the first time a concept/class type is mentioned in the document.

Labels:
name: Docs
name: MultiIndex

Comments:
merge on green 
Green
@topper-123 : Slow down, not quite 🙂 .  AppVeyor isn't quite done yet AFAICT.
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/22671?src=pr&el=h1) Report
> Merging [#22671](https://codecov.io/gh/pandas-dev/pandas/pull/22671?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/73dd6ece3b66008eb8077098c101d0e300b1e714?src=pr&el=desc) will **not change** coverage.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/22671/graphs/tree.svg?width=650&token=eZ4WkYLtcO&height=150&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/22671?src=pr&el=tree)

```diff
@@           Coverage Diff           @@
##           master   #22671   +/-   ##
=======================================
  Coverage   92.17%   92.17%           
=======================================
  Files         169      169           
  Lines       50708    50708           
=======================================
  Hits        46740    46740           
  Misses       3968     3968
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.58% <ø> (ø)` | :arrow_up: |
| #single | `42.35% <ø> (ø)` | :arrow_up: |


------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/22671?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/22671?src=pr&el=footer). Last update [73dd6ec...56f73b2](https://codecov.io/gh/pandas-dev/pandas/pull/22671?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

Ah! I was on mobile and saw the green check for ‘approved’, which is identical to the one for when tests pass...

Anyway, tests are green now 😉
@topper-123 : Indeed, they are.  Thanks!
DOC/CLN: small whatsnew fixes
State: closed

Small edits to fix some instances where the text isn't rendering as intended.

Labels:
name: Docs
name: Clean

Comments:
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/22659?src=pr&el=h1) Report
> Merging [#22659](https://codecov.io/gh/pandas-dev/pandas/pull/22659?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/0976e1261781153603064eb67d66630a099edcd7?src=pr&el=desc) will **not change** coverage.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/22659/graphs/tree.svg?width=650&token=eZ4WkYLtcO&height=150&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/22659?src=pr&el=tree)

```diff
@@           Coverage Diff           @@
##           master   #22659   +/-   ##
=======================================
  Coverage   92.17%   92.17%           
=======================================
  Files         169      169           
  Lines       50708    50708           
=======================================
  Hits        46740    46740           
  Misses       3968     3968
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.58% <ø> (ø)` | :arrow_up: |
| #single | `42.35% <ø> (ø)` | :arrow_up: |


------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/22659?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/22659?src=pr&el=footer). Last update [0976e12...08eba3a](https://codecov.io/gh/pandas-dev/pandas/pull/22659?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).