BrandonFors/pandas-github-issues huggingface dataset:
BUG: fix Series constructor for scalar and Categorical dtype
State: closed

Categories and ordering of the resulting Series were not the same as those of the passed Categorical dtype. Closes #19565

- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry


Labels:
name: Reshaping
description: Concat, Merge/Join, Stack/Unstack, Explode
name: Categorical
description: Categorical Data Type

Comments:
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/19717?src=pr&el=h1) Report
> Merging [#19717](https://codecov.io/gh/pandas-dev/pandas/pull/19717?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/83820679f16e6803b653ede5a4e468a211fcb443?src=pr&el=desc) will **decrease** coverage by `<.01%`.
> The diff coverage is `100%`.

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

```diff
@@            Coverage Diff             @@
##           master   #19717      +/-   ##
==========================================
- Coverage   91.61%    91.6%   -0.01%     
==========================================
  Files         150      150              
  Lines       48882    48882              
==========================================
- Hits        44782    44780       -2     
- Misses       4100     4102       +2
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `89.98% <100%> (-0.01%)` | :arrow_down: |
| #single | `41.79% <0%> (ø)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/19717?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/dtypes/cast.py](https://codecov.io/gh/pandas-dev/pandas/pull/19717/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZHR5cGVzL2Nhc3QucHk=) | `87.98% <100%> (ø)` | :arrow_up: |
| [pandas/util/testing.py](https://codecov.io/gh/pandas-dev/pandas/pull/19717/diff?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvdGVzdGluZy5weQ==) | `83.64% <0%> (-0.21%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/19717?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/19717?src=pr&el=footer). Last update [8382067...47f7d40](https://codecov.io/gh/pandas-dev/pandas/pull/19717?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

Could you also add a test that hits the `Series` constructor directly?

```python
result = Series('a', index=[0, 1],
                dtype=pd.api.types.CategoricalDtype(['a', 'b'], ordered=True)
```

That way if the implementation changes in the future, we at least have that covered.
thanks!
BUG: Fix Series constructor for Categorical with index
State: closed

Fixes Series constructor so that ValueError is raised when a Categorical and index of incorrect length are given. Closes issue #19342

- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry


Labels:
name: Bug
name: Categorical
description: Categorical Data Type

Comments:
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/19714?src=pr&el=h1) Report
> Merging [#19714](https://codecov.io/gh/pandas-dev/pandas/pull/19714?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/1e4c50a56f7e953ab84308f000dff6fc1ac71171?src=pr&el=desc) will **increase** coverage by `<.01%`.
> The diff coverage is `100%`.

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

```diff
@@            Coverage Diff             @@
##           master   #19714      +/-   ##
==========================================
+ Coverage   91.66%   91.66%   +<.01%     
==========================================
  Files         150      150              
  Lines       48969    48975       +6     
==========================================
+ Hits        44886    44892       +6     
  Misses       4083     4083
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.04% <100%> (ø)` | :arrow_up: |
| #single | `41.85% <50%> (ø)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/19714?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/series.py](https://codecov.io/gh/pandas-dev/pandas/pull/19714/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvc2VyaWVzLnB5) | `94.44% <100%> (+0.03%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/19714?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/19714?src=pr&el=footer). Last update [1e4c50a...f5db9ab](https://codecov.io/gh/pandas-dev/pandas/pull/19714?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

Hello @cbertinato! Thanks for updating the PR.







Cheers ! There are no PEP8 issues in this Pull Request. :beers: 

##### Comment last updated on February 26, 2018 at 14:53 Hours UTC
i rebased. ping on green.
I agree. It shouldn’t broadcast a list like that. We can remove the check and see if there’s anywhere else where this breaks. If not, then fix the test in test_style?
I wasn’t sure whether anything else relied on this behavior. 
> I agree. It shouldn’t broadcast a list like that. We can remove the check and see if there’s anywhere else where this breaks. If not, then fix the test in test_style?

yes, and add this as an additional test in test_constructor. 
thanks @cbertinato sometimes the seemingly small changes are hard!
Thanks for the help and advice!
Implement maybe_cache for compat between immutable/mutable classes
State: closed

Also fixes lookups/docstrings for class-level access to cache_readonly attributes.

- [x] closes #19700
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry

Related: https://github.com/pandas-dev/pandas2/issues/27

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

Comments:
this seems like quite a lot of extra code when you could simply override hasnans for Series
> this seems like quite a lot of extra code when you could simply override hasnans for Series

If it were just `hasnans` I would agree.  The motivation comes from WIP to move arith/comparison ops from DatetimeIndexOpsMixin/DTI/TDI/PI to array classes, where there are currently a bunch of cache_readonlys that need to be flipped.  This seemed like a reasonable scope to break off of what would otherwise be a giant diff (similar train of thought for #19672).
Since this is failing tests anyway, I'll remove the new pieces and just fix hasnans and the docstrings.
No idea what’s up with this test. Closing to narrow the queue
Move conda build and ASV check to cron job
State: closed

xref #19695 (not closing until pip build test is moved or we decide to keep that here)

https://travis-ci.org/pandas-dev/pandas-ci and http://github.com/pandas-dev/pandas-ci

Labels:
name: CI
description: Continuous Integration

Comments:
https://travis-ci.org/pandas-dev/pandas-ci is passing now and set to run daily.

Will merge this once travis passes.
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/19698?src=pr&el=h1) Report
> Merging [#19698](https://codecov.io/gh/pandas-dev/pandas/pull/19698?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/d198a6efd5a3d2e7d5afb4a3cf556507c7501dd4?src=pr&el=desc) will **increase** coverage by `0.02%`.
> The diff coverage is `n/a`.

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

```diff
@@            Coverage Diff             @@
##           master   #19698      +/-   ##
==========================================
+ Coverage   91.58%    91.6%   +0.02%     
==========================================
  Files         150      150              
  Lines       48867    48867              
==========================================
+ Hits        44755    44767      +12     
+ Misses       4112     4100      -12
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `89.98% <ø> (+0.02%)` | :arrow_up: |
| #single | `41.75% <ø> (ø)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/19698?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/plotting/\_converter.py](https://codecov.io/gh/pandas-dev/pandas/pull/19698/diff?src=pr&el=tree#diff-cGFuZGFzL3Bsb3R0aW5nL19jb252ZXJ0ZXIucHk=) | `66.95% <0%> (+1.73%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/19698?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/19698?src=pr&el=footer). Last update [d198a6e...b151fd8](https://codecov.io/gh/pandas-dev/pandas/pull/19698?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

FYI, I renamed `3.5_CONDA_BUILD` to `3.5` and removed the `3.6_ASV` job entirely.
OK, this is all green other than the pip failure from #19668 (looking further into that later today hopefully) https://travis-ci.org/pandas-dev/pandas/builds/341580276

Thoughts on adding `--skip-network` to the "2.7" build? It's the slowest by ~15 minutes. We'll want to make sure at least one of the 2.7 builds has the flag.

FYI, this weekend I'm planning on revamping some of this stuff into a more declarative YAML form. Then we can have a small script that parses those and prints out which builds have which flags / pinned deps.
collect index formatting tests
State: closed


It looks like PeriodIndex/TDI/DTI tests are using different rules for what constitutes test_indexing/test_setops.  Double-checking before making a PR:

test_get_loc_* --> test_indexing
test_get_indexer_* --> test_indexing
test_insert_* --> test_indexing
test_where_* --> test_indexing
test_join_* --> test_setops
test_append_* --> test_setops
test_difference_* --> test_setops

Many of these at the moment are in e.g. test_ops or test_period/test_datetime.

Labels:
name: Testing
description: pandas testing functions or related to the test suite
name: Indexing
description: Related to indexing on series/frames, not to indexes themselves

Comments:
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/19661?src=pr&el=h1) Report
> Merging [#19661](https://codecov.io/gh/pandas-dev/pandas/pull/19661?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/2fdf1e256e5e0b7f1fe909629e2f0b7893c8c7c3?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/19661/graphs/tree.svg?height=150&width=650&token=eZ4WkYLtcO&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/19661?src=pr&el=tree)

```diff
@@           Coverage Diff           @@
##           master   #19661   +/-   ##
=======================================
  Coverage   91.58%   91.58%           
=======================================
  Files         150      150           
  Lines       48867    48867           
=======================================
  Hits        44755    44755           
  Misses       4112     4112
```

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


------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/19661?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/19661?src=pr&el=footer). Last update [2fdf1e2...a5c00d1](https://codecov.io/gh/pandas-dev/pandas/pull/19661?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

thanks!
DOC: spellchecked io.rst
State: closed

Spellcheck of the docs, specifically of `io.rst`.
I did not read everything thoroughly, but I believe the suggested changes will help enforce a greater level of consistency in the docs.

* Backticks ` `` ` around Series, DataFrame.
* Added some function references, i.e. `` :meth:`~DataFrame.method` ``.
* Consistency of booleans, typsetting as ``False`` instead of False or *False*.
* Minor rephrasing of sentences, spelling, periods, colons etc.

Cheers!


Labels:
name: Docs

Comments:
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/19660?src=pr&el=h1) Report
> Merging [#19660](https://codecov.io/gh/pandas-dev/pandas/pull/19660?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/569bc7a35c06ef8eb9a121ca983ba8951399a124?src=pr&el=desc) will **increase** coverage by `<.01%`.
> The diff coverage is `n/a`.

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

```diff
@@            Coverage Diff             @@
##           master   #19660      +/-   ##
==========================================
+ Coverage   91.58%   91.59%   +<.01%     
==========================================
  Files         150      150              
  Lines       48806    48806              
==========================================
+ Hits        44701    44703       +2     
+ Misses       4105     4103       -2
```

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

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/19660?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/util/testing.py](https://codecov.io/gh/pandas-dev/pandas/pull/19660/diff?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvdGVzdGluZy5weQ==) | `83.85% <0%> (+0.2%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/19660?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/19660?src=pr&el=footer). Last update [569bc7a...9bd5a5b](https://codecov.io/gh/pandas-dev/pandas/pull/19660?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

thanks @tommyod 

I kind of like the formatting when reading with quoted DataFrame/Series.
tests for tslibs.conversion and tslibs.timezones
State: closed

This is the last one.

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

Comments:
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/19642?src=pr&el=h1) Report
> Merging [#19642](https://codecov.io/gh/pandas-dev/pandas/pull/19642?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/569bc7a35c06ef8eb9a121ca983ba8951399a124?src=pr&el=desc) will **increase** coverage by `<.01%`.
> The diff coverage is `n/a`.

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

```diff
@@            Coverage Diff             @@
##           master   #19642      +/-   ##
==========================================
+ Coverage   91.58%   91.59%   +<.01%     
==========================================
  Files         150      150              
  Lines       48806    48806              
==========================================
+ Hits        44701    44703       +2     
+ Misses       4105     4103       -2
```

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

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/19642?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/util/testing.py](https://codecov.io/gh/pandas-dev/pandas/pull/19642/diff?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvdGVzdGluZy5weQ==) | `83.85% <0%> (+0.2%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/19642?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/19642?src=pr&el=footer). Last update [569bc7a...6c30451](https://codecov.io/gh/pandas-dev/pandas/pull/19642?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

thanks
Organize PeriodIndex tests
State: closed

Crammed a lot of #19627 into this.  Also did some new parametrization.

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

Comments:
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/19641?src=pr&el=h1) Report
> Merging [#19641](https://codecov.io/gh/pandas-dev/pandas/pull/19641?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/13bd008edbbe0780600072d404fa989accb5e762?src=pr&el=desc) will **decrease** coverage by `0.02%`.
> The diff coverage is `n/a`.

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

```diff
@@            Coverage Diff             @@
##           master   #19641      +/-   ##
==========================================
- Coverage   91.61%   91.59%   -0.03%     
==========================================
  Files         150      150              
  Lines       48807    48807              
==========================================
- Hits        44716    44704      -12     
- Misses       4091     4103      +12
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `89.96% <ø> (-0.03%)` | :arrow_down: |
| #single | `41.73% <ø> (ø)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/19641?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/plotting/\_converter.py](https://codecov.io/gh/pandas-dev/pandas/pull/19641/diff?src=pr&el=tree#diff-cGFuZGFzL3Bsb3R0aW5nL19jb252ZXJ0ZXIucHk=) | `65.22% <0%> (-1.74%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/19641?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/19641?src=pr&el=footer). Last update [13bd008...0ac9789](https://codecov.io/gh/pandas-dev/pandas/pull/19641?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

ok pls do a parameterization / de-duplication pass next.
move array_to_datetime timests
State: closed

Almost done.

With array_to_datetime there is some fuzziness in when a test is for array_to_datetime and when it is for to_datetime.  I'm trying to specifically isolate tslibs tests, so for now am erring on the side of keeping to_datetime tests in test_tools.

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

Comments:
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/19640?src=pr&el=h1) Report
> Merging [#19640](https://codecov.io/gh/pandas-dev/pandas/pull/19640?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/7a5634e79f0b42ddbf602720dc184e9ce69f929c?src=pr&el=desc) will **increase** coverage by `0.02%`.
> The diff coverage is `n/a`.

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

```diff
@@            Coverage Diff             @@
##           master   #19640      +/-   ##
==========================================
+ Coverage   91.58%   91.61%   +0.02%     
==========================================
  Files         150      150              
  Lines       48807    48807              
==========================================
+ Hits        44702    44714      +12     
+ Misses       4105     4093      -12
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `89.98% <ø> (+0.02%)` | :arrow_up: |
| #single | `41.73% <ø> (ø)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/19640?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/plotting/\_converter.py](https://codecov.io/gh/pandas-dev/pandas/pull/19640/diff?src=pr&el=tree#diff-cGFuZGFzL3Bsb3R0aW5nL19jb252ZXJ0ZXIucHk=) | `66.95% <0%> (+1.73%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/19640?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/19640?src=pr&el=footer). Last update [7a5634e...2e6ac8c](https://codecov.io/gh/pandas-dev/pandas/pull/19640?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

formatting by wrapping near the end of the line is rarely desired.