BrandonFors/pandas-github-issues huggingface dataset:
BUG: first/last lose timezone in groupby with as_index=False
State: closed

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


Labels:
name: Bug
name: Timezones
description: Timezone data dtype

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

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

```diff
@@           Coverage Diff           @@
##           master   #21573   +/-   ##
=======================================
  Coverage    91.9%    91.9%           
=======================================
  Files         153      153           
  Lines       49549    49549           
=======================================
  Hits        45539    45539           
  Misses       4010     4010
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.3% <100%> (ø)` | :arrow_up: |
| #single | `41.78% <0%> (ø)` | :arrow_up: |

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

------

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

@reidy-p 
>So if we have the categorical column do we want to legitimately go through the compat routine? And, if so, should we preserve the timezone in the compat routine?

I am not too familiar of the conditions in which the data gets passed through the compat routine, but timezones should be preserved in the compat routine.  Yes, looks like #15885 should solve that issue (and offer a performance boost for Categoriacals as well xref #19026)
thanks @reidy-p very nice!
DOC: Fixing spaces around backticks, and linting
State: closed

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


Labels:
name: Docs

Comments:
hmm no conflicts - ok then
hnm not running on travis.
thanks @datapythonista 

not sure why travis doesn't didn't run on this build though......
REF: multi_take is now able to tackle all list-like (non-bool) cases
State: closed

- [x] tests passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`

This is basically a consequence of #21503 - the code path for indexing when ``key`` is a collection is now the same for multi_take and for single take.

(Next step will be to merge the other code paths too, and approach with multi_take _all_ cases in which mutiple axes are being indexed, in whatever fashion)

Labels:
name: Refactor
description: Internal refactoring of code
name: Indexing
description: Related to indexing on series/frames, not to indexes themselves

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

```diff
@@            Coverage Diff             @@
##           master   #21569      +/-   ##
==========================================
- Coverage   91.92%   91.92%   -0.01%     
==========================================
  Files         153      153              
  Lines       49561    49553       -8     
