url
stringlengths 55
59
| repository_url
stringclasses 1
value | labels_url
stringlengths 69
73
| comments_url
stringlengths 64
68
| events_url
stringlengths 62
66
| html_url
stringlengths 44
49
| id
int64 338k
1.06B
| node_id
stringlengths 18
32
| number
int64 1
44.6k
| title
stringlengths 1
590
| user
dict | labels
listlengths 0
9
| state
stringclasses 2
values | locked
bool 2
classes | assignee
dict | assignees
listlengths 0
5
| milestone
dict | comments
int64 0
477
| created_at
unknown | updated_at
unknown | closed_at
unknown | author_association
stringclasses 3
values | active_lock_reason
stringclasses 4
values | body
stringlengths 0
251k
⌀ | reactions
dict | timeline_url
stringlengths 64
68
| performed_via_github_app
float64 | draft
float64 0
1
⌀ | pull_request
dict |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
https://api.github.com/repos/pandas-dev/pandas/issues/43322 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43322/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43322/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43322/events | https://github.com/pandas-dev/pandas/pull/43322 | 983,704,030 | MDExOlB1bGxSZXF1ZXN0NzIzMjM4OTAz | 43,322 | Datetime series slicing - error without loc() | {
"avatar_url": "https://avatars.githubusercontent.com/u/60290302?v=4",
"events_url": "https://api.github.com/users/sri-varsha-rao/events{/privacy}",
"followers_url": "https://api.github.com/users/sri-varsha-rao/followers",
"following_url": "https://api.github.com/users/sri-varsha-rao/following{/other_user}",
"gists_url": "https://api.github.com/users/sri-varsha-rao/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sri-varsha-rao",
"id": 60290302,
"login": "sri-varsha-rao",
"node_id": "MDQ6VXNlcjYwMjkwMzAy",
"organizations_url": "https://api.github.com/users/sri-varsha-rao/orgs",
"received_events_url": "https://api.github.com/users/sri-varsha-rao/received_events",
"repos_url": "https://api.github.com/users/sri-varsha-rao/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sri-varsha-rao/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sri-varsha-rao/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sri-varsha-rao"
} | [] | closed | false | null | [] | null | 1 | "2021-08-31T10:32:55Z" | "2021-08-31T18:33:01Z" | "2021-08-31T18:33:01Z" | NONE | null | Problem:
Date time series on slicing might produce errors for different reasons(change in data format for each, unsorted DateTime inputs etc.) which can be avoided with "loc() on the DateTime".
The error was like *** Slicing with this method is *always* positional.***
After correcting the Issue : (Screenshots)
https://docs.google.com/document/d/1L5Ei0q5BfHCTnfzG43exvTug_N1OE7UEmxbgB0KjIh4/edit?usp=sharing
Issue: 43223
Code testing :
import pandas as pd
import numpy as np
df = pd.DataFrame(
{'ind': [i for i in range(5)]},
index=pd.DatetimeIndex(["11.01.2011 22:00", "11.01.2011 23:00", "12.01.2011 00:00", "2011-01-13 00:00","2011-01-14 00:00"]))
df.loc["2011-01-01": "2011-11-01"].plot()
Test Dataset:
ind
2011-11-01 22:00:00 0
2011-11-01 23:00:00 1
2011-12-01 00:00:00 2
2011-01-13 00:00:00 3
2011-01-14 00:00:00 4
The above code works perfectly with loc() added and is one of the test case examples.
- [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43322/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43322/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/43322.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/43322",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/43322.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/43322"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/43323 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43323/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43323/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43323/events | https://github.com/pandas-dev/pandas/pull/43323 | 983,746,161 | MDExOlB1bGxSZXF1ZXN0NzIzMjc0OTE3 | 43,323 | Update test_sorting.py | {
"avatar_url": "https://avatars.githubusercontent.com/u/82256264?v=4",
"events_url": "https://api.github.com/users/DeepakPareta/events{/privacy}",
"followers_url": "https://api.github.com/users/DeepakPareta/followers",
"following_url": "https://api.github.com/users/DeepakPareta/following{/other_user}",
"gists_url": "https://api.github.com/users/DeepakPareta/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/DeepakPareta",
"id": 82256264,
"login": "DeepakPareta",
"node_id": "MDQ6VXNlcjgyMjU2MjY0",
"organizations_url": "https://api.github.com/users/DeepakPareta/orgs",
"received_events_url": "https://api.github.com/users/DeepakPareta/received_events",
"repos_url": "https://api.github.com/users/DeepakPareta/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/DeepakPareta/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/DeepakPareta/subscriptions",
"type": "User",
"url": "https://api.github.com/users/DeepakPareta"
} | [] | closed | true | null | [] | null | 3 | "2021-08-31T11:20:32Z" | "2021-08-31T12:40:22Z" | "2021-08-31T11:50:05Z" | NONE | spam | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43323/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43323/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/43323.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/43323",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/43323.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/43323"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/43324 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43324/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43324/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43324/events | https://github.com/pandas-dev/pandas/pull/43324 | 983,748,910 | MDExOlB1bGxSZXF1ZXN0NzIzMjc3MjQx | 43,324 | BUG: DataFrame.explode is failing on scalar int value. | {
"avatar_url": "https://avatars.githubusercontent.com/u/64204436?v=4",
"events_url": "https://api.github.com/users/shubh242/events{/privacy}",
"followers_url": "https://api.github.com/users/shubh242/followers",
"following_url": "https://api.github.com/users/shubh242/following{/other_user}",
"gists_url": "https://api.github.com/users/shubh242/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/shubh242",
"id": 64204436,
"login": "shubh242",
"node_id": "MDQ6VXNlcjY0MjA0NDM2",
"organizations_url": "https://api.github.com/users/shubh242/orgs",
"received_events_url": "https://api.github.com/users/shubh242/received_events",
"repos_url": "https://api.github.com/users/shubh242/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/shubh242/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/shubh242/subscriptions",
"type": "User",
"url": "https://api.github.com/users/shubh242"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "02d7e1",
"default": false,
"description": "Concat, Merge/Join, Stack/Unstack, Explode",
"id": 13098779,
"name": "Reshaping",
"node_id": "MDU6TGFiZWwxMzA5ODc3OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Reshaping"
},
{
"color": "e11d21",
"default": false,
"description": "Functionality that used to work in a prior pandas version",
"id": 32815646,
"name": "Regression",
"node_id": "MDU6TGFiZWwzMjgxNTY0Ng==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Regression"
}
] | closed | false | null | [] | {
"closed_at": "2021-10-17T11:06:28Z",
"closed_issues": 77,
"created_at": "2021-09-10T19:48:56Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/13159005?v=4",
"events_url": "https://api.github.com/users/simonjayhawkins/events{/privacy}",
"followers_url": "https://api.github.com/users/simonjayhawkins/followers",
"following_url": "https://api.github.com/users/simonjayhawkins/following{/other_user}",
"gists_url": "https://api.github.com/users/simonjayhawkins/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/simonjayhawkins",
"id": 13159005,
"login": "simonjayhawkins",
"node_id": "MDQ6VXNlcjEzMTU5MDA1",
"organizations_url": "https://api.github.com/users/simonjayhawkins/orgs",
"received_events_url": "https://api.github.com/users/simonjayhawkins/received_events",
"repos_url": "https://api.github.com/users/simonjayhawkins/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/simonjayhawkins/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/simonjayhawkins/subscriptions",
"type": "User",
"url": "https://api.github.com/users/simonjayhawkins"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-10-17T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/90",
"id": 7142224,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/90/labels",
"node_id": "MI_kwDOAA0YD84AbPtQ",
"number": 90,
"open_issues": 0,
"state": "closed",
"title": "1.3.4",
"updated_at": "2021-10-18T11:00:43Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/90"
} | 8 | "2021-08-31T11:23:46Z" | "2021-09-29T22:45:28Z" | "2021-09-29T22:45:28Z" | NONE | null | closes #43314
The **int** datatype of the column was raising this issue.
- [x] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43324/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43324/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/43324.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/43324",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/43324.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/43324"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/43325 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43325/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43325/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43325/events | https://github.com/pandas-dev/pandas/pull/43325 | 983,749,445 | MDExOlB1bGxSZXF1ZXN0NzIzMjc3Njg4 | 43,325 | tensor flow addons | {
"avatar_url": "https://avatars.githubusercontent.com/u/47246236?v=4",
"events_url": "https://api.github.com/users/maripisravankumar/events{/privacy}",
"followers_url": "https://api.github.com/users/maripisravankumar/followers",
"following_url": "https://api.github.com/users/maripisravankumar/following{/other_user}",
"gists_url": "https://api.github.com/users/maripisravankumar/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/maripisravankumar",
"id": 47246236,
"login": "maripisravankumar",
"node_id": "MDQ6VXNlcjQ3MjQ2MjM2",
"organizations_url": "https://api.github.com/users/maripisravankumar/orgs",
"received_events_url": "https://api.github.com/users/maripisravankumar/received_events",
"repos_url": "https://api.github.com/users/maripisravankumar/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/maripisravankumar/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/maripisravankumar/subscriptions",
"type": "User",
"url": "https://api.github.com/users/maripisravankumar"
} | [] | closed | false | null | [] | null | 0 | "2021-08-31T11:24:27Z" | "2021-08-31T11:50:20Z" | "2021-08-31T11:50:20Z" | NONE | null | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43325/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43325/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/43325.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/43325",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/43325.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/43325"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/43326 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43326/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43326/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43326/events | https://github.com/pandas-dev/pandas/pull/43326 | 983,759,128 | MDExOlB1bGxSZXF1ZXN0NzIzMjg2MDk4 | 43,326 | error resolution in sas file | {
"avatar_url": "https://avatars.githubusercontent.com/u/60814171?v=4",
"events_url": "https://api.github.com/users/Pranava1709/events{/privacy}",
"followers_url": "https://api.github.com/users/Pranava1709/followers",
"following_url": "https://api.github.com/users/Pranava1709/following{/other_user}",
"gists_url": "https://api.github.com/users/Pranava1709/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Pranava1709",
"id": 60814171,
"login": "Pranava1709",
"node_id": "MDQ6VXNlcjYwODE0MTcx",
"organizations_url": "https://api.github.com/users/Pranava1709/orgs",
"received_events_url": "https://api.github.com/users/Pranava1709/received_events",
"repos_url": "https://api.github.com/users/Pranava1709/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Pranava1709/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Pranava1709/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Pranava1709"
} | [] | closed | false | null | [] | null | 14 | "2021-08-31T11:35:06Z" | "2021-08-31T17:55:13Z" | "2021-08-31T16:58:37Z" | NONE | null | - [x] closes https://github.com/pandas-dev/pandas/issues/18198
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [x] SAS file is now giving empty dataframe. Not NONE.
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43326/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43326/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/43326.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/43326",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/43326.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/43326"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/43327 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43327/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43327/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43327/events | https://github.com/pandas-dev/pandas/pull/43327 | 983,791,882 | MDExOlB1bGxSZXF1ZXN0NzIzMzE0MjI0 | 43,327 | BUG: styler index and empty df | {
"avatar_url": "https://avatars.githubusercontent.com/u/24256554?v=4",
"events_url": "https://api.github.com/users/attack68/events{/privacy}",
"followers_url": "https://api.github.com/users/attack68/followers",
"following_url": "https://api.github.com/users/attack68/following{/other_user}",
"gists_url": "https://api.github.com/users/attack68/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/attack68",
"id": 24256554,
"login": "attack68",
"node_id": "MDQ6VXNlcjI0MjU2NTU0",
"organizations_url": "https://api.github.com/users/attack68/orgs",
"received_events_url": "https://api.github.com/users/attack68/received_events",
"repos_url": "https://api.github.com/users/attack68/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/attack68/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/attack68/subscriptions",
"type": "User",
"url": "https://api.github.com/users/attack68"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "006b75",
"default": false,
"description": "conditional formatting using DataFrame.style",
"id": 1728592794,
"name": "Styler",
"node_id": "MDU6TGFiZWwxNzI4NTkyNzk0",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Styler"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 0 | "2021-08-31T12:13:43Z" | "2021-08-31T15:45:01Z" | "2021-08-31T14:59:10Z" | CONTRIBUTOR | null | - [x] closes #43305
- [x] tests added / passed
- [x] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43327/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43327/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/43327.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/43327",
"merged_at": "2021-08-31T14:59:09Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/43327.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/43327"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/43328 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43328/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43328/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43328/events | https://github.com/pandas-dev/pandas/pull/43328 | 983,802,306 | MDExOlB1bGxSZXF1ZXN0NzIzMzIzMDYz | 43,328 | add Series.str.remove(pre|suf)fix | {
"avatar_url": "https://avatars.githubusercontent.com/u/30958850?v=4",
"events_url": "https://api.github.com/users/janosh/events{/privacy}",
"followers_url": "https://api.github.com/users/janosh/followers",
"following_url": "https://api.github.com/users/janosh/following{/other_user}",
"gists_url": "https://api.github.com/users/janosh/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/janosh",
"id": 30958850,
"login": "janosh",
"node_id": "MDQ6VXNlcjMwOTU4ODUw",
"organizations_url": "https://api.github.com/users/janosh/orgs",
"received_events_url": "https://api.github.com/users/janosh/received_events",
"repos_url": "https://api.github.com/users/janosh/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/janosh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/janosh/subscriptions",
"type": "User",
"url": "https://api.github.com/users/janosh"
} | [
{
"color": "4E9A06",
"default": false,
"description": null,
"id": 76812,
"name": "Enhancement",
"node_id": "MDU6TGFiZWw3NjgxMg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Enhancement"
},
{
"color": "5319e7",
"default": false,
"description": "String extension data type and string data",
"id": 57522093,
"name": "Strings",
"node_id": "MDU6TGFiZWw1NzUyMjA5Mw==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Strings"
},
{
"color": "72e24d",
"default": false,
"description": "",
"id": 1971420228,
"name": "Python 3.9",
"node_id": "MDU6TGFiZWwxOTcxNDIwMjI4",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Python%203.9"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 4 | "2021-08-31T12:24:44Z" | "2021-09-06T19:46:19Z" | "2021-09-06T19:45:57Z" | CONTRIBUTOR | null | - [x] closes #36944
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [x] whatsnew entry
Based on work in https://github.com/pandas-dev/pandas/pull/39226 | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43328/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43328/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/43328.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/43328",
"merged_at": "2021-09-06T19:45:57Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/43328.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/43328"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/43329 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43329/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43329/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43329/events | https://github.com/pandas-dev/pandas/issues/43329 | 983,876,172 | MDU6SXNzdWU5ODM4NzYxNzI= | 43,329 | BUG: resampling DataFrame with DateTimeIndex with holes and `uint64` columns leads to error on `pandas==1.3.2` (not in `1.2.5`) | {
"avatar_url": "https://avatars.githubusercontent.com/u/59931832?v=4",
"events_url": "https://api.github.com/users/julienlmet/events{/privacy}",
"followers_url": "https://api.github.com/users/julienlmet/followers",
"following_url": "https://api.github.com/users/julienlmet/following{/other_user}",
"gists_url": "https://api.github.com/users/julienlmet/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/julienlmet",
"id": 59931832,
"login": "julienlmet",
"node_id": "MDQ6VXNlcjU5OTMxODMy",
"organizations_url": "https://api.github.com/users/julienlmet/orgs",
"received_events_url": "https://api.github.com/users/julienlmet/received_events",
"repos_url": "https://api.github.com/users/julienlmet/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/julienlmet/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/julienlmet/subscriptions",
"type": "User",
"url": "https://api.github.com/users/julienlmet"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "e11d21",
"default": false,
"description": "Functionality that used to work in a prior pandas version",
"id": 32815646,
"name": "Regression",
"node_id": "MDU6TGFiZWwzMjgxNTY0Ng==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Regression"
}
] | open | false | null | [] | {
"closed_at": null,
"closed_issues": 47,
"created_at": "2021-10-16T17:29:59Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/13159005?v=4",
"events_url": "https://api.github.com/users/simonjayhawkins/events{/privacy}",
"followers_url": "https://api.github.com/users/simonjayhawkins/followers",
"following_url": "https://api.github.com/users/simonjayhawkins/following{/other_user}",
"gists_url": "https://api.github.com/users/simonjayhawkins/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/simonjayhawkins",
"id": 13159005,
"login": "simonjayhawkins",
"node_id": "MDQ6VXNlcjEzMTU5MDA1",
"organizations_url": "https://api.github.com/users/simonjayhawkins/orgs",
"received_events_url": "https://api.github.com/users/simonjayhawkins/received_events",
"repos_url": "https://api.github.com/users/simonjayhawkins/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/simonjayhawkins/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/simonjayhawkins/subscriptions",
"type": "User",
"url": "https://api.github.com/users/simonjayhawkins"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-11-28T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/91",
"id": 7259169,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/91/labels",
"node_id": "MI_kwDOAA0YD84AbsQh",
"number": 91,
"open_issues": 23,
"state": "open",
"title": "1.3.5",
"updated_at": "2021-11-21T13:42:45Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/91"
} | 8 | "2021-08-31T13:39:35Z" | "2021-11-18T21:45:30Z" | null | NONE | null | - [x] I have checked that this issue has not already been reported.
- [x] I have confirmed this bug exists on the latest version of pandas.
- [ ] (optional) I have confirmed this bug exists on the master branch of pandas.
---
**Note**: Please read [this guide](https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) detailing how to provide the necessary information for us to reproduce your bug.
#### Code Sample, a copy-pastable example
```python
import numpy as np
import pandas as pd
# Data generation: DataFrame with DateTimeIndex, one row per hour, values are 0 or 1.
df = pd.DataFrame(index=pd.date_range(start="2000-01-01", end="2000-01-03 23", freq="H"), columns=["x"], data=[0, 1, 0] * 24)
# Removing some rows in order to have a hole in the dataset
df = df.loc[(df.index < "2000-01-02") | (df.index > "2000-01-03"), :]
# Create dummy indicator
one_hot = pd.get_dummies(df["x"]) # This line leads to having "RuntimeError: empty group with uint64_t"
# one_hot = pd.get_dummies(df["x"], dtype=int) # This line leads to having expected dataframe
# Keeping, for each day, the maximum day value.
df_output = one_hot.resample("D").max()
# Expected_dataframe:
df_expected = pd.DataFrame(
index=pd.date_range(start="2000-01-01", end="2000-01-03", freq="D"),
data={col: [1, np.nan, 1] for col in [0,1]}
)
pd.testing.assert_frame_equal(df_expected, df_output)
```
#### Problem description
With `pandas=1.3.2`, above code block leads to "RuntimeError: empty group with uint64_t". It was not the case with `pandas==1.1.0` for instance. Not an issue for me (problem solved specifying `dtype`), but probably an issue to solve.
#### Expected Output
Given in code sample section
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit : 5f648bf1706dd75a9ca0d29f26eadfbb595fe52b
python : 3.8.5.final.0
python-bits : 64
OS : Linux
OS-release : 5.4.72-microsoft-standard-WSL2
Version : #1 SMP Wed Oct 28 23:40:43 UTC 2020
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : C.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.3.2
numpy : 1.21.2
pytz : 2021.1
dateutil : 2.8.2
pip : 21.2.4
setuptools : 57.4.0
Cython : None
pytest : 6.2.5
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : None
IPython : 7.27.0
pandas_datareader: None
bs4 : None
bottleneck : None
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : 3.4.3
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pyxlsb : None
s3fs : None
scipy : 1.7.1
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
numba : None
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43329/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43329/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/43330 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43330/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43330/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43330/events | https://github.com/pandas-dev/pandas/issues/43330 | 984,052,611 | MDU6SXNzdWU5ODQwNTI2MTE= | 43,330 | BUG: groupby.std() casts to float64 | {
"avatar_url": "https://avatars.githubusercontent.com/u/6472290?v=4",
"events_url": "https://api.github.com/users/debnathshoham/events{/privacy}",
"followers_url": "https://api.github.com/users/debnathshoham/followers",
"following_url": "https://api.github.com/users/debnathshoham/following{/other_user}",
"gists_url": "https://api.github.com/users/debnathshoham/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/debnathshoham",
"id": 6472290,
"login": "debnathshoham",
"node_id": "MDQ6VXNlcjY0NzIyOTA=",
"organizations_url": "https://api.github.com/users/debnathshoham/orgs",
"received_events_url": "https://api.github.com/users/debnathshoham/received_events",
"repos_url": "https://api.github.com/users/debnathshoham/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/debnathshoham/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/debnathshoham/subscriptions",
"type": "User",
"url": "https://api.github.com/users/debnathshoham"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "729FCF",
"default": false,
"description": null,
"id": 233160,
"name": "Groupby",
"node_id": "MDU6TGFiZWwyMzMxNjA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Groupby"
},
{
"color": "e102d8",
"default": false,
"description": "Unexpected or buggy dtype conversions",
"id": 31404521,
"name": "Dtype Conversions",
"node_id": "MDU6TGFiZWwzMTQwNDUyMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Dtype%20Conversions"
},
{
"color": "547c03",
"default": false,
"description": "sum, mean, min, max, etc.",
"id": 2365504383,
"name": "Reduction Operations",
"node_id": "MDU6TGFiZWwyMzY1NTA0Mzgz",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Reduction%20Operations"
}
] | open | false | null | [] | null | 4 | "2021-08-31T16:25:31Z" | "2021-09-30T23:15:37Z" | null | CONTRIBUTOR | null | - [x] I have checked that this issue has not already been reported.
- [x] I have confirmed this bug exists on the latest version of pandas.
- [x] (optional) I have confirmed this bug exists on the master branch of pandas.
---
This came out of https://github.com/pandas-dev/pandas/pull/43213#discussion_r699410411
#### Code Sample, a copy-pastable example
```python
In [1]: import pandas as pd
In [2]: pd.__version__
Out[2]: '1.4.0.dev0+532.g9bf09adcda'
In [3]: df=pd.DataFrame([[1,2]]*3, columns=["a","b"], dtype="Int64")
In [4]: df.groupby("a").std().dtypes
Out[4]:
b float64
dtype: object
In [5]: df=pd.DataFrame([[1,2]]*3, columns=["a","b"], dtype="Float64")
In [6]: df.groupby("a").std().dtypes
Out[6]:
b float64
dtype: object
```
#### Problem description
With `Float64` as input, should return `Float64` and not `float64`
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit : 9bf09adcdab1a5babaed9f3315f2572cebf9f1f2
python : 3.8.10.final.0
python-bits : 64
OS : Darwin
OS-release : 20.6.0
Version : Darwin Kernel Version 20.6.0: Wed Jun 23 00:26:31 PDT 2021; root:xnu-7195.141.2~5/RELEASE_X86_64
machine : x86_64
processor : i386
byteorder : little
LC_ALL : None
LANG : None
LOCALE : None.UTF-8
pandas : 1.4.0.dev0+532.g9bf09adcda
numpy : 1.21.0
pytz : 2021.1
dateutil : 2.8.1
pip : 21.1.3
setuptools : 49.6.0.post20210108
Cython : 0.29.23
pytest : 6.2.4
hypothesis : 6.14.1
sphinx : 3.5.4
blosc : None
feather : None
xlsxwriter : 1.4.4
lxml.etree : 4.6.3
html5lib : 1.1
pymysql : None
psycopg2 : None
jinja2 : 3.0.1
IPython : 7.25.0
pandas_datareader: None
bs4 : 4.9.3
bottleneck : 1.3.2
fsspec : 2021.05.0
fastparquet : 0.6.3
gcsfs : 2021.05.0
matplotlib : 3.4.2
numexpr : 2.7.3
odfpy : None
openpyxl : 3.0.7
pandas_gbq : None
pyarrow : 4.0.1
pyxlsb : 1.0.8
s3fs : 0.4.2
scipy : 1.7.0
sqlalchemy : 1.4.20
tables : 3.6.1
tabulate : 0.8.9
xarray : 0.18.2
xlrd : 2.0.1
xlwt : 1.3.0
numba : 0.53.1
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43330/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43330/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/43331 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43331/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43331/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43331/events | https://github.com/pandas-dev/pandas/pull/43331 | 984,074,995 | MDExOlB1bGxSZXF1ZXN0NzIzNTU0MDU1 | 43,331 | CLN: remove typing ignores | {
"avatar_url": "https://avatars.githubusercontent.com/u/24256554?v=4",
"events_url": "https://api.github.com/users/attack68/events{/privacy}",
"followers_url": "https://api.github.com/users/attack68/followers",
"following_url": "https://api.github.com/users/attack68/following{/other_user}",
"gists_url": "https://api.github.com/users/attack68/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/attack68",
"id": 24256554,
"login": "attack68",
"node_id": "MDQ6VXNlcjI0MjU2NTU0",
"organizations_url": "https://api.github.com/users/attack68/orgs",
"received_events_url": "https://api.github.com/users/attack68/received_events",
"repos_url": "https://api.github.com/users/attack68/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/attack68/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/attack68/subscriptions",
"type": "User",
"url": "https://api.github.com/users/attack68"
} | [
{
"color": "207de5",
"default": false,
"description": null,
"id": 211029535,
"name": "Clean",
"node_id": "MDU6TGFiZWwyMTEwMjk1MzU=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Clean"
},
{
"color": "ea91a4",
"default": false,
"description": "type annotations, mypy/pyright type checking",
"id": 1280988427,
"name": "Typing",
"node_id": "MDU6TGFiZWwxMjgwOTg4NDI3",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Typing"
},
{
"color": "006b75",
"default": false,
"description": "conditional formatting using DataFrame.style",
"id": 1728592794,
"name": "Styler",
"node_id": "MDU6TGFiZWwxNzI4NTkyNzk0",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Styler"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 3 | "2021-08-31T16:50:02Z" | "2021-09-01T21:51:54Z" | "2021-08-31T20:53:57Z" | CONTRIBUTOR | null | mypy now passes without ignorance
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43331/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43331/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/43331.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/43331",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/43331.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/43331"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/43332 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43332/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43332/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43332/events | https://github.com/pandas-dev/pandas/pull/43332 | 984,147,091 | MDExOlB1bGxSZXF1ZXN0NzIzNjE0OTg0 | 43,332 | PERF: merge | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [
{
"color": "a10c02",
"default": false,
"description": "Memory or execution speed performance",
"id": 8935311,
"name": "Performance",
"node_id": "MDU6TGFiZWw4OTM1MzEx",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Performance"
},
{
"color": "02d7e1",
"default": false,
"description": "Concat, Merge/Join, Stack/Unstack, Explode",
"id": 13098779,
"name": "Reshaping",
"node_id": "MDU6TGFiZWwxMzA5ODc3OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Reshaping"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 1 | "2021-08-31T18:07:18Z" | "2021-08-31T20:36:43Z" | "2021-08-31T19:37:14Z" | MEMBER | null | ```
from asv_bench.benchmarks.join_merge import *
self6 = Merge()
self6.setup(False)
%timeit self6.time_merge_dataframes_cross(False)
535 ms ± 4.25 ms per loop (mean ± std. dev. of 7 runs, 1 loop each) # <- master
242 ms ± 5.98 ms per loop (mean ± std. dev. of 7 runs, 1 loop each) # <- PR
self6.setup(True)
%timeit self6.time_merge_dataframes_cross(True)
540 ms ± 9.13 ms per loop (mean ± std. dev. of 7 runs, 1 loop each) # <- master
243 ms ± 4.57 ms per loop (mean ± std. dev. of 7 runs, 1 loop each) # <- PR
``` | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43332/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43332/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/43332.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/43332",
"merged_at": "2021-08-31T19:37:14Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/43332.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/43332"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/43333 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43333/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43333/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43333/events | https://github.com/pandas-dev/pandas/pull/43333 | 984,181,979 | MDExOlB1bGxSZXF1ZXN0NzIzNjQ0NTY4 | 43,333 | PERF: read_sas | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [
{
"color": "a10c02",
"default": false,
"description": "Memory or execution speed performance",
"id": 8935311,
"name": "Performance",
"node_id": "MDU6TGFiZWw4OTM1MzEx",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Performance"
},
{
"color": "5319e7",
"default": false,
"description": "SAS: read_sas",
"id": 258745163,
"name": "IO SAS",
"node_id": "MDU6TGFiZWwyNTg3NDUxNjM=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20SAS"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 0 | "2021-08-31T18:47:51Z" | "2021-09-01T15:56:50Z" | "2021-09-01T15:50:16Z" | MEMBER | null | ```
from asv_bench.benchmarks.io.sas import *
self8 = SAS()
self8.setup("sas7bdat")
%timeit self8.time_read_sas("sas7bdat")
41.6 ms ± 1.77 ms per loop (mean ± std. dev. of 7 runs, 10 loops each) # <- master
22.7 ms ± 1.04 ms per loop (mean ± std. dev. of 7 runs, 10 loops each) # <- PR
``` | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43333/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43333/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/43333.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/43333",
"merged_at": "2021-09-01T15:50:16Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/43333.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/43333"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/43334 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43334/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43334/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43334/events | https://github.com/pandas-dev/pandas/issues/43334 | 984,289,599 | MDU6SXNzdWU5ODQyODk1OTk= | 43,334 | BUG: pd.Categorical turns all values into NaN | {
"avatar_url": "https://avatars.githubusercontent.com/u/669983?v=4",
"events_url": "https://api.github.com/users/mfstabile/events{/privacy}",
"followers_url": "https://api.github.com/users/mfstabile/followers",
"following_url": "https://api.github.com/users/mfstabile/following{/other_user}",
"gists_url": "https://api.github.com/users/mfstabile/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mfstabile",
"id": 669983,
"login": "mfstabile",
"node_id": "MDQ6VXNlcjY2OTk4Mw==",
"organizations_url": "https://api.github.com/users/mfstabile/orgs",
"received_events_url": "https://api.github.com/users/mfstabile/received_events",
"repos_url": "https://api.github.com/users/mfstabile/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mfstabile/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mfstabile/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mfstabile"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "e11d21",
"default": false,
"description": "Functionality that used to work in a prior pandas version",
"id": 32815646,
"name": "Regression",
"node_id": "MDU6TGFiZWwzMjgxNTY0Ng==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Regression"
},
{
"color": "fbca04",
"default": false,
"description": "Related to non-user accessible pandas implementation",
"id": 49094459,
"name": "Internals",
"node_id": "MDU6TGFiZWw0OTA5NDQ1OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Internals"
},
{
"color": "e11d21",
"default": false,
"description": "Categorical Data Type",
"id": 78527356,
"name": "Categorical",
"node_id": "MDU6TGFiZWw3ODUyNzM1Ng==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Categorical"
}
] | closed | false | null | [] | {
"closed_at": "2021-10-17T11:06:28Z",
"closed_issues": 77,
"created_at": "2021-09-10T19:48:56Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/13159005?v=4",
"events_url": "https://api.github.com/users/simonjayhawkins/events{/privacy}",
"followers_url": "https://api.github.com/users/simonjayhawkins/followers",
"following_url": "https://api.github.com/users/simonjayhawkins/following{/other_user}",
"gists_url": "https://api.github.com/users/simonjayhawkins/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/simonjayhawkins",
"id": 13159005,
"login": "simonjayhawkins",
"node_id": "MDQ6VXNlcjEzMTU5MDA1",
"organizations_url": "https://api.github.com/users/simonjayhawkins/orgs",
"received_events_url": "https://api.github.com/users/simonjayhawkins/received_events",
"repos_url": "https://api.github.com/users/simonjayhawkins/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/simonjayhawkins/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/simonjayhawkins/subscriptions",
"type": "User",
"url": "https://api.github.com/users/simonjayhawkins"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-10-17T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/90",
"id": 7142224,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/90/labels",
"node_id": "MI_kwDOAA0YD84AbPtQ",
"number": 90,
"open_issues": 0,
"state": "closed",
"title": "1.3.4",
"updated_at": "2021-10-18T11:00:43Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/90"
} | 5 | "2021-08-31T20:28:43Z" | "2021-09-17T16:32:02Z" | "2021-09-17T16:32:02Z" | NONE | null | - [X] I have checked that this issue has not already been reported.
- [x] I have confirmed this bug exists on the latest version of pandas.
- [ ] (optional) I have confirmed this bug exists on the master branch of pandas.
---
#### Code Sample
```python
import pandas as pd
data = pd.read_excel('titanic.xlsx')
data['Survived'] = data['Survived'].astype('category')
data['Sex'] = data['Sex'].astype('category')
data.Survived.cat.categories = ['No', 'Yes']
data.Sex.cat.categories = ['female','male']
data.Survived = pd.Categorical(data.Survived, categories=['No', 'Yes'], ordered=False)
data.Sex = pd.Categorical(data.Sex, categories=['female','male'], ordered=False)
print(data.head(3))
```
#### Problem description
This code sample reads the popular Kaggle titanic file. When reading the titanic.xlsx file, the following Data Set is generated:
| |PassengerId | **Survived** | Pclass | ... | Fare | Cabin | Embarked |
|-|-----|------|---| ---- | ------ | --- | - |
|0| 1 | **0** | 3 | ... | 7.2500 | NaN | S |
|1| 2 | **1** | 1 | ... | 71.2833 | C85 | C |
|2| 3 | **1** | 3 | ... | 7.9250 | NaN | S |
When I execute the code above, the result displayed on the terminal is as follows:
| |PassengerId | **Survived** | Pclass | ... | Fare | Cabin | Embarked |
|-|-----|------|---| ---- | ------ | --- | - |
|0| 1 |**NaN** | 3 | ... | 7.2500 | NaN | S |
|1| 2 | **NaN** | 1 | ... | 71.2833 | C85 | C |
|2| 3 | **NaN** | 3 | ... | 7.9250 | NaN | S |
As can be seen, all values in the "Survived" Series are now NaN. The expected behavior, however, would be for the values to become "Yes" or "No". Strangely, if I invert the penultimate and anti-penultimate lines generating the following code sample:
```python
import pandas as pd
data = pd.read_excel('titanic.xlsx')
data['Survived'] = data['Survived'].astype('category')
data['Sex'] = data['Sex'].astype('category')
data.Survived.cat.categories = ['No', 'Yes']
data.Sex.cat.categories = ['female','male']
data.Sex = pd.Categorical(data.Sex, categories=['female','male'], ordered=False)
data.Survived = pd.Categorical(data.Survived, categories=['No', 'Yes'], ordered=False)
print(data.head(3))
```
The result generated by the code sample above is the expected one, as shown below.
| |PassengerId | **Survived** | Pclass | ... | Fare | Cabin | Embarked |
|-|-----|------|---| ---- | ------ | --- | - |
|0| 1 | **No** | 3 | ... | 7.2500 | NaN | S |
|1| 2 | **Yes** | 1 | ... | 71.2833 | C85 | C |
|2| 3 | **Yes** | 3 | ... | 7.9250 | NaN | S |
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit : 5f648bf1706dd75a9ca0d29f26eadfbb595fe52b
python : 3.9.6.final.0
python-bits : 64
OS : Darwin
OS-release : 19.6.0
Version : Darwin Kernel Version 19.6.0: Tue Jun 22 19:49:55 PDT 2021; root:xnu-6153.141.35~1/RELEASE_X86_64
machine : x86_64
processor : i386
byteorder : little
LC_ALL : None
LANG : pt_BR.UTF-8
LOCALE : pt_BR.UTF-8
pandas : 1.3.2
numpy : 1.21.1
pytz : 2021.1
dateutil : 2.8.1
pip : 21.1.3
setuptools : 57.0.0
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 3.0.1
IPython : None
pandas_datareader: None
bs4 : None
bottleneck : None
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : 3.4.3
numexpr : None
odfpy : None
openpyxl : 3.0.7
pandas_gbq : None
pyarrow : None
pyxlsb : None
s3fs : None
scipy : None
sqlalchemy : 1.4.15
tables : None
tabulate : None
xarray : None
xlrd : 2.0.1
xlwt : None
numba : None
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43334/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43334/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/43335 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43335/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43335/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43335/events | https://github.com/pandas-dev/pandas/pull/43335 | 984,329,490 | MDExOlB1bGxSZXF1ZXN0NzIzNzc2MTEx | 43,335 | PERF: unstack | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [
{
"color": "a10c02",
"default": false,
"description": "Memory or execution speed performance",
"id": 8935311,
"name": "Performance",
"node_id": "MDU6TGFiZWw4OTM1MzEx",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Performance"
},
{
"color": "02d7e1",
"default": false,
"description": "Concat, Merge/Join, Stack/Unstack, Explode",
"id": 13098779,
"name": "Reshaping",
"node_id": "MDU6TGFiZWwxMzA5ODc3OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Reshaping"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 0 | "2021-08-31T21:16:46Z" | "2021-09-02T23:23:39Z" | "2021-09-02T23:18:54Z" | MEMBER | null | ```
from asv_bench.benchmarks.reshape import *
self = ReshapeExtensionDtype()
self.setup("Period[s]")
%timeit self.time_unstack_fast('Period[s]')
9.23 ms ± 357 µs per loop (mean ± std. dev. of 7 runs, 100 loops each) # <- master
5.19 ms ± 106 µs per loop (mean ± std. dev. of 7 runs, 100 loops each) # <- PR
``` | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43335/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43335/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/43335.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/43335",
"merged_at": "2021-09-02T23:18:54Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/43335.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/43335"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/43336 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43336/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43336/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43336/events | https://github.com/pandas-dev/pandas/issues/43336 | 984,338,826 | MDU6SXNzdWU5ODQzMzg4MjY= | 43,336 | BUG: Change in index of empty dataframes in `mode` operation | {
"avatar_url": "https://avatars.githubusercontent.com/u/11664259?v=4",
"events_url": "https://api.github.com/users/galipremsagar/events{/privacy}",
"followers_url": "https://api.github.com/users/galipremsagar/followers",
"following_url": "https://api.github.com/users/galipremsagar/following{/other_user}",
"gists_url": "https://api.github.com/users/galipremsagar/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/galipremsagar",
"id": 11664259,
"login": "galipremsagar",
"node_id": "MDQ6VXNlcjExNjY0MjU5",
"organizations_url": "https://api.github.com/users/galipremsagar/orgs",
"received_events_url": "https://api.github.com/users/galipremsagar/received_events",
"repos_url": "https://api.github.com/users/galipremsagar/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/galipremsagar/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/galipremsagar/subscriptions",
"type": "User",
"url": "https://api.github.com/users/galipremsagar"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "eb6420",
"default": false,
"description": "Non-arithmetic algos: value_counts, factorize, sorting, isin, clip, shift, diff",
"id": 57296398,
"name": "Algos",
"node_id": "MDU6TGFiZWw1NzI5NjM5OA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Algos"
},
{
"color": "be21f2",
"default": false,
"description": "May be closeable, needs more eyeballs",
"id": 2365504893,
"name": "Closing Candidate",
"node_id": "MDU6TGFiZWwyMzY1NTA0ODkz",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Closing%20Candidate"
}
] | closed | false | null | [] | null | 3 | "2021-08-31T21:28:39Z" | "2021-09-01T15:20:00Z" | "2021-09-01T15:19:59Z" | NONE | null | - [x] I have checked that this issue has not already been reported.
- [x] I have confirmed this bug exists on the latest version of pandas.
- [ ] (optional) I have confirmed this bug exists on the master branch of pandas.
---
**Note**: Please read [this guide](https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) detailing how to provide the necessary information for us to reproduce your bug.
#### Code Sample, a copy-pastable example
Previously pandas used to retain the index in an empty dataframe:
```python
>>> df = pd.DataFrame({'a':['a', 'b', 'c']}, index=['a', 'b', 'c'])
>>> df.mode()
a
0 a
1 b
2 c
>>> df.mode(numeric_only=True)
Empty DataFrame
Columns: []
Index: [a, b, c]
>>> pd.__version__
'1.2.5'
```
Currently the index is not being retained if the dataframe is empty:
```python
>>> import pandas as pd
>>> df = pd.DataFrame({'a':['a', 'b', 'c']}, index=['a', 'b', 'c'])
>>> df.mode()
a
0 a
1 b
2 c
>>> df.mode(numeric_only=True)
Empty DataFrame
Columns: []
Index: []
>>> pd.__version__
```
Is this a conscious change, if yes can someone point me to the docs where I can learn more about this change?
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit : 5f648bf1706dd75a9ca0d29f26eadfbb595fe52b
python : 3.8.10.final.0
python-bits : 64
OS : Linux
OS-release : 4.15.0-76-generic
Version : #86-Ubuntu SMP Fri Jan 17 17:24:28 UTC 2020
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.3.2
numpy : 1.21.2
pytz : 2021.1
dateutil : 2.8.2
pip : 21.2.4
setuptools : 57.4.0
Cython : 0.29.24
pytest : 6.2.5
hypothesis : 6.17.4
sphinx : 4.1.2
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 3.0.1
IPython : 7.27.0
pandas_datareader: None
bs4 : 4.9.3
bottleneck : None
fsspec : 2021.08.1
fastparquet : None
gcsfs : None
matplotlib : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : 5.0.0
pyxlsb : None
s3fs : None
scipy : None
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
numba : 0.53.1
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43336/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43336/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/43337 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43337/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43337/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43337/events | https://github.com/pandas-dev/pandas/issues/43337 | 984,357,390 | MDU6SXNzdWU5ODQzNTczOTA= | 43,337 | BUG: transpose unnecessarily returning object | {
"avatar_url": "https://avatars.githubusercontent.com/u/45562402?v=4",
"events_url": "https://api.github.com/users/rhshadrach/events{/privacy}",
"followers_url": "https://api.github.com/users/rhshadrach/followers",
"following_url": "https://api.github.com/users/rhshadrach/following{/other_user}",
"gists_url": "https://api.github.com/users/rhshadrach/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/rhshadrach",
"id": 45562402,
"login": "rhshadrach",
"node_id": "MDQ6VXNlcjQ1NTYyNDAy",
"organizations_url": "https://api.github.com/users/rhshadrach/orgs",
"received_events_url": "https://api.github.com/users/rhshadrach/received_events",
"repos_url": "https://api.github.com/users/rhshadrach/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/rhshadrach/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rhshadrach/subscriptions",
"type": "User",
"url": "https://api.github.com/users/rhshadrach"
} | [
{
"color": "4E9A06",
"default": false,
"description": null,
"id": 76812,
"name": "Enhancement",
"node_id": "MDU6TGFiZWw3NjgxMg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Enhancement"
},
{
"color": "e102d8",
"default": false,
"description": "Unexpected or buggy dtype conversions",
"id": 31404521,
"name": "Dtype Conversions",
"node_id": "MDU6TGFiZWwzMTQwNDUyMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Dtype%20Conversions"
}
] | open | false | null | [] | {
"closed_at": null,
"closed_issues": 786,
"created_at": "2015-01-13T10:53:19Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "Changes that would be nice to have in the next release. These issues are not blocking. They will be pushed to the next release if no one has time to fix them.",
"due_on": null,
"html_url": "https://github.com/pandas-dev/pandas/milestone/32",
"id": 933188,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/32/labels",
"node_id": "MDk6TWlsZXN0b25lOTMzMTg4",
"number": 32,
"open_issues": 1053,
"state": "open",
"title": "Contributions Welcome",
"updated_at": "2021-11-21T00:50:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/32"
} | 1 | "2021-08-31T21:54:55Z" | "2021-09-01T13:41:08Z" | null | MEMBER | null | Ref: https://github.com/pandas-dev/pandas/pull/43213/files#r699680952
Example:
```
df = pd.DataFrame({'a': [1], 'b': [2]})
print(df.T.dtypes)
df['b'] = df['b'].astype('Int64')
print(df.T.dtypes)
```
gives int64 for the first example, and object for the 2nd. However, the 2nd arguably would be better off as Int64.
The code from #43213 could be used in the transpose method, something akin to
```
from pandas.core.dtypes.cast import find_common_type
df = pd.DataFrame({'a': [1], 'b': [2]})
df['b'] = df['b'].astype('Int64')
common_type = find_common_type(df.dtypes.tolist())
print(df.T.astype(common_type, copy=False).dtypes)
```
Perhaps there are undesirable side-effects by doing this? | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43337/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43337/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/43338 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43338/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43338/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43338/events | https://github.com/pandas-dev/pandas/pull/43338 | 984,412,924 | MDExOlB1bGxSZXF1ZXN0NzIzODUwMTU0 | 43,338 | ENH: Rolling rank | {
"avatar_url": "https://avatars.githubusercontent.com/u/355612?v=4",
"events_url": "https://api.github.com/users/gsiano/events{/privacy}",
"followers_url": "https://api.github.com/users/gsiano/followers",
"following_url": "https://api.github.com/users/gsiano/following{/other_user}",
"gists_url": "https://api.github.com/users/gsiano/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/gsiano",
"id": 355612,
"login": "gsiano",
"node_id": "MDQ6VXNlcjM1NTYxMg==",
"organizations_url": "https://api.github.com/users/gsiano/orgs",
"received_events_url": "https://api.github.com/users/gsiano/received_events",
"repos_url": "https://api.github.com/users/gsiano/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/gsiano/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gsiano/subscriptions",
"type": "User",
"url": "https://api.github.com/users/gsiano"
} | [
{
"color": "4E9A06",
"default": false,
"description": null,
"id": 76812,
"name": "Enhancement",
"node_id": "MDU6TGFiZWw3NjgxMg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Enhancement"
},
{
"color": "d4c5f9",
"default": false,
"description": "rolling, ewma, expanding",
"id": 1045950827,
"name": "Window",
"node_id": "MDU6TGFiZWwxMDQ1OTUwODI3",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Window"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 13 | "2021-08-31T23:10:54Z" | "2021-09-14T13:08:26Z" | "2021-09-14T13:07:58Z" | CONTRIBUTOR | null | xref https://github.com/pandas-dev/pandas/issues/9481
- [x] closes #9481
- [x] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43338/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43338/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/43338.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/43338",
"merged_at": "2021-09-14T13:07:58Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/43338.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/43338"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/43339 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43339/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43339/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43339/events | https://github.com/pandas-dev/pandas/issues/43339 | 984,599,626 | MDU6SXNzdWU5ODQ1OTk2MjY= | 43,339 | BUG: skiplist memory leak in rolling functions | {
"avatar_url": "https://avatars.githubusercontent.com/u/355612?v=4",
"events_url": "https://api.github.com/users/gsiano/events{/privacy}",
"followers_url": "https://api.github.com/users/gsiano/followers",
"following_url": "https://api.github.com/users/gsiano/following{/other_user}",
"gists_url": "https://api.github.com/users/gsiano/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/gsiano",
"id": 355612,
"login": "gsiano",
"node_id": "MDQ6VXNlcjM1NTYxMg==",
"organizations_url": "https://api.github.com/users/gsiano/orgs",
"received_events_url": "https://api.github.com/users/gsiano/received_events",
"repos_url": "https://api.github.com/users/gsiano/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/gsiano/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gsiano/subscriptions",
"type": "User",
"url": "https://api.github.com/users/gsiano"
} | [
{
"color": "a10c02",
"default": false,
"description": "Memory or execution speed performance",
"id": 8935311,
"name": "Performance",
"node_id": "MDU6TGFiZWw4OTM1MzEx",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Performance"
},
{
"color": "d4c5f9",
"default": false,
"description": "rolling, ewma, expanding",
"id": 1045950827,
"name": "Window",
"node_id": "MDU6TGFiZWwxMDQ1OTUwODI3",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Window"
}
] | closed | false | null | [] | {
"closed_at": "2021-10-17T11:06:28Z",
"closed_issues": 77,
"created_at": "2021-09-10T19:48:56Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/13159005?v=4",
"events_url": "https://api.github.com/users/simonjayhawkins/events{/privacy}",
"followers_url": "https://api.github.com/users/simonjayhawkins/followers",
"following_url": "https://api.github.com/users/simonjayhawkins/following{/other_user}",
"gists_url": "https://api.github.com/users/simonjayhawkins/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/simonjayhawkins",
"id": 13159005,
"login": "simonjayhawkins",
"node_id": "MDQ6VXNlcjEzMTU5MDA1",
"organizations_url": "https://api.github.com/users/simonjayhawkins/orgs",
"received_events_url": "https://api.github.com/users/simonjayhawkins/received_events",
"repos_url": "https://api.github.com/users/simonjayhawkins/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/simonjayhawkins/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/simonjayhawkins/subscriptions",
"type": "User",
"url": "https://api.github.com/users/simonjayhawkins"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-10-17T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/90",
"id": 7142224,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/90/labels",
"node_id": "MI_kwDOAA0YD84AbPtQ",
"number": 90,
"open_issues": 0,
"state": "closed",
"title": "1.3.4",
"updated_at": "2021-10-18T11:00:43Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/90"
} | 1 | "2021-09-01T04:24:00Z" | "2021-10-16T17:46:50Z" | "2021-10-16T17:46:50Z" | CONTRIBUTOR | null | - [x] I have checked that this issue has not already been reported.
- [x] I have confirmed this bug exists on the latest version of pandas.
- [ ] (optional) I have confirmed this bug exists on the master branch of pandas.
---
**Note**: Please read [this guide](https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) detailing how to provide the necessary information for us to reproduce your bug.
#### Code Sample, a copy-pastable example
running the `test_rolling_non_monotonic` test with the following addition triggers the leak
discovered in #43338
```
diff --git a/pandas/tests/window/test_rolling.py b/pandas/tests/window/test_rolling.py
index f829ae4be0..35063ba555 100644
--- a/pandas/tests/window/test_rolling.py
+++ b/pandas/tests/window/test_rolling.py
@@ -1251,6 +1251,19 @@ def test_rolling_decreasing_indices(method):
-0.45439658241367054,
],
),
+ (
+ "median",
+ [
+ float("nan"),
+ 6.5,
+ float("nan"),
+ 20.5,
+ 4.0,
+ 6.5,
+ 9.0,
+ 12.5
+ ],
+ ),
],
)
def test_rolling_non_monotonic(method, expected):
```
#### Problem description
`roll_median_c` and `roll_quantile` reassign but don't destroy their skiplist pointers when the indices are non-monotonic. `skiplist_destroy` should be called before `skiplist_init`. It might also be worth considering adding a `reset()` function to the skiplist to avoid unnecessary reallocations. But, since these extra allocations currently happen anyways it's probably better to just add the destroy() call first.
```
==184879==
==184879== 0 bytes in 1 blocks are indirectly lost in loss record 1 of 1,913
==184879== at 0x483B7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==184879== by 0x168B8745: node_init (skiplist.h:69)
==184879== by 0x168B8745: skiplist_init(int) (skiplist.h:129)
==184879== by 0x168D3F1B: __pyx_pf_6pandas_5_libs_6window_12aggregations_10roll_median_c (aggregations.cpp:9332)
==184879== by 0x168D3F1B: __pyx_pw_6pandas_5_libs_6window_12aggregations_11roll_median_c(_object*, _object*, _object*) (aggregations.cpp:9050)
==184879== by 0x526878: ??? (in /usr/bin/python3.9)
==184879== by 0x629E37: _PyObject_Call (in /usr/bin/python3.9)
==184879== by 0x59F7D5: _PyEval_EvalFrameDefault (in /usr/bin/python3.9)
==184879== by 0x59734D: ??? (in /usr/bin/python3.9)
==184879== by 0x62C5F3: _PyFunction_Vectorcall (in /usr/bin/python3.9)
==184879== by 0x599266: _PyEval_EvalFrameDefault (in /usr/bin/python3.9)
==184879== by 0x59734D: ??? (in /usr/bin/python3.9)
==184879== by 0x62C5F3: _PyFunction_Vectorcall (in /usr/bin/python3.9)
==184879== by 0x599266: _PyEval_EvalFrameDefault (in /usr/bin/python3.9)
==184879==
==184879== 0 bytes in 1 blocks are indirectly lost in loss record 2 of 1,913
==184879== at 0x483B7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==184879== by 0x168B8750: node_init (skiplist.h:70)
==184879== by 0x168B8750: skiplist_init(int) (skiplist.h:129)
==184879== by 0x168D3F1B: __pyx_pf_6pandas_5_libs_6window_12aggregations_10roll_median_c (aggregations.cpp:9332)
==184879== by 0x168D3F1B: __pyx_pw_6pandas_5_libs_6window_12aggregations_11roll_median_c(_object*, _object*, _object*) (aggregations.cpp:9050)
==184879== by 0x526878: ??? (in /usr/bin/python3.9)
==184879== by 0x629E37: _PyObject_Call (in /usr/bin/python3.9)
==184879== by 0x59F7D5: _PyEval_EvalFrameDefault (in /usr/bin/python3.9)
==184879== by 0x59734D: ??? (in /usr/bin/python3.9)
==184879== by 0x62C5F3: _PyFunction_Vectorcall (in /usr/bin/python3.9)
==184879== by 0x599266: _PyEval_EvalFrameDefault (in /usr/bin/python3.9)
==184879== by 0x59734D: ??? (in /usr/bin/python3.9)
==184879== by 0x62C5F3: _PyFunction_Vectorcall (in /usr/bin/python3.9)
==184879== by 0x599266: _PyEval_EvalFrameDefault (in /usr/bin/python3.9)
==184879==
```
#### Expected Output
#### Output of ``pd.show_versions()``
<details>
```>>> pd.show_versions()
INSTALLED VERSIONS
------------------
commit : 4caa51b1790d3b1c03835e919fc9f753fbd817b3
python : 3.9.5.final.0
python-bits : 64
OS : Linux
OS-release : 5.11.0-7620-generic
Version : #21~1626191760~20.04~55de9c3~dev-Ubuntu SMP Tue Jul 20 18:02:09
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.4.0.dev0+551.g4caa51b179.dirty
numpy : 1.21.1
pytz : 2019.3
dateutil : 2.7.3
pip : 21.2.4
setuptools : 45.2.0
Cython : 0.29.21
pytest : 6.2.5
hypothesis : 6.17.4
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : 4.6.3
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 3.0.1
IPython : 7.26.0
pandas_datareader: None
bs4 : None
bottleneck : None
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : 3.4.2
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pyxlsb : None
s3fs : None
scipy : 1.7.1
sqlalchemy : 1.4.22
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
numba : None```
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43339/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43339/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/43340 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43340/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43340/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43340/events | https://github.com/pandas-dev/pandas/pull/43340 | 984,904,660 | MDExOlB1bGxSZXF1ZXN0NzI0Mjg1MDAy | 43,340 | BUG: transpose casts mixed dtypes to object | {
"avatar_url": "https://avatars.githubusercontent.com/u/6472290?v=4",
"events_url": "https://api.github.com/users/debnathshoham/events{/privacy}",
"followers_url": "https://api.github.com/users/debnathshoham/followers",
"following_url": "https://api.github.com/users/debnathshoham/following{/other_user}",
"gists_url": "https://api.github.com/users/debnathshoham/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/debnathshoham",
"id": 6472290,
"login": "debnathshoham",
"node_id": "MDQ6VXNlcjY0NzIyOTA=",
"organizations_url": "https://api.github.com/users/debnathshoham/orgs",
"received_events_url": "https://api.github.com/users/debnathshoham/received_events",
"repos_url": "https://api.github.com/users/debnathshoham/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/debnathshoham/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/debnathshoham/subscriptions",
"type": "User",
"url": "https://api.github.com/users/debnathshoham"
} | [
{
"color": "e102d8",
"default": false,
"description": "Unexpected or buggy dtype conversions",
"id": 31404521,
"name": "Dtype Conversions",
"node_id": "MDU6TGFiZWwzMTQwNDUyMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Dtype%20Conversions"
},
{
"color": "7fcce8",
"default": false,
"description": "",
"id": 2347992045,
"name": "Stale",
"node_id": "MDU6TGFiZWwyMzQ3OTkyMDQ1",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Stale"
}
] | open | false | null | [] | null | 6 | "2021-09-01T09:09:01Z" | "2021-11-04T00:03:21Z" | null | CONTRIBUTOR | null | - [x] closes #43337
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [x] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43340/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43340/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/43340.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/43340",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/43340.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/43340"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/43341 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43341/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43341/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43341/events | https://github.com/pandas-dev/pandas/pull/43341 | 984,905,275 | MDExOlB1bGxSZXF1ZXN0NzI0Mjg1NTI5 | 43,341 | BUG: styler.format options and validator tests | {
"avatar_url": "https://avatars.githubusercontent.com/u/24256554?v=4",
"events_url": "https://api.github.com/users/attack68/events{/privacy}",
"followers_url": "https://api.github.com/users/attack68/followers",
"following_url": "https://api.github.com/users/attack68/following{/other_user}",
"gists_url": "https://api.github.com/users/attack68/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/attack68",
"id": 24256554,
"login": "attack68",
"node_id": "MDQ6VXNlcjI0MjU2NTU0",
"organizations_url": "https://api.github.com/users/attack68/orgs",
"received_events_url": "https://api.github.com/users/attack68/received_events",
"repos_url": "https://api.github.com/users/attack68/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/attack68/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/attack68/subscriptions",
"type": "User",
"url": "https://api.github.com/users/attack68"
} | [
{
"color": "006b75",
"default": false,
"description": "conditional formatting using DataFrame.style",
"id": 1728592794,
"name": "Styler",
"node_id": "MDU6TGFiZWwxNzI4NTkyNzk0",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Styler"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 4 | "2021-09-01T09:09:37Z" | "2021-09-07T15:47:13Z" | "2021-09-06T15:50:04Z" | CONTRIBUTOR | null | sorry, this is a fix for recent #43256.
the input types were not working using the instance factory approach so this is explicit.
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43341/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43341/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/43341.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/43341",
"merged_at": "2021-09-06T15:50:03Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/43341.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/43341"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/43342 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43342/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43342/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43342/events | https://github.com/pandas-dev/pandas/issues/43342 | 985,165,279 | MDU6SXNzdWU5ODUxNjUyNzk= | 43,342 | BUG: Styler initialised with `precision` doesn't display correctly | {
"avatar_url": "https://avatars.githubusercontent.com/u/24256554?v=4",
"events_url": "https://api.github.com/users/attack68/events{/privacy}",
"followers_url": "https://api.github.com/users/attack68/followers",
"following_url": "https://api.github.com/users/attack68/following{/other_user}",
"gists_url": "https://api.github.com/users/attack68/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/attack68",
"id": 24256554,
"login": "attack68",
"node_id": "MDQ6VXNlcjI0MjU2NTU0",
"organizations_url": "https://api.github.com/users/attack68/orgs",
"received_events_url": "https://api.github.com/users/attack68/received_events",
"repos_url": "https://api.github.com/users/attack68/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/attack68/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/attack68/subscriptions",
"type": "User",
"url": "https://api.github.com/users/attack68"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "006b75",
"default": false,
"description": "conditional formatting using DataFrame.style",
"id": 1728592794,
"name": "Styler",
"node_id": "MDU6TGFiZWwxNzI4NTkyNzk0",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Styler"
}
] | closed | false | null | [] | null | 0 | "2021-09-01T13:37:46Z" | "2021-09-01T18:09:21Z" | "2021-09-01T18:09:21Z" | CONTRIBUTOR | null | ```
df = pd.DataFrame([[1000.0]])
styler = Styler(df, precision=0)
styler
0
0 1000.000000
```
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43342/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43342/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/43343 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43343/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43343/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43343/events | https://github.com/pandas-dev/pandas/pull/43343 | 985,177,822 | MDExOlB1bGxSZXF1ZXN0NzI0NTE2NjM4 | 43,343 | BUG: styler initialise precision=0 | {
"avatar_url": "https://avatars.githubusercontent.com/u/24256554?v=4",
"events_url": "https://api.github.com/users/attack68/events{/privacy}",
"followers_url": "https://api.github.com/users/attack68/followers",
"following_url": "https://api.github.com/users/attack68/following{/other_user}",
"gists_url": "https://api.github.com/users/attack68/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/attack68",
"id": 24256554,
"login": "attack68",
"node_id": "MDQ6VXNlcjI0MjU2NTU0",
"organizations_url": "https://api.github.com/users/attack68/orgs",
"received_events_url": "https://api.github.com/users/attack68/received_events",
"repos_url": "https://api.github.com/users/attack68/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/attack68/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/attack68/subscriptions",
"type": "User",
"url": "https://api.github.com/users/attack68"
} | [
{
"color": "006b75",
"default": false,
"description": "conditional formatting using DataFrame.style",
"id": 1728592794,
"name": "Styler",
"node_id": "MDU6TGFiZWwxNzI4NTkyNzk0",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Styler"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 1 | "2021-09-01T13:48:56Z" | "2021-09-01T18:10:56Z" | "2021-09-01T18:09:21Z" | CONTRIBUTOR | null | - [x] closes #43342
no whats new needed since this was a recent change for 1.4.0 | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43343/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43343/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/43343.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/43343",
"merged_at": "2021-09-01T18:09:21Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/43343.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/43343"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/43344 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43344/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43344/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43344/events | https://github.com/pandas-dev/pandas/issues/43344 | 985,208,679 | MDU6SXNzdWU5ODUyMDg2Nzk= | 43,344 | BUG: series.replace() fails when string series contains pd.NA | {
"avatar_url": "https://avatars.githubusercontent.com/u/7604948?v=4",
"events_url": "https://api.github.com/users/stevendavis/events{/privacy}",
"followers_url": "https://api.github.com/users/stevendavis/followers",
"following_url": "https://api.github.com/users/stevendavis/following{/other_user}",
"gists_url": "https://api.github.com/users/stevendavis/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/stevendavis",
"id": 7604948,
"login": "stevendavis",
"node_id": "MDQ6VXNlcjc2MDQ5NDg=",
"organizations_url": "https://api.github.com/users/stevendavis/orgs",
"received_events_url": "https://api.github.com/users/stevendavis/received_events",
"repos_url": "https://api.github.com/users/stevendavis/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/stevendavis/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/stevendavis/subscriptions",
"type": "User",
"url": "https://api.github.com/users/stevendavis"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "5319e7",
"default": false,
"description": "String extension data type and string data",
"id": 57522093,
"name": "Strings",
"node_id": "MDU6TGFiZWw1NzUyMjA5Mw==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Strings"
},
{
"color": "01a886",
"default": false,
"description": "replace method",
"id": 1652721180,
"name": "replace",
"node_id": "MDU6TGFiZWwxNjUyNzIxMTgw",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/replace"
}
] | open | false | null | [] | {
"closed_at": null,
"closed_issues": 786,
"created_at": "2015-01-13T10:53:19Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "Changes that would be nice to have in the next release. These issues are not blocking. They will be pushed to the next release if no one has time to fix them.",
"due_on": null,
"html_url": "https://github.com/pandas-dev/pandas/milestone/32",
"id": 933188,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/32/labels",
"node_id": "MDk6TWlsZXN0b25lOTMzMTg4",
"number": 32,
"open_issues": 1053,
"state": "open",
"title": "Contributions Welcome",
"updated_at": "2021-11-21T00:50:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/32"
} | 2 | "2021-09-01T14:14:08Z" | "2021-09-15T16:20:00Z" | null | NONE | null | - [x ] I have checked that this issue has not already been reported.
- [x ] I have confirmed this bug exists on the latest version of pandas.
- [ ] (optional) I have confirmed this bug exists on the master branch of pandas.
---
**Note**: Please read [this guide](https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) detailing how to provide the necessary information for us to reproduce your bug.
#### Code Sample, a copy-pastable example
```
def test_pandas_replace_na():
series = pd.Series(["AA", "BB", "CC", "DD", "EE", "", pd.NA], dtype="string")
original = list(series)
regex_mapping = {
"AA": "CC",
"BB": "CC",
"EE": "CC",
"CC": "CC-REPL",
}
series2 = series.replace(regex_mapping, regex=True)
assert list(series2) == ["CC", "CC", "CC-REPL", "DD", "CC", "", pd.NA]
```
#### Problem description
The test case above causes this error in compare_or_regex_search():
ValueError: NumPy boolean array indexing assignment cannot assign 7 input values to the 6 output values where the mask is true
#### Expected Output
See test case.
Is there a suggested workaround?
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit : 5f648bf1706dd75a9ca0d29f26eadfbb595fe52b
python : 3.8.8.final.0
python-bits : 64
OS : Windows
OS-release : 10
Version : 10.0.18362
machine : AMD64
processor : Intel64 Family 6 Model 85 Stepping 7, GenuineIntel
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : English_United States.1252
pandas : 1.3.2
numpy : 1.20.2
pytz : 2021.1
dateutil : 2.8.2
pip : 21.1.1
setuptools : 49.6.0.post20210108
Cython : None
pytest : 6.2.4
hypothesis : None
sphinx : 4.1.2
blosc : None
feather : None
xlsxwriter : 3.0.1
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 2.11.3
IPython : 7.23.0
pandas_datareader: None
bs4 : None
bottleneck : None
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : 3.4.1
numexpr : None
odfpy : None
openpyxl : 3.0.7
pandas_gbq : None
pyarrow : None
pyxlsb : None
s3fs : None
scipy : 1.6.3
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
numba : 0.53.1
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43344/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43344/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/43345 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43345/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43345/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43345/events | https://github.com/pandas-dev/pandas/issues/43345 | 985,323,809 | MDU6SXNzdWU5ODUzMjM4MDk= | 43,345 | BUG: datetimelike index and column with name same as year in index | {
"avatar_url": "https://avatars.githubusercontent.com/u/33159416?v=4",
"events_url": "https://api.github.com/users/Dominioncher/events{/privacy}",
"followers_url": "https://api.github.com/users/Dominioncher/followers",
"following_url": "https://api.github.com/users/Dominioncher/following{/other_user}",
"gists_url": "https://api.github.com/users/Dominioncher/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Dominioncher",
"id": 33159416,
"login": "Dominioncher",
"node_id": "MDQ6VXNlcjMzMTU5NDE2",
"organizations_url": "https://api.github.com/users/Dominioncher/orgs",
"received_events_url": "https://api.github.com/users/Dominioncher/received_events",
"repos_url": "https://api.github.com/users/Dominioncher/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Dominioncher/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Dominioncher/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Dominioncher"
} | [
{
"color": "0b02e1",
"default": false,
"description": "Related to indexing on series/frames, not to indexes themselves",
"id": 2822098,
"name": "Indexing",
"node_id": "MDU6TGFiZWwyODIyMDk4",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Indexing"
},
{
"color": "0052cc",
"default": false,
"description": null,
"id": 34444536,
"name": "Usage Question",
"node_id": "MDU6TGFiZWwzNDQ0NDUzNg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Usage%20Question"
}
] | closed | false | null | [] | null | 1 | "2021-09-01T15:56:51Z" | "2021-09-02T04:43:31Z" | "2021-09-02T04:43:31Z" | NONE | null | - [x] I have checked that this issue has not already been reported.
- [x] I have confirmed this bug exists on the latest version of pandas.
- [ ] (optional) I have confirmed this bug exists on the master branch of pandas.
---
#### Code Sample, a copy-pastable example
```python
import pandas as pd
dates = ['2019-01-01', '2020-01-01']
frame = pd.DataFrame(index=pd.to_datetime(dates))
frame['2020'] = 0
print(frame['2020'])
```
#### Problem description
I can create any column with any names but when i try create column with name like year in my indexes it return DataFrame expect Series
#### Expected Output
2019-01-01 0
2020-01-01 0
Name: 2020, dtype: int64
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit : 5f648bf1706dd75a9ca0d29f26eadfbb595fe52b
python : 3.8.10.final.0
python-bits : 64
OS : Windows
OS-release : 10
Version : 10.0.19042
machine : AMD64
processor : AMD64 Family 23 Model 113 Stepping 0, AuthenticAMD
byteorder : little
LC_ALL : None
LANG : None
LOCALE : Russian_Russia.1251
pandas : 1.3.2
numpy : 1.21.2
pytz : 2021.1
dateutil : 2.8.1
pip : 20.2.3
setuptools : 56.0.0
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 2.11.2
IPython : None
pandas_datareader: None
bs4 : None
bottleneck : None
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pyxlsb : None
s3fs : None
scipy : None
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
numba : None
None
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43345/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43345/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/43346 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43346/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43346/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43346/events | https://github.com/pandas-dev/pandas/pull/43346 | 985,403,646 | MDExOlB1bGxSZXF1ZXN0NzI0NzAzMzU2 | 43,346 | ENH: kw `names` to `Styler.hide_index` | {
"avatar_url": "https://avatars.githubusercontent.com/u/24256554?v=4",
"events_url": "https://api.github.com/users/attack68/events{/privacy}",
"followers_url": "https://api.github.com/users/attack68/followers",
"following_url": "https://api.github.com/users/attack68/following{/other_user}",
"gists_url": "https://api.github.com/users/attack68/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/attack68",
"id": 24256554,
"login": "attack68",
"node_id": "MDQ6VXNlcjI0MjU2NTU0",
"organizations_url": "https://api.github.com/users/attack68/orgs",
"received_events_url": "https://api.github.com/users/attack68/received_events",
"repos_url": "https://api.github.com/users/attack68/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/attack68/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/attack68/subscriptions",
"type": "User",
"url": "https://api.github.com/users/attack68"
} | [
{
"color": "006b75",
"default": false,
"description": "read_html, to_html, Styler.apply, Styler.applymap",
"id": 57395487,
"name": "IO HTML",
"node_id": "MDU6TGFiZWw1NzM5NTQ4Nw==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20HTML"
},
{
"color": "006b75",
"default": false,
"description": "conditional formatting using DataFrame.style",
"id": 1728592794,
"name": "Styler",
"node_id": "MDU6TGFiZWwxNzI4NTkyNzk0",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Styler"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 1 | "2021-09-01T17:19:37Z" | "2021-09-01T21:51:04Z" | "2021-09-01T18:30:27Z" | CONTRIBUTOR | null | adds an item to #41649 and #41693
Im ambiguous about this feature but for better compatability when refactoring `DataFrame.to_html` and `DataFrame.to_latex` to use `Styler` it is needed.

| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43346/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43346/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/43346.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/43346",
"merged_at": "2021-09-01T18:30:27Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/43346.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/43346"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/43347 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43347/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43347/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43347/events | https://github.com/pandas-dev/pandas/pull/43347 | 985,562,663 | MDExOlB1bGxSZXF1ZXN0NzI0ODQ0MjIz | 43,347 | Backport PR #43145 on branch 1.3.x (REGR: Fix fastparquet 0.7.0 not being able to read a parquet file) | {
"avatar_url": "https://avatars.githubusercontent.com/u/39504233?v=4",
"events_url": "https://api.github.com/users/meeseeksmachine/events{/privacy}",
"followers_url": "https://api.github.com/users/meeseeksmachine/followers",
"following_url": "https://api.github.com/users/meeseeksmachine/following{/other_user}",
"gists_url": "https://api.github.com/users/meeseeksmachine/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/meeseeksmachine",
"id": 39504233,
"login": "meeseeksmachine",
"node_id": "MDQ6VXNlcjM5NTA0MjMz",
"organizations_url": "https://api.github.com/users/meeseeksmachine/orgs",
"received_events_url": "https://api.github.com/users/meeseeksmachine/received_events",
"repos_url": "https://api.github.com/users/meeseeksmachine/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/meeseeksmachine/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/meeseeksmachine/subscriptions",
"type": "User",
"url": "https://api.github.com/users/meeseeksmachine"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "e11d21",
"default": false,
"description": "Functionality that used to work in a prior pandas version",
"id": 32815646,
"name": "Regression",
"node_id": "MDU6TGFiZWwzMjgxNTY0Ng==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Regression"
},
{
"color": "5319e7",
"default": false,
"description": "parquet, feather",
"id": 685114413,
"name": "IO Parquet",
"node_id": "MDU6TGFiZWw2ODUxMTQ0MTM=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20Parquet"
}
] | closed | false | null | [] | {
"closed_at": "2021-09-12T08:21:30Z",
"closed_issues": 79,
"created_at": "2021-08-15T08:07:48Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/13159005?v=4",
"events_url": "https://api.github.com/users/simonjayhawkins/events{/privacy}",
"followers_url": "https://api.github.com/users/simonjayhawkins/followers",
"following_url": "https://api.github.com/users/simonjayhawkins/following{/other_user}",
"gists_url": "https://api.github.com/users/simonjayhawkins/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/simonjayhawkins",
"id": 13159005,
"login": "simonjayhawkins",
"node_id": "MDQ6VXNlcjEzMTU5MDA1",
"organizations_url": "https://api.github.com/users/simonjayhawkins/orgs",
"received_events_url": "https://api.github.com/users/simonjayhawkins/received_events",
"repos_url": "https://api.github.com/users/simonjayhawkins/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/simonjayhawkins/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/simonjayhawkins/subscriptions",
"type": "User",
"url": "https://api.github.com/users/simonjayhawkins"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-09-12T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/89",
"id": 7059576,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/89/labels",
"node_id": "MI_kwDOAA0YD84Aa7h4",
"number": 89,
"open_issues": 0,
"state": "closed",
"title": "1.3.3",
"updated_at": "2021-09-12T20:30:04Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/89"
} | 0 | "2021-09-01T19:37:10Z" | "2021-09-01T20:19:36Z" | "2021-09-01T20:19:36Z" | NONE | null | Backport PR #43145: REGR: Fix fastparquet 0.7.0 not being able to read a parquet file | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43347/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43347/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/43347.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/43347",
"merged_at": "2021-09-01T20:19:36Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/43347.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/43347"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/43348 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43348/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43348/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43348/events | https://github.com/pandas-dev/pandas/issues/43348 | 985,587,048 | MDU6SXNzdWU5ODU1ODcwNDg= | 43,348 | CLN: Remove Sphinx Warnings from DocBuild | {
"avatar_url": "https://avatars.githubusercontent.com/u/16733618?v=4",
"events_url": "https://api.github.com/users/alimcmaster1/events{/privacy}",
"followers_url": "https://api.github.com/users/alimcmaster1/followers",
"following_url": "https://api.github.com/users/alimcmaster1/following{/other_user}",
"gists_url": "https://api.github.com/users/alimcmaster1/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/alimcmaster1",
"id": 16733618,
"login": "alimcmaster1",
"node_id": "MDQ6VXNlcjE2NzMzNjE4",
"organizations_url": "https://api.github.com/users/alimcmaster1/orgs",
"received_events_url": "https://api.github.com/users/alimcmaster1/received_events",
"repos_url": "https://api.github.com/users/alimcmaster1/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/alimcmaster1/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/alimcmaster1/subscriptions",
"type": "User",
"url": "https://api.github.com/users/alimcmaster1"
} | [
{
"color": "3465A4",
"default": false,
"description": null,
"id": 134699,
"name": "Docs",
"node_id": "MDU6TGFiZWwxMzQ2OTk=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Docs"
},
{
"color": "0e8a16",
"default": true,
"description": null,
"id": 717120670,
"name": "good first issue",
"node_id": "MDU6TGFiZWw3MTcxMjA2NzA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/good%20first%20issue"
}
] | closed | false | {
"avatar_url": "https://avatars.githubusercontent.com/u/19284074?v=4",
"events_url": "https://api.github.com/users/bodevone/events{/privacy}",
"followers_url": "https://api.github.com/users/bodevone/followers",
"following_url": "https://api.github.com/users/bodevone/following{/other_user}",
"gists_url": "https://api.github.com/users/bodevone/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/bodevone",
"id": 19284074,
"login": "bodevone",
"node_id": "MDQ6VXNlcjE5Mjg0MDc0",
"organizations_url": "https://api.github.com/users/bodevone/orgs",
"received_events_url": "https://api.github.com/users/bodevone/received_events",
"repos_url": "https://api.github.com/users/bodevone/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/bodevone/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bodevone/subscriptions",
"type": "User",
"url": "https://api.github.com/users/bodevone"
} | [
{
"avatar_url": "https://avatars.githubusercontent.com/u/19284074?v=4",
"events_url": "https://api.github.com/users/bodevone/events{/privacy}",
"followers_url": "https://api.github.com/users/bodevone/followers",
"following_url": "https://api.github.com/users/bodevone/following{/other_user}",
"gists_url": "https://api.github.com/users/bodevone/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/bodevone",
"id": 19284074,
"login": "bodevone",
"node_id": "MDQ6VXNlcjE5Mjg0MDc0",
"organizations_url": "https://api.github.com/users/bodevone/orgs",
"received_events_url": "https://api.github.com/users/bodevone/received_events",
"repos_url": "https://api.github.com/users/bodevone/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/bodevone/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bodevone/subscriptions",
"type": "User",
"url": "https://api.github.com/users/bodevone"
}
] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 2 | "2021-09-01T19:53:55Z" | "2021-09-02T23:50:43Z" | "2021-09-02T23:50:33Z" | CONTRIBUTOR | null | ```
/home/runner/work/pandas/pandas/doc/source/conf.py:524: RemovedInSphinx50Warning: rpartition() is now deprecated.
modname, accessor = rpartition(mod_cls, ".")
```
eg. https://github.com/pandas-dev/pandas/pull/43145/checks?check_run_id=3479105382
Deprecated in 5.0 https://www.sphinx-doc.org/en/master/extdev/deprecated.html | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43348/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43348/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/43349 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43349/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43349/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43349/events | https://github.com/pandas-dev/pandas/pull/43349 | 985,621,580 | MDExOlB1bGxSZXF1ZXN0NzI0ODk4NTU4 | 43,349 | CI: Fix Failing Doc Build | {
"avatar_url": "https://avatars.githubusercontent.com/u/16733618?v=4",
"events_url": "https://api.github.com/users/alimcmaster1/events{/privacy}",
"followers_url": "https://api.github.com/users/alimcmaster1/followers",
"following_url": "https://api.github.com/users/alimcmaster1/following{/other_user}",
"gists_url": "https://api.github.com/users/alimcmaster1/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/alimcmaster1",
"id": 16733618,
"login": "alimcmaster1",
"node_id": "MDQ6VXNlcjE2NzMzNjE4",
"organizations_url": "https://api.github.com/users/alimcmaster1/orgs",
"received_events_url": "https://api.github.com/users/alimcmaster1/received_events",
"repos_url": "https://api.github.com/users/alimcmaster1/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/alimcmaster1/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/alimcmaster1/subscriptions",
"type": "User",
"url": "https://api.github.com/users/alimcmaster1"
} | [
{
"color": "3465A4",
"default": false,
"description": null,
"id": 134699,
"name": "Docs",
"node_id": "MDU6TGFiZWwxMzQ2OTk=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Docs"
},
{
"color": "a2bca7",
"default": false,
"description": "Continuous Integration",
"id": 48070600,
"name": "CI",
"node_id": "MDU6TGFiZWw0ODA3MDYwMA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/CI"
}
] | closed | false | null | [] | {
"closed_at": "2021-09-12T08:21:30Z",
"closed_issues": 79,
"created_at": "2021-08-15T08:07:48Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/13159005?v=4",
"events_url": "https://api.github.com/users/simonjayhawkins/events{/privacy}",
"followers_url": "https://api.github.com/users/simonjayhawkins/followers",
"following_url": "https://api.github.com/users/simonjayhawkins/following{/other_user}",
"gists_url": "https://api.github.com/users/simonjayhawkins/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/simonjayhawkins",
"id": 13159005,
"login": "simonjayhawkins",
"node_id": "MDQ6VXNlcjEzMTU5MDA1",
"organizations_url": "https://api.github.com/users/simonjayhawkins/orgs",
"received_events_url": "https://api.github.com/users/simonjayhawkins/received_events",
"repos_url": "https://api.github.com/users/simonjayhawkins/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/simonjayhawkins/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/simonjayhawkins/subscriptions",
"type": "User",
"url": "https://api.github.com/users/simonjayhawkins"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-09-12T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/89",
"id": 7059576,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/89/labels",
"node_id": "MI_kwDOAA0YD84Aa7h4",
"number": 89,
"open_issues": 0,
"state": "closed",
"title": "1.3.3",
"updated_at": "2021-09-12T20:30:04Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/89"
} | 6 | "2021-09-01T20:16:04Z" | "2021-09-02T09:57:47Z" | "2021-09-01T20:18:55Z" | CONTRIBUTOR | null | https://github.com/pandas-dev/pandas/pull/43145 had failing code checks
https://github.com/pandas-dev/pandas/pull/43347/checks?check_run_id=3488498926
```
/home/runner/work/pandas/pandas/doc/source/whatsnew/v1.3.3.rst:36: WARNING: Bullet list ends without a blank line; unexpected unindent.
``` | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43349/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43349/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/43349.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/43349",
"merged_at": "2021-09-01T20:18:55Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/43349.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/43349"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/43350 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43350/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43350/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43350/events | https://github.com/pandas-dev/pandas/pull/43350 | 985,626,921 | MDExOlB1bGxSZXF1ZXN0NzI0OTAzNTMy | 43,350 | Backport PR #43349 on branch 1.3.x (CI: Fix Failing Doc Build) | {
"avatar_url": "https://avatars.githubusercontent.com/u/39504233?v=4",
"events_url": "https://api.github.com/users/meeseeksmachine/events{/privacy}",
"followers_url": "https://api.github.com/users/meeseeksmachine/followers",
"following_url": "https://api.github.com/users/meeseeksmachine/following{/other_user}",
"gists_url": "https://api.github.com/users/meeseeksmachine/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/meeseeksmachine",
"id": 39504233,
"login": "meeseeksmachine",
"node_id": "MDQ6VXNlcjM5NTA0MjMz",
"organizations_url": "https://api.github.com/users/meeseeksmachine/orgs",
"received_events_url": "https://api.github.com/users/meeseeksmachine/received_events",
"repos_url": "https://api.github.com/users/meeseeksmachine/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/meeseeksmachine/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/meeseeksmachine/subscriptions",
"type": "User",
"url": "https://api.github.com/users/meeseeksmachine"
} | [
{
"color": "3465A4",
"default": false,
"description": null,
"id": 134699,
"name": "Docs",
"node_id": "MDU6TGFiZWwxMzQ2OTk=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Docs"
},
{
"color": "a2bca7",
"default": false,
"description": "Continuous Integration",
"id": 48070600,
"name": "CI",
"node_id": "MDU6TGFiZWw0ODA3MDYwMA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/CI"
}
] | closed | false | null | [] | {
"closed_at": "2021-09-12T08:21:30Z",
"closed_issues": 79,
"created_at": "2021-08-15T08:07:48Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/13159005?v=4",
"events_url": "https://api.github.com/users/simonjayhawkins/events{/privacy}",
"followers_url": "https://api.github.com/users/simonjayhawkins/followers",
"following_url": "https://api.github.com/users/simonjayhawkins/following{/other_user}",
"gists_url": "https://api.github.com/users/simonjayhawkins/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/simonjayhawkins",
"id": 13159005,
"login": "simonjayhawkins",
"node_id": "MDQ6VXNlcjEzMTU5MDA1",
"organizations_url": "https://api.github.com/users/simonjayhawkins/orgs",
"received_events_url": "https://api.github.com/users/simonjayhawkins/received_events",
"repos_url": "https://api.github.com/users/simonjayhawkins/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/simonjayhawkins/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/simonjayhawkins/subscriptions",
"type": "User",
"url": "https://api.github.com/users/simonjayhawkins"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-09-12T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/89",
"id": 7059576,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/89/labels",
"node_id": "MI_kwDOAA0YD84Aa7h4",
"number": 89,
"open_issues": 0,
"state": "closed",
"title": "1.3.3",
"updated_at": "2021-09-12T20:30:04Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/89"
} | 0 | "2021-09-01T20:19:44Z" | "2021-09-02T09:57:32Z" | "2021-09-01T20:23:50Z" | NONE | null | Backport PR #43349: CI: Fix Failing Doc Build | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43350/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43350/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/43350.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/43350",
"merged_at": "2021-09-01T20:23:50Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/43350.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/43350"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/43351 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43351/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43351/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43351/events | https://github.com/pandas-dev/pandas/issues/43351 | 985,661,414 | MDU6SXNzdWU5ODU2NjE0MTQ= | 43,351 | BUG: Inconsistent assignment of `NAT` values to datetime columns in `MultiIndex` | {
"avatar_url": "https://avatars.githubusercontent.com/u/11664259?v=4",
"events_url": "https://api.github.com/users/galipremsagar/events{/privacy}",
"followers_url": "https://api.github.com/users/galipremsagar/followers",
"following_url": "https://api.github.com/users/galipremsagar/following{/other_user}",
"gists_url": "https://api.github.com/users/galipremsagar/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/galipremsagar",
"id": 11664259,
"login": "galipremsagar",
"node_id": "MDQ6VXNlcjExNjY0MjU5",
"organizations_url": "https://api.github.com/users/galipremsagar/orgs",
"received_events_url": "https://api.github.com/users/galipremsagar/received_events",
"repos_url": "https://api.github.com/users/galipremsagar/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/galipremsagar/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/galipremsagar/subscriptions",
"type": "User",
"url": "https://api.github.com/users/galipremsagar"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "AFEEEE",
"default": false,
"description": null,
"id": 211840,
"name": "Timeseries",
"node_id": "MDU6TGFiZWwyMTE4NDA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Timeseries"
},
{
"color": "d7e102",
"default": false,
"description": "np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate",
"id": 2822342,
"name": "Missing-data",
"node_id": "MDU6TGFiZWwyODIyMzQy",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Missing-data"
},
{
"color": "e11d21",
"default": false,
"description": "Functionality that used to work in a prior pandas version",
"id": 32815646,
"name": "Regression",
"node_id": "MDU6TGFiZWwzMjgxNTY0Ng==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Regression"
},
{
"color": "207de5",
"default": false,
"description": null,
"id": 71268330,
"name": "MultiIndex",
"node_id": "MDU6TGFiZWw3MTI2ODMzMA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/MultiIndex"
}
] | open | false | null | [] | {
"closed_at": null,
"closed_issues": 47,
"created_at": "2021-10-16T17:29:59Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/13159005?v=4",
"events_url": "https://api.github.com/users/simonjayhawkins/events{/privacy}",
"followers_url": "https://api.github.com/users/simonjayhawkins/followers",
"following_url": "https://api.github.com/users/simonjayhawkins/following{/other_user}",
"gists_url": "https://api.github.com/users/simonjayhawkins/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/simonjayhawkins",
"id": 13159005,
"login": "simonjayhawkins",
"node_id": "MDQ6VXNlcjEzMTU5MDA1",
"organizations_url": "https://api.github.com/users/simonjayhawkins/orgs",
"received_events_url": "https://api.github.com/users/simonjayhawkins/received_events",
"repos_url": "https://api.github.com/users/simonjayhawkins/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/simonjayhawkins/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/simonjayhawkins/subscriptions",
"type": "User",
"url": "https://api.github.com/users/simonjayhawkins"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-11-28T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/91",
"id": 7259169,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/91/labels",
"node_id": "MI_kwDOAA0YD84AbsQh",
"number": 91,
"open_issues": 23,
"state": "open",
"title": "1.3.5",
"updated_at": "2021-11-21T13:42:45Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/91"
} | 4 | "2021-09-01T20:47:58Z" | "2021-10-16T18:29:10Z" | null | NONE | null | - [x] I have checked that this issue has not already been reported.
- [x] I have confirmed this bug exists on the latest version of pandas.
- [ ] (optional) I have confirmed this bug exists on the master branch of pandas.
---
**Note**: Please read [this guide](https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) detailing how to provide the necessary information for us to reproduce your bug.
#### Code Sample, a copy-pastable example
```python
>>> import pandas as pd
>>> import numpy as np
>>> midx = pd.MultiIndex(
... [
... ["a", "b", "c"],
... ["house", "store", "forest"],
... ["clouds", "clear", "storm"],
... ["fire", "smoke", "clear"],
... [
... np.datetime64("2001-01-01", "ns"),
... np.datetime64("2002-01-01", "ns"),
... np.datetime64("2003-01-01", "ns"),
... ],
... [1.0, np.nan, 2],
... ],
... [
... [0, 0, 0, 0, 1, 1, 2],
... [1, 1, 1, 1, 0, 0, 2],
... [0, 0, 2, 2, 2, 0, 1],
... [0, 0, 0, 1, 2, 0, 1],
... [1, 0, 1, 2, 0, 0, 1],
... [1, 0, 1, 2, 0, 0, 1],
... ],
... )
>>> midx.names = ["alpha", "location", "weather", "sign", "timestamp", "float"]
>>>
>>> pdf = pd.DataFrame({'a':[1] , 'b':[2] , 'c':[3] , 'd':[2] , 'e':[0] , 'f':[2], 'g':[10]})
>>> pdf.columns = midx
>>> pdf
alpha a b c
location store house forest
weather clouds storm storm clouds clear
sign fire fire smoke clear fire smoke
timestamp 2002-01-01 2001-01-01 2002-01-01 2003-01-01 2001-01-01 2001-01-01 2002-01-01
float NaN 1.0 NaN 2.0 1.0 1.0 NaN
0 1 2 3 2 0 2 10
>>> pdf["new_col"] = [11]
>>> pdf
alpha a b c new_col
location store house forest
weather clouds storm storm clouds clear
sign fire fire smoke clear fire smoke
timestamp 2002-01-01 2001-01-01 2002-01-01 2003-01-01 2001-01-01 2001-01-01 2002-01-01 NaT
float NaN 1.0 NaN 2.0 1.0 1.0 NaN
0 1 2 3 2 0 2 10 11
>>> pdf.columns
MultiIndex([( 'a', 'store', 'clouds', 'fire', '2002-01-01', nan),
( 'a', 'store', 'clouds', 'fire', '2001-01-01', 1.0),
( 'a', 'store', 'storm', 'fire', '2002-01-01', nan),
( 'a', 'store', 'storm', 'smoke', '2003-01-01', 2.0),
( 'b', 'house', 'storm', 'clear', '2001-01-01', 1.0),
( 'b', 'house', 'clouds', 'fire', '2001-01-01', 1.0),
( 'c', 'forest', 'clear', 'smoke', '2002-01-01', nan),
('new_col', '', '', '', 'NaT', '')],
names=['alpha', 'location', 'weather', 'sign', 'timestamp', 'float'])
```
#### Problem description
It looks like just for datetime like types the `NAT` values are being inserted in multiIndex, and not for string or float types.
Previous behavior in 1.2.5 was consistent with all types, i.e., just insert empty string `''`
[this should explain **why** the current behaviour is a problem and why the expected output is a better solution]
#### Expected Output
Consistency with all dtypes as in 1.2.5
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit : 5f648bf1706dd75a9ca0d29f26eadfbb595fe52b
python : 3.8.10.final.0
python-bits : 64
OS : Linux
OS-release : 4.15.0-76-generic
Version : #86-Ubuntu SMP Fri Jan 17 17:24:28 UTC 2020
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.3.2
numpy : 1.21.2
pytz : 2021.1
dateutil : 2.8.2
pip : 21.2.4
setuptools : 57.4.0
Cython : 0.29.24
pytest : 6.2.5
hypothesis : 6.17.4
sphinx : 4.1.2
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 3.0.1
IPython : 7.27.0
pandas_datareader: None
bs4 : 4.9.3
bottleneck : None
fsspec : 2021.08.1
fastparquet : None
gcsfs : None
matplotlib : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : 5.0.0
pyxlsb : None
s3fs : None
scipy : None
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
numba : 0.53.1
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43351/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43351/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/43352 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43352/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43352/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43352/events | https://github.com/pandas-dev/pandas/pull/43352 | 985,691,862 | MDExOlB1bGxSZXF1ZXN0NzI0OTYyNzc4 | 43,352 | PERF: unstack 2 the unstackening | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [
{
"color": "a10c02",
"default": false,
"description": "Memory or execution speed performance",
"id": 8935311,
"name": "Performance",
"node_id": "MDU6TGFiZWw4OTM1MzEx",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Performance"
},
{
"color": "02d7e1",
"default": false,
"description": "Concat, Merge/Join, Stack/Unstack, Explode",
"id": 13098779,
"name": "Reshaping",
"node_id": "MDU6TGFiZWwxMzA5ODc3OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Reshaping"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 0 | "2021-09-01T21:13:13Z" | "2021-09-01T23:35:32Z" | "2021-09-01T23:04:31Z" | MEMBER | null | ```
from asv_bench.benchmarks.reshape import *
self2 = Unstack()
self2.setup("category")
%timeit self2.time_full_product("category")
31.3 ms ± 2.23 ms per loop (mean ± std. dev. of 7 runs, 10 loops each) # <- master
20.1 ms ± 304 µs per loop (mean ± std. dev. of 7 runs, 100 loops each) # < PR
```
Orthogonal to #43335 | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43352/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43352/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/43352.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/43352",
"merged_at": "2021-09-01T23:04:31Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/43352.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/43352"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/43353 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43353/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43353/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43353/events | https://github.com/pandas-dev/pandas/pull/43353 | 985,729,899 | MDExOlB1bGxSZXF1ZXN0NzI0OTk4MTQ3 | 43,353 | PERF: rebuild_blknos_and_blklocs | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [
{
"color": "a10c02",
"default": false,
"description": "Memory or execution speed performance",
"id": 8935311,
"name": "Performance",
"node_id": "MDU6TGFiZWw4OTM1MzEx",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Performance"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 0 | "2021-09-01T21:46:33Z" | "2021-09-01T23:40:44Z" | "2021-09-01T23:01:18Z" | MEMBER | null | I don't have an asv on hand which is dominated by this method, but profiling time_copy_overhead_single_col and looking at this method:
```
from asv_bench.benchmarks.groupby import *
self = Apply()
self.setup(4)
%timeit self.time_copy_overhead_single_col(4)
227 ms ± 10.9 ms per loop (mean ± std. dev. of 7 runs, 1 loop each) # <- master
218 ms ± 13.3 ms per loop (mean ± std. dev. of 7 runs, 1 loop each) # <- PR
%prun -s cumtime for n in range(10): self.time_copy_overhead_single_col(4) # | grep _rebuild_blknos_and_blklocs
19870 0.208 0.000 0.529 0.000 managers.py:220(_rebuild_blknos_and_blklocs) # <- master
19860 0.108 0.000 0.186 0.000 {method '_rebuild_blknos_and_blklocs' of 'pandas._libs.internals.BlockManager' objects} # <- PR
``` | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43353/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43353/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/43353.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/43353",
"merged_at": "2021-09-01T23:01:18Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/43353.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/43353"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/43354 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43354/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43354/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43354/events | https://github.com/pandas-dev/pandas/pull/43354 | 986,003,514 | MDExOlB1bGxSZXF1ZXN0NzI1MjUwMTEw | 43,354 | PERF: concat | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [
{
"color": "a10c02",
"default": false,
"description": "Memory or execution speed performance",
"id": 8935311,
"name": "Performance",
"node_id": "MDU6TGFiZWw4OTM1MzEx",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Performance"
},
{
"color": "02d7e1",
"default": false,
"description": "Concat, Merge/Join, Stack/Unstack, Explode",
"id": 13098779,
"name": "Reshaping",
"node_id": "MDU6TGFiZWwxMzA5ODc3OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Reshaping"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 0 | "2021-09-02T02:34:11Z" | "2021-09-03T01:15:47Z" | "2021-09-02T23:18:25Z" | MEMBER | null | ```
from asv_bench.benchmarks.groupby import *
self = Apply()
self.setup(4)
%timeit self.time_copy_overhead_single_col(4)
213 ms ± 10.9 ms per loop (mean ± std. dev. of 7 runs, 1 loop each) # <- master
161 ms ± 2.84 ms per loop (mean ± std. dev. of 7 runs, 10 loops each) # <- PR
``` | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43354/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43354/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/43354.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/43354",
"merged_at": "2021-09-02T23:18:25Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/43354.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/43354"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/43355 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43355/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43355/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43355/events | https://github.com/pandas-dev/pandas/issues/43355 | 986,024,861 | MDU6SXNzdWU5ODYwMjQ4NjE= | 43,355 | BUG: Groupby rolling count gives inconsistent outputs with missing index | {
"avatar_url": "https://avatars.githubusercontent.com/u/14278095?v=4",
"events_url": "https://api.github.com/users/LiutongZhou/events{/privacy}",
"followers_url": "https://api.github.com/users/LiutongZhou/followers",
"following_url": "https://api.github.com/users/LiutongZhou/following{/other_user}",
"gists_url": "https://api.github.com/users/LiutongZhou/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/LiutongZhou",
"id": 14278095,
"login": "LiutongZhou",
"node_id": "MDQ6VXNlcjE0Mjc4MDk1",
"organizations_url": "https://api.github.com/users/LiutongZhou/orgs",
"received_events_url": "https://api.github.com/users/LiutongZhou/received_events",
"repos_url": "https://api.github.com/users/LiutongZhou/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/LiutongZhou/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/LiutongZhou/subscriptions",
"type": "User",
"url": "https://api.github.com/users/LiutongZhou"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "729FCF",
"default": false,
"description": null,
"id": 233160,
"name": "Groupby",
"node_id": "MDU6TGFiZWwyMzMxNjA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Groupby"
},
{
"color": "d4c5f9",
"default": false,
"description": "rolling, ewma, expanding",
"id": 1045950827,
"name": "Window",
"node_id": "MDU6TGFiZWwxMDQ1OTUwODI3",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Window"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 1 | "2021-09-02T02:57:52Z" | "2021-09-06T15:36:23Z" | "2021-09-06T15:36:23Z" | NONE | null | - [x] I have checked that this issue has not already been reported.
- [x] I have confirmed this bug exists on the latest version of pandas.
- [ ] (optional) I have confirmed this bug exists on the master branch of pandas.
---
#### Code Sample, a copy-pastable example
```python
# [1] In:
import pandas as pd
assert pd.__version__ == "1.3.2"
df = pd.DataFrame(
{
"id": ["a", "a", "b", "b", "b"],
"timestamp": pd.date_range("2021-9-1", periods=5, freq="H"),
"y": range(5),
}
)
df
```
```python
# [1] Out:
id timestamp y
0 a 2021-09-01 00:00:00 0
1 a 2021-09-01 01:00:00 1
2 b 2021-09-01 02:00:00 2
3 b 2021-09-01 03:00:00 3
4 b 2021-09-01 04:00:00 4
```
```python
# [2] In:
grp = df.groupby("id").rolling("1H", on="timestamp")
grp.count()
```
```python
# [2] Out:
# original index [0,1,2,3,4] is in output
timestamp y
id
a 0 2021-09-01 00:00:00 1.0
1 2021-09-01 01:00:00 1.0
b 2 2021-09-01 02:00:00 1.0
3 2021-09-01 03:00:00 1.0
4 2021-09-01 04:00:00 1.0
```
```python
# [3] In:
grp["y"].count()
```
```python
# [3] Out:
# original index [0,1,2,3,4] is missing in output as opposed to [2] Out
id timestamp
a 2021-09-01 00:00:00 1.0
2021-09-01 01:00:00 1.0
b 2021-09-01 02:00:00 1.0
2021-09-01 03:00:00 1.0
2021-09-01 04:00:00 1.0
Name: y, dtype: float64
```
```python
# [4] In:
grp.count() # same as [2] In
```
```python
# [4] Out:
# output is inconsistent with that from [2] Out
timestamp y
id timestamp
a 2021-09-01 00:00:00 NaT 1.0
2021-09-01 01:00:00 NaT 1.0
b 2021-09-01 02:00:00 NaT 1.0
2021-09-01 03:00:00 NaT 1.0
2021-09-01 04:00:00 NaT 1.0
```
#### Expected Output
1. `[4] Out` should be identical to `[2] Out`
2. I as a user would hope original index is, at least optionally if not by default, kept in output so I can efficiently join the rolling count results back to the original `df`.
#### Problem description
1. Groupby rolling count gives inconsistent outputs (see `[2] Out` and `[4] Out`) when running cell 1~4. Same problem exists when `count` is replaced by `agg(len)`
2. `[3] Out` using pandas 1.3.2 ignored original index whereas `[2] Out` (as well as `[3] Out` using pandas 1.1.5 ) maintained original index. Original index (in this example, `[0,1,2,3,4]`) should ideally be optionally kept in outputs otherwise there will be no way to traceback which rolling count corresponds to the original row (see `[3] Out`). Joining two data frames on `['id', 'timestamp']` afterwards is not the correct solution as it is easy to find non 1-1 match examples.
```python
# [3] Out: pandas 1.3.2
# original index [0,1,2,3,4] is missing.
id timestamp
a 2021-09-01 00:00:00 1.0
2021-09-01 01:00:00 1.0
b 2021-09-01 02:00:00 1.0
2021-09-01 03:00:00 1.0
2021-09-01 04:00:00 1.0
Name: y, dtype: float64
```
```python
# [3] Out: pandas 1.1.5
# original index [0,1,2,3,4] maintained as expected though the rolling count numbers are wrong (should be [1,1,1,1,1])
id
a 0 1.0
1 2.0
b 2 1.0
3 2.0
4 3.0
```
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit : 5f648bf1706dd75a9ca0d29f26eadfbb595fe52b
python : 3.8.10.final.0
python-bits : 64
OS : Linux
OS-release : 4.14.225-121.362.amzn1.x86_64
Version : #1 SMP Tue Mar 23 00:29:14 UTC 2021
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.3.2
numpy : 1.20.3
pytz : 2021.1
dateutil : 2.8.2
pip : 21.2.4
setuptools : 57.4.0
Cython : None
pytest : None
hypothesis : None
sphinx : 4.1.2
blosc : None
feather : None
xlsxwriter : 3.0.1
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 3.0.1
IPython : 7.26.0
pandas_datareader: None
bs4 : None
bottleneck : None
fsspec : 2021.07.0
fastparquet : None
gcsfs : None
matplotlib : 3.4.3
numexpr : None
odfpy : None
openpyxl : 3.0.7
pandas_gbq : None
pyarrow : 5.0.0
pyxlsb : None
s3fs : 0.4.2
scipy : 1.6.3
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
numba : None
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43355/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43355/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/43356 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43356/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43356/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43356/events | https://github.com/pandas-dev/pandas/pull/43356 | 986,151,929 | MDExOlB1bGxSZXF1ZXN0NzI1Mzg1NzIy | 43,356 | CI: styler mypy fix | {
"avatar_url": "https://avatars.githubusercontent.com/u/24256554?v=4",
"events_url": "https://api.github.com/users/attack68/events{/privacy}",
"followers_url": "https://api.github.com/users/attack68/followers",
"following_url": "https://api.github.com/users/attack68/following{/other_user}",
"gists_url": "https://api.github.com/users/attack68/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/attack68",
"id": 24256554,
"login": "attack68",
"node_id": "MDQ6VXNlcjI0MjU2NTU0",
"organizations_url": "https://api.github.com/users/attack68/orgs",
"received_events_url": "https://api.github.com/users/attack68/received_events",
"repos_url": "https://api.github.com/users/attack68/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/attack68/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/attack68/subscriptions",
"type": "User",
"url": "https://api.github.com/users/attack68"
} | [
{
"color": "ea91a4",
"default": false,
"description": "type annotations, mypy/pyright type checking",
"id": 1280988427,
"name": "Typing",
"node_id": "MDU6TGFiZWwxMjgwOTg4NDI3",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Typing"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 1 | "2021-09-02T05:17:04Z" | "2021-09-02T11:27:42Z" | "2021-09-02T09:48:07Z" | CONTRIBUTOR | null | null | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43356/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43356/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/43356.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/43356",
"merged_at": "2021-09-02T09:48:07Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/43356.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/43356"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/43357 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43357/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43357/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43357/events | https://github.com/pandas-dev/pandas/issues/43357 | 986,232,261 | MDU6SXNzdWU5ODYyMzIyNjE= | 43,357 | BUG: passing kwargs to Series.aggregate raises TypeError: f() got an unexpected keyword argument | {
"avatar_url": "https://avatars.githubusercontent.com/u/3282717?v=4",
"events_url": "https://api.github.com/users/jakeanq/events{/privacy}",
"followers_url": "https://api.github.com/users/jakeanq/followers",
"following_url": "https://api.github.com/users/jakeanq/following{/other_user}",
"gists_url": "https://api.github.com/users/jakeanq/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jakeanq",
"id": 3282717,
"login": "jakeanq",
"node_id": "MDQ6VXNlcjMyODI3MTc=",
"organizations_url": "https://api.github.com/users/jakeanq/orgs",
"received_events_url": "https://api.github.com/users/jakeanq/received_events",
"repos_url": "https://api.github.com/users/jakeanq/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jakeanq/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jakeanq/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jakeanq"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "e11d21",
"default": false,
"description": "Functionality that used to work in a prior pandas version",
"id": 32815646,
"name": "Regression",
"node_id": "MDU6TGFiZWwzMjgxNTY0Ng==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Regression"
},
{
"color": "fbca04",
"default": false,
"description": "Apply, Aggregate, Transform",
"id": 697792067,
"name": "Apply",
"node_id": "MDU6TGFiZWw2OTc3OTIwNjc=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Apply"
},
{
"color": "8dd5fc",
"default": false,
"description": "Series data structure",
"id": 1357732944,
"name": "Series",
"node_id": "MDU6TGFiZWwxMzU3NzMyOTQ0",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Series"
}
] | closed | false | {
"avatar_url": "https://avatars.githubusercontent.com/u/45562402?v=4",
"events_url": "https://api.github.com/users/rhshadrach/events{/privacy}",
"followers_url": "https://api.github.com/users/rhshadrach/followers",
"following_url": "https://api.github.com/users/rhshadrach/following{/other_user}",
"gists_url": "https://api.github.com/users/rhshadrach/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/rhshadrach",
"id": 45562402,
"login": "rhshadrach",
"node_id": "MDQ6VXNlcjQ1NTYyNDAy",
"organizations_url": "https://api.github.com/users/rhshadrach/orgs",
"received_events_url": "https://api.github.com/users/rhshadrach/received_events",
"repos_url": "https://api.github.com/users/rhshadrach/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/rhshadrach/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rhshadrach/subscriptions",
"type": "User",
"url": "https://api.github.com/users/rhshadrach"
} | [
{
"avatar_url": "https://avatars.githubusercontent.com/u/45562402?v=4",
"events_url": "https://api.github.com/users/rhshadrach/events{/privacy}",
"followers_url": "https://api.github.com/users/rhshadrach/followers",
"following_url": "https://api.github.com/users/rhshadrach/following{/other_user}",
"gists_url": "https://api.github.com/users/rhshadrach/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/rhshadrach",
"id": 45562402,
"login": "rhshadrach",
"node_id": "MDQ6VXNlcjQ1NTYyNDAy",
"organizations_url": "https://api.github.com/users/rhshadrach/orgs",
"received_events_url": "https://api.github.com/users/rhshadrach/received_events",
"repos_url": "https://api.github.com/users/rhshadrach/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/rhshadrach/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rhshadrach/subscriptions",
"type": "User",
"url": "https://api.github.com/users/rhshadrach"
}
] | {
"closed_at": "2021-10-17T11:06:28Z",
"closed_issues": 77,
"created_at": "2021-09-10T19:48:56Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/13159005?v=4",
"events_url": "https://api.github.com/users/simonjayhawkins/events{/privacy}",
"followers_url": "https://api.github.com/users/simonjayhawkins/followers",
"following_url": "https://api.github.com/users/simonjayhawkins/following{/other_user}",
"gists_url": "https://api.github.com/users/simonjayhawkins/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/simonjayhawkins",
"id": 13159005,
"login": "simonjayhawkins",
"node_id": "MDQ6VXNlcjEzMTU5MDA1",
"organizations_url": "https://api.github.com/users/simonjayhawkins/orgs",
"received_events_url": "https://api.github.com/users/simonjayhawkins/received_events",
"repos_url": "https://api.github.com/users/simonjayhawkins/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/simonjayhawkins/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/simonjayhawkins/subscriptions",
"type": "User",
"url": "https://api.github.com/users/simonjayhawkins"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-10-17T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/90",
"id": 7142224,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/90/labels",
"node_id": "MI_kwDOAA0YD84AbPtQ",
"number": 90,
"open_issues": 0,
"state": "closed",
"title": "1.3.4",
"updated_at": "2021-10-18T11:00:43Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/90"
} | 4 | "2021-09-02T06:39:56Z" | "2021-09-23T12:12:15Z" | "2021-09-23T12:12:15Z" | NONE | null | - [X] I have checked that this issue has not already been reported.
- [X] I have confirmed this bug exists on the latest version of pandas. The bug is present on 1.3.0, 1.3.1 and 1.3.2 but not 1.2.5.
- [ ] (optional) I have confirmed this bug exists on the master branch of pandas.
---
**Note**: Please read [this guide](https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) detailing how to provide the necessary information for us to reproduce your bug.
#### Code Sample, a copy-pastable example
```python
#!/usr/bin/env python
import pandas as pd
def func(a, b, c=2):
pass
if __name__ == "__main__":
s = pd.Series([1, 2, 3, 4])
s.aggregate(func, 0, 99, c=101)
```
#### Problem description
Prior to Pandas 1.3.0, it was possible to pass kwargs when using Series.aggregate, however it appears that Pandas now attempts to apply the arguments and keyword arguments twice (first currying them then using them to call the curried function).
#### Expected Output
Expect output is the program running normally and not throwing an exception.
#### Actual Output
```python traceback
Traceback (most recent call last):
File "/home/jake/pandas-env/lib/python3.9/site-packages/pandas/core/apply.py", line 1068, in agg
result = self.obj.apply(f, *args, **kwargs)
File "/home/jake/pandas-env/lib/python3.9/site-packages/pandas/core/series.py", line 4357, in apply
return SeriesApply(self, func, convert_dtype, args, kwargs).apply()
File "/home/jake/pandas-env/lib/python3.9/site-packages/pandas/core/apply.py", line 1043, in apply
return self.apply_standard()
File "/home/jake/pandas-env/lib/python3.9/site-packages/pandas/core/apply.py", line 1099, in apply_standard
mapped = lib.map_infer(
File "pandas/_libs/lib.pyx", line 2859, in pandas._libs.lib.map_infer
File "/home/jake/pandas-env/lib/python3.9/site-packages/pandas/core/apply.py", line 131, in f
return func(x, *args, **kwargs)
TypeError: f() got an unexpected keyword argument 'c'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/jake/./pd_test.py", line 11, in <module>
s.aggregate(func, 0, 99, c=101)
File "/home/jake/pandas-env/lib/python3.9/site-packages/pandas/core/series.py", line 4227, in aggregate
result = op.agg()
File "/home/jake/pandas-env/lib/python3.9/site-packages/pandas/core/apply.py", line 1070, in agg
result = f(self.obj, *args, **kwargs)
TypeError: f() got an unexpected keyword argument 'c'
```
#### Output of ``pd.show_versions()``
<details>
```
INSTALLED VERSIONS
------------------
commit : 5f648bf1706dd75a9ca0d29f26eadfbb595fe52b
python : 3.9.6.final.0
python-bits : 64
OS : Linux
OS-release : 5.13.5-arch1-1
Version : #1 SMP PREEMPT Sun, 25 Jul 2021 18:02:58 +0000
machine : x86_64
processor :
byteorder : little
LC_ALL : None
LANG : en_AU.UTF-8
LOCALE : en_AU.UTF-8
pandas : 1.3.2
numpy : 1.21.2
pytz : 2021.1
dateutil : 2.8.2
pip : 21.1.3
setuptools : 56.0.0
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : None
IPython : None
pandas_datareader: None
bs4 : None
bottleneck : None
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pyxlsb : None
s3fs : None
scipy : None
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
numba : None
```
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43357/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43357/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/43358 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43358/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43358/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43358/events | https://github.com/pandas-dev/pandas/pull/43358 | 986,544,499 | MDExOlB1bGxSZXF1ZXN0NzI1NzQxMDg5 | 43,358 | TST: added test for groupby when calling first, last, nth (GH29645) | {
"avatar_url": "https://avatars.githubusercontent.com/u/63981558?v=4",
"events_url": "https://api.github.com/users/lorenzophys/events{/privacy}",
"followers_url": "https://api.github.com/users/lorenzophys/followers",
"following_url": "https://api.github.com/users/lorenzophys/following{/other_user}",
"gists_url": "https://api.github.com/users/lorenzophys/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/lorenzophys",
"id": 63981558,
"login": "lorenzophys",
"node_id": "MDQ6VXNlcjYzOTgxNTU4",
"organizations_url": "https://api.github.com/users/lorenzophys/orgs",
"received_events_url": "https://api.github.com/users/lorenzophys/received_events",
"repos_url": "https://api.github.com/users/lorenzophys/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/lorenzophys/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/lorenzophys/subscriptions",
"type": "User",
"url": "https://api.github.com/users/lorenzophys"
} | [
{
"color": "C4A000",
"default": false,
"description": "pandas testing functions or related to the test suite",
"id": 127685,
"name": "Testing",
"node_id": "MDU6TGFiZWwxMjc2ODU=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Testing"
},
{
"color": "729FCF",
"default": false,
"description": null,
"id": 233160,
"name": "Groupby",
"node_id": "MDU6TGFiZWwyMzMxNjA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Groupby"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 1 | "2021-09-02T10:54:17Z" | "2021-09-06T21:50:59Z" | "2021-09-06T21:50:54Z" | CONTRIBUTOR | null | - [x] closes #29645
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
Provided test for `groupby` when callling `first`, `last`, `nth` on a `Series` with `None` or `np.nan`.
Tests and linter pass locally.
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43358/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43358/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/43358.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/43358",
"merged_at": "2021-09-06T21:50:54Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/43358.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/43358"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/43359 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43359/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43359/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43359/events | https://github.com/pandas-dev/pandas/issues/43359 | 986,745,170 | MDU6SXNzdWU5ODY3NDUxNzA= | 43,359 | DOC: Default engine incorrect for ExcelWriter and xlsx | {
"avatar_url": "https://avatars.githubusercontent.com/u/296164?v=4",
"events_url": "https://api.github.com/users/jseabold/events{/privacy}",
"followers_url": "https://api.github.com/users/jseabold/followers",
"following_url": "https://api.github.com/users/jseabold/following{/other_user}",
"gists_url": "https://api.github.com/users/jseabold/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jseabold",
"id": 296164,
"login": "jseabold",
"node_id": "MDQ6VXNlcjI5NjE2NA==",
"organizations_url": "https://api.github.com/users/jseabold/orgs",
"received_events_url": "https://api.github.com/users/jseabold/received_events",
"repos_url": "https://api.github.com/users/jseabold/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jseabold/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jseabold/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jseabold"
} | [
{
"color": "3465A4",
"default": false,
"description": null,
"id": 134699,
"name": "Docs",
"node_id": "MDU6TGFiZWwxMzQ2OTk=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Docs"
},
{
"color": "bfe5bf",
"default": false,
"description": "read_excel, to_excel",
"id": 49254273,
"name": "IO Excel",
"node_id": "MDU6TGFiZWw0OTI1NDI3Mw==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20Excel"
}
] | closed | false | {
"avatar_url": "https://avatars.githubusercontent.com/u/37710770?v=4",
"events_url": "https://api.github.com/users/LiquidMika/events{/privacy}",
"followers_url": "https://api.github.com/users/LiquidMika/followers",
"following_url": "https://api.github.com/users/LiquidMika/following{/other_user}",
"gists_url": "https://api.github.com/users/LiquidMika/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/LiquidMika",
"id": 37710770,
"login": "LiquidMika",
"node_id": "MDQ6VXNlcjM3NzEwNzcw",
"organizations_url": "https://api.github.com/users/LiquidMika/orgs",
"received_events_url": "https://api.github.com/users/LiquidMika/received_events",
"repos_url": "https://api.github.com/users/LiquidMika/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/LiquidMika/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/LiquidMika/subscriptions",
"type": "User",
"url": "https://api.github.com/users/LiquidMika"
} | [
{
"avatar_url": "https://avatars.githubusercontent.com/u/37710770?v=4",
"events_url": "https://api.github.com/users/LiquidMika/events{/privacy}",
"followers_url": "https://api.github.com/users/LiquidMika/followers",
"following_url": "https://api.github.com/users/LiquidMika/following{/other_user}",
"gists_url": "https://api.github.com/users/LiquidMika/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/LiquidMika",
"id": 37710770,
"login": "LiquidMika",
"node_id": "MDQ6VXNlcjM3NzEwNzcw",
"organizations_url": "https://api.github.com/users/LiquidMika/orgs",
"received_events_url": "https://api.github.com/users/LiquidMika/received_events",
"repos_url": "https://api.github.com/users/LiquidMika/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/LiquidMika/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/LiquidMika/subscriptions",
"type": "User",
"url": "https://api.github.com/users/LiquidMika"
}
] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 5 | "2021-09-02T13:40:11Z" | "2021-09-12T16:55:59Z" | "2021-09-12T16:55:59Z" | CONTRIBUTOR | null | ###
- [X] I have checked that the issue still exists on the latest versions of the docs on `master` [here](https://pandas.pydata.org/docs/dev/)
### Location of the documentation
https://pandas.pydata.org/docs/dev/reference/api/pandas.ExcelWriter.html#pandas.ExcelWriter
### Documentation problem
Unless, I'm missing something I don't think openpyxl is the default for writing xlsx files.
```python
In [1014]: pd.ExcelWriter("foo.xlsx").engine
Out[1014]: 'xlsxwriter'
In [1015]: pd.ExcelWriter("foo.xlsx", engine="openpyxl").engine
Out[1015]: 'openpyxl'
```
### Suggested fix for documentation
Change the default to xlsxwriter in the docstring. Happy to submit a PR, if I'm correct. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43359/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43359/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/43360 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43360/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43360/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43360/events | https://github.com/pandas-dev/pandas/pull/43360 | 986,808,681 | MDExOlB1bGxSZXF1ZXN0NzI1OTc4MzU5 | 43,360 | CLN: Replace sphinx's rpartition with python's in-built one | {
"avatar_url": "https://avatars.githubusercontent.com/u/19284074?v=4",
"events_url": "https://api.github.com/users/bodevone/events{/privacy}",
"followers_url": "https://api.github.com/users/bodevone/followers",
"following_url": "https://api.github.com/users/bodevone/following{/other_user}",
"gists_url": "https://api.github.com/users/bodevone/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/bodevone",
"id": 19284074,
"login": "bodevone",
"node_id": "MDQ6VXNlcjE5Mjg0MDc0",
"organizations_url": "https://api.github.com/users/bodevone/orgs",
"received_events_url": "https://api.github.com/users/bodevone/received_events",
"repos_url": "https://api.github.com/users/bodevone/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/bodevone/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bodevone/subscriptions",
"type": "User",
"url": "https://api.github.com/users/bodevone"
} | [
{
"color": "3465A4",
"default": false,
"description": null,
"id": 134699,
"name": "Docs",
"node_id": "MDU6TGFiZWwxMzQ2OTk=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Docs"
}
] | closed | false | {
"avatar_url": "https://avatars.githubusercontent.com/u/16733618?v=4",
"events_url": "https://api.github.com/users/alimcmaster1/events{/privacy}",
"followers_url": "https://api.github.com/users/alimcmaster1/followers",
"following_url": "https://api.github.com/users/alimcmaster1/following{/other_user}",
"gists_url": "https://api.github.com/users/alimcmaster1/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/alimcmaster1",
"id": 16733618,
"login": "alimcmaster1",
"node_id": "MDQ6VXNlcjE2NzMzNjE4",
"organizations_url": "https://api.github.com/users/alimcmaster1/orgs",
"received_events_url": "https://api.github.com/users/alimcmaster1/received_events",
"repos_url": "https://api.github.com/users/alimcmaster1/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/alimcmaster1/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/alimcmaster1/subscriptions",
"type": "User",
"url": "https://api.github.com/users/alimcmaster1"
} | [
{
"avatar_url": "https://avatars.githubusercontent.com/u/16733618?v=4",
"events_url": "https://api.github.com/users/alimcmaster1/events{/privacy}",
"followers_url": "https://api.github.com/users/alimcmaster1/followers",
"following_url": "https://api.github.com/users/alimcmaster1/following{/other_user}",
"gists_url": "https://api.github.com/users/alimcmaster1/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/alimcmaster1",
"id": 16733618,
"login": "alimcmaster1",
"node_id": "MDQ6VXNlcjE2NzMzNjE4",
"organizations_url": "https://api.github.com/users/alimcmaster1/orgs",
"received_events_url": "https://api.github.com/users/alimcmaster1/received_events",
"repos_url": "https://api.github.com/users/alimcmaster1/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/alimcmaster1/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/alimcmaster1/subscriptions",
"type": "User",
"url": "https://api.github.com/users/alimcmaster1"
}
] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 1 | "2021-09-02T14:29:23Z" | "2021-09-03T12:58:39Z" | "2021-09-02T23:50:34Z" | CONTRIBUTOR | null | Closes #43348
Replaced Sphinx's `rpartition` which was deprecated with Python's in-built method
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43360/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43360/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/43360.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/43360",
"merged_at": "2021-09-02T23:50:33Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/43360.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/43360"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/43361 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43361/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43361/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43361/events | https://github.com/pandas-dev/pandas/issues/43361 | 986,918,120 | MDU6SXNzdWU5ODY5MTgxMjA= | 43,361 | DOC: wrong example in comparison with spreadsheets | {
"avatar_url": "https://avatars.githubusercontent.com/u/45651132?v=4",
"events_url": "https://api.github.com/users/solopython/events{/privacy}",
"followers_url": "https://api.github.com/users/solopython/followers",
"following_url": "https://api.github.com/users/solopython/following{/other_user}",
"gists_url": "https://api.github.com/users/solopython/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/solopython",
"id": 45651132,
"login": "solopython",
"node_id": "MDQ6VXNlcjQ1NjUxMTMy",
"organizations_url": "https://api.github.com/users/solopython/orgs",
"received_events_url": "https://api.github.com/users/solopython/received_events",
"repos_url": "https://api.github.com/users/solopython/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/solopython/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/solopython/subscriptions",
"type": "User",
"url": "https://api.github.com/users/solopython"
} | [
{
"color": "3465A4",
"default": false,
"description": null,
"id": 134699,
"name": "Docs",
"node_id": "MDU6TGFiZWwxMzQ2OTk=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Docs"
},
{
"color": "0e8a16",
"default": true,
"description": null,
"id": 717120670,
"name": "good first issue",
"node_id": "MDU6TGFiZWw3MTcxMjA2NzA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/good%20first%20issue"
}
] | closed | false | {
"avatar_url": "https://avatars.githubusercontent.com/u/18447566?v=4",
"events_url": "https://api.github.com/users/Digres45/events{/privacy}",
"followers_url": "https://api.github.com/users/Digres45/followers",
"following_url": "https://api.github.com/users/Digres45/following{/other_user}",
"gists_url": "https://api.github.com/users/Digres45/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Digres45",
"id": 18447566,
"login": "Digres45",
"node_id": "MDQ6VXNlcjE4NDQ3NTY2",
"organizations_url": "https://api.github.com/users/Digres45/orgs",
"received_events_url": "https://api.github.com/users/Digres45/received_events",
"repos_url": "https://api.github.com/users/Digres45/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Digres45/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Digres45/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Digres45"
} | [
{
"avatar_url": "https://avatars.githubusercontent.com/u/18447566?v=4",
"events_url": "https://api.github.com/users/Digres45/events{/privacy}",
"followers_url": "https://api.github.com/users/Digres45/followers",
"following_url": "https://api.github.com/users/Digres45/following{/other_user}",
"gists_url": "https://api.github.com/users/Digres45/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Digres45",
"id": 18447566,
"login": "Digres45",
"node_id": "MDQ6VXNlcjE4NDQ3NTY2",
"organizations_url": "https://api.github.com/users/Digres45/orgs",
"received_events_url": "https://api.github.com/users/Digres45/received_events",
"repos_url": "https://api.github.com/users/Digres45/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Digres45/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Digres45/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Digres45"
}
] | {
"closed_at": null,
"closed_issues": 786,
"created_at": "2015-01-13T10:53:19Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "Changes that would be nice to have in the next release. These issues are not blocking. They will be pushed to the next release if no one has time to fix them.",
"due_on": null,
"html_url": "https://github.com/pandas-dev/pandas/milestone/32",
"id": 933188,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/32/labels",
"node_id": "MDk6TWlsZXN0b25lOTMzMTg4",
"number": 32,
"open_issues": 1053,
"state": "open",
"title": "Contributions Welcome",
"updated_at": "2021-11-21T00:50:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/32"
} | 2 | "2021-09-02T16:06:55Z" | "2021-09-03T09:57:15Z" | "2021-09-03T09:57:15Z" | NONE | null | ###
- [X] I have checked that the issue still exists on the latest versions of the docs on `master` [here](https://pandas.pydata.org/docs/dev/)
### Location of the documentation
https://pandas.pydata.org/docs/getting_started/comparison/comparison_with_spreadsheets.html
### Documentation problem
In [38]: firstlast["Last_Name"] = firstlast["String"].str.rsplit(" ", expand=True)[**0**]
### Suggested fix for documentation
In [38]: firstlast["Last_Name"] = firstlast["String"].str.rsplit(" ", expand=True)[**1**] | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43361/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43361/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/43362 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43362/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43362/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43362/events | https://github.com/pandas-dev/pandas/issues/43362 | 986,941,438 | MDU6SXNzdWU5ODY5NDE0Mzg= | 43,362 | ENH: allow schema to be a dict in to_parquet | {
"avatar_url": "https://avatars.githubusercontent.com/u/17162724?v=4",
"events_url": "https://api.github.com/users/raybellwaves/events{/privacy}",
"followers_url": "https://api.github.com/users/raybellwaves/followers",
"following_url": "https://api.github.com/users/raybellwaves/following{/other_user}",
"gists_url": "https://api.github.com/users/raybellwaves/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/raybellwaves",
"id": 17162724,
"login": "raybellwaves",
"node_id": "MDQ6VXNlcjE3MTYyNzI0",
"organizations_url": "https://api.github.com/users/raybellwaves/orgs",
"received_events_url": "https://api.github.com/users/raybellwaves/received_events",
"repos_url": "https://api.github.com/users/raybellwaves/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/raybellwaves/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/raybellwaves/subscriptions",
"type": "User",
"url": "https://api.github.com/users/raybellwaves"
} | [
{
"color": "4E9A06",
"default": false,
"description": null,
"id": 76812,
"name": "Enhancement",
"node_id": "MDU6TGFiZWw3NjgxMg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Enhancement"
},
{
"color": "5319e7",
"default": false,
"description": "parquet, feather",
"id": 685114413,
"name": "IO Parquet",
"node_id": "MDU6TGFiZWw2ODUxMTQ0MTM=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20Parquet"
}
] | open | false | null | [] | null | 2 | "2021-09-02T16:30:49Z" | "2021-09-03T15:30:25Z" | null | CONTRIBUTOR | null | #### Is your feature request related to a problem?
I come from writing parquet with dask (https://docs.dask.org/en/latest/generated/dask.dataframe.to_parquet.html).
In `dask.dataframe.to_parquet` schema can be a Schema object, dict, "infer" or None.
I'm used to passing a dict with pyarrow schema definition e.g. `{"a": pa.int32(), "b": pa.string(), "c": pa.float32()}` to the schema arg.
Passing a dict to the schema arg in `to_parquet` gives `TypeError: Argument 'schema' has incorrect type (expected pyarrow.lib.Schema, got dict)`
#### Describe the solution you'd like
```
if isinstance(schema, dict) and engine == "pyarrow":
schema = pa.schema(schema)
```
https://github.com/dask/dask/blob/main/dask/dataframe/io/parquet/arrow.py#L789
#### API breaking implications
None (I don't believe)
#### Additional context
```python
import pandas as pd
import pyarrow as pa
df = pd.DataFrame([1, "a", 1.5], index=list("abc")).T
d = {"a": pa.int32(), "b": pa.string(), "c": pa.float32()}
df.to_parquet("tmp.parquet", schema=d)
TypeError Traceback (most recent call last)
/tmp/ipykernel_50490/2662220410.py in <module>
----> 1 df.to_parquet("/tmp/tmp2.parquet", schema=d)
/opt/userenvs/ray.bell/ml_env/lib/python3.8/site-packages/pandas/util/_decorators.py in wrapper(*args, **kwargs)
205 else:
206 kwargs[new_arg_name] = new_arg_value
--> 207 return func(*args, **kwargs)
208
209 return cast(F, wrapper)
/opt/userenvs/ray.bell/ml_env/lib/python3.8/site-packages/pandas/core/frame.py in to_parquet(self, path, engine, compression, index, partition_cols, storage_options, **kwargs)
2675 from pandas.io.parquet import to_parquet
2676
-> 2677 return to_parquet(
2678 self,
2679 path,
/opt/userenvs/ray.bell/ml_env/lib/python3.8/site-packages/pandas/io/parquet.py in to_parquet(df, path, engine, compression, index, storage_options, partition_cols, **kwargs)
414 path_or_buf: FilePathOrBuffer = io.BytesIO() if path is None else path
415
--> 416 impl.write(
417 df,
418 path_or_buf,
/opt/userenvs/ray.bell/ml_env/lib/python3.8/site-packages/pandas/io/parquet.py in write(self, df, path, compression, index, storage_options, partition_cols, **kwargs)
171 from_pandas_kwargs["preserve_index"] = index
172
--> 173 table = self.api.Table.from_pandas(df, **from_pandas_kwargs)
174
175 path_or_handle, handles, kwargs["filesystem"] = _get_path_or_handle(
TypeError: Argument 'schema' has incorrect type (expected pyarrow.lib.Schema, got dict)
schema = pa.schema(d)
df.to_parquet("tmp.parquet", schema=schema)
```
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43362/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43362/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/43363 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43363/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43363/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43363/events | https://github.com/pandas-dev/pandas/issues/43363 | 986,942,170 | MDU6SXNzdWU5ODY5NDIxNzA= | 43,363 | QST: How should copy behaviour work in ArrowString Array `to_numpy` method? | {
"avatar_url": "https://avatars.githubusercontent.com/u/21278205?v=4",
"events_url": "https://api.github.com/users/1nF0rmed/events{/privacy}",
"followers_url": "https://api.github.com/users/1nF0rmed/followers",
"following_url": "https://api.github.com/users/1nF0rmed/following{/other_user}",
"gists_url": "https://api.github.com/users/1nF0rmed/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/1nF0rmed",
"id": 21278205,
"login": "1nF0rmed",
"node_id": "MDQ6VXNlcjIxMjc4MjA1",
"organizations_url": "https://api.github.com/users/1nF0rmed/orgs",
"received_events_url": "https://api.github.com/users/1nF0rmed/received_events",
"repos_url": "https://api.github.com/users/1nF0rmed/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/1nF0rmed/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/1nF0rmed/subscriptions",
"type": "User",
"url": "https://api.github.com/users/1nF0rmed"
} | [
{
"color": "5319e7",
"default": false,
"description": "String extension data type and string data",
"id": 57522093,
"name": "Strings",
"node_id": "MDU6TGFiZWw1NzUyMjA5Mw==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Strings"
},
{
"color": "207de5",
"default": false,
"description": "Requires discussion from core team before further action",
"id": 219960758,
"name": "Needs Discussion",
"node_id": "MDU6TGFiZWwyMTk5NjA3NTg=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Needs%20Discussion"
},
{
"color": "f9d0c4",
"default": false,
"description": "",
"id": 3303158446,
"name": "Arrow",
"node_id": "MDU6TGFiZWwzMzAzMTU4NDQ2",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Arrow"
}
] | open | false | null | [] | null | 4 | "2021-09-02T16:31:37Z" | "2021-09-05T18:08:43Z" | null | CONTRIBUTOR | null | I was looking at the TODO's in the project and noticed one in the `to_numpy` method of the `ArrowStringArray` class.
https://github.com/pandas-dev/pandas/blob/9d77a5641a912833fc6459ad67ecd8900f9f9e95/pandas/core/arrays/string_arrow.py#L196-L205
From what I understand, it seems like we want to use the option as a way to do a deep copy of the values given in the array.
Would like to raise a PR for the same.
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43363/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43363/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/43364 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43364/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43364/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43364/events | https://github.com/pandas-dev/pandas/issues/43364 | 986,992,354 | MDU6SXNzdWU5ODY5OTIzNTQ= | 43,364 | CI Set pre-commit autoupdate to run monthly instead of weekly | {
"avatar_url": "https://avatars.githubusercontent.com/u/33491632?v=4",
"events_url": "https://api.github.com/users/MarcoGorelli/events{/privacy}",
"followers_url": "https://api.github.com/users/MarcoGorelli/followers",
"following_url": "https://api.github.com/users/MarcoGorelli/following{/other_user}",
"gists_url": "https://api.github.com/users/MarcoGorelli/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/MarcoGorelli",
"id": 33491632,
"login": "MarcoGorelli",
"node_id": "MDQ6VXNlcjMzNDkxNjMy",
"organizations_url": "https://api.github.com/users/MarcoGorelli/orgs",
"received_events_url": "https://api.github.com/users/MarcoGorelli/received_events",
"repos_url": "https://api.github.com/users/MarcoGorelli/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/MarcoGorelli/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/MarcoGorelli/subscriptions",
"type": "User",
"url": "https://api.github.com/users/MarcoGorelli"
} | [
{
"color": "a2bca7",
"default": false,
"description": "Continuous Integration",
"id": 48070600,
"name": "CI",
"node_id": "MDU6TGFiZWw0ODA3MDYwMA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/CI"
},
{
"color": "0e8a16",
"default": true,
"description": null,
"id": 717120670,
"name": "good first issue",
"node_id": "MDU6TGFiZWw3MTcxMjA2NzA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/good%20first%20issue"
}
] | closed | false | {
"avatar_url": "https://avatars.githubusercontent.com/u/21278205?v=4",
"events_url": "https://api.github.com/users/1nF0rmed/events{/privacy}",
"followers_url": "https://api.github.com/users/1nF0rmed/followers",
"following_url": "https://api.github.com/users/1nF0rmed/following{/other_user}",
"gists_url": "https://api.github.com/users/1nF0rmed/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/1nF0rmed",
"id": 21278205,
"login": "1nF0rmed",
"node_id": "MDQ6VXNlcjIxMjc4MjA1",
"organizations_url": "https://api.github.com/users/1nF0rmed/orgs",
"received_events_url": "https://api.github.com/users/1nF0rmed/received_events",
"repos_url": "https://api.github.com/users/1nF0rmed/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/1nF0rmed/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/1nF0rmed/subscriptions",
"type": "User",
"url": "https://api.github.com/users/1nF0rmed"
} | [
{
"avatar_url": "https://avatars.githubusercontent.com/u/21278205?v=4",
"events_url": "https://api.github.com/users/1nF0rmed/events{/privacy}",
"followers_url": "https://api.github.com/users/1nF0rmed/followers",
"following_url": "https://api.github.com/users/1nF0rmed/following{/other_user}",
"gists_url": "https://api.github.com/users/1nF0rmed/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/1nF0rmed",
"id": 21278205,
"login": "1nF0rmed",
"node_id": "MDQ6VXNlcjIxMjc4MjA1",
"organizations_url": "https://api.github.com/users/1nF0rmed/orgs",
"received_events_url": "https://api.github.com/users/1nF0rmed/received_events",
"repos_url": "https://api.github.com/users/1nF0rmed/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/1nF0rmed/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/1nF0rmed/subscriptions",
"type": "User",
"url": "https://api.github.com/users/1nF0rmed"
}
] | null | 5 | "2021-09-02T17:31:53Z" | "2021-09-03T15:21:30Z" | "2021-09-03T14:51:31Z" | MEMBER | null | most of the packages' new release don't affect pandas code - can we change the cron schedule to be monthly instead of weekly?
https://github.com/pandas-dev/pandas/blob/58059c152ccf8a714eb3233f13ed22987eb42b44/.github/workflows/autoupdate-pre-commit-config.yml#L5
Feel free to open a pull request if you know how to do this, no need to ask if you can work on it | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43364/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43364/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/43365 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43365/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43365/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43365/events | https://github.com/pandas-dev/pandas/pull/43365 | 987,046,664 | MDExOlB1bGxSZXF1ZXN0NzI2MTg0MDE2 | 43,365 | TYP: tslibs | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [
{
"color": "ea91a4",
"default": false,
"description": "type annotations, mypy/pyright type checking",
"id": 1280988427,
"name": "Typing",
"node_id": "MDU6TGFiZWwxMjgwOTg4NDI3",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Typing"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 0 | "2021-09-02T18:39:22Z" | "2021-09-02T23:22:38Z" | "2021-09-02T23:21:12Z" | MEMBER | null | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43365/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43365/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/43365.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/43365",
"merged_at": "2021-09-02T23:21:12Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/43365.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/43365"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/43366 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43366/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43366/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43366/events | https://github.com/pandas-dev/pandas/pull/43366 | 987,138,716 | MDExOlB1bGxSZXF1ZXN0NzI2MjY1MDI1 | 43,366 | MAINT: rename IOError -> OSError | {
"avatar_url": "https://avatars.githubusercontent.com/u/895458?v=4",
"events_url": "https://api.github.com/users/mwtoews/events{/privacy}",
"followers_url": "https://api.github.com/users/mwtoews/followers",
"following_url": "https://api.github.com/users/mwtoews/following{/other_user}",
"gists_url": "https://api.github.com/users/mwtoews/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mwtoews",
"id": 895458,
"login": "mwtoews",
"node_id": "MDQ6VXNlcjg5NTQ1OA==",
"organizations_url": "https://api.github.com/users/mwtoews/orgs",
"received_events_url": "https://api.github.com/users/mwtoews/received_events",
"repos_url": "https://api.github.com/users/mwtoews/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mwtoews/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mwtoews/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mwtoews"
} | [
{
"color": "ffa0ff",
"default": false,
"description": "Incorrect or improved errors from pandas",
"id": 42670965,
"name": "Error Reporting",
"node_id": "MDU6TGFiZWw0MjY3MDk2NQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Error%20Reporting"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 10 | "2021-09-02T20:35:36Z" | "2021-09-11T02:28:51Z" | "2021-09-11T02:28:39Z" | CONTRIBUTOR | null | Since Python 3.3, IO and OS exceptions were re-worked as per [PEP 3151](https://www.python.org/dev/peps/pep-3151/). The new main base class is [OSError](https://docs.python.org/3/library/exceptions.html#OSError), with several other exceptions merged, including IOError (i.e. `assert IOError is OSError`).
This PR changes many of the old alias to OSError, with a few exceptions:
- Versioneer EnvironmentError were not modified (this change has been merged upstream)
- In `pandas/_libs/parsers.pyx`, this is not an OSError, as there is no issue reading the file. The exception is reclassified as a [TypeError](https://docs.python.org/3/library/exceptions.html#TypeError).
Are any of these changes worthy of a whatsnew entry?
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43366/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43366/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/43366.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/43366",
"merged_at": "2021-09-11T02:28:39Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/43366.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/43366"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/43367 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43367/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43367/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43367/events | https://github.com/pandas-dev/pandas/issues/43367 | 987,143,702 | MDU6SXNzdWU5ODcxNDM3MDI= | 43,367 | ENH: format_bytes bool arg in memory_usage? | {
"avatar_url": "https://avatars.githubusercontent.com/u/17162724?v=4",
"events_url": "https://api.github.com/users/raybellwaves/events{/privacy}",
"followers_url": "https://api.github.com/users/raybellwaves/followers",
"following_url": "https://api.github.com/users/raybellwaves/following{/other_user}",
"gists_url": "https://api.github.com/users/raybellwaves/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/raybellwaves",
"id": 17162724,
"login": "raybellwaves",
"node_id": "MDQ6VXNlcjE3MTYyNzI0",
"organizations_url": "https://api.github.com/users/raybellwaves/orgs",
"received_events_url": "https://api.github.com/users/raybellwaves/received_events",
"repos_url": "https://api.github.com/users/raybellwaves/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/raybellwaves/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/raybellwaves/subscriptions",
"type": "User",
"url": "https://api.github.com/users/raybellwaves"
} | [
{
"color": "4E9A06",
"default": false,
"description": null,
"id": 76812,
"name": "Enhancement",
"node_id": "MDU6TGFiZWw3NjgxMg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Enhancement"
},
{
"color": "207de5",
"default": false,
"description": "Requires discussion from core team before further action",
"id": 219960758,
"name": "Needs Discussion",
"node_id": "MDU6TGFiZWwyMTk5NjA3NTg=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Needs%20Discussion"
}
] | open | false | null | [] | null | 0 | "2021-09-02T20:41:00Z" | "2021-09-30T23:23:00Z" | null | CONTRIBUTOR | null | #### Is your feature request related to a problem?
[this should provide a description of what the problem is, e.g. "I wish I could use pandas to do [...]"]
I wish pandas could return formatted bytes when calling memory_usage so I can easily understand how much memory a column takes up
#### Describe the solution you'd like
```
DataFrame.memory_usage(..., format_bytes: bool = False):
if format_bytes:
...
```
#### API breaking implications
None (hopefully). An addition arg which defaults to False
#### Describe alternatives you've considered
```
from dask.utils import format_bytes
import pandas as pd
df = pd.DataFrame([range(1000), ["a"] * 1000]).T
df.memory_usage()
```
<img width="170" alt="Screen Shot 2021-09-02 at 4 40 16 PM" src="https://user-images.githubusercontent.com/17162724/131913139-8267557e-b5be-42d3-b35d-8271db923a3d.png">
```
df.memory_usage().apply(format_bytes)
```
<img width="415" alt="Screen Shot 2021-09-02 at 4 38 41 PM" src="https://user-images.githubusercontent.com/17162724/131912997-dbb0c86f-4f48-4c1c-982c-4b03dd9d254b.png">
#### Additional context
[add any other context, code examples, or references to existing implementations about the feature request here]
```python
# Your code here, if applicable
```
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43367/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43367/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/43368 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43368/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43368/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43368/events | https://github.com/pandas-dev/pandas/pull/43368 | 987,167,969 | MDExOlB1bGxSZXF1ZXN0NzI2MjkwODQ3 | 43,368 | CLN: add arg validation for `caption` | {
"avatar_url": "https://avatars.githubusercontent.com/u/24256554?v=4",
"events_url": "https://api.github.com/users/attack68/events{/privacy}",
"followers_url": "https://api.github.com/users/attack68/followers",
"following_url": "https://api.github.com/users/attack68/following{/other_user}",
"gists_url": "https://api.github.com/users/attack68/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/attack68",
"id": 24256554,
"login": "attack68",
"node_id": "MDQ6VXNlcjI0MjU2NTU0",
"organizations_url": "https://api.github.com/users/attack68/orgs",
"received_events_url": "https://api.github.com/users/attack68/received_events",
"repos_url": "https://api.github.com/users/attack68/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/attack68/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/attack68/subscriptions",
"type": "User",
"url": "https://api.github.com/users/attack68"
} | [
{
"color": "006b75",
"default": false,
"description": "conditional formatting using DataFrame.style",
"id": 1728592794,
"name": "Styler",
"node_id": "MDU6TGFiZWwxNzI4NTkyNzk0",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Styler"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 2 | "2021-09-02T21:10:19Z" | "2021-09-05T10:13:28Z" | "2021-09-05T01:36:13Z" | CONTRIBUTOR | null | this is needed since ``DataFrame.to_latex`` validates the ``caption`` arg.
(Personally not a fan of this type of explicit validation)
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43368/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43368/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/43368.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/43368",
"merged_at": "2021-09-05T01:36:12Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/43368.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/43368"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/43369 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43369/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43369/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43369/events | https://github.com/pandas-dev/pandas/pull/43369 | 987,191,003 | MDExOlB1bGxSZXF1ZXN0NzI2MzExMTY2 | 43,369 | ENH: `multirow` naive implementation `Styler.to_latex` part1 | {
"avatar_url": "https://avatars.githubusercontent.com/u/24256554?v=4",
"events_url": "https://api.github.com/users/attack68/events{/privacy}",
"followers_url": "https://api.github.com/users/attack68/followers",
"following_url": "https://api.github.com/users/attack68/following{/other_user}",
"gists_url": "https://api.github.com/users/attack68/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/attack68",
"id": 24256554,
"login": "attack68",
"node_id": "MDQ6VXNlcjI0MjU2NTU0",
"organizations_url": "https://api.github.com/users/attack68/orgs",
"received_events_url": "https://api.github.com/users/attack68/received_events",
"repos_url": "https://api.github.com/users/attack68/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/attack68/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/attack68/subscriptions",
"type": "User",
"url": "https://api.github.com/users/attack68"
} | [
{
"color": "006b75",
"default": false,
"description": "to_latex",
"id": 251382258,
"name": "IO LaTeX",
"node_id": "MDU6TGFiZWwyNTEzODIyNTg=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20LaTeX"
},
{
"color": "006b75",
"default": false,
"description": "conditional formatting using DataFrame.style",
"id": 1728592794,
"name": "Styler",
"node_id": "MDU6TGFiZWwxNzI4NTkyNzk0",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Styler"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 3 | "2021-09-02T21:43:37Z" | "2021-09-07T05:26:36Z" | "2021-09-07T05:26:29Z" | CONTRIBUTOR | null | this is also for compatability with `DataFrame.to_latex`. #41649
I think its a nice feature though, although opinions on the argument input choice are welcome. Maybe `"none"` is better than `"naive"`.
When implementing this for multicol there will be the option for left or right alignment, so the likes of `"naive-left"` or `"naive-r"` will be used. see #43382
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43369/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43369/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/43369.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/43369",
"merged_at": "2021-09-07T05:26:29Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/43369.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/43369"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/43370 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43370/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43370/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43370/events | https://github.com/pandas-dev/pandas/pull/43370 | 987,203,195 | MDExOlB1bGxSZXF1ZXN0NzI2MzIxODY5 | 43,370 | PERF: MultiIndex.get_indexer | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [
{
"color": "0b02e1",
"default": false,
"description": "Related to indexing on series/frames, not to indexes themselves",
"id": 2822098,
"name": "Indexing",
"node_id": "MDU6TGFiZWwyODIyMDk4",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Indexing"
},
{
"color": "a10c02",
"default": false,
"description": "Memory or execution speed performance",
"id": 8935311,
"name": "Performance",
"node_id": "MDU6TGFiZWw4OTM1MzEx",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Performance"
},
{
"color": "207de5",
"default": false,
"description": null,
"id": 71268330,
"name": "MultiIndex",
"node_id": "MDU6TGFiZWw3MTI2ODMzMA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/MultiIndex"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 3 | "2021-09-02T22:02:06Z" | "2021-09-05T17:59:08Z" | "2021-09-05T01:45:58Z" | MEMBER | null | Avoids expensive construction of MultiIndex.values, followed by expensive casting of sequence-of-tuples back to tuple-of-Indexes.
```
import pandas as pd
mi = pd.MultiIndex.from_product([range(100), range(100), range(100)])
%timeit mi.get_indexer(mi[:-1])
698 ms ± 18.7 ms per loop (mean ± std. dev. of 7 runs, 1 loop each) # <- master
157 ms ± 1.21 ms per loop (mean ± std. dev. of 7 runs, 10 loops each) # <- PR
```
Follow-up will move _extract_level_codes out of cython so that Engine._get_indexer and Engine._get_indexer_non_unique are restored to having consistent signatures. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43370/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43370/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/43370.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/43370",
"merged_at": "2021-09-05T01:45:58Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/43370.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/43370"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/43371 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43371/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43371/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43371/events | https://github.com/pandas-dev/pandas/issues/43371 | 987,204,770 | MDU6SXNzdWU5ODcyMDQ3NzA= | 43,371 | BUG: Lacking `milliseconds` field in `DateOffset` | {
"avatar_url": "https://avatars.githubusercontent.com/u/13521008?v=4",
"events_url": "https://api.github.com/users/isVoid/events{/privacy}",
"followers_url": "https://api.github.com/users/isVoid/followers",
"following_url": "https://api.github.com/users/isVoid/following{/other_user}",
"gists_url": "https://api.github.com/users/isVoid/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/isVoid",
"id": 13521008,
"login": "isVoid",
"node_id": "MDQ6VXNlcjEzNTIxMDA4",
"organizations_url": "https://api.github.com/users/isVoid/orgs",
"received_events_url": "https://api.github.com/users/isVoid/received_events",
"repos_url": "https://api.github.com/users/isVoid/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/isVoid/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/isVoid/subscriptions",
"type": "User",
"url": "https://api.github.com/users/isVoid"
} | [
{
"color": "4E9A06",
"default": false,
"description": null,
"id": 76812,
"name": "Enhancement",
"node_id": "MDU6TGFiZWw3NjgxMg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Enhancement"
},
{
"color": "0052cc",
"default": false,
"description": "DateOffsets",
"id": 53181044,
"name": "Frequency",
"node_id": "MDU6TGFiZWw1MzE4MTA0NA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Frequency"
}
] | open | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 1 | "2021-09-02T22:04:12Z" | "2021-10-29T22:00:59Z" | null | NONE | null | - [x] I have checked that this issue has not already been reported.
- [x] I have confirmed this bug exists on the latest version of pandas.
- [ ] (optional) I have confirmed this bug exists on the master branch of pandas.
---
#### Code Sample, a copy-pastable example
```python
# Your code here
>>> import pandas as pd
>>> pd.date_range(start='2000-01-01 08:00:00', end='2000-01-01 08:00:01', freq='1L')
DatetimeIndex([ '2000-01-01 08:00:00', '2000-01-01 08:00:00.001000',
'2000-01-01 08:00:00.002000', '2000-01-01 08:00:00.003000',
'2000-01-01 08:00:00.004000', '2000-01-01 08:00:00.005000',
'2000-01-01 08:00:00.006000', '2000-01-01 08:00:00.007000',
'2000-01-01 08:00:00.008000', '2000-01-01 08:00:00.009000',
...
'2000-01-01 08:00:00.991000', '2000-01-01 08:00:00.992000',
'2000-01-01 08:00:00.993000', '2000-01-01 08:00:00.994000',
'2000-01-01 08:00:00.995000', '2000-01-01 08:00:00.996000',
'2000-01-01 08:00:00.997000', '2000-01-01 08:00:00.998000',
'2000-01-01 08:00:00.999000', '2000-01-01 08:00:01'],
dtype='datetime64[ns]', length=1001, freq='L')
>>> pd.date_range(start='2000-01-01 08:00:00', end='2000-01-01 08:00:01', freq=pd.DateOffset(milliseconds=1))
DatetimeIndex(['2000-01-01 08:00:00'], dtype='datetime64[ns]', freq='<DateOffset>')
```
#### Problem description
Today, I can specify 1 millisecond offset in `date_range` by offset alias `1L` or `1ms`. But I cannot specify this offset through `pd.DateOffset` because its lacking a `milliseconds` field.
#### Expected Output
Similar to the case specified with offset alias `L` or `ms`.
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit : 7c48ff4409c622c582c56a5702373f726de08e96
python : 3.7.10.final.0
python-bits : 64
OS : Linux
OS-release : 4.15.0-76-generic
Version : #86-Ubuntu SMP Fri Jan 17 17:24:28 UTC 2020
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : None
LOCALE : en_US.UTF-8
pandas : 1.2.5
numpy : 1.21.2
pytz : 2021.1
dateutil : 2.8.1
pip : 21.2.4
setuptools : 52.0.0.post20210125
Cython : 0.29.24
pytest : 6.2.4
hypothesis : 6.17.2
sphinx : 4.1.2
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 2.11.3
IPython : 7.27.0
pandas_datareader: None
bs4 : 4.9.3
bottleneck : None
fsspec : 2021.07.0
fastparquet : None
gcsfs : None
matplotlib : 3.4.3
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : 5.0.0
pyxlsb : None
s3fs : None
scipy : 1.5.3
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43371/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43371/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/43372 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43372/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43372/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43372/events | https://github.com/pandas-dev/pandas/pull/43372 | 987,215,420 | MDExOlB1bGxSZXF1ZXN0NzI2MzMyNzkw | 43,372 | CLN: Minor cleanup of deprecations in parser code | {
"avatar_url": "https://avatars.githubusercontent.com/u/47963215?v=4",
"events_url": "https://api.github.com/users/lithomas1/events{/privacy}",
"followers_url": "https://api.github.com/users/lithomas1/followers",
"following_url": "https://api.github.com/users/lithomas1/following{/other_user}",
"gists_url": "https://api.github.com/users/lithomas1/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/lithomas1",
"id": 47963215,
"login": "lithomas1",
"node_id": "MDQ6VXNlcjQ3OTYzMjE1",
"organizations_url": "https://api.github.com/users/lithomas1/orgs",
"received_events_url": "https://api.github.com/users/lithomas1/received_events",
"repos_url": "https://api.github.com/users/lithomas1/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/lithomas1/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/lithomas1/subscriptions",
"type": "User",
"url": "https://api.github.com/users/lithomas1"
} | [
{
"color": "5319e7",
"default": false,
"description": "read_csv, to_csv",
"id": 47229171,
"name": "IO CSV",
"node_id": "MDU6TGFiZWw0NzIyOTE3MQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20CSV"
},
{
"color": "207de5",
"default": false,
"description": null,
"id": 211029535,
"name": "Clean",
"node_id": "MDU6TGFiZWwyMTEwMjk1MzU=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Clean"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 1 | "2021-09-02T22:19:49Z" | "2021-09-18T17:45:52Z" | "2021-09-04T14:10:51Z" | MEMBER | null | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
Some spaghetti that I noticed and was annoying. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43372/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43372/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/43372.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/43372",
"merged_at": "2021-09-04T14:10:51Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/43372.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/43372"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/43373 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43373/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43373/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43373/events | https://github.com/pandas-dev/pandas/pull/43373 | 987,226,172 | MDExOlB1bGxSZXF1ZXN0NzI2MzQyMzA5 | 43,373 | BUG: Fix regression in is_list_like | {
"avatar_url": "https://avatars.githubusercontent.com/u/5399935?v=4",
"events_url": "https://api.github.com/users/aiudirog/events{/privacy}",
"followers_url": "https://api.github.com/users/aiudirog/followers",
"following_url": "https://api.github.com/users/aiudirog/following{/other_user}",
"gists_url": "https://api.github.com/users/aiudirog/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/aiudirog",
"id": 5399935,
"login": "aiudirog",
"node_id": "MDQ6VXNlcjUzOTk5MzU=",
"organizations_url": "https://api.github.com/users/aiudirog/orgs",
"received_events_url": "https://api.github.com/users/aiudirog/received_events",
"repos_url": "https://api.github.com/users/aiudirog/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/aiudirog/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/aiudirog/subscriptions",
"type": "User",
"url": "https://api.github.com/users/aiudirog"
} | [
{
"color": "0052cc",
"default": false,
"description": "pandas objects compatability with Numpy or Python functions",
"id": 76865106,
"name": "Compat",
"node_id": "MDU6TGFiZWw3Njg2NTEwNg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Compat"
}
] | closed | false | null | [] | {
"closed_at": "2021-09-12T08:21:30Z",
"closed_issues": 79,
"created_at": "2021-08-15T08:07:48Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/13159005?v=4",
"events_url": "https://api.github.com/users/simonjayhawkins/events{/privacy}",
"followers_url": "https://api.github.com/users/simonjayhawkins/followers",
"following_url": "https://api.github.com/users/simonjayhawkins/following{/other_user}",
"gists_url": "https://api.github.com/users/simonjayhawkins/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/simonjayhawkins",
"id": 13159005,
"login": "simonjayhawkins",
"node_id": "MDQ6VXNlcjEzMTU5MDA1",
"organizations_url": "https://api.github.com/users/simonjayhawkins/orgs",
"received_events_url": "https://api.github.com/users/simonjayhawkins/received_events",
"repos_url": "https://api.github.com/users/simonjayhawkins/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/simonjayhawkins/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/simonjayhawkins/subscriptions",
"type": "User",
"url": "https://api.github.com/users/simonjayhawkins"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-09-12T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/89",
"id": 7059576,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/89/labels",
"node_id": "MI_kwDOAA0YD84Aa7h4",
"number": 89,
"open_issues": 0,
"state": "closed",
"title": "1.3.3",
"updated_at": "2021-09-12T20:30:04Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/89"
} | 12 | "2021-09-02T22:40:14Z" | "2021-09-05T01:44:50Z" | "2021-09-04T23:28:26Z" | CONTRIBUTOR | null | `is_list_like()` used to use `isinstance(obj, abc.Iterable)` before #39852 where it was optimized for performance. This resulted in a regression where objects that explicitly declare `__iter__` as `None` are considered "list like" but not instances of `abc.Iterable`.
Because the original original PR was focused on performance, here are the same timeit cases run on this PR:
```python
In[1]: import numpy as np
In[2]: from pandas._libs.lib import is_list_like
In[3]: arr = np.array(0)
In[4]: arr2 = np.array([0])
In[5]: %timeit is_list_like([])
51.3 ns ± 0.231 ns per loop (mean ± std. dev. of 7 runs, 10000000 loops each) <- master
56.3 ns ± 0.44 ns per loop (mean ± std. dev. of 7 runs, 10000000 loops each) <- PR
153 ns ± 2.4 ns per loop (mean ± std. dev. of 7 runs, 10000000 loops each) <- isinstance(obj, abc.Iterable)
In[6]: %timeit is_list_like(0)
117 ns ± 2.19 ns per loop (mean ± std. dev. of 7 runs, 10000000 loops each) <- master
126 ns ± 2 ns per loop (mean ± std. dev. of 7 runs, 10000000 loops each) <- PR
154 ns ± 1.18 ns per loop (mean ± std. dev. of 7 runs, 10000000 loops each) <- isinstance(obj, abc.Iterable)
In[7]: %timeit is_list_like(arr)
49.5 ns ± 0.156 ns per loop (mean ± std. dev. of 7 runs, 10000000 loops each) <- master
50.6 ns ± 0.14 ns per loop (mean ± std. dev. of 7 runs, 10000000 loops each) <- PR
152 ns ± 1.12 ns per loop (mean ± std. dev. of 7 runs, 10000000 loops each) <- isinstance(obj, abc.Iterable)
In[8]: %timeit is_list_like(arr2)
50.8 ns ± 1.36 ns per loop (mean ± std. dev. of 7 runs, 10000000 loops each) <- master
51.5 ns ± 0.179 ns per loop (mean ± std. dev. of 7 runs, 10000000 loops each) <- PR
151 ns ± 0.582 ns per loop (mean ± std. dev. of 7 runs, 10000000 loops each) <- isinstance(obj, abc.Iterable)
```
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43373/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43373/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/43373.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/43373",
"merged_at": "2021-09-04T23:28:26Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/43373.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/43373"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/43374 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43374/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43374/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43374/events | https://github.com/pandas-dev/pandas/pull/43374 | 987,291,853 | MDExOlB1bGxSZXF1ZXN0NzI2NDAwNzQ4 | 43,374 | BUG: rolling.groupby with on and __getitem__ doesn't mutate underlying object | {
"avatar_url": "https://avatars.githubusercontent.com/u/10647082?v=4",
"events_url": "https://api.github.com/users/mroeschke/events{/privacy}",
"followers_url": "https://api.github.com/users/mroeschke/followers",
"following_url": "https://api.github.com/users/mroeschke/following{/other_user}",
"gists_url": "https://api.github.com/users/mroeschke/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mroeschke",
"id": 10647082,
"login": "mroeschke",
"node_id": "MDQ6VXNlcjEwNjQ3MDgy",
"organizations_url": "https://api.github.com/users/mroeschke/orgs",
"received_events_url": "https://api.github.com/users/mroeschke/received_events",
"repos_url": "https://api.github.com/users/mroeschke/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mroeschke/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mroeschke/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mroeschke"
} | [
{
"color": "729FCF",
"default": false,
"description": null,
"id": 233160,
"name": "Groupby",
"node_id": "MDU6TGFiZWwyMzMxNjA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Groupby"
},
{
"color": "d4c5f9",
"default": false,
"description": "rolling, ewma, expanding",
"id": 1045950827,
"name": "Window",
"node_id": "MDU6TGFiZWwxMDQ1OTUwODI3",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Window"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 4 | "2021-09-03T00:51:09Z" | "2021-09-06T17:14:39Z" | "2021-09-06T15:36:23Z" | MEMBER | null | - [x] closes #43355
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [x] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43374/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43374/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/43374.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/43374",
"merged_at": "2021-09-06T15:36:23Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/43374.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/43374"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/43375 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43375/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43375/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43375/events | https://github.com/pandas-dev/pandas/issues/43375 | 987,318,562 | MDU6SXNzdWU5ODczMTg1NjI= | 43,375 | BUG: concat still sorts columns if they differ | {
"avatar_url": "https://avatars.githubusercontent.com/u/179487?v=4",
"events_url": "https://api.github.com/users/mathrick/events{/privacy}",
"followers_url": "https://api.github.com/users/mathrick/followers",
"following_url": "https://api.github.com/users/mathrick/following{/other_user}",
"gists_url": "https://api.github.com/users/mathrick/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mathrick",
"id": 179487,
"login": "mathrick",
"node_id": "MDQ6VXNlcjE3OTQ4Nw==",
"organizations_url": "https://api.github.com/users/mathrick/orgs",
"received_events_url": "https://api.github.com/users/mathrick/received_events",
"repos_url": "https://api.github.com/users/mathrick/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mathrick/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mathrick/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mathrick"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "02d7e1",
"default": false,
"description": "Concat, Merge/Join, Stack/Unstack, Explode",
"id": 13098779,
"name": "Reshaping",
"node_id": "MDU6TGFiZWwxMzA5ODc3OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Reshaping"
},
{
"color": "e99695",
"default": false,
"description": "Related to the Index class or subclasses",
"id": 1218227310,
"name": "Index",
"node_id": "MDU6TGFiZWwxMjE4MjI3MzEw",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Index"
},
{
"color": "006b75",
"default": false,
"description": "union, intersection, difference, symmetric_difference",
"id": 3073524400,
"name": "setops",
"node_id": "MDU6TGFiZWwzMDczNTI0NDAw",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/setops"
}
] | closed | false | {
"avatar_url": "https://avatars.githubusercontent.com/u/31857876?v=4",
"events_url": "https://api.github.com/users/CloseChoice/events{/privacy}",
"followers_url": "https://api.github.com/users/CloseChoice/followers",
"following_url": "https://api.github.com/users/CloseChoice/following{/other_user}",
"gists_url": "https://api.github.com/users/CloseChoice/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/CloseChoice",
"id": 31857876,
"login": "CloseChoice",
"node_id": "MDQ6VXNlcjMxODU3ODc2",
"organizations_url": "https://api.github.com/users/CloseChoice/orgs",
"received_events_url": "https://api.github.com/users/CloseChoice/received_events",
"repos_url": "https://api.github.com/users/CloseChoice/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/CloseChoice/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/CloseChoice/subscriptions",
"type": "User",
"url": "https://api.github.com/users/CloseChoice"
} | [
{
"avatar_url": "https://avatars.githubusercontent.com/u/31857876?v=4",
"events_url": "https://api.github.com/users/CloseChoice/events{/privacy}",
"followers_url": "https://api.github.com/users/CloseChoice/followers",
"following_url": "https://api.github.com/users/CloseChoice/following{/other_user}",
"gists_url": "https://api.github.com/users/CloseChoice/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/CloseChoice",
"id": 31857876,
"login": "CloseChoice",
"node_id": "MDQ6VXNlcjMxODU3ODc2",
"organizations_url": "https://api.github.com/users/CloseChoice/orgs",
"received_events_url": "https://api.github.com/users/CloseChoice/received_events",
"repos_url": "https://api.github.com/users/CloseChoice/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/CloseChoice/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/CloseChoice/subscriptions",
"type": "User",
"url": "https://api.github.com/users/CloseChoice"
}
] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 2 | "2021-09-03T01:52:58Z" | "2021-10-10T17:28:30Z" | "2021-10-10T17:28:30Z" | NONE | null | - [x] I have checked that this issue has not already been reported.
- [x] I have confirmed this bug exists on the latest version of pandas.
- [ ] (optional) I have confirmed this bug exists on the master branch of pandas.
---
#### Code Sample, a copy-pastable example
```python
>>> print(pd.concat([pd.DataFrame({i: i}, index=[i]) for i in range(10, 0, -1)], sort=False))
1 2 3 4 5 6 7 8 9 10
10 NaN NaN NaN NaN NaN NaN NaN NaN NaN 10.0
9 NaN NaN NaN NaN NaN NaN NaN NaN 9.0 NaN
8 NaN NaN NaN NaN NaN NaN NaN 8.0 NaN NaN
7 NaN NaN NaN NaN NaN NaN 7.0 NaN NaN NaN
6 NaN NaN NaN NaN NaN 6.0 NaN NaN NaN NaN
5 NaN NaN NaN NaN 5.0 NaN NaN NaN NaN NaN
4 NaN NaN NaN 4.0 NaN NaN NaN NaN NaN NaN
3 NaN NaN 3.0 NaN NaN NaN NaN NaN NaN NaN
2 NaN 2.0 NaN NaN NaN NaN NaN NaN NaN NaN
1 1.0 NaN NaN NaN NaN NaN NaN NaN NaN NaN
```
#### Problem description
This was marked as fixed in #4588, but `concat()` still sorts the columns if they differ. The `sort` argument doesn't seem to have any effect on this.
#### Expected Output
```python
10 9 8 7 6 5 4 3 2 1
10 10.0 NaN NaN NaN NaN NaN NaN NaN NaN NaN
9 NaN 9.0 NaN NaN NaN NaN NaN NaN NaN NaN
8 NaN NaN 8.0 NaN NaN NaN NaN NaN NaN NaN
7 NaN NaN NaN 7.0 NaN NaN NaN NaN NaN NaN
6 NaN NaN NaN NaN 6.0 NaN NaN NaN NaN NaN
5 NaN NaN NaN NaN NaN 5.0 NaN NaN NaN NaN
4 NaN NaN NaN NaN NaN NaN 4.0 NaN NaN NaN
3 NaN NaN NaN NaN NaN NaN NaN 3.0 NaN NaN
2 NaN NaN NaN NaN NaN NaN NaN NaN 2.0 NaN
1 NaN NaN NaN NaN NaN NaN NaN NaN NaN 1.0
```
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit : 5f648bf1706dd75a9ca0d29f26eadfbb595fe52b
python : 3.8.10.final.0
python-bits : 64
OS : Linux
OS-release : 5.4.0-77-generic
Version : #86-Ubuntu SMP Thu Jun 17 02:35:03 UTC 2021
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_GB.UTF-8
LOCALE : en_GB.UTF-8
pandas : 1.3.2
numpy : 1.21.2
pytz : 2021.1
dateutil : 2.8.2
pip : 20.0.2
setuptools : 44.0.0
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : None
IPython : None
pandas_datareader: None
bs4 : None
bottleneck : None
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pyxlsb : None
s3fs : None
scipy : None
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
numba : None
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43375/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43375/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/43376 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43376/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43376/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43376/events | https://github.com/pandas-dev/pandas/pull/43376 | 987,396,399 | MDExOlB1bGxSZXF1ZXN0NzI2NDg4MjIw | 43,376 | REF: reindex_indexer use np.void to avoid JoinUnit | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [
{
"color": "FCE94F",
"default": false,
"description": "Internal refactoring of code",
"id": 127681,
"name": "Refactor",
"node_id": "MDU6TGFiZWwxMjc2ODE=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Refactor"
},
{
"color": "fbca04",
"default": false,
"description": "Related to non-user accessible pandas implementation",
"id": 49094459,
"name": "Internals",
"node_id": "MDU6TGFiZWw0OTA5NDQ1OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Internals"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 1 | "2021-09-03T04:54:42Z" | "2021-09-08T14:07:13Z" | "2021-09-08T12:44:59Z" | MEMBER | null | ATM we do a kludgy thing where we sometimes reindex before calling concat (e.g. in DataFrame.append) and that leads to all-NA columns that we choose to ignore when choosing the dtype for the concatenated column. This leads to a) funky behavior when we encounter an "real" all-NA column and b) a big performance hit in checking for all-NA columns.
Instead of doing that, this PR implements the keyword use_na_proxy (chosen to match ArrayManager's keyword) that ends up creating ndarrays with np.void dtype instead of all-NA float64 ndarrays.
This will allow us to simplify a bunch of code in internals.concat (e.g. get rid of case where `unit.block is None`) and improve the funky behavior mentioned above. Both of these are left to follow-ups to keep the diff manageable. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43376/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43376/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/43376.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/43376",
"merged_at": "2021-09-08T12:44:58Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/43376.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/43376"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/43377 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43377/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43377/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43377/events | https://github.com/pandas-dev/pandas/pull/43377 | 987,603,859 | MDExOlB1bGxSZXF1ZXN0NzI2NjY1NTE0 | 43,377 | correcting example in comparison with spreadsheets | {
"avatar_url": "https://avatars.githubusercontent.com/u/18447566?v=4",
"events_url": "https://api.github.com/users/Digres45/events{/privacy}",
"followers_url": "https://api.github.com/users/Digres45/followers",
"following_url": "https://api.github.com/users/Digres45/following{/other_user}",
"gists_url": "https://api.github.com/users/Digres45/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Digres45",
"id": 18447566,
"login": "Digres45",
"node_id": "MDQ6VXNlcjE4NDQ3NTY2",
"organizations_url": "https://api.github.com/users/Digres45/orgs",
"received_events_url": "https://api.github.com/users/Digres45/received_events",
"repos_url": "https://api.github.com/users/Digres45/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Digres45/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Digres45/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Digres45"
} | [
{
"color": "3465A4",
"default": false,
"description": null,
"id": 134699,
"name": "Docs",
"node_id": "MDU6TGFiZWwxMzQ2OTk=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Docs"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 0 | "2021-09-03T09:51:08Z" | "2021-09-20T04:49:13Z" | "2021-09-03T09:57:16Z" | CONTRIBUTOR | null | - [ ] closes #43361
- [ ] doc/source/getting_started/comparison/includes/nth_word.rst file updated with correction in example
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43377/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43377/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/43377.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/43377",
"merged_at": "2021-09-03T09:57:15Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/43377.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/43377"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/43378 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43378/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43378/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43378/events | https://github.com/pandas-dev/pandas/pull/43378 | 987,632,326 | MDExOlB1bGxSZXF1ZXN0NzI2NjkwMzUx | 43,378 | Auto-update now occurs monthly instead of weekly | {
"avatar_url": "https://avatars.githubusercontent.com/u/5129863?v=4",
"events_url": "https://api.github.com/users/normyp/events{/privacy}",
"followers_url": "https://api.github.com/users/normyp/followers",
"following_url": "https://api.github.com/users/normyp/following{/other_user}",
"gists_url": "https://api.github.com/users/normyp/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/normyp",
"id": 5129863,
"login": "normyp",
"node_id": "MDQ6VXNlcjUxMjk4NjM=",
"organizations_url": "https://api.github.com/users/normyp/orgs",
"received_events_url": "https://api.github.com/users/normyp/received_events",
"repos_url": "https://api.github.com/users/normyp/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/normyp/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/normyp/subscriptions",
"type": "User",
"url": "https://api.github.com/users/normyp"
} | [] | closed | false | null | [] | null | 1 | "2021-09-03T10:26:32Z" | "2021-09-03T15:21:12Z" | "2021-09-03T13:49:15Z" | NONE | null | Fixes issue #43364
- [x] closes #44364
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43378/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43378/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/43378.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/43378",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/43378.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/43378"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/43379 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43379/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43379/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43379/events | https://github.com/pandas-dev/pandas/pull/43379 | 987,680,703 | MDExOlB1bGxSZXF1ZXN0NzI2NzMyMzMw | 43,379 | Auto-update now occurs monthly instead of weekly | {
"avatar_url": "https://avatars.githubusercontent.com/u/21278205?v=4",
"events_url": "https://api.github.com/users/1nF0rmed/events{/privacy}",
"followers_url": "https://api.github.com/users/1nF0rmed/followers",
"following_url": "https://api.github.com/users/1nF0rmed/following{/other_user}",
"gists_url": "https://api.github.com/users/1nF0rmed/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/1nF0rmed",
"id": 21278205,
"login": "1nF0rmed",
"node_id": "MDQ6VXNlcjIxMjc4MjA1",
"organizations_url": "https://api.github.com/users/1nF0rmed/orgs",
"received_events_url": "https://api.github.com/users/1nF0rmed/received_events",
"repos_url": "https://api.github.com/users/1nF0rmed/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/1nF0rmed/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/1nF0rmed/subscriptions",
"type": "User",
"url": "https://api.github.com/users/1nF0rmed"
} | [
{
"color": "a2bca7",
"default": false,
"description": "Continuous Integration",
"id": 48070600,
"name": "CI",
"node_id": "MDU6TGFiZWw0ODA3MDYwMA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/CI"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 0 | "2021-09-03T11:33:55Z" | "2021-09-03T14:51:32Z" | "2021-09-03T14:51:31Z" | CONTRIBUTOR | null | - [x] closes #43364
- [x] tests passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43379/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43379/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/43379.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/43379",
"merged_at": "2021-09-03T14:51:31Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/43379.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/43379"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/43380 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43380/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43380/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43380/events | https://github.com/pandas-dev/pandas/issues/43380 | 987,697,073 | MDU6SXNzdWU5ODc2OTcwNzM= | 43,380 | REGR: 1.3 invalid exclusion of nuisance columns with groupby aggregation | {
"avatar_url": "https://avatars.githubusercontent.com/u/47320452?v=4",
"events_url": "https://api.github.com/users/joseph-wakeling-frequenz/events{/privacy}",
"followers_url": "https://api.github.com/users/joseph-wakeling-frequenz/followers",
"following_url": "https://api.github.com/users/joseph-wakeling-frequenz/following{/other_user}",
"gists_url": "https://api.github.com/users/joseph-wakeling-frequenz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/joseph-wakeling-frequenz",
"id": 47320452,
"login": "joseph-wakeling-frequenz",
"node_id": "MDQ6VXNlcjQ3MzIwNDUy",
"organizations_url": "https://api.github.com/users/joseph-wakeling-frequenz/orgs",
"received_events_url": "https://api.github.com/users/joseph-wakeling-frequenz/received_events",
"repos_url": "https://api.github.com/users/joseph-wakeling-frequenz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/joseph-wakeling-frequenz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/joseph-wakeling-frequenz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/joseph-wakeling-frequenz"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "3465A4",
"default": false,
"description": null,
"id": 134699,
"name": "Docs",
"node_id": "MDU6TGFiZWwxMzQ2OTk=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Docs"
},
{
"color": "729FCF",
"default": false,
"description": null,
"id": 233160,
"name": "Groupby",
"node_id": "MDU6TGFiZWwyMzMxNjA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Groupby"
},
{
"color": "e11d21",
"default": false,
"description": "Functionality that used to work in a prior pandas version",
"id": 32815646,
"name": "Regression",
"node_id": "MDU6TGFiZWwzMjgxNTY0Ng==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Regression"
},
{
"color": "009800",
"default": false,
"description": "Duplicate issue or pull request",
"id": 40153326,
"name": "Duplicate Report",
"node_id": "MDU6TGFiZWw0MDE1MzMyNg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Duplicate%20Report"
},
{
"color": "547c03",
"default": false,
"description": "sum, mean, min, max, etc.",
"id": 2365504383,
"name": "Reduction Operations",
"node_id": "MDU6TGFiZWwyMzY1NTA0Mzgz",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Reduction%20Operations"
},
{
"color": "120491",
"default": false,
"description": "Identifying/Dropping nuisance columns in reductions, groupby.add, DataFrame.apply",
"id": 2365523662,
"name": "Nuisance Columns",
"node_id": "MDU6TGFiZWwyMzY1NTIzNjYy",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Nuisance%20Columns"
}
] | closed | false | null | [] | {
"closed_at": "2021-09-12T08:21:30Z",
"closed_issues": 79,
"created_at": "2021-08-15T08:07:48Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/13159005?v=4",
"events_url": "https://api.github.com/users/simonjayhawkins/events{/privacy}",
"followers_url": "https://api.github.com/users/simonjayhawkins/followers",
"following_url": "https://api.github.com/users/simonjayhawkins/following{/other_user}",
"gists_url": "https://api.github.com/users/simonjayhawkins/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/simonjayhawkins",
"id": 13159005,
"login": "simonjayhawkins",
"node_id": "MDQ6VXNlcjEzMTU5MDA1",
"organizations_url": "https://api.github.com/users/simonjayhawkins/orgs",
"received_events_url": "https://api.github.com/users/simonjayhawkins/received_events",
"repos_url": "https://api.github.com/users/simonjayhawkins/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/simonjayhawkins/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/simonjayhawkins/subscriptions",
"type": "User",
"url": "https://api.github.com/users/simonjayhawkins"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-09-12T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/89",
"id": 7059576,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/89/labels",
"node_id": "MI_kwDOAA0YD84Aa7h4",
"number": 89,
"open_issues": 0,
"state": "closed",
"title": "1.3.3",
"updated_at": "2021-09-12T20:30:04Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/89"
} | 6 | "2021-09-03T11:57:04Z" | "2021-09-13T12:31:25Z" | "2021-09-11T11:02:28Z" | NONE | null | - [x] I have checked that this issue has not already been reported.
- [x] I have confirmed this bug exists on the latest version of pandas.
- [ ] (optional) I have confirmed this bug exists on the master branch of pandas.
---
#### Code Sample, a copy-pastable example
Adapted from ["Automatic exclusion of nuisance columns"](https://pandas.pydata.org/docs/user_guide/groupby.html?highlight=decimal#automatic-exclusion-of-nuisance-columns) in the User Guide "Group by" docs:
```python
from decimal import Decimal
import pandas as pd
df_dec = pd.DataFrame(
{
"id": [1, 2, 1, 2],
"int_column": [1, 2, 3, 4],
"dec_column": [
Decimal("0.50"),
Decimal("0.15"),
Decimal("0.25"),
Decimal("0.40"),
],
}
)
print('\ndf_dec.groupby(["id"])[["dec_column"]].sum()')
print('According to docs this should sum correctly')
print('It works for pandas 1.2.x but generates an empty dataframe for 1.3.x')
print(df_dec.groupby(["id"])[["dec_column"]].sum())
print('\ndf_dec.groupby(["id"])[["int_column", "dec_column"]].sum()')
print('This drops `dec_column` as expected for both 1.2.x and 1.3.x')
print(df_dec.groupby(["id"])[["int_column", "dec_column"]].sum())
print('\ndf_dec.groupby(["id"]).agg({"int_column": "sum", "dec_column": "sum"})')
print('This aggregates everything correctly as expected for both 1.2.x and 1.3.x')
print(df_dec.groupby(["id"]).agg({"int_column": "sum", "dec_column": "sum"}))
```
#### Problem description
The User Guide "Group by" docs provides a code example that shows when nuisance columns will be excluded from aggregation. According to this doc the case:
```python
df_dec.groupby(["id"])[["dec_column"]].sum()
```
should produce a valid aggregation, but for pandas >= 1.3.0 it results in an empty dataframe.
The impact of the regression can even be seen in the published docs. If we look an archive.org 2021-02-25 snapshot of the "Automatic exclusion of nuisance columns" section, we can see that the example produces correct output (see `Out[170]` in the code example):
https://web.archive.org/web/20210225195813/https://pandas.pydata.org/docs/user_guide/groupby.html#automatic-exclusion-of-nuisance-columns
By contrast the 2021-08-24 snapshot displays an empty dataframe for the `Out[170]` example:
https://web.archive.org/web/20210824151314/https://pandas.pydata.org/docs/user_guide/groupby.html#automatic-exclusion-of-nuisance-columns
However, note that the docs in both cases indicate that the example _should_ produce a correct aggregation.
#### Expected Output
```python
df_dec.groupby(["id"])[["dec_column"]].sum()
```
should produce the result:
```
dec_column
id
1 0.75
2 0.55
```
For pandas 1.2.x it does so as expected. For pandas >= 1.3.0 it produces instead the incorrect
```
Empty DataFrame
Columns: []
Index: [1, 2]
``` | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43380/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43380/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/43381 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43381/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43381/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43381/events | https://github.com/pandas-dev/pandas/issues/43381 | 987,746,178 | MDU6SXNzdWU5ODc3NDYxNzg= | 43,381 | BUG: rolling() function does not work with Float64 columns with missing values | {
"avatar_url": "https://avatars.githubusercontent.com/u/287141?v=4",
"events_url": "https://api.github.com/users/janlugt/events{/privacy}",
"followers_url": "https://api.github.com/users/janlugt/followers",
"following_url": "https://api.github.com/users/janlugt/following{/other_user}",
"gists_url": "https://api.github.com/users/janlugt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/janlugt",
"id": 287141,
"login": "janlugt",
"node_id": "MDQ6VXNlcjI4NzE0MQ==",
"organizations_url": "https://api.github.com/users/janlugt/orgs",
"received_events_url": "https://api.github.com/users/janlugt/received_events",
"repos_url": "https://api.github.com/users/janlugt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/janlugt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/janlugt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/janlugt"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "d4c5f9",
"default": false,
"description": "rolling, ewma, expanding",
"id": 1045950827,
"name": "Window",
"node_id": "MDU6TGFiZWwxMDQ1OTUwODI3",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Window"
},
{
"color": "8cc645",
"default": false,
"description": "Related to pd.NA and nullable extension arrays",
"id": 1817503692,
"name": "NA - MaskedArrays",
"node_id": "MDU6TGFiZWwxODE3NTAzNjky",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/NA%20-%20MaskedArrays"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 9 | "2021-09-03T12:57:56Z" | "2021-11-10T12:31:48Z" | "2021-09-04T01:57:07Z" | NONE | null | - [x] I have checked that this issue has not already been reported.
- [x] I have confirmed this bug exists on the latest version of pandas.
- [ ] (optional) I have confirmed this bug exists on the master branch of pandas.
---
#### Code Sample, a copy-pastable example
Simple series with floats, dtype float64:
```python
>>> df = pd.Series([0.0, 1.0, 2.0, 3.0, 4.0])
>>> df
0 0.0
1 1.0
2 2.0
3 3.0
4 4.0
dtype: float64
```
diff() introduces a NaN in the first position:
```python
>>> df.diff()
0 NaN
1 1.0
2 1.0
3 1.0
4 1.0
dtype: float64
```
This works as expected:
```python
>>> df.diff().rolling(2).sum()
0 NaN
1 NaN
2 2.0
3 2.0
4 2.0
```
We can cast to a Float64:
```python
>>> df.astype('Float64')
0 0.0
1 1.0
2 2.0
3 3.0
4 4.0
dtype: Float64
```
diff() still works fine, but gives us a pd.NA instead of a NaN:
```python
>>> df.astype('Float64').diff()
0 <NA>
1 1.0
2 1.0
3 1.0
4 1.0
dtype: Float64
```
Now, when we call rolling(), everything comes tumbling down:
```python
>>> df.astype('Float64').diff().rolling(2).sum()
Traceback (most recent call last):
File "/home/janlugt/repositories/streaming_anomaly_detection/.venv/lib/python3.8/site-packages/pandas/core/window/rolling.py", line 321, in _prep_values
values = ensure_float64(values)
File "pandas/_libs/algos_common_helper.pxi", line 45, in pandas._libs.algos.ensure_float64
File "/home/janlugt/repositories/streaming_anomaly_detection/.venv/lib/python3.8/site-packages/pandas/core/arrays/masked.py", line 335, in __array__
return self.to_numpy(dtype=dtype)
File "/home/janlugt/repositories/streaming_anomaly_detection/.venv/lib/python3.8/site-packages/pandas/core/arrays/masked.py", line 292, in to_numpy
raise ValueError(
ValueError: cannot convert to 'float64'-dtype NumPy array with missing values. Specify an appropriate 'na_value' for this dtype.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/janlugt/repositories/streaming_anomaly_detection/.venv/lib/python3.8/site-packages/pandas/core/window/rolling.py", line 402, in _apply_series
values = self._prep_values(obj._values)
File "/home/janlugt/repositories/streaming_anomaly_detection/.venv/lib/python3.8/site-packages/pandas/core/window/rolling.py", line 323, in _prep_values
raise TypeError(f"cannot handle this type -> {values.dtype}") from err
TypeError: cannot handle this type -> Float64
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/janlugt/repositories/streaming_anomaly_detection/.venv/lib/python3.8/site-packages/pandas/core/window/rolling.py", line 1723, in sum
return super().sum(*args, engine=engine, engine_kwargs=engine_kwargs, **kwargs)
File "/home/janlugt/repositories/streaming_anomaly_detection/.venv/lib/python3.8/site-packages/pandas/core/window/rolling.py", line 1233, in sum
return self._apply(window_func, name="sum", **kwargs)
File "/home/janlugt/repositories/streaming_anomaly_detection/.venv/lib/python3.8/site-packages/pandas/core/window/rolling.py", line 539, in _apply
return self._apply_blockwise(homogeneous_func, name)
File "/home/janlugt/repositories/streaming_anomaly_detection/.venv/lib/python3.8/site-packages/pandas/core/window/rolling.py", line 417, in _apply_blockwise
return self._apply_series(homogeneous_func, name)
File "/home/janlugt/repositories/streaming_anomaly_detection/.venv/lib/python3.8/site-packages/pandas/core/window/rolling.py", line 404, in _apply_series
raise DataError("No numeric types to aggregate") from err
pandas.core.base.DataError: No numeric types to aggregate
```
#### Problem description
My expectation would be that whether we call rolling on a float64 or a Float64 series, the output would be the same. The promise of pd.NA is that it can be used consistently across data types, and make the use of specific NaN types such as np.nan or NaT unnecessary, which is clearly not the case here.
#### Expected Output
```
>>> df.astype('Float64').diff().rolling(2).sum()
0 <NA>
1 <NA>
2 2.0
3 2.0
4 2.0
```
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit : 5f648bf1706dd75a9ca0d29f26eadfbb595fe52b
python : 3.8.10.final.0
python-bits : 64
OS : Linux
OS-release : 5.10.16.3-microsoft-standard-WSL2
Version : #1 SMP Fri Apr 2 22:23:49 UTC 2021
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : C.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.3.2
numpy : 1.21.1
pytz : 2021.1
dateutil : 2.8.1
pip : 21.2.4
setuptools : 57.0.0
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : None
IPython : None
pandas_datareader: None
bs4 : None
bottleneck : None
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pyxlsb : None
s3fs : None
scipy : 1.6.2
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
numba : None
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43381/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43381/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/43382 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43382/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43382/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43382/events | https://github.com/pandas-dev/pandas/pull/43382 | 987,976,828 | MDExOlB1bGxSZXF1ZXN0NzI2OTgyOTc3 | 43,382 | ENH: `multicol` naive implementation. part2 | {
"avatar_url": "https://avatars.githubusercontent.com/u/24256554?v=4",
"events_url": "https://api.github.com/users/attack68/events{/privacy}",
"followers_url": "https://api.github.com/users/attack68/followers",
"following_url": "https://api.github.com/users/attack68/following{/other_user}",
"gists_url": "https://api.github.com/users/attack68/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/attack68",
"id": 24256554,
"login": "attack68",
"node_id": "MDQ6VXNlcjI0MjU2NTU0",
"organizations_url": "https://api.github.com/users/attack68/orgs",
"received_events_url": "https://api.github.com/users/attack68/received_events",
"repos_url": "https://api.github.com/users/attack68/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/attack68/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/attack68/subscriptions",
"type": "User",
"url": "https://api.github.com/users/attack68"
} | [
{
"color": "006b75",
"default": false,
"description": "conditional formatting using DataFrame.style",
"id": 1728592794,
"name": "Styler",
"node_id": "MDU6TGFiZWwxNzI4NTkyNzk0",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Styler"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 2 | "2021-09-03T17:32:56Z" | "2021-09-08T09:43:40Z" | "2021-09-08T09:43:36Z" | CONTRIBUTOR | null | follows #43369 | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43382/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43382/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/43382.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/43382",
"merged_at": "2021-09-08T09:43:36Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/43382.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/43382"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/43383 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43383/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43383/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43383/events | https://github.com/pandas-dev/pandas/issues/43383 | 987,987,493 | MDU6SXNzdWU5ODc5ODc0OTM= | 43,383 | BUG: Styler strange render behaviour with MultiIndex of only 1 level | {
"avatar_url": "https://avatars.githubusercontent.com/u/24256554?v=4",
"events_url": "https://api.github.com/users/attack68/events{/privacy}",
"followers_url": "https://api.github.com/users/attack68/followers",
"following_url": "https://api.github.com/users/attack68/following{/other_user}",
"gists_url": "https://api.github.com/users/attack68/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/attack68",
"id": 24256554,
"login": "attack68",
"node_id": "MDQ6VXNlcjI0MjU2NTU0",
"organizations_url": "https://api.github.com/users/attack68/orgs",
"received_events_url": "https://api.github.com/users/attack68/received_events",
"repos_url": "https://api.github.com/users/attack68/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/attack68/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/attack68/subscriptions",
"type": "User",
"url": "https://api.github.com/users/attack68"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "207de5",
"default": false,
"description": null,
"id": 71268330,
"name": "MultiIndex",
"node_id": "MDU6TGFiZWw3MTI2ODMzMA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/MultiIndex"
},
{
"color": "006b75",
"default": false,
"description": "conditional formatting using DataFrame.style",
"id": 1728592794,
"name": "Styler",
"node_id": "MDU6TGFiZWwxNzI4NTkyNzk0",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Styler"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 0 | "2021-09-03T17:50:27Z" | "2021-09-04T15:00:20Z" | "2021-09-04T15:00:20Z" | CONTRIBUTOR | null |

| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43383/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43383/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/43384 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43384/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43384/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43384/events | https://github.com/pandas-dev/pandas/pull/43384 | 988,053,037 | MDExOlB1bGxSZXF1ZXN0NzI3MDQ3NDIw | 43,384 | REF: reindex_indexer up-front to simplify JoinUnit | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [
{
"color": "FCE94F",
"default": false,
"description": "Internal refactoring of code",
"id": 127681,
"name": "Refactor",
"node_id": "MDU6TGFiZWwxMjc2ODE=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Refactor"
},
{
"color": "fbca04",
"default": false,
"description": "Related to non-user accessible pandas implementation",
"id": 49094459,
"name": "Internals",
"node_id": "MDU6TGFiZWw0OTA5NDQ1OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Internals"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 0 | "2021-09-03T19:34:33Z" | "2021-09-08T22:34:55Z" | "2021-09-08T21:44:14Z" | MEMBER | null | Sits on top of #43376 | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43384/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43384/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/43384.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/43384",
"merged_at": "2021-09-08T21:44:14Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/43384.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/43384"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/43385 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43385/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43385/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43385/events | https://github.com/pandas-dev/pandas/pull/43385 | 988,085,772 | MDExOlB1bGxSZXF1ZXN0NzI3MDc1Mzc2 | 43,385 | BUG: one level multiindex styler display | {
"avatar_url": "https://avatars.githubusercontent.com/u/24256554?v=4",
"events_url": "https://api.github.com/users/attack68/events{/privacy}",
"followers_url": "https://api.github.com/users/attack68/followers",
"following_url": "https://api.github.com/users/attack68/following{/other_user}",
"gists_url": "https://api.github.com/users/attack68/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/attack68",
"id": 24256554,
"login": "attack68",
"node_id": "MDQ6VXNlcjI0MjU2NTU0",
"organizations_url": "https://api.github.com/users/attack68/orgs",
"received_events_url": "https://api.github.com/users/attack68/received_events",
"repos_url": "https://api.github.com/users/attack68/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/attack68/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/attack68/subscriptions",
"type": "User",
"url": "https://api.github.com/users/attack68"
} | [
{
"color": "207de5",
"default": false,
"description": null,
"id": 71268330,
"name": "MultiIndex",
"node_id": "MDU6TGFiZWw3MTI2ODMzMA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/MultiIndex"
},
{
"color": "006b75",
"default": false,
"description": "conditional formatting using DataFrame.style",
"id": 1728592794,
"name": "Styler",
"node_id": "MDU6TGFiZWwxNzI4NTkyNzk0",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Styler"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 1 | "2021-09-03T20:36:52Z" | "2021-09-04T16:42:00Z" | "2021-09-04T15:00:20Z" | CONTRIBUTOR | null | - [x] closes #43383
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43385/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43385/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/43385.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/43385",
"merged_at": "2021-09-04T15:00:20Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/43385.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/43385"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/43386 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43386/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43386/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43386/events | https://github.com/pandas-dev/pandas/issues/43386 | 988,091,558 | MDU6SXNzdWU5ODgwOTE1NTg= | 43,386 | BUG: RollingGroupby.corr() producing incorrect results | {
"avatar_url": "https://avatars.githubusercontent.com/u/11448360?v=4",
"events_url": "https://api.github.com/users/grantgustafson/events{/privacy}",
"followers_url": "https://api.github.com/users/grantgustafson/followers",
"following_url": "https://api.github.com/users/grantgustafson/following{/other_user}",
"gists_url": "https://api.github.com/users/grantgustafson/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/grantgustafson",
"id": 11448360,
"login": "grantgustafson",
"node_id": "MDQ6VXNlcjExNDQ4MzYw",
"organizations_url": "https://api.github.com/users/grantgustafson/orgs",
"received_events_url": "https://api.github.com/users/grantgustafson/received_events",
"repos_url": "https://api.github.com/users/grantgustafson/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/grantgustafson/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/grantgustafson/subscriptions",
"type": "User",
"url": "https://api.github.com/users/grantgustafson"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "729FCF",
"default": false,
"description": null,
"id": 233160,
"name": "Groupby",
"node_id": "MDU6TGFiZWwyMzMxNjA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Groupby"
},
{
"color": "e11d21",
"default": false,
"description": "Functionality that used to work in a prior pandas version",
"id": 32815646,
"name": "Regression",
"node_id": "MDU6TGFiZWwzMjgxNTY0Ng==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Regression"
},
{
"color": "d4c5f9",
"default": false,
"description": "rolling, ewma, expanding",
"id": 1045950827,
"name": "Window",
"node_id": "MDU6TGFiZWwxMDQ1OTUwODI3",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Window"
}
] | closed | false | null | [] | {
"closed_at": "2021-10-17T11:06:28Z",
"closed_issues": 77,
"created_at": "2021-09-10T19:48:56Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/13159005?v=4",
"events_url": "https://api.github.com/users/simonjayhawkins/events{/privacy}",
"followers_url": "https://api.github.com/users/simonjayhawkins/followers",
"following_url": "https://api.github.com/users/simonjayhawkins/following{/other_user}",
"gists_url": "https://api.github.com/users/simonjayhawkins/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/simonjayhawkins",
"id": 13159005,
"login": "simonjayhawkins",
"node_id": "MDQ6VXNlcjEzMTU5MDA1",
"organizations_url": "https://api.github.com/users/simonjayhawkins/orgs",
"received_events_url": "https://api.github.com/users/simonjayhawkins/received_events",
"repos_url": "https://api.github.com/users/simonjayhawkins/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/simonjayhawkins/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/simonjayhawkins/subscriptions",
"type": "User",
"url": "https://api.github.com/users/simonjayhawkins"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-10-17T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/90",
"id": 7142224,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/90/labels",
"node_id": "MI_kwDOAA0YD84AbPtQ",
"number": 90,
"open_issues": 0,
"state": "closed",
"title": "1.3.4",
"updated_at": "2021-10-18T11:00:43Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/90"
} | 3 | "2021-09-03T20:49:09Z" | "2021-10-03T13:52:20Z" | "2021-10-03T13:52:20Z" | NONE | null | - [x] I have checked that this issue has not already been reported.
- [x] I have confirmed this bug exists on the latest version of pandas.
- [ ] (optional) I have confirmed this bug exists on the master branch of pandas.
---
**Note**: Please read [this guide](https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) detailing how to provide the necessary information for us to reproduce your bug.
#### Code Sample, a copy-pastable example
```python
import pandas as pd
# sample dataframe. We order it by column c
df = pd.DataFrame({
"a": ["g1"]*4 + ["g2"]*4,
"b": range(8),
"c": [0, 4, 6, 1, 2, 7, 3, 5]
}).sort_values("c")
df
```
<div>
<table border="1" class="dataframe">
<thead>
<tr style="text-align: right;">
<th></th>
<th>a</th>
<th>b</th>
<th>c</th>
</tr>
</thead>
<tbody>
<tr>
<th>0</th>
<td>g1</td>
<td>0</td>
<td>0</td>
</tr>
<tr>
<th>3</th>
<td>g1</td>
<td>3</td>
<td>1</td>
</tr>
<tr>
<th>4</th>
<td>g2</td>
<td>4</td>
<td>2</td>
</tr>
<tr>
<th>6</th>
<td>g2</td>
<td>6</td>
<td>3</td>
</tr>
<tr>
<th>1</th>
<td>g1</td>
<td>1</td>
<td>4</td>
</tr>
<tr>
<th>7</th>
<td>g2</td>
<td>7</td>
<td>5</td>
</tr>
<tr>
<th>2</th>
<td>g1</td>
<td>2</td>
<td>6</td>
</tr>
<tr>
<th>5</th>
<td>g2</td>
<td>5</td>
<td>7</td>
</tr>
</tbody>
</table>
</div>
```python
(df.groupby("a")[["b", "c"]]
.rolling(3)
.corr()
.unstack()
.iloc[:, 1]
.droplevel("a")
.sort_index())
```
0 NaN
1 NaN
2 0.155543
3 NaN
4 0.960769
5 -0.397360
6 0.981981
7 NaN
Name: (b, c), dtype: float64
```python
# this result should be no different than above - sorting by groupby key should not be necessary
(df.sort_values(["a", "c"]).groupby("a")[["b", "c"]]
.rolling(3)
.corr()
.unstack()
.iloc[:, 1]
.droplevel("a")
.sort_index())
```
0 NaN
1 0.052414
2 -0.596040
3 NaN
4 NaN
5 -0.500000
6 NaN
7 0.928571
Name: (b, c), dtype: float64
#### Problem description
This RollingGroupby.corr() operation is producing incorrect results. The example above shows how sorting the dataframe with respect to the groupby key fixes the issue, but that should not be necessary since it is the groupby key. I have tested and this bug does not exist in version `1.2.5`. It first appears in `1.3.0`.
#### Expected Output
The bottom part of the above repro contains expected output. Here's another way of showing expected output by filtering to one group:
```python
(df[df['a'] == "g1"]
.groupby("a")[["b", "c"]]
.rolling(3)
.corr()
.unstack()
.iloc[:, 1]
.droplevel("a")
.sort_index())
```
0 NaN
1 0.052414
2 -0.596040
3 NaN
Name: (b, c), dtype: float64
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit : 5f648bf1706dd75a9ca0d29f26eadfbb595fe52b
python : 3.8.10.final.0
python-bits : 64
OS : Linux
OS-release : 4.18.0-240.22.1.el8_3.x86_64
Version : #1 SMP Thu Mar 25 14:36:04 EDT 2021
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.3.2
numpy : 1.21.2
pytz : 2021.1
dateutil : 2.8.2
pip : 21.2.4
setuptools : 57.4.0
Cython : None
pytest : 6.2.5
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 3.0.1
IPython : 7.27.0
pandas_datareader: None
bs4 : None
bottleneck : None
fsspec : 0.8.7
fastparquet : None
gcsfs : None
matplotlib : 3.4.3
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : 5.0.0
pyxlsb : None
s3fs : 0.4.2
scipy : 1.7.1
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : 2.0.1
xlwt : None
numba : None
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43386/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43386/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/43387 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43387/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43387/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43387/events | https://github.com/pandas-dev/pandas/issues/43387 | 988,106,176 | MDU6SXNzdWU5ODgxMDYxNzY= | 43,387 | TYP: RangeIndex._constructor | {
"avatar_url": "https://avatars.githubusercontent.com/u/6618166?v=4",
"events_url": "https://api.github.com/users/twoertwein/events{/privacy}",
"followers_url": "https://api.github.com/users/twoertwein/followers",
"following_url": "https://api.github.com/users/twoertwein/following{/other_user}",
"gists_url": "https://api.github.com/users/twoertwein/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/twoertwein",
"id": 6618166,
"login": "twoertwein",
"node_id": "MDQ6VXNlcjY2MTgxNjY=",
"organizations_url": "https://api.github.com/users/twoertwein/orgs",
"received_events_url": "https://api.github.com/users/twoertwein/received_events",
"repos_url": "https://api.github.com/users/twoertwein/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/twoertwein/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/twoertwein/subscriptions",
"type": "User",
"url": "https://api.github.com/users/twoertwein"
} | [
{
"color": "ea91a4",
"default": false,
"description": "type annotations, mypy/pyright type checking",
"id": 1280988427,
"name": "Typing",
"node_id": "MDU6TGFiZWwxMjgwOTg4NDI3",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Typing"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 1 | "2021-09-03T21:19:32Z" | "2021-10-30T15:10:03Z" | "2021-10-30T15:10:03Z" | CONTRIBUTOR | null | `RangeIndex._constructor` returns `Type[Int64Index]` but it is supposed to return the current type of the class itself (`Type[RangeIndex]`) .
pandas/core/indexes/range.py:179: error: Return type "Type[Int64Index]" of "_constructor" incompatible with return type "Type[RangeIndex]" in supertype "Index" [override]
Found by declaring `cache_readonly = property`. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43387/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43387/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/43388 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43388/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43388/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43388/events | https://github.com/pandas-dev/pandas/issues/43388 | 988,115,656 | MDU6SXNzdWU5ODgxMTU2NTY= | 43,388 | TYP: IndexEngine.get_indexer_with_fill | {
"avatar_url": "https://avatars.githubusercontent.com/u/6618166?v=4",
"events_url": "https://api.github.com/users/twoertwein/events{/privacy}",
"followers_url": "https://api.github.com/users/twoertwein/followers",
"following_url": "https://api.github.com/users/twoertwein/following{/other_user}",
"gists_url": "https://api.github.com/users/twoertwein/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/twoertwein",
"id": 6618166,
"login": "twoertwein",
"node_id": "MDQ6VXNlcjY2MTgxNjY=",
"organizations_url": "https://api.github.com/users/twoertwein/orgs",
"received_events_url": "https://api.github.com/users/twoertwein/received_events",
"repos_url": "https://api.github.com/users/twoertwein/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/twoertwein/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/twoertwein/subscriptions",
"type": "User",
"url": "https://api.github.com/users/twoertwein"
} | [
{
"color": "ea91a4",
"default": false,
"description": "type annotations, mypy/pyright type checking",
"id": 1280988427,
"name": "Typing",
"node_id": "MDU6TGFiZWwxMjgwOTg4NDI3",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Typing"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 0 | "2021-09-03T21:41:44Z" | "2021-10-30T15:10:03Z" | "2021-10-30T15:10:03Z" | CONTRIBUTOR | null | pandas/core/indexes/base.py:3696: error: "IndexEngine" has no attribute "get_indexer_with_fill" [attr-defined]
Is this code intended to be reached only by certain sub-classes of `IndexEngine` that have `get_indexer_with_fill`?
I'm not sure how this is related to `cache_readonly = property` but it was found that way. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43388/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43388/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/43389 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43389/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43389/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43389/events | https://github.com/pandas-dev/pandas/pull/43389 | 988,119,618 | MDExOlB1bGxSZXF1ZXN0NzI3MTA0Mjk0 | 43,389 | Backport PR #43152 on branch 1.3.x (BUG: Outer/right merge with EA dtypes cast to object) | {
"avatar_url": "https://avatars.githubusercontent.com/u/39504233?v=4",
"events_url": "https://api.github.com/users/meeseeksmachine/events{/privacy}",
"followers_url": "https://api.github.com/users/meeseeksmachine/followers",
"following_url": "https://api.github.com/users/meeseeksmachine/following{/other_user}",
"gists_url": "https://api.github.com/users/meeseeksmachine/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/meeseeksmachine",
"id": 39504233,
"login": "meeseeksmachine",
"node_id": "MDQ6VXNlcjM5NTA0MjMz",
"organizations_url": "https://api.github.com/users/meeseeksmachine/orgs",
"received_events_url": "https://api.github.com/users/meeseeksmachine/received_events",
"repos_url": "https://api.github.com/users/meeseeksmachine/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/meeseeksmachine/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/meeseeksmachine/subscriptions",
"type": "User",
"url": "https://api.github.com/users/meeseeksmachine"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "02d7e1",
"default": false,
"description": "Concat, Merge/Join, Stack/Unstack, Explode",
"id": 13098779,
"name": "Reshaping",
"node_id": "MDU6TGFiZWwxMzA5ODc3OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Reshaping"
},
{
"color": "6138b5",
"default": false,
"description": "Extending pandas with custom dtypes or arrays.",
"id": 849023693,
"name": "ExtensionArray",
"node_id": "MDU6TGFiZWw4NDkwMjM2OTM=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/ExtensionArray"
}
] | closed | false | null | [] | {
"closed_at": "2021-09-12T08:21:30Z",
"closed_issues": 79,
"created_at": "2021-08-15T08:07:48Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/13159005?v=4",
"events_url": "https://api.github.com/users/simonjayhawkins/events{/privacy}",
"followers_url": "https://api.github.com/users/simonjayhawkins/followers",
"following_url": "https://api.github.com/users/simonjayhawkins/following{/other_user}",
"gists_url": "https://api.github.com/users/simonjayhawkins/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/simonjayhawkins",
"id": 13159005,
"login": "simonjayhawkins",
"node_id": "MDQ6VXNlcjEzMTU5MDA1",
"organizations_url": "https://api.github.com/users/simonjayhawkins/orgs",
"received_events_url": "https://api.github.com/users/simonjayhawkins/received_events",
"repos_url": "https://api.github.com/users/simonjayhawkins/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/simonjayhawkins/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/simonjayhawkins/subscriptions",
"type": "User",
"url": "https://api.github.com/users/simonjayhawkins"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-09-12T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/89",
"id": 7059576,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/89/labels",
"node_id": "MI_kwDOAA0YD84Aa7h4",
"number": 89,
"open_issues": 0,
"state": "closed",
"title": "1.3.3",
"updated_at": "2021-09-12T20:30:04Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/89"
} | 5 | "2021-09-03T21:52:39Z" | "2021-09-04T23:28:56Z" | "2021-09-04T23:28:48Z" | NONE | null | Backport PR #43152: BUG: Outer/right merge with EA dtypes cast to object | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43389/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43389/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/43389.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/43389",
"merged_at": "2021-09-04T23:28:48Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/43389.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/43389"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/43390 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43390/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43390/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43390/events | https://github.com/pandas-dev/pandas/issues/43390 | 988,119,894 | MDU6SXNzdWU5ODgxMTk4OTQ= | 43,390 | TYP: NumericIndex._can_hold_na | {
"avatar_url": "https://avatars.githubusercontent.com/u/6618166?v=4",
"events_url": "https://api.github.com/users/twoertwein/events{/privacy}",
"followers_url": "https://api.github.com/users/twoertwein/followers",
"following_url": "https://api.github.com/users/twoertwein/following{/other_user}",
"gists_url": "https://api.github.com/users/twoertwein/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/twoertwein",
"id": 6618166,
"login": "twoertwein",
"node_id": "MDQ6VXNlcjY2MTgxNjY=",
"organizations_url": "https://api.github.com/users/twoertwein/orgs",
"received_events_url": "https://api.github.com/users/twoertwein/received_events",
"repos_url": "https://api.github.com/users/twoertwein/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/twoertwein/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/twoertwein/subscriptions",
"type": "User",
"url": "https://api.github.com/users/twoertwein"
} | [
{
"color": "ea91a4",
"default": false,
"description": "type annotations, mypy/pyright type checking",
"id": 1280988427,
"name": "Typing",
"node_id": "MDU6TGFiZWwxMjgwOTg4NDI3",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Typing"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 786,
"created_at": "2015-01-13T10:53:19Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "Changes that would be nice to have in the next release. These issues are not blocking. They will be pushed to the next release if no one has time to fix them.",
"due_on": null,
"html_url": "https://github.com/pandas-dev/pandas/milestone/32",
"id": 933188,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/32/labels",
"node_id": "MDk6TWlsZXN0b25lOTMzMTg4",
"number": 32,
"open_issues": 1053,
"state": "open",
"title": "Contributions Welcome",
"updated_at": "2021-11-21T00:50:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/32"
} | 3 | "2021-09-03T21:53:24Z" | "2021-11-04T02:19:49Z" | "2021-11-04T02:19:48Z" | CONTRIBUTOR | null | `Index._can_hold_na`: bool
`NumericIndex._can_hold_na`: property-like (cache_readonly)
bool is not a property-like object.
pandas/core/indexes/numeric.py:103: error: Signature of "_can_hold_na" incompatible with supertype "Index" [override] | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43390/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43390/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/43391 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43391/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43391/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43391/events | https://github.com/pandas-dev/pandas/issues/43391 | 988,127,279 | MDU6SXNzdWU5ODgxMjcyNzk= | 43,391 | TYP: ensure_platform_int probably needs a dtype annotation | {
"avatar_url": "https://avatars.githubusercontent.com/u/6618166?v=4",
"events_url": "https://api.github.com/users/twoertwein/events{/privacy}",
"followers_url": "https://api.github.com/users/twoertwein/followers",
"following_url": "https://api.github.com/users/twoertwein/following{/other_user}",
"gists_url": "https://api.github.com/users/twoertwein/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/twoertwein",
"id": 6618166,
"login": "twoertwein",
"node_id": "MDQ6VXNlcjY2MTgxNjY=",
"organizations_url": "https://api.github.com/users/twoertwein/orgs",
"received_events_url": "https://api.github.com/users/twoertwein/received_events",
"repos_url": "https://api.github.com/users/twoertwein/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/twoertwein/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/twoertwein/subscriptions",
"type": "User",
"url": "https://api.github.com/users/twoertwein"
} | [
{
"color": "ea91a4",
"default": false,
"description": "type annotations, mypy/pyright type checking",
"id": 1280988427,
"name": "Typing",
"node_id": "MDU6TGFiZWwxMjgwOTg4NDI3",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Typing"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 0 | "2021-09-03T22:11:41Z" | "2021-09-26T12:03:54Z" | "2021-09-26T12:02:23Z" | CONTRIBUTOR | null | `ensure_platform_int` is annotated as returning a `np.ndarray` but its output is used in places that require a `Sequence[int]`. I assume this can be fixed by adding a dtype to the `np.ndarray`.
pandas/core/groupby/ops.py:858: error: Argument 1 to "take" of "ExtensionArray" has incompatible type "ndarray[Any, Any]"; expected "Sequence[int]" [arg-type] | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43391/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43391/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/43392 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43392/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43392/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43392/events | https://github.com/pandas-dev/pandas/pull/43392 | 988,146,553 | MDExOlB1bGxSZXF1ZXN0NzI3MTI3MDAw | 43,392 | BUG: dtype lost in DataFrame.append | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [
{
"color": "e102d8",
"default": false,
"description": "Unexpected or buggy dtype conversions",
"id": 31404521,
"name": "Dtype Conversions",
"node_id": "MDU6TGFiZWwzMTQwNDUyMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Dtype%20Conversions"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 1 | "2021-09-03T23:08:26Z" | "2021-09-04T18:17:46Z" | "2021-09-04T18:14:11Z" | MEMBER | null | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
1) For BlockManager, this improves dtype-retention, see test_append_same_columns_type
2) For ArrayManager, this fixes an unwanted casting to object, see test_append_empty_frame_to_series_with_dateutil_tz
3) I'm increasingly confident that with this, we can get rid of several kludges in internals.concat
4) This does change the order of columns in some cases, see test_append_empty_frame_to_series_with_dateutil_tz. AFAICT this is due to a bug in union_indexes (but fixing it breaks other things that i need to run down), xref #43375 | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43392/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43392/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/43392.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/43392",
"merged_at": "2021-09-04T18:14:11Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/43392.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/43392"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/43393 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43393/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43393/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43393/events | https://github.com/pandas-dev/pandas/issues/43393 | 988,152,930 | MDU6SXNzdWU5ODgxNTI5MzA= | 43,393 | TYP: Distinguish use of numpy.dtype and ExtensionDtype | {
"avatar_url": "https://avatars.githubusercontent.com/u/6618166?v=4",
"events_url": "https://api.github.com/users/twoertwein/events{/privacy}",
"followers_url": "https://api.github.com/users/twoertwein/followers",
"following_url": "https://api.github.com/users/twoertwein/following{/other_user}",
"gists_url": "https://api.github.com/users/twoertwein/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/twoertwein",
"id": 6618166,
"login": "twoertwein",
"node_id": "MDQ6VXNlcjY2MTgxNjY=",
"organizations_url": "https://api.github.com/users/twoertwein/orgs",
"received_events_url": "https://api.github.com/users/twoertwein/received_events",
"repos_url": "https://api.github.com/users/twoertwein/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/twoertwein/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/twoertwein/subscriptions",
"type": "User",
"url": "https://api.github.com/users/twoertwein"
} | [
{
"color": "ea91a4",
"default": false,
"description": "type annotations, mypy/pyright type checking",
"id": 1280988427,
"name": "Typing",
"node_id": "MDU6TGFiZWwxMjgwOTg4NDI3",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Typing"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 786,
"created_at": "2015-01-13T10:53:19Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "Changes that would be nice to have in the next release. These issues are not blocking. They will be pushed to the next release if no one has time to fix them.",
"due_on": null,
"html_url": "https://github.com/pandas-dev/pandas/milestone/32",
"id": 933188,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/32/labels",
"node_id": "MDk6TWlsZXN0b25lOTMzMTg4",
"number": 32,
"open_issues": 1053,
"state": "open",
"title": "Contributions Welcome",
"updated_at": "2021-11-21T00:50:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/32"
} | 1 | "2021-09-03T23:24:59Z" | "2021-09-05T17:48:48Z" | "2021-09-05T17:48:47Z" | CONTRIBUTOR | null | `Index` inherits from `IndexOpsMixin` which defines `self.dtype` as a property of `Union[np.dtype, "ExtensionDtype"]`. There are a few places where either `numpy.dtype` or `ExtensionDtype` are expected, but not both:
pandas/core/indexes/base.py:6857: error: Item "dtype[Any]" of "Union[dtype[Any], ExtensionDtype]" has no attribute "categories" [union-attr]
pandas/core/indexes/base.py:6857: error: Item "ExtensionDtype" of "Union[dtype[Any], ExtensionDtype]" has no attribute "categories" [union-attr]
pandas/core/arrays/categorical.py:2649: error: Item "dtype[Any]" of "Union[dtype[Any], ExtensionDtype]" has no attribute "construct_array_type" [union-attr]
pandas/core/indexes/period.py:429: error: Item "dtype[Any]" of "Union[dtype[Any], ExtensionDtype]" has no attribute "resolution" [union-attr]
pandas/core/indexes/period.py:429: error: Item "ExtensionDtype" of "Union[dtype[Any], ExtensionDtype]" has no attribute "resolution" [union-attr]
pandas/core/indexes/period.py:482: error: Item "dtype[Any]" of "Union[dtype[Any], ExtensionDtype]" has no attribute "resolution" [union-attr]
pandas/core/indexes/period.py:482: error: Item "ExtensionDtype" of "Union[dtype[Any], ExtensionDtype]" has no attribute "resolution" [union-attr]
pandas/core/indexes/interval.py:531: error: Item "dtype[Any]" of "Union[dtype[Any], ExtensionDtype]" has no attribute "subtype" [union-attr]
pandas/core/indexes/interval.py:531: error: Item "ExtensionDtype" of "Union[dtype[Any], ExtensionDtype]" has no attribute "subtype" [union-attr]
pandas/core/indexes/interval.py:747: error: Item "dtype[Any]" of "Union[dtype[Any], ExtensionDtype]" has no attribute "subtype" [union-attr]
pandas/core/indexes/interval.py:747: error: Item "ExtensionDtype" of "Union[dtype[Any], ExtensionDtype]" has no attribute "subtype" [union-attr]
pandas/core/internals/blocks.py:1613: error: Item "dtype[Any]" of "Union[dtype[Any], ExtensionDtype]" has no attribute "na_value" [union-attr] | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43393/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43393/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/43394 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43394/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43394/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43394/events | https://github.com/pandas-dev/pandas/issues/43394 | 988,191,383 | MDU6SXNzdWU5ODgxOTEzODM= | 43,394 | pd.date_range function not returns right bound when start=end and closed set to 'right' | {
"avatar_url": "https://avatars.githubusercontent.com/u/8338595?v=4",
"events_url": "https://api.github.com/users/lzy1g1225/events{/privacy}",
"followers_url": "https://api.github.com/users/lzy1g1225/followers",
"following_url": "https://api.github.com/users/lzy1g1225/following{/other_user}",
"gists_url": "https://api.github.com/users/lzy1g1225/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/lzy1g1225",
"id": 8338595,
"login": "lzy1g1225",
"node_id": "MDQ6VXNlcjgzMzg1OTU=",
"organizations_url": "https://api.github.com/users/lzy1g1225/orgs",
"received_events_url": "https://api.github.com/users/lzy1g1225/received_events",
"repos_url": "https://api.github.com/users/lzy1g1225/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/lzy1g1225/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/lzy1g1225/subscriptions",
"type": "User",
"url": "https://api.github.com/users/lzy1g1225"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "AFEEEE",
"default": false,
"description": null,
"id": 211840,
"name": "Timeseries",
"node_id": "MDU6TGFiZWwyMTE4NDA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Timeseries"
},
{
"color": "b60205",
"default": false,
"description": "Internal Consistency of API/Behavior",
"id": 1741841389,
"name": "API - Consistency",
"node_id": "MDU6TGFiZWwxNzQxODQxMzg5",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/API%20-%20Consistency"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 1 | "2021-09-04T02:33:30Z" | "2021-10-03T16:43:57Z" | "2021-10-03T16:43:57Z" | NONE | null |
```python
pd.date_range(start='2021-09-02', end='2021-09-02', freq='D', closed=None)
pd.date_range(start='2021-09-02', end='2021-09-02', freq='D', closed='right')
```
#### Problem description
the first line returns 2021-09-02
but the second line returns empty( this is incorrect )
#### Expected Output
I think if we set closed to 'right', then the date range should still returns 2021-09-02, because start date equals end date and we want the end date, the formula would looks like (2021-09-02, 2021-09-02], right date should be picked instead of returns empty | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43394/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43394/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/43395 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43395/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43395/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43395/events | https://github.com/pandas-dev/pandas/issues/43395 | 988,191,801 | MDU6SXNzdWU5ODgxOTE4MDE= | 43,395 | BUG: TypeError for .at indexer when accessing MultiIndex through date string | {
"avatar_url": "https://avatars.githubusercontent.com/u/60556855?v=4",
"events_url": "https://api.github.com/users/FinalSh4re/events{/privacy}",
"followers_url": "https://api.github.com/users/FinalSh4re/followers",
"following_url": "https://api.github.com/users/FinalSh4re/following{/other_user}",
"gists_url": "https://api.github.com/users/FinalSh4re/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/FinalSh4re",
"id": 60556855,
"login": "FinalSh4re",
"node_id": "MDQ6VXNlcjYwNTU2ODU1",
"organizations_url": "https://api.github.com/users/FinalSh4re/orgs",
"received_events_url": "https://api.github.com/users/FinalSh4re/received_events",
"repos_url": "https://api.github.com/users/FinalSh4re/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/FinalSh4re/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/FinalSh4re/subscriptions",
"type": "User",
"url": "https://api.github.com/users/FinalSh4re"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "AFEEEE",
"default": false,
"description": null,
"id": 211840,
"name": "Timeseries",
"node_id": "MDU6TGFiZWwyMTE4NDA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Timeseries"
},
{
"color": "0b02e1",
"default": false,
"description": "Related to indexing on series/frames, not to indexes themselves",
"id": 2822098,
"name": "Indexing",
"node_id": "MDU6TGFiZWwyODIyMDk4",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Indexing"
},
{
"color": "207de5",
"default": false,
"description": null,
"id": 71268330,
"name": "MultiIndex",
"node_id": "MDU6TGFiZWw3MTI2ODMzMA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/MultiIndex"
}
] | open | false | null | [] | null | 0 | "2021-09-04T02:36:41Z" | "2021-09-04T11:21:33Z" | null | NONE | null | - [x] I have checked that this issue has not already been reported.
- [x] I have confirmed this bug exists on the latest version of pandas.
- [ ] (optional) I have confirmed this bug exists on the master branch of pandas.
---
#### Code Sample, a copy-pastable example
```python
import pandas as pd
import numpy as np
np.random.seed(0)
tickers = ['AAPL', 'AMZN', 'GOOG']
timestamps = pd.date_range('2021-08-01', freq='12H', periods=8)
index = pd.MultiIndex.from_product([tickers, timestamps],
names=['ticker', 'timestamp'])
df = pd.DataFrame(np.random.rand(index.shape[0], 4),
columns=['open', 'high', 'low', 'close'],
index=index)
by_day = df.groupby(['ticker',
pd.Grouper(level='timestamp', freq='D')])
df_daily_open = by_day.head(1)
df_daily_open.at[('AMZN', '2021-08-02'), 'open']
```
#### Problem description
Above code throws a TypeError for the `.at[]` indexer:
```python
TypeError: unsupported operand type(s) for +: 'slice' and 'int'
```
Using `.loc[]` instead, works without any issues and gives the expected result:
```python
>>> df_daily_open.loc[('AMZN', '2021-08-02'), 'open']
ticker timestamp
AMZN 2021-08-02 0.437032
Name: open, dtype: float64
```
Using a timestamp instead of a date string works for `.at[]`:
```python
>>> df_daily_open.at[('AMZN', pd.to_datetime('2021-08-02')), 'open']
0.43703195379934145
```
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit : 5f648bf1706dd75a9ca0d29f26eadfbb595fe52b
python : 3.9.1.final.0
python-bits : 64
OS : Linux
OS-release : 5.10.60-1-MANJARO
Version : #1 SMP PREEMPT Wed Aug 18 08:02:07 UTC 2021
machine : x86_64
processor :
byteorder : little
LC_ALL : None
LANG : C
LOCALE : None.None
pandas : 1.3.2
numpy : 1.20.3
pytz : 2021.1
dateutil : 2.8.1
pip : 21.2.4
setuptools : 49.2.1
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : 4.6.3
html5lib : 1.1
pymysql : None
psycopg2 : None
jinja2 : 3.0.1
IPython : 7.24.1
pandas_datareader: None
bs4 : 4.9.3
bottleneck : None
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : 3.4.2
numexpr : None
odfpy : None
openpyxl : 3.0.7
pandas_gbq : None
pyarrow : None
pyxlsb : None
s3fs : None
scipy : 1.7.0
sqlalchemy : None
tables : None
tabulate : 0.8.9
xarray : None
xlrd : None
xlwt : None
numba : None
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43395/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43395/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/43396 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43396/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43396/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43396/events | https://github.com/pandas-dev/pandas/issues/43396 | 988,195,440 | MDU6SXNzdWU5ODgxOTU0NDA= | 43,396 | DEPR: prefix argument in read_csv/read_table | {
"avatar_url": "https://avatars.githubusercontent.com/u/47963215?v=4",
"events_url": "https://api.github.com/users/lithomas1/events{/privacy}",
"followers_url": "https://api.github.com/users/lithomas1/followers",
"following_url": "https://api.github.com/users/lithomas1/following{/other_user}",
"gists_url": "https://api.github.com/users/lithomas1/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/lithomas1",
"id": 47963215,
"login": "lithomas1",
"node_id": "MDQ6VXNlcjQ3OTYzMjE1",
"organizations_url": "https://api.github.com/users/lithomas1/orgs",
"received_events_url": "https://api.github.com/users/lithomas1/received_events",
"repos_url": "https://api.github.com/users/lithomas1/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/lithomas1/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/lithomas1/subscriptions",
"type": "User",
"url": "https://api.github.com/users/lithomas1"
} | [
{
"color": "5319e7",
"default": false,
"description": "read_csv, to_csv",
"id": 47229171,
"name": "IO CSV",
"node_id": "MDU6TGFiZWw0NzIyOTE3MQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20CSV"
},
{
"color": "5319e7",
"default": false,
"description": "Functionality to remove in pandas",
"id": 87485152,
"name": "Deprecate",
"node_id": "MDU6TGFiZWw4NzQ4NTE1Mg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Deprecate"
}
] | open | false | null | [] | null | 0 | "2021-09-04T03:03:31Z" | "2021-09-04T03:03:31Z" | null | MEMBER | null | It conflicts with header and names I think and users should really just be using a list comprehension on the dataframe column names afterwards. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43396/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43396/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/43397 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43397/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43397/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43397/events | https://github.com/pandas-dev/pandas/pull/43397 | 988,238,661 | MDExOlB1bGxSZXF1ZXN0NzI3MTk5ODIz | 43,397 | REF: `styler.to_latex` siunitx changes: render {} only when needed. | {
"avatar_url": "https://avatars.githubusercontent.com/u/24256554?v=4",
"events_url": "https://api.github.com/users/attack68/events{/privacy}",
"followers_url": "https://api.github.com/users/attack68/followers",
"following_url": "https://api.github.com/users/attack68/following{/other_user}",
"gists_url": "https://api.github.com/users/attack68/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/attack68",
"id": 24256554,
"login": "attack68",
"node_id": "MDQ6VXNlcjI0MjU2NTU0",
"organizations_url": "https://api.github.com/users/attack68/orgs",
"received_events_url": "https://api.github.com/users/attack68/received_events",
"repos_url": "https://api.github.com/users/attack68/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/attack68/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/attack68/subscriptions",
"type": "User",
"url": "https://api.github.com/users/attack68"
} | [
{
"color": "006b75",
"default": false,
"description": "to_latex",
"id": 251382258,
"name": "IO LaTeX",
"node_id": "MDU6TGFiZWwyNTEzODIyNTg=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20LaTeX"
},
{
"color": "006b75",
"default": false,
"description": "conditional formatting using DataFrame.style",
"id": 1728592794,
"name": "Styler",
"node_id": "MDU6TGFiZWwxNzI4NTkyNzk0",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Styler"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 1 | "2021-09-04T08:02:40Z" | "2021-09-04T16:43:57Z" | "2021-09-04T14:09:02Z" | CONTRIBUTOR | null | adds item on #41649 for better backwards compat, and this is probably slightly better anyway.
When:
- `siunitx=True` columns headers are now rendered like `{} & {A} & {B} \\`
- `siunitx=False` (default) then they are now rendered like ` & A & B \\`
Rndering column headers with or without curly braces has no effect in the LaTeX output, except when using `siunitx` where they are required for it to work properly.
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43397/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43397/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/43397.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/43397",
"merged_at": "2021-09-04T14:09:01Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/43397.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/43397"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/43398 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43398/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43398/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43398/events | https://github.com/pandas-dev/pandas/issues/43398 | 988,271,398 | MDU6SXNzdWU5ODgyNzEzOTg= | 43,398 | BUG: DataFrame.drop does not work with MultiIndex dataframes | {
"avatar_url": "https://avatars.githubusercontent.com/u/85084485?v=4",
"events_url": "https://api.github.com/users/imahdimir/events{/privacy}",
"followers_url": "https://api.github.com/users/imahdimir/followers",
"following_url": "https://api.github.com/users/imahdimir/following{/other_user}",
"gists_url": "https://api.github.com/users/imahdimir/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/imahdimir",
"id": 85084485,
"login": "imahdimir",
"node_id": "MDQ6VXNlcjg1MDg0NDg1",
"organizations_url": "https://api.github.com/users/imahdimir/orgs",
"received_events_url": "https://api.github.com/users/imahdimir/received_events",
"repos_url": "https://api.github.com/users/imahdimir/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/imahdimir/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/imahdimir/subscriptions",
"type": "User",
"url": "https://api.github.com/users/imahdimir"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "207de5",
"default": false,
"description": "Clarification about behavior needed to assess issue",
"id": 307649777,
"name": "Needs Info",
"node_id": "MDU6TGFiZWwzMDc2NDk3Nzc=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Needs%20Info"
}
] | closed | false | null | [] | null | 2 | "2021-09-04T11:16:31Z" | "2021-09-10T21:03:20Z" | "2021-09-10T21:03:14Z" | NONE | null | - [x] I have checked that this issue has not already been reported.
- [x] I have confirmed this bug exists on the latest version of pandas.
- [ ] (optional) I have confirmed this bug exists on the master branch of pandas.
---
**Note**: Please read [this guide](https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) detailing how to provide the necessary information for us to reproduce your bug.
#### Code Sample, a copy-pastable example
```python
# Your code here
```
#### Problem description
[this should explain **why** the current behavior is a problem and why the expected output is a better solution]
#### Expected Output
#### Output of ``pd.show_versions()``
<details>
[paste the output of ``pd.show_versions()`` here leaving a blank line after the details tag]
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43398/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43398/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/43399 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43399/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43399/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43399/events | https://github.com/pandas-dev/pandas/pull/43399 | 988,288,258 | MDExOlB1bGxSZXF1ZXN0NzI3MjM3MzMw | 43,399 | BUG: no `label` render in `Styler.to_latex` if `caption` and `"longtable"` | {
"avatar_url": "https://avatars.githubusercontent.com/u/24256554?v=4",
"events_url": "https://api.github.com/users/attack68/events{/privacy}",
"followers_url": "https://api.github.com/users/attack68/followers",
"following_url": "https://api.github.com/users/attack68/following{/other_user}",
"gists_url": "https://api.github.com/users/attack68/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/attack68",
"id": 24256554,
"login": "attack68",
"node_id": "MDQ6VXNlcjI0MjU2NTU0",
"organizations_url": "https://api.github.com/users/attack68/orgs",
"received_events_url": "https://api.github.com/users/attack68/received_events",
"repos_url": "https://api.github.com/users/attack68/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/attack68/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/attack68/subscriptions",
"type": "User",
"url": "https://api.github.com/users/attack68"
} | [
{
"color": "006b75",
"default": false,
"description": "to_latex",
"id": 251382258,
"name": "IO LaTeX",
"node_id": "MDU6TGFiZWwyNTEzODIyNTg=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20LaTeX"
},
{
"color": "006b75",
"default": false,
"description": "conditional formatting using DataFrame.style",
"id": 1728592794,
"name": "Styler",
"node_id": "MDU6TGFiZWwxNzI4NTkyNzk0",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Styler"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 0 | "2021-09-04T12:56:28Z" | "2021-09-04T16:43:02Z" | "2021-09-04T14:07:14Z" | CONTRIBUTOR | null | No whats new this is a 1.4.0 feature fix.
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43399/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43399/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/43399.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/43399",
"merged_at": "2021-09-04T14:07:14Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/43399.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/43399"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/43400 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43400/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43400/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43400/events | https://github.com/pandas-dev/pandas/pull/43400 | 988,314,862 | MDExOlB1bGxSZXF1ZXN0NzI3MjU3MDkx | 43,400 | TYP: type some un-typed decorators | {
"avatar_url": "https://avatars.githubusercontent.com/u/6618166?v=4",
"events_url": "https://api.github.com/users/twoertwein/events{/privacy}",
"followers_url": "https://api.github.com/users/twoertwein/followers",
"following_url": "https://api.github.com/users/twoertwein/following{/other_user}",
"gists_url": "https://api.github.com/users/twoertwein/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/twoertwein",
"id": 6618166,
"login": "twoertwein",
"node_id": "MDQ6VXNlcjY2MTgxNjY=",
"organizations_url": "https://api.github.com/users/twoertwein/orgs",
"received_events_url": "https://api.github.com/users/twoertwein/received_events",
"repos_url": "https://api.github.com/users/twoertwein/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/twoertwein/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/twoertwein/subscriptions",
"type": "User",
"url": "https://api.github.com/users/twoertwein"
} | [
{
"color": "ea91a4",
"default": false,
"description": "type annotations, mypy/pyright type checking",
"id": 1280988427,
"name": "Typing",
"node_id": "MDU6TGFiZWwxMjgwOTg4NDI3",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Typing"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 1 | "2021-09-04T15:28:27Z" | "2021-09-22T01:05:49Z" | "2021-09-10T17:05:38Z" | CONTRIBUTOR | null | - xref #33455
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43400/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43400/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/43400.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/43400",
"merged_at": "2021-09-10T17:05:37Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/43400.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/43400"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/43401 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43401/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43401/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43401/events | https://github.com/pandas-dev/pandas/issues/43401 | 988,323,341 | MDU6SXNzdWU5ODgzMjMzNDE= | 43,401 | BUG: Cythonized kendall correlation implementation is incorrect | {
"avatar_url": "https://avatars.githubusercontent.com/u/709668?v=4",
"events_url": "https://api.github.com/users/zrait/events{/privacy}",
"followers_url": "https://api.github.com/users/zrait/followers",
"following_url": "https://api.github.com/users/zrait/following{/other_user}",
"gists_url": "https://api.github.com/users/zrait/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/zrait",
"id": 709668,
"login": "zrait",
"node_id": "MDQ6VXNlcjcwOTY2OA==",
"organizations_url": "https://api.github.com/users/zrait/orgs",
"received_events_url": "https://api.github.com/users/zrait/received_events",
"repos_url": "https://api.github.com/users/zrait/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/zrait/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/zrait/subscriptions",
"type": "User",
"url": "https://api.github.com/users/zrait"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "a10c02",
"default": false,
"description": "Memory or execution speed performance",
"id": 8935311,
"name": "Performance",
"node_id": "MDU6TGFiZWw4OTM1MzEx",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Performance"
},
{
"color": "e11d21",
"default": false,
"description": "Functionality that used to work in a prior pandas version",
"id": 32815646,
"name": "Regression",
"node_id": "MDU6TGFiZWwzMjgxNTY0Ng==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Regression"
},
{
"color": "eb6420",
"default": false,
"description": "Non-arithmetic algos: value_counts, factorize, sorting, isin, clip, shift, diff",
"id": 57296398,
"name": "Algos",
"node_id": "MDU6TGFiZWw1NzI5NjM5OA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Algos"
}
] | closed | false | null | [] | {
"closed_at": "2021-09-12T08:21:30Z",
"closed_issues": 79,
"created_at": "2021-08-15T08:07:48Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/13159005?v=4",
"events_url": "https://api.github.com/users/simonjayhawkins/events{/privacy}",
"followers_url": "https://api.github.com/users/simonjayhawkins/followers",
"following_url": "https://api.github.com/users/simonjayhawkins/following{/other_user}",
"gists_url": "https://api.github.com/users/simonjayhawkins/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/simonjayhawkins",
"id": 13159005,
"login": "simonjayhawkins",
"node_id": "MDQ6VXNlcjEzMTU5MDA1",
"organizations_url": "https://api.github.com/users/simonjayhawkins/orgs",
"received_events_url": "https://api.github.com/users/simonjayhawkins/received_events",
"repos_url": "https://api.github.com/users/simonjayhawkins/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/simonjayhawkins/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/simonjayhawkins/subscriptions",
"type": "User",
"url": "https://api.github.com/users/simonjayhawkins"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-09-12T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/89",
"id": 7059576,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/89/labels",
"node_id": "MI_kwDOAA0YD84Aa7h4",
"number": 89,
"open_issues": 0,
"state": "closed",
"title": "1.3.3",
"updated_at": "2021-09-12T20:30:04Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/89"
} | 0 | "2021-09-04T16:15:29Z" | "2021-09-06T18:35:46Z" | "2021-09-06T18:35:46Z" | CONTRIBUTOR | null | - [x] I have checked that this issue has not already been reported.
- [x] I have confirmed this bug exists on the latest version of pandas.
- [x] (optional) I have confirmed this bug exists on the master branch of pandas.
---
#### Problem description
The Cythonized implementation of Kendall correlation implemented [here](https://github.com/pandas-dev/pandas/pull/39132) has been completely broken in the case of tied values since its original commit.
Scipy (and most other stats pacakges) [implement](https://github.com/scipy/scipy/blob/master/scipy/stats/stats.py#L4717) the [b variant](https://en.wikipedia.org/wiki/Kendall_rank_correlation_coefficient#Tau-b) of Kendall's tau, not the original version. Rank based correlation algorithms absolutely need to handle ties correctly as ordinal data often includes repeated values in some columns.
Even if we wanted to implement the "a variant" of Kendall's tau (which would be a breaking change from the implementation prior to the Cythonization diff), the correct code would disregard ties entirely, whereas the current implementation is including them in its calculations.
It's non-trivial to implement a Cythonized version of the correct code with tie-handling here, and I think that the Cythonized version should be reverted.
#### Code Sample, a copy-pastable example
```
df = pd.DataFrame([[1, 2], [2, 1], [1, 3]])
df[0].corr(df[1],method='kendall') == df.corr(method='kendall')[0][1]
# output
False
```
#### Expected Output
`True`
#### Change to test case that catches this bug
https://github.com/zrait/pandas/commit/94a0eea77bf587e4d502684da6a4ba8c6797ae83 is a simple change to the correlation test case that ensures that one of the columns used has repeated values and fails with the current implementation but not if the Cythonization is reverted.
More generally, I think the float test data should be updated to include duplicates, as a danger of randomly generated float data is the fact that it won't naturally include any duplicates.
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43401/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43401/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/43402 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43402/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43402/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43402/events | https://github.com/pandas-dev/pandas/issues/43402 | 988,337,365 | MDU6SXNzdWU5ODgzMzczNjU= | 43,402 | BUG: to_clipboard raises an error with null values in data frame | {
"avatar_url": "https://avatars.githubusercontent.com/u/85762931?v=4",
"events_url": "https://api.github.com/users/BabakAmini/events{/privacy}",
"followers_url": "https://api.github.com/users/BabakAmini/followers",
"following_url": "https://api.github.com/users/BabakAmini/following{/other_user}",
"gists_url": "https://api.github.com/users/BabakAmini/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/BabakAmini",
"id": 85762931,
"login": "BabakAmini",
"node_id": "MDQ6VXNlcjg1NzYyOTMx",
"organizations_url": "https://api.github.com/users/BabakAmini/orgs",
"received_events_url": "https://api.github.com/users/BabakAmini/received_events",
"repos_url": "https://api.github.com/users/BabakAmini/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/BabakAmini/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/BabakAmini/subscriptions",
"type": "User",
"url": "https://api.github.com/users/BabakAmini"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "06909A",
"default": false,
"description": "IO issues that don't fit into a more specific label",
"id": 2301354,
"name": "IO Data",
"node_id": "MDU6TGFiZWwyMzAxMzU0",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20Data"
},
{
"color": "d7e102",
"default": false,
"description": "np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate",
"id": 2822342,
"name": "Missing-data",
"node_id": "MDU6TGFiZWwyODIyMzQy",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Missing-data"
},
{
"color": "fbca04",
"default": false,
"description": "Windows OS",
"id": 57186974,
"name": "Windows",
"node_id": "MDU6TGFiZWw1NzE4Njk3NA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Windows"
}
] | open | false | null | [] | {
"closed_at": null,
"closed_issues": 786,
"created_at": "2015-01-13T10:53:19Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "Changes that would be nice to have in the next release. These issues are not blocking. They will be pushed to the next release if no one has time to fix them.",
"due_on": null,
"html_url": "https://github.com/pandas-dev/pandas/milestone/32",
"id": 933188,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/32/labels",
"node_id": "MDk6TWlsZXN0b25lOTMzMTg4",
"number": 32,
"open_issues": 1053,
"state": "open",
"title": "Contributions Welcome",
"updated_at": "2021-11-21T00:50:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/32"
} | 12 | "2021-09-04T17:38:31Z" | "2021-09-17T22:39:45Z" | null | NONE | null | With the latest version of pandas installed on windows, running the following code will raise an error:
```
df = pd.DataFrame(['\x00'])
df.to_clipboard(index=False, excel=False)
```
Here is the traceback:
<details>
ArgumentError Traceback (most recent call last)
<ipython-input-7-2549db3ae4d0> in <module>
1 df = pd.DataFrame(['\x00'])
----> 2 df.to_clipboard(index=False, excel=False)
e:\Anaconda\lib\site-packages\pandas\core\generic.py in to_clipboard(self, excel, sep, **kwargs)
3023 from pandas.io import clipboards
3024
-> 3025 clipboards.to_clipboard(self, excel=excel, sep=sep, **kwargs)
3026
3027 @final
e:\Anaconda\lib\site-packages\pandas\io\clipboards.py in to_clipboard(obj, excel, sep, **kwargs)
143 else:
144 objstr = str(obj)
--> 145 clipboard_set(objstr)
e:\Anaconda\lib\site-packages\pandas\io\clipboard\__init__.py in lazy_load_stub_copy(text)
631 global copy, paste
632 copy, paste = determine_clipboard()
--> 633 return copy(text)
634
635
e:\Anaconda\lib\site-packages\pandas\io\clipboard\__init__.py in copy_windows(text)
454 # the object must have been allocated using the
455 # function with the GMEM_MOVEABLE flag.
--> 456 count = wcslen(text) + 1
457 handle = safeGlobalAlloc(GMEM_MOVEABLE, count * sizeof(c_wchar))
458 locked_handle = safeGlobalLock(handle)
e:\Anaconda\lib\site-packages\pandas\io\clipboard\__init__.py in __call__(self, *args)
306
307 def __call__(self, *args):
--> 308 ret = self.f(*args)
309 if not ret and get_errno():
310 raise PyperclipWindowsException("Error calling " + self.f.__name__)
ArgumentError: argument 1: <class 'ValueError'>: embedded null character
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43402/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43402/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/43403 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43403/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43403/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43403/events | https://github.com/pandas-dev/pandas/pull/43403 | 988,345,689 | MDExOlB1bGxSZXF1ZXN0NzI3Mjc5OTgy | 43,403 | Revert Cythonized Kendall implementation and improve test case to prevent regressions | {
"avatar_url": "https://avatars.githubusercontent.com/u/709668?v=4",
"events_url": "https://api.github.com/users/zrait/events{/privacy}",
"followers_url": "https://api.github.com/users/zrait/followers",
"following_url": "https://api.github.com/users/zrait/following{/other_user}",
"gists_url": "https://api.github.com/users/zrait/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/zrait",
"id": 709668,
"login": "zrait",
"node_id": "MDQ6VXNlcjcwOTY2OA==",
"organizations_url": "https://api.github.com/users/zrait/orgs",
"received_events_url": "https://api.github.com/users/zrait/received_events",
"repos_url": "https://api.github.com/users/zrait/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/zrait/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/zrait/subscriptions",
"type": "User",
"url": "https://api.github.com/users/zrait"
} | [
{
"color": "e11d21",
"default": false,
"description": "Functionality that used to work in a prior pandas version",
"id": 32815646,
"name": "Regression",
"node_id": "MDU6TGFiZWwzMjgxNTY0Ng==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Regression"
},
{
"color": "eb6420",
"default": false,
"description": "Non-arithmetic algos: value_counts, factorize, sorting, isin, clip, shift, diff",
"id": 57296398,
"name": "Algos",
"node_id": "MDU6TGFiZWw1NzI5NjM5OA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Algos"
}
] | closed | false | null | [] | {
"closed_at": "2021-09-12T08:21:30Z",
"closed_issues": 79,
"created_at": "2021-08-15T08:07:48Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/13159005?v=4",
"events_url": "https://api.github.com/users/simonjayhawkins/events{/privacy}",
"followers_url": "https://api.github.com/users/simonjayhawkins/followers",
"following_url": "https://api.github.com/users/simonjayhawkins/following{/other_user}",
"gists_url": "https://api.github.com/users/simonjayhawkins/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/simonjayhawkins",
"id": 13159005,
"login": "simonjayhawkins",
"node_id": "MDQ6VXNlcjEzMTU5MDA1",
"organizations_url": "https://api.github.com/users/simonjayhawkins/orgs",
"received_events_url": "https://api.github.com/users/simonjayhawkins/received_events",
"repos_url": "https://api.github.com/users/simonjayhawkins/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/simonjayhawkins/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/simonjayhawkins/subscriptions",
"type": "User",
"url": "https://api.github.com/users/simonjayhawkins"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-09-12T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/89",
"id": 7059576,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/89/labels",
"node_id": "MI_kwDOAA0YD84Aa7h4",
"number": 89,
"open_issues": 0,
"state": "closed",
"title": "1.3.3",
"updated_at": "2021-09-12T20:30:04Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/89"
} | 14 | "2021-09-04T18:31:51Z" | "2021-09-06T23:51:43Z" | "2021-09-06T18:35:47Z" | CONTRIBUTOR | null | - [x] closes #43401
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43403/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43403/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/43403.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/43403",
"merged_at": "2021-09-06T18:35:46Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/43403.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/43403"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/43404 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43404/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43404/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43404/events | https://github.com/pandas-dev/pandas/pull/43404 | 988,349,453 | MDExOlB1bGxSZXF1ZXN0NzI3MjgyNzkx | 43,404 | BUG?: `hide_columns` now doesn't hide index names | {
"avatar_url": "https://avatars.githubusercontent.com/u/24256554?v=4",
"events_url": "https://api.github.com/users/attack68/events{/privacy}",
"followers_url": "https://api.github.com/users/attack68/followers",
"following_url": "https://api.github.com/users/attack68/following{/other_user}",
"gists_url": "https://api.github.com/users/attack68/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/attack68",
"id": 24256554,
"login": "attack68",
"node_id": "MDQ6VXNlcjI0MjU2NTU0",
"organizations_url": "https://api.github.com/users/attack68/orgs",
"received_events_url": "https://api.github.com/users/attack68/received_events",
"repos_url": "https://api.github.com/users/attack68/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/attack68/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/attack68/subscriptions",
"type": "User",
"url": "https://api.github.com/users/attack68"
} | [
{
"color": "006b75",
"default": false,
"description": "conditional formatting using DataFrame.style",
"id": 1728592794,
"name": "Styler",
"node_id": "MDU6TGFiZWwxNzI4NTkyNzk0",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Styler"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 0 | "2021-09-04T18:55:15Z" | "2021-09-05T06:12:04Z" | "2021-09-04T23:58:59Z" | CONTRIBUTOR | null | After #43346 it is now possible to control index names visibility. This PR adds full flexibility.
This actually reverts #42839, but only because there is now an explicit method to hide index names.
Also linking this to an old master tracker #24546.
<img width="644" alt="Screenshot 2021-09-04 at 20 51 13" src="https://user-images.githubusercontent.com/24256554/132105167-f6a202c1-d2bb-4b1a-aabc-905ec1697321.png">
<img width="564" alt="Screenshot 2021-09-04 at 20 50 46" src="https://user-images.githubusercontent.com/24256554/132105172-7de05beb-d270-4792-9a86-262cc3f80660.png">
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43404/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43404/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/43404.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/43404",
"merged_at": "2021-09-04T23:58:59Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/43404.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/43404"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/43405 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43405/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43405/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43405/events | https://github.com/pandas-dev/pandas/issues/43405 | 988,362,339 | MDU6SXNzdWU5ODgzNjIzMzk= | 43,405 | BUG/API: Inconsistent index result for groupby().rolling(on=...) between Series and DataFrame | {
"avatar_url": "https://avatars.githubusercontent.com/u/10647082?v=4",
"events_url": "https://api.github.com/users/mroeschke/events{/privacy}",
"followers_url": "https://api.github.com/users/mroeschke/followers",
"following_url": "https://api.github.com/users/mroeschke/following{/other_user}",
"gists_url": "https://api.github.com/users/mroeschke/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mroeschke",
"id": 10647082,
"login": "mroeschke",
"node_id": "MDQ6VXNlcjEwNjQ3MDgy",
"organizations_url": "https://api.github.com/users/mroeschke/orgs",
"received_events_url": "https://api.github.com/users/mroeschke/received_events",
"repos_url": "https://api.github.com/users/mroeschke/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mroeschke/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mroeschke/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mroeschke"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "729FCF",
"default": false,
"description": null,
"id": 233160,
"name": "Groupby",
"node_id": "MDU6TGFiZWwyMzMxNjA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Groupby"
},
{
"color": "e11d21",
"default": false,
"description": "Functionality that used to work in a prior pandas version",
"id": 32815646,
"name": "Regression",
"node_id": "MDU6TGFiZWwzMjgxNTY0Ng==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Regression"
},
{
"color": "d4c5f9",
"default": false,
"description": "rolling, ewma, expanding",
"id": 1045950827,
"name": "Window",
"node_id": "MDU6TGFiZWwxMDQ1OTUwODI3",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Window"
},
{
"color": "b60205",
"default": false,
"description": "Internal Consistency of API/Behavior",
"id": 1741841389,
"name": "API - Consistency",
"node_id": "MDU6TGFiZWwxNzQxODQxMzg5",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/API%20-%20Consistency"
}
] | open | false | null | [] | {
"closed_at": null,
"closed_issues": 786,
"created_at": "2015-01-13T10:53:19Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "Changes that would be nice to have in the next release. These issues are not blocking. They will be pushed to the next release if no one has time to fix them.",
"due_on": null,
"html_url": "https://github.com/pandas-dev/pandas/milestone/32",
"id": 933188,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/32/labels",
"node_id": "MDk6TWlsZXN0b25lOTMzMTg4",
"number": 32,
"open_issues": 1053,
"state": "open",
"title": "Contributions Welcome",
"updated_at": "2021-11-21T00:50:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/32"
} | 2 | "2021-09-04T20:17:08Z" | "2021-09-05T17:54:12Z" | null | MEMBER | null | - [x] I have checked that this issue has not already been reported.
- [x] I have confirmed this bug exists on the latest version of pandas.
- [x] (optional) I have confirmed this bug exists on the master branch of pandas.
xref https://github.com/pandas-dev/pandas/issues/43355
```
In [1]: df = pd.DataFrame(
...: {
...: "id": ["a", "a", "b", "b", "b"],
...: "timestamp": pd.date_range("2021-9-1", periods=5, freq="H"),
...: "y": range(5),
...: }
...: )
...: df
Out[1]:
id timestamp y
0 a 2021-09-01 00:00:00 0
1 a 2021-09-01 01:00:00 1
2 b 2021-09-01 02:00:00 2
3 b 2021-09-01 03:00:00 3
4 b 2021-09-01 04:00:00 4
In [2]: grp = df.groupby("id").rolling("1H", on="timestamp")
...: grp.count().index
Out[2]:
MultiIndex([('a', 0),
('a', 1),
('b', 2),
('b', 3),
('b', 4)],
names=['id', None])
In [4]: grp["y"].count().index
Out[4]:
MultiIndex([('a', '2021-09-01 00:00:00'),
('a', '2021-09-01 01:00:00'),
('b', '2021-09-01 02:00:00'),
('b', '2021-09-01 03:00:00'),
('b', '2021-09-01 04:00:00')],
names=['id', 'timestamp'])
```
According to the `on` documentation
> For a DataFrame, a datetime-like column or Index level on which to calculate the rolling window, rather than the DataFrame’s index. Provided integer column is ignored and excluded from result since an integer index is not used to calculate the rolling window.
Though the docs specifically states this applies to a `DataFrame`, this inconsistency seems confusing to users and could be possible for a `DataFrame` and `Series` result to have the same index result | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43405/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43405/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/43406 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43406/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43406/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43406/events | https://github.com/pandas-dev/pandas/pull/43406 | 988,371,479 | MDExOlB1bGxSZXF1ZXN0NzI3Mjk5NDcw | 43,406 | BUG: DataFrame.__setitem__ sometimes operating inplace | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [
{
"color": "0b02e1",
"default": false,
"description": "Related to indexing on series/frames, not to indexes themselves",
"id": 2822098,
"name": "Indexing",
"node_id": "MDU6TGFiZWwyODIyMDk4",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Indexing"
},
{
"color": "1d76db",
"default": false,
"description": "",
"id": 3165546917,
"name": "ArrayManager",
"node_id": "MDU6TGFiZWwzMTY1NTQ2OTE3",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/ArrayManager"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 10 | "2021-09-04T21:21:25Z" | "2021-11-01T17:35:59Z" | "2021-11-01T17:14:20Z" | MEMBER | null | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
The fixed bug is the currently-xfailed test test_setitem_same_dtype_not_inplace (see #39510, which has its own subsection in the 1.3.0 release notes). Pretty much all the other altered tests are changed because those tests rely on the incorrect behavior.
The main non-test change is the addition of an `inplace` check in `BlockManager.iset`. We want inplace to be False when this is reached via `DataFrame.__setitem__` and True when reached via `loc/iloc.__setitem__` | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43406/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43406/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/43406.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/43406",
"merged_at": "2021-11-01T17:14:20Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/43406.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/43406"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/43407 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43407/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43407/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43407/events | https://github.com/pandas-dev/pandas/pull/43407 | 988,386,677 | MDExOlB1bGxSZXF1ZXN0NzI3MzExMDI4 | 43,407 | Backport PR #43373 on branch 1.3.x (BUG: Fix regression in is_list_like) | {
"avatar_url": "https://avatars.githubusercontent.com/u/39504233?v=4",
"events_url": "https://api.github.com/users/meeseeksmachine/events{/privacy}",
"followers_url": "https://api.github.com/users/meeseeksmachine/followers",
"following_url": "https://api.github.com/users/meeseeksmachine/following{/other_user}",
"gists_url": "https://api.github.com/users/meeseeksmachine/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/meeseeksmachine",
"id": 39504233,
"login": "meeseeksmachine",
"node_id": "MDQ6VXNlcjM5NTA0MjMz",
"organizations_url": "https://api.github.com/users/meeseeksmachine/orgs",
"received_events_url": "https://api.github.com/users/meeseeksmachine/received_events",
"repos_url": "https://api.github.com/users/meeseeksmachine/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/meeseeksmachine/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/meeseeksmachine/subscriptions",
"type": "User",
"url": "https://api.github.com/users/meeseeksmachine"
} | [
{
"color": "0052cc",
"default": false,
"description": "pandas objects compatability with Numpy or Python functions",
"id": 76865106,
"name": "Compat",
"node_id": "MDU6TGFiZWw3Njg2NTEwNg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Compat"
}
] | closed | false | null | [] | {
"closed_at": "2021-09-12T08:21:30Z",
"closed_issues": 79,
"created_at": "2021-08-15T08:07:48Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/13159005?v=4",
"events_url": "https://api.github.com/users/simonjayhawkins/events{/privacy}",
"followers_url": "https://api.github.com/users/simonjayhawkins/followers",
"following_url": "https://api.github.com/users/simonjayhawkins/following{/other_user}",
"gists_url": "https://api.github.com/users/simonjayhawkins/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/simonjayhawkins",
"id": 13159005,
"login": "simonjayhawkins",
"node_id": "MDQ6VXNlcjEzMTU5MDA1",
"organizations_url": "https://api.github.com/users/simonjayhawkins/orgs",
"received_events_url": "https://api.github.com/users/simonjayhawkins/received_events",
"repos_url": "https://api.github.com/users/simonjayhawkins/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/simonjayhawkins/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/simonjayhawkins/subscriptions",
"type": "User",
"url": "https://api.github.com/users/simonjayhawkins"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-09-12T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/89",
"id": 7059576,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/89/labels",
"node_id": "MI_kwDOAA0YD84Aa7h4",
"number": 89,
"open_issues": 0,
"state": "closed",
"title": "1.3.3",
"updated_at": "2021-09-12T20:30:04Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/89"
} | 0 | "2021-09-04T23:29:04Z" | "2021-09-05T07:21:01Z" | "2021-09-05T07:21:01Z" | NONE | null | Backport PR #43373: BUG: Fix regression in is_list_like | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43407/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43407/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/43407.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/43407",
"merged_at": "2021-09-05T07:21:01Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/43407.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/43407"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/43408 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43408/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43408/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43408/events | https://github.com/pandas-dev/pandas/pull/43408 | 988,386,740 | MDExOlB1bGxSZXF1ZXN0NzI3MzExMDc2 | 43,408 | Backport PR #43150 on branch 1.3.x (BUG: GroupBy.quantile fails with pd.NA) | {
"avatar_url": "https://avatars.githubusercontent.com/u/39504233?v=4",
"events_url": "https://api.github.com/users/meeseeksmachine/events{/privacy}",
"followers_url": "https://api.github.com/users/meeseeksmachine/followers",
"following_url": "https://api.github.com/users/meeseeksmachine/following{/other_user}",
"gists_url": "https://api.github.com/users/meeseeksmachine/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/meeseeksmachine",
"id": 39504233,
"login": "meeseeksmachine",
"node_id": "MDQ6VXNlcjM5NTA0MjMz",
"organizations_url": "https://api.github.com/users/meeseeksmachine/orgs",
"received_events_url": "https://api.github.com/users/meeseeksmachine/received_events",
"repos_url": "https://api.github.com/users/meeseeksmachine/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/meeseeksmachine/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/meeseeksmachine/subscriptions",
"type": "User",
"url": "https://api.github.com/users/meeseeksmachine"
} | [
{
"color": "729FCF",
"default": false,
"description": null,
"id": 233160,
"name": "Groupby",
"node_id": "MDU6TGFiZWwyMzMxNjA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Groupby"
},
{
"color": "d7e102",
"default": false,
"description": "np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate",
"id": 2822342,
"name": "Missing-data",
"node_id": "MDU6TGFiZWwyODIyMzQy",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Missing-data"
}
] | closed | false | null | [] | {
"closed_at": "2021-09-12T08:21:30Z",
"closed_issues": 79,
"created_at": "2021-08-15T08:07:48Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/13159005?v=4",
"events_url": "https://api.github.com/users/simonjayhawkins/events{/privacy}",
"followers_url": "https://api.github.com/users/simonjayhawkins/followers",
"following_url": "https://api.github.com/users/simonjayhawkins/following{/other_user}",
"gists_url": "https://api.github.com/users/simonjayhawkins/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/simonjayhawkins",
"id": 13159005,
"login": "simonjayhawkins",
"node_id": "MDQ6VXNlcjEzMTU5MDA1",
"organizations_url": "https://api.github.com/users/simonjayhawkins/orgs",
"received_events_url": "https://api.github.com/users/simonjayhawkins/received_events",
"repos_url": "https://api.github.com/users/simonjayhawkins/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/simonjayhawkins/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/simonjayhawkins/subscriptions",
"type": "User",
"url": "https://api.github.com/users/simonjayhawkins"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-09-12T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/89",
"id": 7059576,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/89/labels",
"node_id": "MI_kwDOAA0YD84Aa7h4",
"number": 89,
"open_issues": 0,
"state": "closed",
"title": "1.3.3",
"updated_at": "2021-09-12T20:30:04Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/89"
} | 6 | "2021-09-04T23:29:37Z" | "2021-09-05T16:13:26Z" | "2021-09-05T16:13:26Z" | NONE | null | Backport PR #43150: BUG: GroupBy.quantile fails with pd.NA | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43408/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43408/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/43408.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/43408",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/43408.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/43408"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/43409 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43409/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43409/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43409/events | https://github.com/pandas-dev/pandas/pull/43409 | 988,389,324 | MDExOlB1bGxSZXF1ZXN0NzI3MzEyOTAw | 43,409 | BUG: concat of bool and boolean giving object dtype | {
"avatar_url": "https://avatars.githubusercontent.com/u/37011898?v=4",
"events_url": "https://api.github.com/users/mzeitlin11/events{/privacy}",
"followers_url": "https://api.github.com/users/mzeitlin11/followers",
"following_url": "https://api.github.com/users/mzeitlin11/following{/other_user}",
"gists_url": "https://api.github.com/users/mzeitlin11/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mzeitlin11",
"id": 37011898,
"login": "mzeitlin11",
"node_id": "MDQ6VXNlcjM3MDExODk4",
"organizations_url": "https://api.github.com/users/mzeitlin11/orgs",
"received_events_url": "https://api.github.com/users/mzeitlin11/received_events",
"repos_url": "https://api.github.com/users/mzeitlin11/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mzeitlin11/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mzeitlin11/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mzeitlin11"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "02d7e1",
"default": false,
"description": "Concat, Merge/Join, Stack/Unstack, Explode",
"id": 13098779,
"name": "Reshaping",
"node_id": "MDU6TGFiZWwxMzA5ODc3OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Reshaping"
},
{
"color": "e102d8",
"default": false,
"description": "Unexpected or buggy dtype conversions",
"id": 31404521,
"name": "Dtype Conversions",
"node_id": "MDU6TGFiZWwzMTQwNDUyMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Dtype%20Conversions"
},
{
"color": "8cc645",
"default": false,
"description": "Related to pd.NA and nullable extension arrays",
"id": 1817503692,
"name": "NA - MaskedArrays",
"node_id": "MDU6TGFiZWwxODE3NTAzNjky",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/NA%20-%20MaskedArrays"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 0 | "2021-09-04T23:53:49Z" | "2021-09-07T22:51:05Z" | "2021-09-07T22:40:36Z" | MEMBER | null | - [x] closes #42800
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [x] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43409/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43409/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/43409.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/43409",
"merged_at": "2021-09-07T22:40:36Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/43409.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/43409"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/43410 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43410/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43410/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43410/events | https://github.com/pandas-dev/pandas/pull/43410 | 988,404,395 | MDExOlB1bGxSZXF1ZXN0NzI3MzI0MTky | 43,410 | REGR: Resampler.aggregate fails when used with column selection | {
"avatar_url": "https://avatars.githubusercontent.com/u/45562402?v=4",
"events_url": "https://api.github.com/users/rhshadrach/events{/privacy}",
"followers_url": "https://api.github.com/users/rhshadrach/followers",
"following_url": "https://api.github.com/users/rhshadrach/following{/other_user}",
"gists_url": "https://api.github.com/users/rhshadrach/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/rhshadrach",
"id": 45562402,
"login": "rhshadrach",
"node_id": "MDQ6VXNlcjQ1NTYyNDAy",
"organizations_url": "https://api.github.com/users/rhshadrach/orgs",
"received_events_url": "https://api.github.com/users/rhshadrach/received_events",
"repos_url": "https://api.github.com/users/rhshadrach/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/rhshadrach/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rhshadrach/subscriptions",
"type": "User",
"url": "https://api.github.com/users/rhshadrach"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "e11d21",
"default": false,
"description": "Functionality that used to work in a prior pandas version",
"id": 32815646,
"name": "Regression",
"node_id": "MDU6TGFiZWwzMjgxNTY0Ng==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Regression"
},
{
"color": "207de5",
"default": false,
"description": "resample method",
"id": 74975453,
"name": "Resample",
"node_id": "MDU6TGFiZWw3NDk3NTQ1Mw==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Resample"
}
] | closed | false | null | [] | {
"closed_at": "2021-09-12T08:21:30Z",
"closed_issues": 79,
"created_at": "2021-08-15T08:07:48Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/13159005?v=4",
"events_url": "https://api.github.com/users/simonjayhawkins/events{/privacy}",
"followers_url": "https://api.github.com/users/simonjayhawkins/followers",
"following_url": "https://api.github.com/users/simonjayhawkins/following{/other_user}",
"gists_url": "https://api.github.com/users/simonjayhawkins/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/simonjayhawkins",
"id": 13159005,
"login": "simonjayhawkins",
"node_id": "MDQ6VXNlcjEzMTU5MDA1",
"organizations_url": "https://api.github.com/users/simonjayhawkins/orgs",
"received_events_url": "https://api.github.com/users/simonjayhawkins/received_events",
"repos_url": "https://api.github.com/users/simonjayhawkins/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/simonjayhawkins/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/simonjayhawkins/subscriptions",
"type": "User",
"url": "https://api.github.com/users/simonjayhawkins"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-09-12T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/89",
"id": 7059576,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/89/labels",
"node_id": "MI_kwDOAA0YD84Aa7h4",
"number": 89,
"open_issues": 0,
"state": "closed",
"title": "1.3.3",
"updated_at": "2021-09-12T20:30:04Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/89"
} | 7 | "2021-09-05T02:02:15Z" | "2021-09-07T21:50:29Z" | "2021-09-06T20:37:19Z" | MEMBER | null | - [x] closes #42905
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [x] whatsnew entry
The method `resample._GroupByMixin._gotitem` calls
```
new_rs = type(self)(
subset, groupby=groupby, parent=self, selection=selection, **kwargs
)
```
The selection (which ends up in kwargs in `__init__`) was being ignored.
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43410/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43410/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/43410.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/43410",
"merged_at": "2021-09-06T20:37:19Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/43410.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/43410"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/43411 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43411/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43411/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43411/events | https://github.com/pandas-dev/pandas/pull/43411 | 988,418,271 | MDExOlB1bGxSZXF1ZXN0NzI3MzM0MDI4 | 43,411 | ADMIN: Add GitHub Issue Forms for Bugs, Performance, or Installation issues | {
"avatar_url": "https://avatars.githubusercontent.com/u/10647082?v=4",
"events_url": "https://api.github.com/users/mroeschke/events{/privacy}",
"followers_url": "https://api.github.com/users/mroeschke/followers",
"following_url": "https://api.github.com/users/mroeschke/following{/other_user}",
"gists_url": "https://api.github.com/users/mroeschke/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mroeschke",
"id": 10647082,
"login": "mroeschke",
"node_id": "MDQ6VXNlcjEwNjQ3MDgy",
"organizations_url": "https://api.github.com/users/mroeschke/orgs",
"received_events_url": "https://api.github.com/users/mroeschke/received_events",
"repos_url": "https://api.github.com/users/mroeschke/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mroeschke/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mroeschke/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mroeschke"
} | [
{
"color": "DDDDDD",
"default": false,
"description": "Administrative tasks related to the pandas project",
"id": 32933285,
"name": "Admin",
"node_id": "MDU6TGFiZWwzMjkzMzI4NQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Admin"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 0 | "2021-09-05T04:05:50Z" | "2021-09-06T06:06:34Z" | "2021-09-06T06:06:30Z" | MEMBER | null | - [x] xref #42951
Replaces the current bug report form with the new GitHub Issue Forms Additionally, adds performance issue and installation issue form that I've seen common in our tracker but currently does not have a good way to report.
Forms can be tested here: https://github.com/mroeschke/issue-form-test/issues/new/choose
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43411/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43411/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/43411.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/43411",
"merged_at": "2021-09-06T06:06:30Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/43411.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/43411"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/43412 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43412/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43412/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43412/events | https://github.com/pandas-dev/pandas/issues/43412 | 988,439,333 | MDU6SXNzdWU5ODg0MzkzMzM= | 43,412 | BUG: a duplicated index would cause groupby.fillna(method='ffill') a wrong result | {
"avatar_url": "https://avatars.githubusercontent.com/u/31037879?v=4",
"events_url": "https://api.github.com/users/mIgLLL/events{/privacy}",
"followers_url": "https://api.github.com/users/mIgLLL/followers",
"following_url": "https://api.github.com/users/mIgLLL/following{/other_user}",
"gists_url": "https://api.github.com/users/mIgLLL/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mIgLLL",
"id": 31037879,
"login": "mIgLLL",
"node_id": "MDQ6VXNlcjMxMDM3ODc5",
"organizations_url": "https://api.github.com/users/mIgLLL/orgs",
"received_events_url": "https://api.github.com/users/mIgLLL/received_events",
"repos_url": "https://api.github.com/users/mIgLLL/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mIgLLL/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mIgLLL/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mIgLLL"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "729FCF",
"default": false,
"description": null,
"id": 233160,
"name": "Groupby",
"node_id": "MDU6TGFiZWwyMzMxNjA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Groupby"
}
] | open | false | null | [] | null | 1 | "2021-09-05T06:57:40Z" | "2021-09-08T12:13:22Z" | null | NONE | null | - [ ] I have checked that this issue has not already been reported.
- [ ] I have confirmed this bug exists on the latest version of pandas.
- [ ] (optional) I have confirmed this bug exists on the master branch of pandas.
---
**Note**: Please read [this guide](https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) detailing how to provide the necessary information for us to reproduce your bug.
#### Code Sample, a copy-pastable example
```python
# Your code here
import pandas as pd
df1 = pd.DataFrame({'B': [np.nan, 1, 2, np.nan, 4,np.nan,np.nan,7,8,9,10,11,np.nan,13,14,15]})
df1.loc[:5,'A']=3
df1.loc[5:10,'A']=2
df1.loc[10:,'A']=4
df2=df1.copy()
df=df1.append(df2)
df['C']=df.groupby('A')['B'].shift(1)
a=df.groupby('A')['C'].fillna(method='ffill')
# after reset_index()
df=df.reset_index(drop=True)
df['D']=df.groupby('A')['C'].fillna(method='ffill')
```
#### Problem description
[this should explain **why** the current behaviour is a problem and why the expected output is a better solution]
I find that if the index is duplicated after some dataframe appending, the groupby.fillna() would cause something wrong.
I have already find the solution to the problem. I can aviod this problem by just reset_index first.
But I still fell confusing on the result in dataframe "a". It would be great help if anyone can give me some guide.
Secondly, I think this may cause serious wrong of anyone don't take it serious and just write a command like:
df['D']=df.groupby('A')['C'].fillna(method='ffill').reset_index().loc[:,'C']
I think this should be fixed or warned more seriously.
Though I know that something like df['D']=df.groupby('A')['C'].fillna(method='ffill') without reset_index won't work.
#### Expected Output
It should be well performed as a dataframe after reset_index().
#### Output of ``pd.show_versions()``
INSTALLED VERSIONS
------------------
commit : 5f648bf1706dd75a9ca0d29f26eadfbb595fe52b
python : 3.8.11.final.0
python-bits : 64
OS : Windows
OS-release : 10
Version : 10.0.19042
machine : AMD64
processor : Intel64 Family 6 Model 165 Stepping 2, GenuineIntel
byteorder : little
LC_ALL : None
LANG : zh_CN
LOCALE : Chinese (Simplified)_China.936
pandas : 1.3.2
numpy : 1.20.3
pytz : 2021.1
dateutil : 2.8.2
pip : 21.2.2
setuptools : 52.0.0.post20210125
Cython : 0.29.24
pytest : 6.2.4
hypothesis : None
sphinx : 4.0.2
blosc : None
feather : None
xlsxwriter : 3.0.1
lxml.etree : 4.6.3
html5lib : 1.1
pymysql : None
psycopg2 : None
jinja2 : 2.11.3
IPython : 7.26.0
pandas_datareader: None
bs4 : 4.9.3
bottleneck : 1.3.2
fsspec : 2021.07.0
fastparquet : None
gcsfs : None
matplotlib : 3.4.2
numexpr : 2.7.3
odfpy : None
openpyxl : 3.0.7
pandas_gbq : None
pyarrow : None
pyxlsb : None
s3fs : None
scipy : 1.6.2
sqlalchemy : 1.4.22
tables : 3.6.1
tabulate : None
xarray : None
xlrd : 2.0.1
xlwt : 1.3.0
numba : 0.53.1
<details>
[paste the output of ``pd.show_versions()`` here leaving a blank line after the details tag]
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43412/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43412/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/43413 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43413/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43413/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43413/events | https://github.com/pandas-dev/pandas/issues/43413 | 988,440,454 | MDU6SXNzdWU5ODg0NDA0NTQ= | 43,413 | BUG: Specifying dtype argument in pandas.read_csv() throws "ValueError: entry not a 2- or 3- tuple" | {
"avatar_url": "https://avatars.githubusercontent.com/u/70591703?v=4",
"events_url": "https://api.github.com/users/wjs20/events{/privacy}",
"followers_url": "https://api.github.com/users/wjs20/followers",
"following_url": "https://api.github.com/users/wjs20/following{/other_user}",
"gists_url": "https://api.github.com/users/wjs20/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/wjs20",
"id": 70591703,
"login": "wjs20",
"node_id": "MDQ6VXNlcjcwNTkxNzAz",
"organizations_url": "https://api.github.com/users/wjs20/orgs",
"received_events_url": "https://api.github.com/users/wjs20/received_events",
"repos_url": "https://api.github.com/users/wjs20/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/wjs20/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/wjs20/subscriptions",
"type": "User",
"url": "https://api.github.com/users/wjs20"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "207de5",
"default": false,
"description": "Clarification about behavior needed to assess issue",
"id": 307649777,
"name": "Needs Info",
"node_id": "MDU6TGFiZWwzMDc2NDk3Nzc=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Needs%20Info"
},
{
"color": "0052cc",
"default": false,
"description": "Issue that has not been reviewed by a pandas team member",
"id": 1954720290,
"name": "Needs Triage",
"node_id": "MDU6TGFiZWwxOTU0NzIwMjkw",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Needs%20Triage"
}
] | closed | false | null | [] | null | 4 | "2021-09-05T07:05:27Z" | "2021-09-05T08:50:07Z" | "2021-09-05T08:50:07Z" | NONE | null | #### Problem description
I am trying to specify different dtypes for different columns of my dataframe at initialization by passing a dictionary of dtypes to the dtype parameter of **pandas.read_csv()**, however it is throwing a **value error** (code and traceback included below).
#### Code example
```python
import pandas as pd, string, random, numpy as np
from itertools import islice, cycle
# create example columns of different datatypes
categories = list(islice(cycle(['red', 'green', 'blue']), 0, 1000))
strings = [''.join(random.sample(string.ascii_lowercase, 15)) for i in range(1000)]
ints = [random.randrange(2000) for i in range(1000)]
floats = [random.random() for i in range(1000)]
data = list(zip(categories, strings, ints, floats))
# specify the desired dtype of the different columns
dtypes = {'categories':'category', 'strings':'string', 'ints':'int32', 'floats':'float64'}
df = pd.DataFrame(data, columns = ['categories', 'strings', 'ints', floats'], dtype=dtypes)
```
#### Traceback
<details>
```python
ValueError Traceback (most recent call last)
/tmp/ipykernel_19908/2069478510.py in <module>
10
11 dtypes = {'categories':'category', 'strings':'string', 'ints':'int64', 'floats':'float64'}
---> 12 df = pd.DataFrame(data, columns = ['my_categories', 'my_strings', 'my_ints', 'my_floats'], dtype=dtypes)
~/germlines/germlines_env/lib/python3.8/site-packages/pandas/core/frame.py in __init__(self, data, index, columns, dtype, copy)
590 data = {}
591 if dtype is not None:
--> 592 dtype = self._validate_dtype(dtype)
593
594 if isinstance(data, DataFrame):
~/germlines/germlines_env/lib/python3.8/site-packages/pandas/core/generic.py in _validate_dtype(cls, dtype)
440 """validate the passed dtype"""
441 if dtype is not None:
--> 442 dtype = pandas_dtype(dtype)
443
444 # a compound dtype
~/germlines/germlines_env/lib/python3.8/site-packages/pandas/core/dtypes/common.py in pandas_dtype(dtype)
1774 # raise a consistent TypeError if failed
1775 try:
-> 1776 npdtype = np.dtype(dtype)
1777 except SyntaxError as err:
1778 # np.dtype uses `eval` which can raise SyntaxError
~/germlines/germlines_env/lib/python3.8/site-packages/numpy/core/_internal.py in _usefields(adict, align)
60 names = None
61 if names is None:
---> 62 names, formats, offsets, titles = _makenames_list(adict, align)
63 else:
64 formats = []
~/germlines/germlines_env/lib/python3.8/site-packages/numpy/core/_internal.py in _makenames_list(adict, align)
30 n = len(obj)
31 if not isinstance(obj, tuple) or n not in (2, 3):
---> 32 raise ValueError("entry not a 2- or 3- tuple")
33 if n > 2 and obj[2] == fname:
34 continue
ValueError: entry not a 2- or 3- tuple
```
</details>
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit : 5f648bf1706dd75a9ca0d29f26eadfbb595fe52b
python : 3.8.10.final.0
python-bits : 64
OS : Linux
OS-release : 5.4.72-microsoft-standard-WSL2
Version : #1 SMP Wed Oct 28 23:40:43 UTC 2020
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : C.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.3.2
numpy : 1.21.2
pytz : 2021.1
dateutil : 2.8.2
pip : 20.0.2
setuptools : 44.0.0
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 3.0.1
IPython : 7.27.0
pandas_datareader: None
bs4 : 4.9.3
bottleneck : None
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : 3.4.3
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pyxlsb : None
s3fs : None
scipy : 1.7.1
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
numba : None
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43413/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43413/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/43414 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43414/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43414/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43414/events | https://github.com/pandas-dev/pandas/issues/43414 | 988,442,224 | MDU6SXNzdWU5ODg0NDIyMjQ= | 43,414 | BUG: pd.to_datetime cannot infer and coerce dates with AM/PM and infer_datetime_format=True and errors="coerce". | {
"avatar_url": "https://avatars.githubusercontent.com/u/41494027?v=4",
"events_url": "https://api.github.com/users/mikephung122/events{/privacy}",
"followers_url": "https://api.github.com/users/mikephung122/followers",
"following_url": "https://api.github.com/users/mikephung122/following{/other_user}",
"gists_url": "https://api.github.com/users/mikephung122/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mikephung122",
"id": 41494027,
"login": "mikephung122",
"node_id": "MDQ6VXNlcjQxNDk0MDI3",
"organizations_url": "https://api.github.com/users/mikephung122/orgs",
"received_events_url": "https://api.github.com/users/mikephung122/received_events",
"repos_url": "https://api.github.com/users/mikephung122/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mikephung122/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mikephung122/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mikephung122"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "AFEEEE",
"default": false,
"description": null,
"id": 211840,
"name": "Timeseries",
"node_id": "MDU6TGFiZWwyMTE4NDA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Timeseries"
},
{
"color": "009800",
"default": false,
"description": "Duplicate issue or pull request",
"id": 40153326,
"name": "Duplicate Report",
"node_id": "MDU6TGFiZWw0MDE1MzMyNg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Duplicate%20Report"
}
] | closed | false | null | [] | null | 1 | "2021-09-05T07:17:25Z" | "2021-09-18T20:23:52Z" | "2021-09-18T20:23:52Z" | CONTRIBUTOR | null | #### Checklist
- [x] I have checked that this issue has not already been reported.
- [x] I have confirmed this bug exists on the latest version of pandas.
- [x] (optional) I have confirmed this bug exists on the master branch of pandas.
---
#### Code Sample
```python
series = pd.Series(data=['1/1/2021 11:00:00 AM', '1/1/2021 12:00:00 PM', '1/1/2021 1:00:00 PM'])
result = pd.to_datetime(series, errors='coerce', infer_datetime_format=True)
```
#### Problem description
The function should be able to infer datetime strings with AM/PM correctly. This can be seen when using errors='raise' which will correctly return the expected values. Looks like this is a result of an existing issue - https://github.com/pandas-dev/pandas/issues/25143.
#### Expected Output
expected = pd.Series(data=[Timestamp('2021-01-01 11:00:00'), Timestamp('2021-01-01 12:00:00'), Timestamp('2021-01-01 13:00:00')])
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit : 6a683a2911bd82ea40c7e11b8135a0e952f55f2c
python : 3.8.10.final.0
python-bits : 64
OS : Darwin
OS-release : 19.6.0
Version : Darwin Kernel Version 19.6.0: Tue Jun 22 19:49:55 PDT 2021; root:xnu-6153.141.35~1/RELEASE_X86_64
machine : x86_64
processor : i386
byteorder : little
LC_ALL : en_US.UTF-8
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.4.0.dev0+597.g6a683a2911
numpy : 1.21.1
pytz : 2021.1
dateutil : 2.8.2
pip : 21.1.3
setuptools : 52.0.0.post20210125
Cython : 0.29.24
pytest : 6.2.4
hypothesis : 6.14.4
sphinx : 4.1.2
blosc : 1.10.4
feather : None
xlsxwriter : 1.4.4
lxml.etree : 4.6.3
html5lib : 1.1
pymysql : None
psycopg2 : None
jinja2 : 3.0.1
IPython : 7.25.0
pandas_datareader: None
bs4 : 4.9.3
bottleneck : 1.3.2
fsspec : 2021.05.0
fastparquet : 0.6.3
gcsfs : 2021.05.0
matplotlib : 3.4.2
numexpr : 2.7.3
odfpy : None
openpyxl : 3.0.7
pandas_gbq : None
pyarrow : 4.0.1
pyxlsb : None
s3fs : 2021.05.0
scipy : 1.7.0
sqlalchemy : 1.4.22
tables : 3.6.1
tabulate : 0.8.9
xarray : 0.18.2
xlrd : 2.0.1
xlwt : 1.3.0
numba : 0.53.1
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43414/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43414/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/43415 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43415/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43415/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43415/events | https://github.com/pandas-dev/pandas/pull/43415 | 988,442,771 | MDExOlB1bGxSZXF1ZXN0NzI3MzUxODQz | 43,415 | ENH: Add Redis IO functionality | {
"avatar_url": "https://avatars.githubusercontent.com/u/22459070?v=4",
"events_url": "https://api.github.com/users/Jflick58/events{/privacy}",
"followers_url": "https://api.github.com/users/Jflick58/followers",
"following_url": "https://api.github.com/users/Jflick58/following{/other_user}",
"gists_url": "https://api.github.com/users/Jflick58/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Jflick58",
"id": 22459070,
"login": "Jflick58",
"node_id": "MDQ6VXNlcjIyNDU5MDcw",
"organizations_url": "https://api.github.com/users/Jflick58/orgs",
"received_events_url": "https://api.github.com/users/Jflick58/received_events",
"repos_url": "https://api.github.com/users/Jflick58/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Jflick58/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Jflick58/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Jflick58"
} | [
{
"color": "4E9A06",
"default": false,
"description": null,
"id": 76812,
"name": "Enhancement",
"node_id": "MDU6TGFiZWw3NjgxMg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Enhancement"
},
{
"color": "06909A",
"default": false,
"description": "IO issues that don't fit into a more specific label",
"id": 2301354,
"name": "IO Data",
"node_id": "MDU6TGFiZWwyMzAxMzU0",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20Data"
}
] | closed | false | null | [] | null | 7 | "2021-09-05T07:21:11Z" | "2021-09-08T21:23:02Z" | "2021-09-08T21:23:02Z" | NONE | null | Adds two primary IO methods: to_redis() and read_redis()
TL;DR: Serializes DataFrames in and out of Redis. I've used a version of this code in production previously to share a cached DF across multiple worker processes.
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [x] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43415/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43415/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/43415.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/43415",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/43415.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/43415"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/43416 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43416/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43416/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43416/events | https://github.com/pandas-dev/pandas/pull/43416 | 988,459,100 | MDExOlB1bGxSZXF1ZXN0NzI3MzY0MzEy | 43,416 | BUG GH#43414 Infer and coerce datetimes am pm | {
"avatar_url": "https://avatars.githubusercontent.com/u/41494027?v=4",
"events_url": "https://api.github.com/users/mikephung122/events{/privacy}",
"followers_url": "https://api.github.com/users/mikephung122/followers",
"following_url": "https://api.github.com/users/mikephung122/following{/other_user}",
"gists_url": "https://api.github.com/users/mikephung122/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mikephung122",
"id": 41494027,
"login": "mikephung122",
"node_id": "MDQ6VXNlcjQxNDk0MDI3",
"organizations_url": "https://api.github.com/users/mikephung122/orgs",
"received_events_url": "https://api.github.com/users/mikephung122/received_events",
"repos_url": "https://api.github.com/users/mikephung122/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mikephung122/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mikephung122/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mikephung122"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "AFEEEE",
"default": false,
"description": null,
"id": 211840,
"name": "Timeseries",
"node_id": "MDU6TGFiZWwyMTE4NDA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Timeseries"
}
] | closed | false | null | [] | null | 4 | "2021-09-05T08:59:26Z" | "2021-09-30T03:03:04Z" | "2021-09-18T20:23:31Z" | CONTRIBUTOR | null | - [ ] closes #43414
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43416/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43416/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/43416.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/43416",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/43416.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/43416"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/43417 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43417/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43417/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43417/events | https://github.com/pandas-dev/pandas/pull/43417 | 988,518,471 | MDExOlB1bGxSZXF1ZXN0NzI3NDA4ODM1 | 43,417 | Backport PR #43150 on branch 1.3.x (BUG: GroupBy.quantile fails with pd.NA) | {
"avatar_url": "https://avatars.githubusercontent.com/u/6472290?v=4",
"events_url": "https://api.github.com/users/debnathshoham/events{/privacy}",
"followers_url": "https://api.github.com/users/debnathshoham/followers",
"following_url": "https://api.github.com/users/debnathshoham/following{/other_user}",
"gists_url": "https://api.github.com/users/debnathshoham/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/debnathshoham",
"id": 6472290,
"login": "debnathshoham",
"node_id": "MDQ6VXNlcjY0NzIyOTA=",
"organizations_url": "https://api.github.com/users/debnathshoham/orgs",
"received_events_url": "https://api.github.com/users/debnathshoham/received_events",
"repos_url": "https://api.github.com/users/debnathshoham/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/debnathshoham/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/debnathshoham/subscriptions",
"type": "User",
"url": "https://api.github.com/users/debnathshoham"
} | [
{
"color": "729FCF",
"default": false,
"description": null,
"id": 233160,
"name": "Groupby",
"node_id": "MDU6TGFiZWwyMzMxNjA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Groupby"
},
{
"color": "8cc645",
"default": false,
"description": "Related to pd.NA and nullable extension arrays",
"id": 1817503692,
"name": "NA - MaskedArrays",
"node_id": "MDU6TGFiZWwxODE3NTAzNjky",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/NA%20-%20MaskedArrays"
}
] | closed | false | null | [] | {
"closed_at": "2021-09-12T08:21:30Z",
"closed_issues": 79,
"created_at": "2021-08-15T08:07:48Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/13159005?v=4",
"events_url": "https://api.github.com/users/simonjayhawkins/events{/privacy}",
"followers_url": "https://api.github.com/users/simonjayhawkins/followers",
"following_url": "https://api.github.com/users/simonjayhawkins/following{/other_user}",
"gists_url": "https://api.github.com/users/simonjayhawkins/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/simonjayhawkins",
"id": 13159005,
"login": "simonjayhawkins",
"node_id": "MDQ6VXNlcjEzMTU5MDA1",
"organizations_url": "https://api.github.com/users/simonjayhawkins/orgs",
"received_events_url": "https://api.github.com/users/simonjayhawkins/received_events",
"repos_url": "https://api.github.com/users/simonjayhawkins/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/simonjayhawkins/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/simonjayhawkins/subscriptions",
"type": "User",
"url": "https://api.github.com/users/simonjayhawkins"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-09-12T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/89",
"id": 7059576,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/89/labels",
"node_id": "MI_kwDOAA0YD84Aa7h4",
"number": 89,
"open_issues": 0,
"state": "closed",
"title": "1.3.3",
"updated_at": "2021-09-12T20:30:04Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/89"
} | 2 | "2021-09-05T14:08:10Z" | "2021-09-09T19:23:54Z" | "2021-09-09T19:21:27Z" | CONTRIBUTOR | null | Backport PR #43150 | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43417/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43417/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/43417.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/43417",
"merged_at": "2021-09-09T19:21:27Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/43417.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/43417"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/43418 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43418/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43418/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43418/events | https://github.com/pandas-dev/pandas/pull/43418 | 988,531,523 | MDExOlB1bGxSZXF1ZXN0NzI3NDE4NDA3 | 43,418 | TYP: ExtensionArray.take accept np.ndarray | {
"avatar_url": "https://avatars.githubusercontent.com/u/6618166?v=4",
"events_url": "https://api.github.com/users/twoertwein/events{/privacy}",
"followers_url": "https://api.github.com/users/twoertwein/followers",
"following_url": "https://api.github.com/users/twoertwein/following{/other_user}",
"gists_url": "https://api.github.com/users/twoertwein/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/twoertwein",
"id": 6618166,
"login": "twoertwein",
"node_id": "MDQ6VXNlcjY2MTgxNjY=",
"organizations_url": "https://api.github.com/users/twoertwein/orgs",
"received_events_url": "https://api.github.com/users/twoertwein/received_events",
"repos_url": "https://api.github.com/users/twoertwein/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/twoertwein/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/twoertwein/subscriptions",
"type": "User",
"url": "https://api.github.com/users/twoertwein"
} | [
{
"color": "6138b5",
"default": false,
"description": "Extending pandas with custom dtypes or arrays.",
"id": 849023693,
"name": "ExtensionArray",
"node_id": "MDU6TGFiZWw4NDkwMjM2OTM=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/ExtensionArray"
},
{
"color": "ea91a4",
"default": false,
"description": "type annotations, mypy/pyright type checking",
"id": 1280988427,
"name": "Typing",
"node_id": "MDU6TGFiZWwxMjgwOTg4NDI3",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Typing"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 13 | "2021-09-05T15:08:33Z" | "2021-09-26T12:02:24Z" | "2021-09-26T12:02:23Z" | CONTRIBUTOR | null | - [x] closes #43391 (np.ndarray is never a Sequence)
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43418/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43418/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/43418.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/43418",
"merged_at": "2021-09-26T12:02:23Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/43418.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/43418"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/43419 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43419/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43419/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43419/events | https://github.com/pandas-dev/pandas/issues/43419 | 988,533,459 | MDU6SXNzdWU5ODg1MzM0NTk= | 43,419 | BUG: COO matrices are copied and converted | {
"avatar_url": "https://avatars.githubusercontent.com/u/2845433?v=4",
"events_url": "https://api.github.com/users/memeplex/events{/privacy}",
"followers_url": "https://api.github.com/users/memeplex/followers",
"following_url": "https://api.github.com/users/memeplex/following{/other_user}",
"gists_url": "https://api.github.com/users/memeplex/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/memeplex",
"id": 2845433,
"login": "memeplex",
"node_id": "MDQ6VXNlcjI4NDU0MzM=",
"organizations_url": "https://api.github.com/users/memeplex/orgs",
"received_events_url": "https://api.github.com/users/memeplex/received_events",
"repos_url": "https://api.github.com/users/memeplex/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/memeplex/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/memeplex/subscriptions",
"type": "User",
"url": "https://api.github.com/users/memeplex"
} | [
{
"color": "3465A4",
"default": false,
"description": null,
"id": 134699,
"name": "Docs",
"node_id": "MDU6TGFiZWwxMzQ2OTk=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Docs"
},
{
"color": "009800",
"default": false,
"description": "Sparse Data Type",
"id": 49182326,
"name": "Sparse",
"node_id": "MDU6TGFiZWw0OTE4MjMyNg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Sparse"
}
] | open | false | null | [] | {
"closed_at": null,
"closed_issues": 786,
"created_at": "2015-01-13T10:53:19Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "Changes that would be nice to have in the next release. These issues are not blocking. They will be pushed to the next release if no one has time to fix them.",
"due_on": null,
"html_url": "https://github.com/pandas-dev/pandas/milestone/32",
"id": 933188,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/32/labels",
"node_id": "MDk6TWlsZXN0b25lOTMzMTg4",
"number": 32,
"open_issues": 1053,
"state": "open",
"title": "Contributions Welcome",
"updated_at": "2021-11-21T00:50:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/32"
} | 5 | "2021-09-05T15:17:34Z" | "2021-09-13T15:50:08Z" | null | NONE | null | - [x] I have checked that this issue has not already been reported.
- [x] I have confirmed this bug exists on the latest version of pandas.
- [ ] (optional) I have confirmed this bug exists on the master branch of pandas.
---
#### Code Sample, a copy-pastable example
Doesn't apply.
#### Problem description
The documentation for `DataFrame.sparse.from_spmatrix()` in [1] states that:
> All sparse formats are supported, but matrices that are not in COOrdinate format will be converted, copying data as needed.
But the first thing it does [2] is:
```python
data = data.tocsc()
```
so conversion. And the implementation for `tocsc` [3] does:
```python
indptr = np.empty(N + 1, dtype=idx_dtype)
indices = np.empty_like(row, dtype=idx_dtype)
data = np.empty_like(self.data, dtype=upcast(self.dtype))
coo_tocsr(N, M, self.nnz, col, row, self.data,
indptr, indices, data)
```
so copy.
Given that the "native" format is CSC, not COO, it seems weird to me that the documentation insists on COO.
#### Expected Output
Doesn't apply.
#### Output of ``pd.show_versions()``
Referenced documentation and code is for 1.3.2.
---
[1] https://pandas.pydata.org/pandas-docs/stable/user_guide/sparse.html
[2] https://github.com/pandas-dev/pandas/blob/v1.3.2/pandas/core/arrays/sparse/accessor.py#L228-L283
[3] https://github.com/scipy/scipy/blob/v1.7.1/scipy/sparse/coo.py#L330-L370
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43419/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43419/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/43420 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43420/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43420/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43420/events | https://github.com/pandas-dev/pandas/pull/43420 | 988,567,517 | MDExOlB1bGxSZXF1ZXN0NzI3NDQ1NzI3 | 43,420 | TST/CLN: ArrayManager tests | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [] | closed | false | null | [] | null | 0 | "2021-09-05T18:20:32Z" | "2021-09-05T23:21:43Z" | "2021-09-05T23:21:39Z" | MEMBER | null | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43420/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43420/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/43420.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/43420",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/43420.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/43420"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/43421 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/43421/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/43421/comments | https://api.github.com/repos/pandas-dev/pandas/issues/43421/events | https://github.com/pandas-dev/pandas/pull/43421 | 988,568,606 | MDExOlB1bGxSZXF1ZXN0NzI3NDQ2NTE2 | 43,421 | REF: MultiIndex._engine followup to #43370 | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [
{
"color": "a10c02",
"default": false,
"description": "Memory or execution speed performance",
"id": 8935311,
"name": "Performance",
"node_id": "MDU6TGFiZWw4OTM1MzEx",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Performance"
},
{
"color": "207de5",
"default": false,
"description": null,
"id": 71268330,
"name": "MultiIndex",
"node_id": "MDU6TGFiZWw3MTI2ODMzMA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/MultiIndex"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 1 | "2021-09-05T18:26:51Z" | "2021-09-06T16:54:59Z" | "2021-09-06T15:46:43Z" | MEMBER | null | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/43421/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/43421/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/43421.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/43421",
"merged_at": "2021-09-06T15:46:43Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/43421.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/43421"
} |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.