BrandonFors/pandas-github-issues huggingface dataset:
CLN: Removed copy parameter in xs_* methods
State: closed

Title is self-explanatory.  Picks up where #6919 left off.


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

Comments:
## [Current coverage](https://codecov.io/gh/pydata/pandas/pull/13781?src=pr) is 85.32% (diff: 100%)

> Merging [#13781](https://codecov.io/gh/pydata/pandas/pull/13781?src=pr) into [master](https://codecov.io/gh/pydata/pandas/branch/master?src=pr) will increase coverage by **<.01%**

``` diff
@@             master     #13781   diff @@
==========================================
  Files           141        141          
  Lines         50679      50671     -8   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
- Hits          43240      43235     -5   
+ Misses         7439       7436     -3   
  Partials          0          0          
```

> Powered by [Codecov](https://codecov.io?src=pr). Last update [474fd05...c314bc1](https://codecov.io/gh/pydata/pandas/compare/474fd0519b768efd1c7ec6555930873bf9910e00...c314bc1f71a1571cfa225a8a9b8fe2eb5ff1e208?src=pr)

thanks @gfyoung
CLN: Removed SparsePanel
State: closed

Title is self-explanatory.  Picks up where #11157 left off.


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

Comments:
this is in slight conflict with #13776 as I needed to add a line to catch an errant warning about SparsePanel (which you should then remove). But can sort that later I guess.

@jreback : what error catching are you referring to in your PR?

## [Current coverage](https://codecov.io/gh/pydata/pandas/pull/13778?src=pr) is 85.23% (diff: 75.00%)

> Merging [#13778](https://codecov.io/gh/pydata/pandas/pull/13778?src=pr) into [master](https://codecov.io/gh/pydata/pandas/branch/master?src=pr) will decrease coverage by **0.10%**

``` diff
@@             master     #13778   diff @@
==========================================
  Files           141        140     -1   
  Lines         50711      50415   -296   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
- Hits          43275      42969   -306   
- Misses         7436       7446    +10   
  Partials          0          0          
```

> Powered by [Codecov](https://codecov.io?src=pr). Last update [3fdcea6...f3fa93b](https://codecov.io/gh/pydata/pandas/compare/3fdcea6f89a5a9f9fdb98452343a21e576430bd9...f3fa93bb9701925916352a52f865d17be0f38f86?src=pr)

lgtm @gfyoung minor doc changes. ping when green.

@gfyoung I think I took out the reference in my other PR (to SparsePanel); I'll rebase after this.

thanks @gfyoung
DEPR: Panel4d and panelND
State: closed

closes #13564 


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

Comments:
This is was a PITA (because some things produce warnings in PY2 but not in PY3) :<

@jorisvandenbossche @wesm @shoyer 

@shoyer @MaximilianR esp have a look at the warnings (e.g. maybe have a specific page)?

Can we add the deprecation notice to the docstrings for `PanelND` and `Panel4D`, too?

@MaximilianR Let's see if we can finish up that doc page on xarray for panel users (https://github.com/pydata/xarray/pull/832) -- it would be great to be able to link to that in the pandas docs.

Oh boy, that will be a joy if when we can remove it :-) 
Too late for now, but isn't there a way to eg test the warning once, and be able to mute them for all other tests?

I wish - the problem is that FutureWarninh is generic so No easy way

Can't you filter with a regex on the message or module?

I gave it a try - u r welcome to change it - it's buggy in 27 I think 

For the next big depr then :-)

## [Current coverage](https://codecov.io/gh/pydata/pandas/pull/13776?src=pr) is 85.32% (diff: 100%)

> No coverage report found for **master** at 4dd734c.
> 
> Powered by [Codecov](https://codecov.io?src=pr). Last update [4dd734c...38641c7](https://codecov.io/gh/pydata/pandas/compare/4dd734c9c3f38ddc19fa77fea71abfb6c1f3f2ba...38641c7f62b8ebff1f0a7c03811ccf57b0ce3cde?src=pr)

> @MaximilianR Let's see if we can finish up that doc page on xarray for panel users (pydata/xarray#832) -- it would be great to be able to link to that in the pandas docs.

I'll have a go this week!

@jorisvandenbossche updated.

@shoyer 
cc @MaximilianR 
we can always change the xarray link points later (I think we have an issue for that anyhow). As these need to go in the `.to_xarray()` doc-string as well.

Small comment/question, for the rest ready to merge for me. The doc link can indeed be updated later.
ENH: DataFrame.style sparsified MultiIndex
State: closed

- [x] closes #11655
- [x] tests added / passed
- [x] passes `git diff upstream/master | flake8 --diff`
- [x] whatsnew entry

[Notebook comparing `DataFrame._html_repr_` to `DataFrame.style`](https://gist.github.com/609c398f814b4a505bf4f406670e457e)

I think we're identical for non-truncated DataFrames. That' has not been implemented in `Styler` yet.

Along the way I noticed two other things that ended up needing fixing.
1. DataFrame.columns.names were not displayed
2. CSS classes weren't being assigned correctly to row labels.

The fixes ended up being pretty intertwined, so I've put them in a single PR. Unfortunately, the commits are a bit jumbled as well :/


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

Comments:
> maybe put a ref to the style docs (e.g. not sure how much of an example is needed here)

@jreback this was undocumented... Adding this section to the notebook. Will push soon.

# CSS Classes

Certain CSS classes are attached to cells.
- Index and Column names include `index_name` and `level<k>` where `k` is its level in a MultiIndex
- Index label cells include
  - `row_heading`
  - `row<n>` where `n` is the numeric position of the row
  - `level<k>` where `k` is the level in a MultiIndex
- Column label cells include
  - `col_heading`
  - `col<n>` where `n` is the numeric position of the column
  - `level<k>` where `k` is the level in a MultiIndex
- Blank cells include `blank`
- Data cells include `data`

## [Current coverage](https://codecov.io/gh/pydata/pandas/pull/13775?src=pr) is 85.24% (diff: 100%)

> Merging [#13775](https://codecov.io/gh/pydata/pandas/pull/13775?src=pr) into [master](https://codecov.io/gh/pydata/pandas/branch/master?src=pr) will increase coverage by **<.01%**

``` diff
@@             master     #13775   diff @@
==========================================
  Files           140        140          
  Lines         50415      50440    +25   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits          42970      42996    +26   
+ Misses         7445       7444     -1   
  Partials          0          0          
```

> Powered by [Codecov](https://codecov.io?src=pr). Last update [98c5b88...7c03a72](https://codecov.io/gh/pydata/pandas/compare/98c5b88d6f9f7bb0afa4fbae49a045d93a1cb33f...7c03a72212c2356ca9c00a8ad49ac12935d0ef82?src=pr)

lgtm. merge away.
DOC: show failing string on numeric parse
State: closed

- [ ] related to #13746
- [x] tests added / passed
- [x] passes `git diff upstream/master | flake8 --diff`
- [ ] whatsnew entry not needed?

``` python
# before
In [7]: pd.to_numeric(['a'])
ValueError: Unable to parse string

# after
In [1]: pd.to_numeric(['a'])
ValueError: Unable to parse string "a" at position 0
```


Labels:
name: IO Data
description: IO issues that don't fit into a more specific label
name: Error Reporting
description: Incorrect or improved errors from pandas
name: Compat
description: pandas objects compatability with Numpy or Python functions

Comments:
I think its straightforward to also provide a row/line number here, e.g. `i` which we know already

## [Current coverage](https://codecov.io/gh/pydata/pandas/pull/13773?src=pr) is 85.23% (diff: 100%)

> No coverage report found for **master** at 6efd743.
> 
> Powered by [Codecov](https://codecov.io?src=pr). Last update [6efd743...13bfd11](https://codecov.io/gh/pydata/pandas/compare/6efd743ccbf2ef6c13ea0c71b7b2e2a022a99455...13bfd116bbb421bad5154ffd0eff6e8c2de37974?src=pr)

@jorisvandenbossche -  I think this one is good now.

Thanks!
BUG: value_counts may raise OutOfBoundsDatetime
State: closed

- [x] closes #13663
- [x] tests added / passed
- [x] passes `git diff upstream/master | flake8 --diff`
- [x] whatsnew entry

The root cause looks normal `Index` raises `OutOfBoudsDatetime`. I think it should be coerced to `object` dtype because user specifies no dtype.

```
pd.Index([datetime(9999, 1, 1)])
# on current master
# OutOfBoundsDatetime: Out of bounds nanosecond timestamp: 9999-01-01 00:00:00

# this PR
Index([9999-01-01 00:00:00], dtype='object')
```


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

Comments:
## [Current coverage](https://codecov.io/gh/pydata/pandas/pull/13772?src=pr) is 84.57% (diff: 100%)

> No coverage report found for **master** at b60e42b.
> 
> Powered by [Codecov](https://codecov.io?src=pr). Last update [b60e42b...533bba3](https://codecov.io/gh/pydata/pandas/compare/b60e42b02040624f319cadd60a99fe50eb62d62e...533bba364cd41ad9ebcd4831dff30d853d2b550e?src=pr)

Gave a quick look, everything looks good.

Slightly OT, do we have a convention on `import datetime` vs. `from datetime import datetime`? You changed it to the second version, which seems to be slightly more common in the codebase? Might be nice to standardize that everywhere.

thanks @sinhrks 

yeah @TomAugspurger there is a bit of differences on import, though generally not back; we _mostly_ `from datetime import datetime` which is the correct idiom here. Could change if someone wants to put in the effort :>

pls make an issue.

yeah, `from datetime import datetime` looks commonto meet with < 80 chars. Though i don't have strong opinion about it.
PEP8: test/indexes/base
State: closed

- [x] passes `git diff upstream/master | flake8 --diff`


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

Comments:
## [Current coverage](https://codecov.io/gh/pydata/pandas/pull/13771?src=pr) is 84.57% (diff: 100%)

> No coverage report found for **master** at b60e42b.
> 
> Powered by [Codecov](https://codecov.io?src=pr). Last update [b60e42b...05b2691](https://codecov.io/gh/pydata/pandas/compare/b60e42b02040624f319cadd60a99fe50eb62d62e...05b26914b8dc6066614b00a0be9fd78c4070d832?src=pr)

thanks @sinhrks
BUG: datetime64[us] arrays with NaT cannot be cast to DatetimeIndex
State: closed

- [x] closes #9114
- [x] tests added / passed
- [x] passes `git diff upstream/master | flake8 --diff`
- [x] whatsnew entry

Fixed by #13692. Added tests.


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

Comments:
Very nice -- thanks!

## [Current coverage](https://codecov.io/gh/pydata/pandas/pull/13770?src=pr) is 84.56% (diff: 100%)

> No coverage report found for **master** at b60e42b.
> 
> Powered by [Codecov](https://codecov.io?src=pr). Last update [b60e42b...6ae1066](https://codecov.io/gh/pydata/pandas/compare/b60e42b02040624f319cadd60a99fe50eb62d62e...6ae1066a48d0bf76d6c218176634708e962f35f6?src=pr)

thank you sir!
TST: add timedelta describe
State: closed

- [x] closes #6145
- [x] tests added / passed
- [x] passes `git diff upstream/master | flake8 --diff`

Must be fixed by `timedelta` dtype. Added tests.


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

Comments:
## [Current coverage](https://codecov.io/gh/pydata/pandas/pull/13769?src=pr) is 84.57% (diff: 100%)

> No coverage report found for **master** at b60e42b.
> 
> Powered by [Codecov](https://codecov.io?src=pr). Last update [b60e42b...3348f39](https://codecov.io/gh/pydata/pandas/compare/b60e42b02040624f319cadd60a99fe50eb62d62e...3348f39c6c78b2595aac262cba71ea50257c4e08?src=pr)

thanks @sinhrks
DOC: Merge FAQ and gotcha
State: closed

- [x] closes #9809
- [ ]  ToDo:
  - [ ] Add detail of dtype promotion

Moved some topics to corresponding docs. Also removed following duplicates.

**Parsing Dates from Text Files:** the same contents exists on io doc.
- http://pandas-docs.github.io/pandas-docs-travis/gotchas.html#parsing-dates-from-text-files
- http://pandas-docs.github.io/pandas-docs-travis/io.html#specifying-date-columns

**Byte ordering issues:**
- http://pandas-docs.github.io/pandas-docs-travis/faq.html#byte-ordering-issues
- http://pandas-docs.github.io/pandas-docs-travis/gotchas.html#byte-ordering-issues


Labels:
name: Docs

Comments:
## [Current coverage](https://codecov.io/gh/pydata/pandas/pull/13768?src=pr) is 85.25% (diff: 100%)

> Merging [#13768](https://codecov.io/gh/pydata/pandas/pull/13768?src=pr) into [master](https://codecov.io/gh/pydata/pandas/branch/master?src=pr) will not change coverage

``` diff
@@             master     #13768   diff @@
==========================================
  Files           140        140          
  Lines         50455      50455          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
  Hits          43014      43014          
  Misses         7441       7441          
  Partials          0          0          
```

> Powered by [Codecov](https://codecov.io?src=pr). Last update [59f2557...8fcb152](https://codecov.io/gh/pydata/pandas/compare/59f25575f42e19f066dc3cd2245983071e2d7813...8fcb15260d2da09af2a7a0142b39fce687edf74e?src=pr)

As @jorisvandenbossche mentioned in the issue discussing consolidating these pages, I would suggest removing the FAQ page and keeping the "Gotchas" page instead. In my opinion, most of these are a better fit there.

The only exception is "DataFrame memory usage" which should probably be moved somewhere else (it isn't a great fit in the FAQ, either). Maybe "Internals" or "Enhancing Performance"?

@jorisvandenbossche ?

As I said in the original issue, although I like the FAQ name, I have the feeling that the content is not really what you would expect from a pandas FAQ (I would expect to see general things like 'what is pandas?', 'how can I contribute?', 'how is pandas developed?', 'how does pandas depend on numpy?', ...), while this are more advanced "gotcha's".

@jorisvandenbossche @sinhrks status on this?

where are we on this?

@sinhrks can you rebase
status of this?
@sinhrks rebased this + made some changes for the comments above -> https://github.com/pandas-dev/pandas/pull/15222
BUG: RangeIndex accepting length-1 arrays as argument
State: closed

- [x] closes #13542
- [x] tests added / passed
- [x] passes `git diff upstream/master | flake8 --diff`
- [x] whatsnew entry


Labels:
name: Bug
name: Indexing
description: Related to indexing on series/frames, not to indexes themselves
name: Reshaping
description: Concat, Merge/Join, Stack/Unstack, Explode

Comments:
## [Current coverage](https://codecov.io/gh/pydata/pandas/pull/13765?src=pr) is 85.27% (diff: 100%)

> Merging [#13765](https://codecov.io/gh/pydata/pandas/pull/13765?src=pr) into [master](https://codecov.io/gh/pydata/pandas/branch/master?src=pr) will decrease coverage by **<.01%**

``` diff
@@             master     #13765   diff @@
==========================================
  Files           139        139          
  Lines         50211      50214     +3   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits          42819      42820     +1   
- Misses         7392       7394     +2   
  Partials          0          0          
```

> Powered by [Codecov](https://codecov.io?src=pr). Last update [5f49638...6180487](https://codecov.io/gh/pydata/pandas/compare/5f496380beb81d3986ca48cf41b893d95c227895...618048708ce4146b0e0a28ff605d84f94a875139?src=pr)

@jreback OK?

can you add the orginal issue example somewhere (and assert it works)

That's what I added in `test_concat.py` (next to the addition in the tests in `test_range.py`) I think?

is it a simplified example?

the original one is on a panel

Well, looking back at the original issue https://github.com/pydata/pandas/issues/13542, this is indeed not the original example I included in the tests. But I found the reported example rather convoluted/difficult to comprehend what was going on. And the example I added, is a simplified (whithout using panels) example that experience exactly the same issue (it is what happened inside the groupby).

But I can add the original panel example as well if you like

it's fine
a simplified example is often better anyhow
so lgtm
BUG: Fix segfault in lib.isnullobj
State: closed

Weird segfault arises when you call `lib.isnullobj` with an array that uses 0-field values to mean `None`.
Changed input to be a `Python` object (i.e. no typing), and the segfault went away.  Discovered when there were segfaults in printing a `DataFrame` containing such an array.

Closes #13717.


Labels:
name: Bug
name: Compat
description: pandas objects compatability with Numpy or Python functions

Comments:
## [Current coverage](https://codecov.io/gh/pydata/pandas/pull/13764?src=pr) is 84.56% (diff: 100%)

> No coverage report found for **master** at b60e42b.
> 
> Powered by [Codecov](https://codecov.io?src=pr). Last update [b60e42b...cd07769](https://codecov.io/gh/pydata/pandas/compare/b60e42b02040624f319cadd60a99fe50eb62d62e...cd077693d209e575fc6a8e806b7470e47cac4349?src=pr)

you need to check if it's iterable now eg s scalar will fail 

or at least assert that (as this cannot be called with s scalar)

@jreback : good point about the scalar thing - I think I actually don't need to remove `ndarray` entirely.  If I remove the `object` dtype specification, that might be sufficient.  Testing it right now.

@jreback : "fixed" all four `isnullobj` methods and added tests for all of them, and Travis is still passing.  Ready to merge if there are no other concerns.

lgtm. can you give a perf test and see if anything material (I don't think so, but can't hurt). as this is the null tester for strings.

What do you mean `null` tester for strings?  What method are you referring to?

this is called for null testing on strings

From where exactly?  Are you talking about the `pandas.types.missing` methods (also, why focus on strings specifically?)

look at how isnull works. this is the only 1 of 2 places this is called.

Okay, that's what I thought.  Where should this perf test go in `asv_bench`?  In `strings.py` I presume?

oh, i mean there prob is a benchmark that tells null on strings already, if not see where the null tests are (I _think_ they are all in one place).

@jreback : I found `isnull` benchmarks in the `DataFrame` benchmarks, so I added one for strings there.

Travis is doing weird things.  Putting `[ci skip]` in the commit until it corrects itself.

thanks

minor change I made in the asv
also it IS slightly slower, so I guess the emitted c-code is slightly less optimal w/o the object typing (but can't have seg faults of course :)
ENH: union_categorical supports identical categories with ordered
State: closed

- [x] related to #13410, #13524
- [x] tests added / passed
- [x] passes `git diff upstream/master | flake8 --diff`
- [x] whatsnew not needed

`.append / concat` can handle ordered `Categorical` which has the identical categories. However, `union_categorical` raises `TypeError`. This PR allows `union_categorical` to handle the case.

**on current mastser**

```
s1 = pd.Series(pd.Categorical([1, 2, 3], ordered=True))
s2 = pd.Series(pd.Categorical([3, 2, 1], categories=[1, 2, 3], ordered=True))
s1.append(s2)

#0    1
#1    2
#2    3
#0    3
#1    2
#2    1
# dtype: category
# Categories (3, int64): [1 < 2 < 3]

pd.types.concat.union_categoricals([s1.values, s2.values])
# TypeError: Can only combine unordered Categoricals
```

CC: @janschulz, @chris-b1


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

Comments:
## [Current coverage](https://codecov.io/gh/pydata/pandas/pull/13763?src=pr) is 85.33% (diff: 100%)

> Merging [#13763](https://codecov.io/gh/pydata/pandas/pull/13763?src=pr) into [master](https://codecov.io/gh/pydata/pandas/branch/master?src=pr) will increase coverage by **<.01%**

``` diff
@@             master     #13763   diff @@
==========================================
  Files           141        141          
  Lines         50703      50717    +14   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits          43267      43281    +14   
  Misses         7436       7436          
  Partials          0          0          
```

> Powered by [Codecov](https://codecov.io?src=pr). Last update [1367945...9cadc4e](https://codecov.io/gh/pydata/pandas/compare/136794524a8f8954c0b8bf8f0327870d83cbf8d4...9cadc4e84172cd89effa0b02dc188c91d8314110?src=pr)

Looks good to me, other than a couple nit-picky doc things.

I created - https://github.com/sinhrks/pandas/pull/1 to also add a `sort_categories` argument, which is needed for https://github.com/pydata/pandas/pull/13406

In my thinking `union_categorical` is a "unstricter" (and "uncleaner") variant of the normal categorical handling: where the usual cat handling errors, this should "bend the rules" and succeed. Following this, I thinking `union_categorical` should handle whatever `append` can take...

@chris-b1 , @janschulz any final comments?

No, looks good to me.

On Jul 28, 2016 7:32 PM, "Jeff Reback" notifications@github.com wrote:

> @chris-b1 https://github.com/chris-b1 , @janschulz
> https://github.com/janschulz any final comments?
> 
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> https://github.com/pydata/pandas/pull/13763#issuecomment-236064325, or mute
> the thread
> https://github.com/notifications/unsubscribe-auth/AB1b_FOSzzp-Gnvwk0SvEXA7FwPCj4fkks5qaUolgaJpZM4JTSrP
> .

LGTM

ty sir!
BUG: DatetimeIndex with nanosecond frequency does not include end
State: closed

- [x] closes #13672
- [x] tests added / passed
- [x] passes `git diff upstream/master | flake8 --diff`
- [x] whatsnew entry


Labels:
name: Bug
name: Datetime
description: Datetime data dtype
name: Frequency
description: DateOffsets

Comments:
## [Current coverage](https://codecov.io/gh/pydata/pandas/pull/13762?src=pr) is 84.56% (diff: 100%)

> Merging [#13762](https://codecov.io/gh/pydata/pandas/pull/13762?src=pr) into [master](https://codecov.io/gh/pydata/pandas/branch/master?src=pr) will not change coverage

``` diff
@@             master     #13762   diff @@
==========================================
  Files           141        141          
  Lines         51195      51195          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
  Hits          43295      43295          
  Misses         7900       7900          
  Partials          0          0          
```

> Powered by [Codecov](https://codecov.io?src=pr). Last update [9f94e6a...0e63d70](https://codecov.io/gh/pydata/pandas/compare/9f94e6a04564e8269b43c5b4e83854d277ea30bd...0e63d70845388a422337561802b1f9081a379328?src=pr)

Looks good to me!