==========================================
- Hits        45559    45551       -8     
  Misses       4002     4002
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.32% <100%> (-0.01%)` | :arrow_down: |
| #single | `41.8% <50%> (-0.01%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/21569?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/indexing.py](https://codecov.io/gh/pandas-dev/pandas/pull/21569/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhpbmcucHk=) | `93.37% <100%> (-0.05%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/21569?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/21569?src=pr&el=footer). Last update [f4fba9e...430a268](https://codecov.io/gh/pandas-dev/pandas/pull/21569?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
DOC: Add documentation for freq='infer' option of DatetimeIndex and TimedeltaIndex constructors
State: closed

- [X] closes #21128
- [X] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`

Reboot of #21201.  Should be good to merge on green based on comments in the previous PR, but will leave this open for a little bit to give anyone who missed the old PR a chance to review.

Labels:
name: Docs
name: Datetime
description: Datetime data dtype
name: Timedelta
description: Timedelta data type
name: Frequency
description: DateOffsets

Comments:
lgtm.
thanks @jschendel
ERR: Raise a simpler backtrace for missing key
State: closed

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


Labels:
name: Indexing
description: Related to indexing on series/frames, not to indexes themselves
name: Error Reporting
description: Incorrect or improved errors from pandas

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

```diff
@@            Coverage Diff             @@
##           master   #21558      +/-   ##
==========================================
- Coverage   91.92%   91.92%   -0.01%     
==========================================
  Files         153      153              
  Lines       49561    49561              
==========================================
- Hits        45559    45557       -2     
- Misses       4002     4004       +2
```

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

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/21558?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/indexing.py](https://codecov.io/gh/pandas-dev/pandas/pull/21558/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhpbmcucHk=) | `93.23% <100%> (-0.19%)` | :arrow_down: |

------

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

thanks @toobaz
Update tutorials.rst
State: closed

- [ ] closes #xxxx
- [ ] tests added / passed
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

Added a new video listing.


Labels:
name: Docs

Comments:
Thanks! I notice that this is a paid video tutorial while the rest of the tutorials linked on this page are free.

@jreback do we have a policy for highlighting paid tutorials?
we shouldn’t have any paid tutorials  - only completely free
BUG: Series.combine_first with datetime-tz dtype (#21469)
State: closed

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


Labels:
name: Bug
name: Timezones
description: Timezone data dtype

Comments:
Closing this PR. Will open a new one that attempts to fix #21546 in addition to #21469,
[TST] : Adding test cases to confirm that .apply() works fine
State: closed

Adding test cases for closure of issue  :  Unexpected behaviour of apply function 

- [x] closes #21535
- [x] tests added / passed
- [x] 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: Algos
description: Non-arithmetic algos: value_counts, factorize, sorting, isin, clip, shift, diff

Comments:
@gfyoung  Please see if this is suffice for test case
@uds5501 : Good start!  Can you include all of the examples from that issue under your test?
Hello @uds5501! Thanks for updating the PR.



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

##### Comment last updated on June 21, 2018 at 07:42 Hours UTC
@gfyoung Thanks for pointing that out! That was really stupid by my side
DOC: remove grammar duplication in groupby docs
State: closed

"can be could be" -> "could be"

Labels:
name: Docs
name: Clean

Comments:
Marking this for `0.24.0`, as this is a relatively trivial PR, and we can pick this up and bring to the finish line (I only have one comment, otherwise, LGTM) if it goes stale.
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/21534?src=pr&el=h1) Report
> Merging [#21534](https://codecov.io/gh/pandas-dev/pandas/pull/21534?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/6131a598a614b93e70a28b36d35819cb6081965b?src=pr&el=desc) will **decrease** coverage by `<.01%`.
> The diff coverage is `n/a`.

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

```diff
@@            Coverage Diff             @@
##           master   #21534      +/-   ##
==========================================
- Coverage   91.92%   91.92%   -0.01%     
==========================================
  Files         153      153              
  Lines       49594    49594              
==========================================
- Hits        45590    45588       -2     
- Misses       4004     4006       +2
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.32% <ø> (-0.01%)` | :arrow_down: |
| #single | `41.82% <ø> (ø)` | :arrow_up: |

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

------

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

@adamjstewart Thanks!
remove daytime attr, move getstate and setstate to base class
State: closed

If/when #18224 is revived to make `_BaseOffset` a `cdef class`, we'll need to move `__getstate__` and `__setstate__` into the base class (and then make some changes).  This moves the two methods pre-emptively so that we'll have a smaller diff for the next steps.

Also removes an attr `self.daytime` that is not used anywhere else.

Labels:
name: Frequency
description: DateOffsets
name: Clean

Comments:
lgtm. ping on green.
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/21533?src=pr&el=h1) Report
> Merging [#21533](https://codecov.io/gh/pandas-dev/pandas/pull/21533?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/6131a598a614b93e70a28b36d35819cb6081965b?src=pr&el=desc) will **decrease** coverage by `<.01%`.
> The diff coverage is `n/a`.

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

```diff
@@            Coverage Diff             @@
##           master   #21533      +/-   ##
==========================================
- Coverage   91.92%   91.92%   -0.01%     
==========================================
  Files         153      153              
  Lines       49594    49570      -24     
==========================================
- Hits        45590    45566      -24     
  Misses       4004     4004
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.32% <ø> (-0.01%)` | :arrow_down: |
| #single | `41.81% <ø> (-0.02%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/21533?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/tseries/offsets.py](https://codecov.io/gh/pandas-dev/pandas/pull/21533/diff?src=pr&el=tree#diff-cGFuZGFzL3RzZXJpZXMvb2Zmc2V0cy5weQ==) | `97.19% <ø> (-0.06%)` | :arrow_down: |

------

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

thanks!
fixed unicode issue (21499) using requests library
State: closed

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


Labels:

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

 - In the file [`pandas/io/html.py`](https://github.com/pandas-dev/pandas/blob/670b1f007292f011f08b71a40d6a3670507fb4d2/pandas/io/html.py), following are the PEP8 issues :

> [Line 988:1](https://github.com/pandas-dev/pandas/blob/670b1f007292f011f08b71a40d6a3670507fb4d2/pandas/io/html.py#L988): [W293](https://duckduckgo.com/?q=pep8%20W293) blank line contains whitespace
> [Line 988:1](https://github.com/pandas-dev/pandas/blob/670b1f007292f011f08b71a40d6a3670507fb4d2/pandas/io/html.py#L988): [W391](https://duckduckgo.com/?q=pep8%20W391) blank line at end of file



##### Comment last updated on June 18, 2018 at 19:04 Hours UTC
Hmm well it looks like this is going to conflict with the work being done in #21504. @ocefpaf can you see if your PR accounts for this issue (adding a test case, accordingly)? If so would be easier just to bundle this in with your change
My guess is that https://github.com/pandas-dev/pandas/pull/21504 could supersede this one. I'll add tests soon. I have a limited time I can work on this. (And I'm waiting for the docstrings questions I asked there before continuing :smile:).
Closing in favor of #21504
PERF: remove useless overrides
State: closed

- [x] closes #21522
- [x] tests passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry

Asv run:

```
       before           after         ratio
     [9e982e18]       [705f0e3b]
-         243±7ms          186±4ms     0.77  multiindex_object.GetLoc.time_large_get_loc_warm
-       220±0.9ms          151±3ms     0.69  multiindex_object.GetLoc.time_large_get_loc
-         173±1ms          101±2ms     0.59  multiindex_object.Integer.time_get_indexer

SOME BENCHMARKS HAVE CHANGED SIGNIFICANTLY.
```

Notice that as of now the same _cannot_ be done for ``.is_monotonic_increasing`` and friends, because the sortedness of the ``MultiIndex`` corresponds to the sortedness of the underlying int index only if levels are themselves sorted.

Labels:
name: Performance
description: Memory or execution speed performance
name: MultiIndex

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

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

```diff
@@            Coverage Diff             @@
##           master   #21523      +/-   ##
==========================================
- Coverage   91.92%   91.92%   -0.01%     
==========================================
  Files         153      153              
  Lines       49587    49583       -4     
==========================================
- Hits        45583    45579       -4     
  Misses       4004     4004
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.32% <ø> (-0.01%)` | :arrow_down: |
| #single | `41.83% <ø> (-0.06%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/21523?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/indexes/multi.py](https://codecov.io/gh/pandas-dev/pandas/pull/21523/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9tdWx0aS5weQ==) | `94.97% <ø> (-0.02%)` | :arrow_down: |

------

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

thanks!
Fixing documentation lists indentation (#21518)
State: closed

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


Labels:
name: Docs

Comments:
- does this change the rendering anywhere?
- do you have a script to check this? (e.g. we can add to lint.sh)
There is a subtle change in the margins with the current template. The change is mainly to have a correct rendering with other markdowns that change the font of blockquotes.

With the current theme, it will make lists like the one in:
- https://pandas.pydata.org/pandas-docs/stable/overview.html#package-overview

Render with the margins of lists like:
- https://pandas.pydata.org/pandas-docs/stable/visualization.html#plotting-with-error-bars

The lists that currently have spaces before the `*` like the one in the overview page have a greater left indentation, that with this change will be removed. The resulting indentation will be the one in the visualization page.

I don't have any script that checks the rendering. Are you thinking on something for visual regression testing, or something simpler?
@datapythonista I meant a script to check the indentation of the lists. (checking rendering is extremely hard and out of scope)
Oh, I understand now, I mixed the two questions; Monday morning... :)

I did the changes looking for the indentation manually. I think a script is a good idea, not sure if it's trivial. I'll create a separate ticket for implementing the script if that's all right.
@datapythonista sure np. 
Created #21520
Long time to do item of me to fix those indentations :-) So +1 ! 

My only question: I see you also have changed correct indentations but for switching `-` to `*`. I am not sure we should impose that? (it's not a restriction of the rst standard)
Ups, forgot to mention about using stars... In the first files I reviewed, all lists were using stars, so when I found the first hyphens I changed them for consistency, expecting to be very few cases. At the end there were many, so I think the change wasn't that much of a good idea, and just adds noise to the PR. But as I already changed them I didn't want to revert.
@jorisvandenbossche I put this on 0.23.2 as it other changes touch the docs might be a slight diff, but no big deal.
thanks @datapythonista 
> @jorisvandenbossche I put this on 0.23.2 as it other changes touch the docs might be a slight diff, but no big deal.

Yep, will decide on it when backporting