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/41820 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41820/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41820/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41820/events | https://github.com/pandas-dev/pandas/pull/41820 | 912,031,756 | MDExOlB1bGxSZXF1ZXN0NjYyMjM3NTQ2 | 41,820 | Move deprecation whatsnew to 1.3 | {
"avatar_url": "https://avatars.githubusercontent.com/u/61934744?v=4",
"events_url": "https://api.github.com/users/phofl/events{/privacy}",
"followers_url": "https://api.github.com/users/phofl/followers",
"following_url": "https://api.github.com/users/phofl/following{/other_user}",
"gists_url": "https://api.github.com/users/phofl/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/phofl",
"id": 61934744,
"login": "phofl",
"node_id": "MDQ6VXNlcjYxOTM0NzQ0",
"organizations_url": "https://api.github.com/users/phofl/orgs",
"received_events_url": "https://api.github.com/users/phofl/received_events",
"repos_url": "https://api.github.com/users/phofl/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/phofl/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/phofl/subscriptions",
"type": "User",
"url": "https://api.github.com/users/phofl"
} | [
{
"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": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"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": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 4 | "2021-06-05T00:14:04Z" | "2021-06-06T08:18:59Z" | "2021-06-05T01:42:59Z" | MEMBER | null | cc @simonjayhawkins | {
"+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/41820/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41820/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41820.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41820",
"merged_at": "2021-06-05T01:42:59Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/41820.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41820"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/41821 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41821/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41821/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41821/events | https://github.com/pandas-dev/pandas/pull/41821 | 912,041,109 | MDExOlB1bGxSZXF1ZXN0NjYyMjQ1OTI2 | 41,821 | BUG: wrong exception when slicing on TimedeltaIndex | {
"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": "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": "Timedelta data type",
"id": 49597148,
"name": "Timedelta",
"node_id": "MDU6TGFiZWw0OTU5NzE0OA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Timedelta"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"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": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 3 | "2021-06-05T00:45:07Z" | "2021-06-17T18:51:07Z" | "2021-06-17T17:48:14Z" | 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
- [x] whatsnew entry
inching towards sharing _maybe_cast_slice_bound between DTI/PI/TDI | {
"+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/41821/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41821/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41821.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41821",
"merged_at": "2021-06-17T17:48:14Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/41821.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41821"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/41822 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41822/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41822/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41822/events | https://github.com/pandas-dev/pandas/pull/41822 | 912,089,647 | MDExOlB1bGxSZXF1ZXN0NjYyMjg4MzM4 | 41,822 | DOC: Whatsnew1.3 grammar | {
"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": "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": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"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": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 1 | "2021-06-05T03:50:57Z" | "2021-06-07T20:23:38Z" | "2021-06-07T16:45:25Z" | MEMBER | null | - [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
This contains the non-controversial edits (in my opinion) from #41747, but is almost all grammar edits. | {
"+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/41822/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41822/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41822.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41822",
"merged_at": "2021-06-07T16:45:25Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/41822.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41822"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/41823 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41823/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41823/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41823/events | https://github.com/pandas-dev/pandas/issues/41823 | 912,106,294 | MDU6SXNzdWU5MTIxMDYyOTQ= | 41,823 | BUG: MultiIndex.unique incorrect when NA value is present | {
"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": "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"
}
] | closed | false | null | [] | null | 3 | "2021-06-05T05:13:47Z" | "2021-06-18T06:54:35Z" | "2021-06-18T04:39:27Z" | MEMBER | null | drop_duplicates looks right, while unique (and _get_unique_index) keep a duplicate entry containing an NA value. Example based on test_intersection_with_missing_values_on_both_sides. The analogous problem crops up for every entry in nulls_fixture
```
nulls_fixture = np.nan
mi1 = pd.MultiIndex.from_arrays([[3, nulls_fixture, 4, nulls_fixture], [1, 2, 4, 2]])
>>> mi1.unique()
MultiIndex([(3.0, 1),
(nan, 2),
(4.0, 4),
(nan, 2)],
)
>>> mi1.drop_duplicates()
MultiIndex([(3.0, 1),
(nan, 2),
(4.0, 4)],
)
``` | {
"+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/41823/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41823/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/41824 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41824/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41824/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41824/events | https://github.com/pandas-dev/pandas/pull/41824 | 912,109,064 | MDExOlB1bGxSZXF1ZXN0NjYyMzA0NjY4 | 41,824 | REF: de-duplicate Index._intersection + MultiIndex._intersection | {
"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": "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": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"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": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 0 | "2021-06-05T05:31:30Z" | "2021-06-08T23:20:49Z" | "2021-06-08T23:16:54Z" | MEMBER | null | With a bit more work I think we can further de-duplicate these methods. | {
"+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/41824/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41824/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41824.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41824",
"merged_at": "2021-06-08T23:16:54Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/41824.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41824"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/41825 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41825/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41825/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41825/events | https://github.com/pandas-dev/pandas/pull/41825 | 912,116,016 | MDExOlB1bGxSZXF1ZXN0NjYyMzEwNDI2 | 41,825 | REF: share wrapping in MultiIndex setops | {
"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": "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 | [] | null | 3 | "2021-06-05T06:12:50Z" | "2021-06-09T23:45:27Z" | "2021-06-09T23:45:25Z" | MEMBER | null | If we can push _wrap_mi_setop_result further down into wrap_setop_result (not at all trivial bc different setops have different desired behavior on empty results) then we can share most of the rest of the MultiIndex setops code.
This PR changes the levels in the result of an empty .difference:
```
mi = pd.MultiIndex.from_product([range(3), ["a", "b"]])
mi2 = mi.repeat(2)
>>> mi.difference(mi2)
MultiIndex([], )
>>> mi.difference(mi2).levels
FrozenList([[], []]) # <-- master
FrozenList([[0, 1, 2], ['a', 'b']]) # <-- PR
```
I think this makes more sense, as a .difference should always be dtype-preserving, which for MultiIndex corresponds to levels-preserving.
In both the PR and in master, .intersection is levels-preserving when the intersection is empty, but it is less obvious to me that this is desirable. In particular, it is mutually exclusive with .intersection being commutative. cc @phofl?
| {
"+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/41825/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41825/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41825.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41825",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/41825.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41825"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/41826 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41826/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41826/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41826/events | https://github.com/pandas-dev/pandas/issues/41826 | 912,311,880 | MDU6SXNzdWU5MTIzMTE4ODA= | 41,826 | ENH: Allow different senses of "distance" for method=nearest indexing | {
"avatar_url": "https://avatars.githubusercontent.com/u/31640292?v=4",
"events_url": "https://api.github.com/users/WardBrian/events{/privacy}",
"followers_url": "https://api.github.com/users/WardBrian/followers",
"following_url": "https://api.github.com/users/WardBrian/following{/other_user}",
"gists_url": "https://api.github.com/users/WardBrian/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/WardBrian",
"id": 31640292,
"login": "WardBrian",
"node_id": "MDQ6VXNlcjMxNjQwMjky",
"organizations_url": "https://api.github.com/users/WardBrian/orgs",
"received_events_url": "https://api.github.com/users/WardBrian/received_events",
"repos_url": "https://api.github.com/users/WardBrian/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/WardBrian/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/WardBrian/subscriptions",
"type": "User",
"url": "https://api.github.com/users/WardBrian"
} | [
{
"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": "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 | 5 | "2021-06-05T15:26:36Z" | "2021-06-09T03:06:25Z" | "2021-06-08T14:59:11Z" | NONE | null | #### Is your feature request related to a problem?
`Index.get_loc` with the method keyword has been quite useful for me, but I often find myself using data (e.g. atmospheric pressure levels) where the truest sense of the word 'nearest' is actually the closest value in log(p), not the normal number line.
#### Describe the solution you'd like
My first thought was to simply request a "log_nearest" option to the method parameter, but I think it is easier to get much more functionality essentially "for free" with a different construction:
Index.get_loc (and subsequently Index._get_nearest_indexer) could accept a parameter (Let's call it "pre", but I think there are certainly better options I haven't thought of) which is a ufunc of one variable, and apply that to the target values and left and right indexed values before calculating their distances.
e.g.:
```python
>>> idx = pd.Index([10, 0.1, 0.01])
>>> idx.get_loc(2.0, method='nearest')
1
>>> idx.get_loc(2.0, method='nearest', pre=np.log)
0
```
#### API breaking implications
This should not affect any existing usages of the API
#### Describe alternatives you've considered
An alternative solution to my specific problem is to store the index in the log-space version, but this is considerably less human-readable in general.
#### Additional context
Besides changing the signatures and documentation, I believe this change can primarily be implemented with edits to this section of the indexing code
https://github.com/pandas-dev/pandas/blob/2cb96529396d93b46abab7bbc73a208e708c642e/pandas/core/indexes/base.py#L3269-L3277
There may also need to be some additional code added to the higher-up functions to produce errors if this parameter is passed when method != "nearest", as I don't believe it makes sense in that context.
It is also worth noting that this has the potential to fail (e.g, if a point in the indexer is 0 or negative, the log function will not work). Pandas may want to trap those errors and report them differently, but a garbage-in-garbage-out disclaimer may be helpful in general | {
"+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/41826/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41826/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/41827 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41827/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41827/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41827/events | https://github.com/pandas-dev/pandas/issues/41827 | 912,342,186 | MDU6SXNzdWU5MTIzNDIxODY= | 41,827 | BUG: DataFrame `isin` function randomly selects values (instead of using them all) when on Intel CPU and input is a torch Tensor | {
"avatar_url": "https://avatars.githubusercontent.com/u/31927714?v=4",
"events_url": "https://api.github.com/users/SamuelTrew/events{/privacy}",
"followers_url": "https://api.github.com/users/SamuelTrew/followers",
"following_url": "https://api.github.com/users/SamuelTrew/following{/other_user}",
"gists_url": "https://api.github.com/users/SamuelTrew/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/SamuelTrew",
"id": 31927714,
"login": "SamuelTrew",
"node_id": "MDQ6VXNlcjMxOTI3NzE0",
"organizations_url": "https://api.github.com/users/SamuelTrew/orgs",
"received_events_url": "https://api.github.com/users/SamuelTrew/received_events",
"repos_url": "https://api.github.com/users/SamuelTrew/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/SamuelTrew/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/SamuelTrew/subscriptions",
"type": "User",
"url": "https://api.github.com/users/SamuelTrew"
} | [
{
"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": "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"
},
{
"color": "fef2c0",
"default": false,
"description": "isin method",
"id": 2468482981,
"name": "isin",
"node_id": "MDU6TGFiZWwyNDY4NDgyOTgx",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/isin"
}
] | open | false | null | [] | null | 1 | "2021-06-05T16:44:35Z" | "2021-07-01T20:55:29Z" | 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.
---
#### Code Sample, a copy-pastable example
```python
from typing import Tuple
import numpy as np
from pandas import DataFrame
from torch.tensor import Tensor
from torchvision import transforms, datasets
import torch
def __loadMNISTData() -> Tuple[DataFrame, DataFrame]:
trans = transforms.Compose([transforms.ToTensor(), transforms.Normalize((0.5,), (1.0,))])
# if not exist, download mnist dataset
trainSet = datasets.MNIST("data", train=True, transform=trans, download=True)
testSet = datasets.MNIST("data", train=False, transform=trans, download=True)
# Scale pixel intensities to [-1, 1]
xTrain: Tensor = trainSet.train_data
xTrain = 2 * (xTrain.float() / 255.0) - 1
# list of 2D images to 1D pixel intensities
xTrain = xTrain.flatten(1, 2).numpy()
yTrain = trainSet.train_labels.numpy()
# Scale pixel intensities to [-1, 1]
xtest: Tensor = testSet.test_data.clone().detach()
xtest = 2 * (xtest.float() / 255.0) - 1
# list of 2D images to 1D pixel intensities
xTest: np.ndarray = xtest.flatten(1, 2).numpy()
yTest: np.ndarray = testSet.test_labels.numpy()
trainDataframe = DataFrame(zip(xTrain, yTrain))
testDataframe = DataFrame(zip(xTest, yTest))
trainDataframe.columns = testDataframe.columns = ["data", "labels"]
return trainDataframe, testDataframe
def _filterDataByLabel(
labels: Tensor, trainDataframe: DataFrame, testDataframe: DataFrame
) -> Tuple[DataFrame, DataFrame]:
print("\nEntering _filterDataByLabel()")
print(f"labels: {labels}")
print(f"Lengths: {len(trainDataframe)}, {len(testDataframe)}")
trainDataframe = trainDataframe[trainDataframe["labels"].isin(labels)]
testDataframe = testDataframe[testDataframe["labels"].isin(labels)]
print(f"Lengths: {len(trainDataframe)}, {len(testDataframe)}")
print(f"Unique values: {trainDataframe['labels'].unique()}")
print("Exiting _filterDataByLabel()\n")
return trainDataframe, testDataframe
data = __loadMNISTData()
labels = torch.tensor(range(10))
trainDataframe, testDataframe = self._filterDataByLabel(labels, *data)
```
#### Problem description
So for some reason, the labels that are passed into the `isin` function, aren't the same as the unique values.
E.g. I'll put 0-9 in and get back a random amount each time even though I set the seeds for python, np, torch and cuda.
If I change labels from a Tensor into a list then this no longer happens.
The weirdest part is that this doesn't happen on my AMD Ryzen 5600x but it does happen on 6th and 8th gen Intel i7 laptop CPUs.
#### Expected Output
The unique values should always be the same as the labels going in even if it's a tensor and no matter what CPU is used.
#### Output of ``pd.show_versions()``
These are the details from my laptop containing the 8th gen i7 cpu
<details>
INSTALLED VERSIONS
------------------
commit : 2cb96529396d93b46abab7bbc73a208e708c642e
python : 3.8.8.final.0
python-bits : 64
OS : Linux
OS-release : 5.11.0-17-generic
Version : #18-Ubuntu SMP Thu May 6 20:10:11 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.2.4
numpy : 1.19.4
pytz : 2021.1
dateutil : 2.8.1
pip : 21.0.1
setuptools : 52.0.0.post20210125
Cython : 0.29.23
pytest : 6.2.3
hypothesis : None
sphinx : 4.0.1
blosc : None
feather : None
xlsxwriter : 1.3.8
lxml.etree : 4.6.3
html5lib : 1.1
pymysql : None
psycopg2 : None
jinja2 : 2.11.3
IPython : 7.22.0
pandas_datareader: None
bs4 : 4.9.3
bottleneck : 1.3.2
fsspec : 0.9.0
fastparquet : None
gcsfs : None
matplotlib : 3.3.2
numexpr : 2.7.3
odfpy : None
openpyxl : 3.0.7
pandas_gbq : None
pyarrow : None
pyxlsb : None
s3fs : None
scipy : 1.6.0
sqlalchemy : 1.4.15
tables : 3.6.1
tabulate : None
xarray : None
xlrd : 2.0.1
xlwt : 1.3.0
numba : 0.53.1
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/41827/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41827/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/41828 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41828/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41828/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41828/events | https://github.com/pandas-dev/pandas/issues/41828 | 912,347,856 | MDU6SXNzdWU5MTIzNDc4NTY= | 41,828 | ENH: retain attrs when concat dataframes | {
"avatar_url": "https://avatars.githubusercontent.com/u/6242032?v=4",
"events_url": "https://api.github.com/users/xiki-tempula/events{/privacy}",
"followers_url": "https://api.github.com/users/xiki-tempula/followers",
"following_url": "https://api.github.com/users/xiki-tempula/following{/other_user}",
"gists_url": "https://api.github.com/users/xiki-tempula/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/xiki-tempula",
"id": 6242032,
"login": "xiki-tempula",
"node_id": "MDQ6VXNlcjYyNDIwMzI=",
"organizations_url": "https://api.github.com/users/xiki-tempula/orgs",
"received_events_url": "https://api.github.com/users/xiki-tempula/received_events",
"repos_url": "https://api.github.com/users/xiki-tempula/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/xiki-tempula/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/xiki-tempula/subscriptions",
"type": "User",
"url": "https://api.github.com/users/xiki-tempula"
} | [
{
"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": "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": "56efc9",
"default": false,
"description": "_metadata, .attrs",
"id": 1539579994,
"name": "metadata",
"node_id": "MDU6TGFiZWwxNTM5NTc5OTk0",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/metadata"
}
] | 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"
} | 3 | "2021-06-05T16:59:07Z" | "2021-06-06T11:28:24Z" | null | NONE | null | #### Is your feature request related to a problem?
I wish the attrs could be retained when concat data frames.
```
d = {'col1': [1, 2], 'col2': [3, 4]}
df1 = pd.DataFrame(data=d)
df1.attrs = {1:1}
df2 = pd.DataFrame(data=d)
df2.attrs = {1:1}
pd.concat([df1, df2]).attrs
{}
```
#### Describe the solution you'd like
```
d = {'col1': [1, 2], 'col2': [3, 4]}
df1 = pd.DataFrame(data=d)
df1.attrs = {1:1}
df2 = pd.DataFrame(data=d)
df2.attrs = {1:1}
pd.concat([df1, df2]).attrs
{1: 1}
```
#### API breaking implications
N/A
#### Describe alternatives you've considered
N/A | {
"+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/41828/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41828/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/41829 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41829/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41829/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41829/events | https://github.com/pandas-dev/pandas/issues/41829 | 912,363,631 | MDU6SXNzdWU5MTIzNjM2MzE= | 41,829 | CI: Re-enable Circle CI | {
"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": "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": "c2e0c6",
"default": false,
"description": "aarch64 architecture",
"id": 2628846204,
"name": "ARM",
"node_id": "MDU6TGFiZWwyNjI4ODQ2MjA0",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/ARM"
}
] | closed | false | {
"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"
} | [
{
"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"
}
] | {
"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-06-05T17:38:50Z" | "2021-09-16T22:43:35Z" | "2021-09-16T22:37:50Z" | MEMBER | null | I contacted CircleCI to check if they could be interested in sponsoring our ARM builds. Will update if I hear from them. For now looks like we're getting the 2,500 credits that @lithomas1 mentioned (not the 400,000 for open source projects for Linux builds). So, not much we can do with those.
I updated this PR so we don't add the CircleCI build, but still, it has everything else so the build passes when it can be added wherever. Only thing is that we now need to disable Circle CI, so the build doesn't fail after we remove the configuration. But only an admin of the pandas-dev organization can do it. @jreback do you mind going to https://app.circleci.com/settings/project/github/pandas-dev/pandas?return-to=https%3A%2F%2Fapp.circleci.com%2Fpipelines%2Fgithub%2Fpandas-dev%2Fpandas%2F30%2Fworkflows%2Ff9a6db17-510a-4eaf-a10c-b3a800e0a6c4%2Fjobs%2F30872 and clickig on "Stop builds" please?
_Originally posted by @datapythonista in https://github.com/pandas-dev/pandas/issues/41739#issuecomment-852446796_
We should re-enable Circle CI if we receive the Circle CI credits.
cc @datapythonista for updates on 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/41829/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41829/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/41830 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41830/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41830/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41830/events | https://github.com/pandas-dev/pandas/pull/41830 | 912,393,075 | MDExOlB1bGxSZXF1ZXN0NjYyNTU1OTMy | 41,830 | TYP: datetimelike | {
"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": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"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": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 0 | "2021-06-05T18:50:56Z" | "2021-06-11T14:52:26Z" | "2021-06-11T11:17:36Z" | 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/41830/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41830/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41830.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41830",
"merged_at": "2021-06-11T11:17:36Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/41830.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41830"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/41831 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41831/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41831/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41831/events | https://github.com/pandas-dev/pandas/issues/41831 | 912,406,932 | MDU6SXNzdWU5MTI0MDY5MzI= | 41,831 | BUG: IntervalIndex([np.nan, np.nan]).is_monotonic returns True | {
"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": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "009800",
"default": false,
"description": "Interval data type",
"id": 150096370,
"name": "Interval",
"node_id": "MDU6TGFiZWwxNTAwOTYzNzA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Interval"
},
{
"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"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"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": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 1 | "2021-06-05T19:24:41Z" | "2021-06-10T15:52:25Z" | "2021-06-10T15:52:25Z" | MEMBER | null | I'm pretty sure this is related to other questionable behavior:
```
index = pd.IntervalIndex([np.nan, np.nan])
other = pd.IntervalIndex([np.nan])
In [4]: index.is_monotonic # should be False
Out[4]: True
In [5]: index._index_as_unique # should be False
Out[5]: True
In [6]: index.get_indexer_for(other) # shouldn't raise
InvalidIndexError: Reindexing only valid with uniquely valued Index objects
``` | {
"+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/41831/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41831/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/41832 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41832/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41832/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41832/events | https://github.com/pandas-dev/pandas/pull/41832 | 912,416,299 | MDExOlB1bGxSZXF1ZXN0NjYyNTc2OTYy | 41,832 | REF: de-duplicate IntervalIndex setops | {
"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": "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": "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"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"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": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 0 | "2021-06-05T19:51:30Z" | "2021-06-08T23:17:19Z" | "2021-06-08T23:15:30Z" | MEMBER | null | I expect we'll be able to get rid of the last ones once #41831 is fixed | {
"+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/41832/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41832/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41832.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41832",
"merged_at": "2021-06-08T23:15:30Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/41832.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41832"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/41833 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41833/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41833/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41833/events | https://github.com/pandas-dev/pandas/pull/41833 | 912,417,260 | MDExOlB1bGxSZXF1ZXN0NjYyNTc3ODA5 | 41,833 | REF: de-duplicate symmetric_difference, _union | {
"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": "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": "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"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"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": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 7 | "2021-06-05T19:53:54Z" | "2021-06-25T20:40:38Z" | "2021-06-09T12:19:04Z" | MEMBER | null | Also fixes buglet in CategoricalIndex.equals(MultiIndex) | {
"+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/41833/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41833/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41833.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41833",
"merged_at": "2021-06-09T12:19:04Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/41833.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41833"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/41834 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41834/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41834/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41834/events | https://github.com/pandas-dev/pandas/issues/41834 | 912,490,754 | MDU6SXNzdWU5MTI0OTA3NTQ= | 41,834 | BUG: Odd timezone offset change with old datetimes with tz_convert | {
"avatar_url": "https://avatars.githubusercontent.com/u/54589?v=4",
"events_url": "https://api.github.com/users/rok/events{/privacy}",
"followers_url": "https://api.github.com/users/rok/followers",
"following_url": "https://api.github.com/users/rok/following{/other_user}",
"gists_url": "https://api.github.com/users/rok/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/rok",
"id": 54589,
"login": "rok",
"node_id": "MDQ6VXNlcjU0NTg5",
"organizations_url": "https://api.github.com/users/rok/orgs",
"received_events_url": "https://api.github.com/users/rok/received_events",
"repos_url": "https://api.github.com/users/rok/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/rok/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rok/subscriptions",
"type": "User",
"url": "https://api.github.com/users/rok"
} | [
{
"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": "Timezone data dtype",
"id": 60458168,
"name": "Timezones",
"node_id": "MDU6TGFiZWw2MDQ1ODE2OA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Timezones"
},
{
"color": "d8439a",
"default": false,
"description": "Issue related to pandas dependency",
"id": 2533668378,
"name": "Upstream issue",
"node_id": "MDU6TGFiZWwyNTMzNjY4Mzc4",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Upstream%20issue"
}
] | closed | false | null | [] | null | 5 | "2021-06-05T23:02:57Z" | "2021-08-21T02:15:44Z" | "2021-08-21T02:15:38Z" | 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
```python
import pandas as pd
[
pd.to_datetime(["1900-01-01"]).tz_localize("UTC").tz_convert("Australia/Broken_Hill"),
pd.to_datetime(["1900-01-01"]).tz_localize("UTC").tz_convert("Pacific/Marquesas"),
pd.to_datetime(["2000-01-01"]).tz_localize("UTC").tz_convert("Pacific/Marquesas"),
pd.to_datetime(["2000-01-01"]).tz_localize("UTC").tz_convert("Australia/Broken_Hill"),
pd.to_datetime(["1900-01-01"]).tz_localize("UTC").tz_convert("Etc/GMT-9"),
pd.to_datetime(["2000-01-01"]).tz_localize("UTC").tz_convert("Etc/GMT-9"),
]
```
Returns:
```
[DatetimeIndex(['1900-01-01 09:26:00+09:26'], dtype='datetime64[ns, Australia/Broken_Hill]', freq=None),
DatetimeIndex(['1899-12-31 14:42:00-09:18'], dtype='datetime64[ns, Pacific/Marquesas]', freq=None),
DatetimeIndex(['1999-12-31 14:30:00-09:30'], dtype='datetime64[ns, Pacific/Marquesas]', freq=None),
DatetimeIndex(['2000-01-01 10:30:00+10:30'], dtype='datetime64[ns, Australia/Broken_Hill]', freq=None),
DatetimeIndex(['1900-01-01 09:00:00+09:00'], dtype='datetime64[ns, Etc/GMT-9]', freq=None),
DatetimeIndex(['2000-01-01 09:00:00+09:00'], dtype='datetime64[ns, Etc/GMT-9]', freq=None)]
```
#### Problem description
Timezone offset seems to change when it shouldn't? I'm not 100% this is not the correct behavior but it seems odd.
I hope this is known behavior and not something esoteric.
#### Expected Output
Probably this:
```
[DatetimeIndex(['1900-01-01 10:30:00+10:30'], dtype='datetime64[ns, Australia/Broken_Hill]', freq=None),
DatetimeIndex(['1899-12-31 14:30:00-09:30'], dtype='datetime64[ns, Pacific/Marquesas]', freq=None),
DatetimeIndex(['1999-12-31 14:30:00-09:30'], dtype='datetime64[ns, Pacific/Marquesas]', freq=None),
DatetimeIndex(['2000-01-01 10:30:00+10:30'], dtype='datetime64[ns, Australia/Broken_Hill]', freq=None),
DatetimeIndex(['1900-01-01 09:00:00+09:00'], dtype='datetime64[ns, Etc/GMT-9]', freq=None),
DatetimeIndex(['2000-01-01 09:00:00+09:00'], dtype='datetime64[ns, Etc/GMT-9]', freq=None)]
```
I'm not sure these timezones even existed then so this might be an invalid calculation.
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit : 2cb96529396d93b46abab7bbc73a208e708c642e
python : 3.7.0.final.0
python-bits : 64
OS : Linux
OS-release : 5.4.0-73-lowlatency
Version : #82-Ubuntu SMP PREEMPT Wed Apr 14 19:19:50 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.2.4
numpy : 1.19.1
pytz : 2020.5
dateutil : 2.8.1
pip : 20.2.3
setuptools : 50.3.0.post20201006
Cython : None
pytest : 6.2.1
hypothesis : None
sphinx : 2.4.4
blosc : None
feather : None
xlsxwriter : None
lxml.etree : 4.6.2
html5lib : None
pymysql : None
psycopg2 : 2.8.6 (dt dec pq3 ext lo64)
jinja2 : 2.11.2
IPython : 7.18.1
pandas_datareader: None
bs4 : None
bottleneck : None
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : 3.3.1
numexpr : None
odfpy : None
openpyxl : 3.0.7
pandas_gbq : None
pyarrow : 1.0.1
pyxlsb : None
s3fs : None
scipy : 1.5.2
sqlalchemy : 1.3.19
tables : None
tabulate : 0.8.7
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/41834/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41834/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/41835 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41835/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41835/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41835/events | https://github.com/pandas-dev/pandas/pull/41835 | 912,588,443 | MDExOlB1bGxSZXF1ZXN0NjYyNzM1NTcx | 41,835 | Backport PR #41806 on branch 1.2.x" | {
"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": "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": "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 | null | [] | {
"closed_at": "2021-06-22T09:35:40Z",
"closed_issues": 50,
"created_at": "2021-04-12T08:10: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.2.x",
"due_on": "2021-05-10T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/85",
"id": 6650632,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/85/labels",
"node_id": "MDk6TWlsZXN0b25lNjY1MDYzMg==",
"number": 85,
"open_issues": 0,
"state": "closed",
"title": "1.2.5",
"updated_at": "2021-06-23T08:13:15Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/85"
} | 1 | "2021-06-06T03:26:56Z" | "2021-06-06T08:14:48Z" | "2021-06-06T08:13:59Z" | CONTRIBUTOR | null | Backport PR #41806 | {
"+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/41835/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41835/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41835.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41835",
"merged_at": "2021-06-06T08:13:59Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/41835.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41835"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/41836 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41836/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41836/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41836/events | https://github.com/pandas-dev/pandas/issues/41836 | 912,602,114 | MDU6SXNzdWU5MTI2MDIxMTQ= | 41,836 | _libs.hashtable.ismember incorrect with tuples containing nan | {
"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": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"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": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 4 | "2021-06-06T04:02:39Z" | "2021-06-17T08:06:51Z" | "2021-06-16T22:15:36Z" | MEMBER | null | It looks like the equality check being done on tuples is checking NA values for identity, so separately instantiated `float("nan")` objects aren't considered matching.
```
from pandas.core.algorithms import isin
values = [("a", float("nan")), ("b", 1)]
comps = [("a", float("nan"))]
alt = ("a", values[0][1])
>>> isin(values, comps)
array([False, False])
>>> isin(values, [alt])
array([ True, False])
```
cc @realead | {
"+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/41836/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41836/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/41837 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41837/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41837/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41837/events | https://github.com/pandas-dev/pandas/issues/41837 | 912,620,024 | MDU6SXNzdWU5MTI2MjAwMjQ= | 41,837 | ENH: DataFrame.to_expr() method | {
"avatar_url": "https://avatars.githubusercontent.com/u/184773?v=4",
"events_url": "https://api.github.com/users/kerrickstaley/events{/privacy}",
"followers_url": "https://api.github.com/users/kerrickstaley/followers",
"following_url": "https://api.github.com/users/kerrickstaley/following{/other_user}",
"gists_url": "https://api.github.com/users/kerrickstaley/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kerrickstaley",
"id": 184773,
"login": "kerrickstaley",
"node_id": "MDQ6VXNlcjE4NDc3Mw==",
"organizations_url": "https://api.github.com/users/kerrickstaley/orgs",
"received_events_url": "https://api.github.com/users/kerrickstaley/received_events",
"repos_url": "https://api.github.com/users/kerrickstaley/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kerrickstaley/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kerrickstaley/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kerrickstaley"
} | [
{
"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"
},
{
"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": "370f77",
"default": false,
"description": "DataFrame data structure",
"id": 1049312478,
"name": "DataFrame",
"node_id": "MDU6TGFiZWwxMDQ5MzEyNDc4",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/DataFrame"
}
] | open | false | null | [] | null | 4 | "2021-06-06T04:48:43Z" | "2021-07-21T14:16:55Z" | null | NONE | null | #### Is your feature request related to a problem?
I would like to write some unit tests for my Pandas code. I want to test that some `DataFrame` is equal to an expected value. The expected value is complicated and I would like an easy way to get the Python code to construct it. My program already computes the expected `DataFrame` value but I need a way to serialize/deserialize it for use in my test code.
[Here is a StackOverflow question with more detail](https://stackoverflow.com/questions/67845199/how-can-i-get-a-repr-of-a-dataframe-that-is-a-valid-python-expression).
#### Describe the solution you'd like
I would like there to be a `DataFrame.to_expr()` method. It should return a `str` containing valid Python code that can be used to re-construct the `DataFrame`.
To the greatest extent possible, it should be true that `pd.testing.assert_frame_equal(df1, eval(df2.to_expr()))` throws an `AssertionError` if and only if `pd.testing.assert_frame_equal(df1, df2)` throws an `AssertionError`. I am using `assert_frame_equal` because it checks column dtypes, whereas `DataFrame.equals()` does not.
Concretely, I think the return value of `.to_expr()` should be something like
```
pandas.DataFrame({'column_1': pandas.Series([1, 2, 3], dtype='int64'), 'column_2': pandas.Series([1.0, 2.0, 3.0], dtype='float64')})
```
Note that on many Python objects, this `.to_expr()` method is called `__repr__()`. [The Python docs state:](https://docs.python.org/3/library/functions.html#repr)
> For many types, [`__repr__`] makes an attempt to return a string that would yield an object with the same value when passed to `eval()`...
However, `DataFrame.__repr__` is already defined to print a different representation (which **is** arguably more useful in an interactive environment).
#### API breaking implications
This is a backwards-compatible change.
#### Describe alternatives you've considered
I've used `DataFrame.to_dict()` and `DataFrame.from_dict()` for this purpose in the past. However, this doesn't preserve the type, and so it doesn't work if you're working with an empty `DataFrame`. I also worry that `from_dict` will sometimes fail to infer the original type even for non-empty `DataFrame`s.
| {
"+1": 1,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 1,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/41837/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41837/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/41838 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41838/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41838/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41838/events | https://github.com/pandas-dev/pandas/issues/41838 | 912,722,673 | MDU6SXNzdWU5MTI3MjI2NzM= | 41,838 | ENH: Using transparentpath in read_csv | {
"avatar_url": "https://avatars.githubusercontent.com/u/41590425?v=4",
"events_url": "https://api.github.com/users/michaelshekasta/events{/privacy}",
"followers_url": "https://api.github.com/users/michaelshekasta/followers",
"following_url": "https://api.github.com/users/michaelshekasta/following{/other_user}",
"gists_url": "https://api.github.com/users/michaelshekasta/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/michaelshekasta",
"id": 41590425,
"login": "michaelshekasta",
"node_id": "MDQ6VXNlcjQxNTkwNDI1",
"organizations_url": "https://api.github.com/users/michaelshekasta/orgs",
"received_events_url": "https://api.github.com/users/michaelshekasta/received_events",
"repos_url": "https://api.github.com/users/michaelshekasta/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/michaelshekasta/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/michaelshekasta/subscriptions",
"type": "User",
"url": "https://api.github.com/users/michaelshekasta"
} | [
{
"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"
},
{
"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 | 2 | "2021-06-06T08:41:07Z" | "2021-08-21T02:19:13Z" | "2021-08-21T02:19:12Z" | NONE | null | Hi Guys,
First of all, Thanks for your work! I wish I could use pandas with transparentpath in read_csv function.
In short, transparentpath can contain gscfs paths and local paths.
for more information see [this example](https://towardsdatascience.com/transparentpath-a-python-package-to-manage-paths-on-google-cloud-storage-ae25a15a44d5)
Thanks,
Michael | {
"+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/41838/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41838/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/41839 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41839/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41839/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41839/events | https://github.com/pandas-dev/pandas/issues/41839 | 912,883,108 | MDU6SXNzdWU5MTI4ODMxMDg= | 41,839 | DOC: Input/Output page contains only input functions | {
"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": "3465A4",
"default": false,
"description": null,
"id": 134699,
"name": "Docs",
"node_id": "MDU6TGFiZWwxMzQ2OTk=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Docs"
},
{
"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": "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 | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"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": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 1 | "2021-06-06T16:36:13Z" | "2021-06-16T23:07:45Z" | "2021-06-16T23:07:45Z" | CONTRIBUTOR | null | #### Location of the documentation
https://pandas.pydata.org/pandas-docs/dev/reference/io.html#html
#### Documentation problem
The title is Input/Output but all linked methods are `read_xyz()`, and there is little if any reference to any `write_xyz()` or `to_xyzz methods.
#### Suggested fix for documentation
Perform a review and enure all input/output methods are referenced on the page.
| {
"+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/41839/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41839/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/41840 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41840/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41840/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41840/events | https://github.com/pandas-dev/pandas/pull/41840 | 912,891,173 | MDExOlB1bGxSZXF1ZXN0NjYzMDAzNDU2 | 41,840 | doc: add highlight_quantile to style.rst | {
"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": "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": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"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": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 0 | "2021-06-06T17:05:00Z" | "2021-06-07T16:51:33Z" | "2021-06-07T16:42:35Z" | CONTRIBUTOR | null | oversight when adding the 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/41840/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41840/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41840.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41840",
"merged_at": "2021-06-07T16:42:35Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/41840.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41840"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/41841 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41841/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41841/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41841/events | https://github.com/pandas-dev/pandas/pull/41841 | 912,948,011 | MDExOlB1bGxSZXF1ZXN0NjYzMDQ5NzI2 | 41,841 | TYP: use annotations in strprime.pyi and timestamps.pyi | {
"avatar_url": "https://avatars.githubusercontent.com/u/7614606?v=4",
"events_url": "https://api.github.com/users/fangchenli/events{/privacy}",
"followers_url": "https://api.github.com/users/fangchenli/followers",
"following_url": "https://api.github.com/users/fangchenli/following{/other_user}",
"gists_url": "https://api.github.com/users/fangchenli/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/fangchenli",
"id": 7614606,
"login": "fangchenli",
"node_id": "MDQ6VXNlcjc2MTQ2MDY=",
"organizations_url": "https://api.github.com/users/fangchenli/orgs",
"received_events_url": "https://api.github.com/users/fangchenli/received_events",
"repos_url": "https://api.github.com/users/fangchenli/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/fangchenli/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/fangchenli/subscriptions",
"type": "User",
"url": "https://api.github.com/users/fangchenli"
} | [
{
"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": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"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": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 0 | "2021-06-06T21:04:36Z" | "2021-06-18T02:24:07Z" | "2021-06-08T11:25:56Z" | MEMBER | 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/41841/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41841/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41841.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41841",
"merged_at": "2021-06-08T11:25:56Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/41841.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41841"
} |
|
https://api.github.com/repos/pandas-dev/pandas/issues/41842 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41842/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41842/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41842/events | https://github.com/pandas-dev/pandas/pull/41842 | 912,952,699 | MDExOlB1bGxSZXF1ZXN0NjYzMDUzNTMx | 41,842 | DOC: reverse rolling window (#38627) | {
"avatar_url": "https://avatars.githubusercontent.com/u/52055110?v=4",
"events_url": "https://api.github.com/users/mdhsieh/events{/privacy}",
"followers_url": "https://api.github.com/users/mdhsieh/followers",
"following_url": "https://api.github.com/users/mdhsieh/following{/other_user}",
"gists_url": "https://api.github.com/users/mdhsieh/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mdhsieh",
"id": 52055110,
"login": "mdhsieh",
"node_id": "MDQ6VXNlcjUyMDU1MTEw",
"organizations_url": "https://api.github.com/users/mdhsieh/orgs",
"received_events_url": "https://api.github.com/users/mdhsieh/received_events",
"repos_url": "https://api.github.com/users/mdhsieh/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mdhsieh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mdhsieh/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mdhsieh"
} | [
{
"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": "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-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"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": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 4 | "2021-06-06T21:27:49Z" | "2021-06-11T03:02:49Z" | "2021-06-11T03:02:35Z" | CONTRIBUTOR | null | This adds the suggested changes from closed pull request (#38627):
https://github.com/pandas-dev/pandas/pull/39091/files/80819f65402e46caa29ff7192b34d43f91c1a0ee
After updated commit.
- remove noqa
- change line back to single quotes
- rename `df1` to `reversed_df`
- add reference to `FixedForwardWindowIndexer`
- remove repeated `df` initialization in code example
- rename `df2` to `reversed_df`
- move code example
- [x] closes #38627
- [ ] 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/41842/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41842/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41842.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41842",
"merged_at": "2021-06-11T03:02:35Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/41842.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41842"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/41843 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41843/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41843/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41843/events | https://github.com/pandas-dev/pandas/issues/41843 | 912,969,939 | MDU6SXNzdWU5MTI5Njk5Mzk= | 41,843 | BUG: `tseries.offsets.MonthEnd` is leaving out full 24h of period | {
"avatar_url": "https://avatars.githubusercontent.com/u/3484242?v=4",
"events_url": "https://api.github.com/users/avibrazil/events{/privacy}",
"followers_url": "https://api.github.com/users/avibrazil/followers",
"following_url": "https://api.github.com/users/avibrazil/following{/other_user}",
"gists_url": "https://api.github.com/users/avibrazil/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/avibrazil",
"id": 3484242,
"login": "avibrazil",
"node_id": "MDQ6VXNlcjM0ODQyNDI=",
"organizations_url": "https://api.github.com/users/avibrazil/orgs",
"received_events_url": "https://api.github.com/users/avibrazil/received_events",
"repos_url": "https://api.github.com/users/avibrazil/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/avibrazil/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/avibrazil/subscriptions",
"type": "User",
"url": "https://api.github.com/users/avibrazil"
} | [
{
"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": "0052cc",
"default": false,
"description": "DateOffsets",
"id": 53181044,
"name": "Frequency",
"node_id": "MDU6TGFiZWw1MzE4MTA0NA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Frequency"
},
{
"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"
}
] | open | false | null | [] | null | 2 | "2021-06-06T22:58:01Z" | "2021-06-15T12:30:09Z" | null | NONE | null | #### Code Sample, a copy-pastable example
```python
>>> pd.Timestamp('2021-05-20') + pd.tseries.offsets.MonthEnd
Timestamp('2021-05-31 00:00:00')
```
`MonthEnd` gets me the first second of the last day, while I was expecting the last second of the last day of month (`Timestamp('2021-05-31 23:59:59.99999999')`). This yields strange consequences as showed below.
#### A consequence of unexpected behavior
When using `df.resample('M').ffill()` to get the last known value for a month, data for the last 24h of a month are ignored.
```python
>>> df=pd.DataFrame({'val': {
pd.Timestamp('2021-03-24 12:03:00'): 1.0,
pd.Timestamp('2021-03-31 12:00:00'): 1001.0,
pd.Timestamp('2021-04-28 12:03:00'): 1.0,
pd.Timestamp('2021-04-30 23:59:00'): 1002.0,
pd.Timestamp('2021-05-30 00:00:01'): 1.0,
pd.Timestamp('2021-05-31 12:00:00'): 1003.0
}})
>>> df
val
2021-03-24 12:03:00 1.0
2021-03-31 12:00:00 1001.0
2021-04-28 12:03:00 1.0
2021-04-30 23:59:00 1002.0
2021-05-30 00:00:01 1.0
2021-05-31 12:00:00 1003.0
>>> df.resample('M').ffill()
val
2021-03-31 1.0
2021-04-30 1.0
2021-05-31 1.0
```
The expected behavior for the `ffill` operation is >1000 for all `MonthEnd`.
On the other hand, a `sum` operation works as expected:
```python
>>> df.resample('M').sum()
val
2021-03-31 1002.0
2021-04-30 1003.0
2021-05-31 1004.0
```
#### Output of ``pd.show_versions()``
<details>
```
INSTALLED VERSIONS
------------------
commit : 2cb96529396d93b46abab7bbc73a208e708c642e
python : 3.8.2.final.0
python-bits : 64
OS : Darwin
OS-release : 20.5.0
Version : Darwin Kernel Version 20.5.0: Sat May 8 05:10:33 PDT 2021; root:xnu-7195.121.3~9/RELEASE_X86_64
machine : x86_64
processor : i386
byteorder : little
LC_ALL : None
LANG : None
LOCALE : en_US.UTF-8
pandas : 1.2.4
numpy : 1.20.1
pytz : 2021.1
dateutil : 2.8.1
pip : 21.1
setuptools : 41.2.0
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : 4.6.3
html5lib : None
pymysql : 1.0.2
psycopg2 : None
jinja2 : 2.11.3
IPython : 7.20.0
pandas_datareader: 0.9.0
bs4 : 4.9.3
bottleneck : None
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : 3.3.4
numexpr : None
odfpy : None
openpyxl : 3.0.7
pandas_gbq : None
pyarrow : 3.0.0
pyxlsb : None
s3fs : None
scipy : 1.6.1
sqlalchemy : 1.3.23
tables : None
tabulate : None
xarray : None
xlrd : 2.0.1
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/41843/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41843/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/41844 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41844/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41844/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41844/events | https://github.com/pandas-dev/pandas/pull/41844 | 912,971,086 | MDExOlB1bGxSZXF1ZXN0NjYzMDY4NDEy | 41,844 | DOC: Add .to_xyz to io docs | {
"avatar_url": "https://avatars.githubusercontent.com/u/59709552?v=4",
"events_url": "https://api.github.com/users/gansel51/events{/privacy}",
"followers_url": "https://api.github.com/users/gansel51/followers",
"following_url": "https://api.github.com/users/gansel51/following{/other_user}",
"gists_url": "https://api.github.com/users/gansel51/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/gansel51",
"id": 59709552,
"login": "gansel51",
"node_id": "MDQ6VXNlcjU5NzA5NTUy",
"organizations_url": "https://api.github.com/users/gansel51/orgs",
"received_events_url": "https://api.github.com/users/gansel51/received_events",
"repos_url": "https://api.github.com/users/gansel51/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/gansel51/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gansel51/subscriptions",
"type": "User",
"url": "https://api.github.com/users/gansel51"
} | [
{
"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": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"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": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 25 | "2021-06-06T23:03:59Z" | "2021-06-16T23:08:03Z" | "2021-06-16T23:07:45Z" | CONTRIBUTOR | null | - [x] closes #41839
- [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
Screenshot below for updated docs
<img width="558" alt="Screen Shot 2021-06-06 at 7 03 23 PM" src="https://user-images.githubusercontent.com/59709552/120942916-e53bf400-c6f9-11eb-96bc-d16dc852f45c.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/41844/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41844/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41844.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41844",
"merged_at": "2021-06-16T23:07:45Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/41844.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41844"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/41845 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41845/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41845/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41845/events | https://github.com/pandas-dev/pandas/pull/41845 | 913,042,785 | MDExOlB1bGxSZXF1ZXN0NjYzMTI3NjYy | 41,845 | docstrings: typos, clarity | {
"avatar_url": "https://avatars.githubusercontent.com/u/1747497?v=4",
"events_url": "https://api.github.com/users/stragu/events{/privacy}",
"followers_url": "https://api.github.com/users/stragu/followers",
"following_url": "https://api.github.com/users/stragu/following{/other_user}",
"gists_url": "https://api.github.com/users/stragu/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/stragu",
"id": 1747497,
"login": "stragu",
"node_id": "MDQ6VXNlcjE3NDc0OTc=",
"organizations_url": "https://api.github.com/users/stragu/orgs",
"received_events_url": "https://api.github.com/users/stragu/received_events",
"repos_url": "https://api.github.com/users/stragu/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/stragu/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/stragu/subscriptions",
"type": "User",
"url": "https://api.github.com/users/stragu"
} | [
{
"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": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"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": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 2 | "2021-06-07T02:59:49Z" | "2021-06-08T12:15:28Z" | "2021-06-08T12:15:28Z" | CONTRIBUTOR | null | Minor changes only in docstrings: capitalisation, hyphenation, "indexes" -> "indices", typos.
- [ ] 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
Apologies for not testing, as the changes are minor and only affect docstrings.
No `whatsnew` entry either because minor. | {
"+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/41845/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41845/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41845.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41845",
"merged_at": "2021-06-08T12:15:28Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/41845.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41845"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/41846 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41846/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41846/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41846/events | https://github.com/pandas-dev/pandas/pull/41846 | 913,090,148 | MDExOlB1bGxSZXF1ZXN0NjYzMTY3MTI1 | 41,846 | BUG: DataFrame.at with CategoricalIndex | {
"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": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"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": "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-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"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": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 14 | "2021-06-07T04:59:42Z" | "2021-06-16T00:29:37Z" | "2021-06-16T00:03:29Z" | MEMBER | null | - [ ] closes #xxxx
- [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/41846/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41846/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41846.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41846",
"merged_at": "2021-06-16T00:03:29Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/41846.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41846"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/41847 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41847/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41847/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41847/events | https://github.com/pandas-dev/pandas/issues/41847 | 913,115,674 | MDU6SXNzdWU5MTMxMTU2NzQ= | 41,847 | BUG: Unable to create DateOffset from two dates | {
"avatar_url": "https://avatars.githubusercontent.com/u/55477181?v=4",
"events_url": "https://api.github.com/users/davidwales/events{/privacy}",
"followers_url": "https://api.github.com/users/davidwales/followers",
"following_url": "https://api.github.com/users/davidwales/following{/other_user}",
"gists_url": "https://api.github.com/users/davidwales/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/davidwales",
"id": 55477181,
"login": "davidwales",
"node_id": "MDQ6VXNlcjU1NDc3MTgx",
"organizations_url": "https://api.github.com/users/davidwales/orgs",
"received_events_url": "https://api.github.com/users/davidwales/received_events",
"repos_url": "https://api.github.com/users/davidwales/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/davidwales/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/davidwales/subscriptions",
"type": "User",
"url": "https://api.github.com/users/davidwales"
} | [
{
"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": "0052cc",
"default": false,
"description": "DateOffsets",
"id": 53181044,
"name": "Frequency",
"node_id": "MDU6TGFiZWw1MzE4MTA0NA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Frequency"
}
] | 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"
} | 6 | "2021-06-07T05:38:29Z" | "2021-07-11T19:37:47Z" | "2021-07-11T19:37:47Z" | 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.
---
#### Code Sample, a copy-pastable example
I'm trying to replicate the behaviour of `dateutil.relativedelta.relativedelta` using pandas `DateOffset`.
With regular Python + dateutil, I would do this:
```python
In [1]: from datetime import date
In [2]: from dateutil.relativedelta import relativedelta
In [3]: date_of_birth = date(1992, 1, 1)
In [4]: today = date(2021, 6, 7)
In [5]: relativedelta(today, date_of_birth)
Out[5]: relativedelta(years=+29, months=+5, days=+6)
```
However, when I try to do the same with `DateOffset`, I get an error:
``` python
In [1]: import pandas as pd
In [2]: df = pd.DataFrame({'date_of_birth': pd.to_datetime(['1992-01-01', '1994-03-18']), 'today': date.today()})
In [3]: df
Out[3]:
date_of_birth today
0 1992-01-01 2021-06-07
1 1994-03-18 2021-06-07
In [4]: pd.tseries.offsets.DateOffset(df['today'], df['date_of_birth'])
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
pandas\_libs\tslibs\offsets.pyx in pandas._libs.tslibs.offsets.BaseOffset._validate_n()
c:\users\dwales\.local\pipx\venvs\jupyterlab\lib\site-packages\pandas\core\series.py in wrapper(self)
140 return converter(self.iloc[0])
--> 141 raise TypeError(f"cannot convert the series to {converter}")
142
TypeError: cannot convert the series to <class 'int'>
During handling of the above exception, another exception occurred:
TypeError Traceback (most recent call last)
<ipython-input-36-429217dd8eab> in <module>
----> 1 pd.tseries.offsets.DateOffset(df['today'], df['date_of_birth'])
pandas\_libs\tslibs\offsets.pyx in pandas._libs.tslibs.offsets.RelativeDeltaOffset.__init__()
pandas\_libs\tslibs\offsets.pyx in pandas._libs.tslibs.offsets.BaseOffset.__init__()
pandas\_libs\tslibs\offsets.pyx in pandas._libs.tslibs.offsets.BaseOffset._validate_n()
TypeError: `n` argument must be an integer, got <class 'pandas.core.series.Series'>
```
#### Problem description
This is confusing to me, because the docs for `DateOffset` say:
> Works exactly like relativedelta in terms of the keyword args you pass in
I'm guessing the issue is that [`relativedelta` has two distinct modes of operation](https://dateutil.readthedocs.io/en/latest/relativedelta.html).
The first mode expects two datetime or date instances as positional arguments, and returns a `relativedelta` between them.
The second mode expects relative years, months, days, etc as keyword arguments and allows you to manually construct a required `relativedelta`.
So far as I can tell, `DateOffset` operates similarly to the second (keyword argument) mode of `relativedelta`. However, I can't find anything in pandas which operates like the first (positional argument) mode.
#### Expected Output
``` python
In [3]: df
Out[3]:
date_of_birth today
0 1992-01-01 2021-06-07
1 1994-03-18 2021-06-07
In [4]: pd.tseries.offsets.DateOffset(df['today'], df['date_of_birth'])
Out[4]:
0 <DateOffset: days=6, months=5, years=29>
1 <DateOffset: days=20, months=2, years=27>
dtype: object
```
#### Workaround
``` python
In [5]: df.apply(lambda df: relativedelta(df['today'], df['date_of_birth']), axis=1)
Out[5]:
0 relativedelta(years=+29, months=+5, days=+6)
1 relativedelta(years=+27, months=+2, days=+20)
dtype: object
```
If you have `NaT` values in your data, you will need to handle them:
``` python
df.apply(lambda df: relativedelta(df['today'], df['date_of_birth']) if (pd.notna(df['today']) & pd.notna(df['date_of_birth'])) else pd.NaT, axis=1)
```
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit : 2cb96529396d93b46abab7bbc73a208e708c642e
python : 3.9.0.final.0
python-bits : 64
OS : Windows
OS-release : 10
Version : 10.0.18362
machine : AMD64
processor : Intel64 Family 6 Model 78 Stepping 3, GenuineIntel
byteorder : little
LC_ALL : None
LANG : None
LOCALE : English_Australia.1252
pandas : 1.2.4
numpy : 1.19.4
pytz : 2020.4
dateutil : 2.8.1
pip : 21.1.2
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 : 2.11.2
IPython : 7.19.0
pandas_datareader: None
bs4 : None
bottleneck : None
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : 3.4.2
numexpr : None
odfpy : None
openpyxl : 3.0.7
pandas_gbq : None
pyarrow : 4.0.1
pyxlsb : None
s3fs : None
scipy : None
sqlalchemy : 1.4.17
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/41847/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41847/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/41848 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41848/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41848/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41848/events | https://github.com/pandas-dev/pandas/issues/41848 | 913,146,594 | MDU6SXNzdWU5MTMxNDY1OTQ= | 41,848 | ENH: Specify how pandas infers dtype on objects | {
"avatar_url": "https://avatars.githubusercontent.com/u/36188368?v=4",
"events_url": "https://api.github.com/users/mocquin/events{/privacy}",
"followers_url": "https://api.github.com/users/mocquin/followers",
"following_url": "https://api.github.com/users/mocquin/following{/other_user}",
"gists_url": "https://api.github.com/users/mocquin/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mocquin",
"id": 36188368,
"login": "mocquin",
"node_id": "MDQ6VXNlcjM2MTg4MzY4",
"organizations_url": "https://api.github.com/users/mocquin/orgs",
"received_events_url": "https://api.github.com/users/mocquin/received_events",
"repos_url": "https://api.github.com/users/mocquin/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mocquin/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mocquin/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mocquin"
} | [
{
"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"
},
{
"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"
}
] | open | false | null | [] | null | 3 | "2021-06-07T06:18:40Z" | "2021-06-07T16:38:17Z" | null | NONE | null | Hello there
#### 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 [...]"]
Context : I am creating a package to handle physical units (yes, another one), and I started working on the pandas interface implementation. I looked into pandas extension page, as well as what `pint` did with `pint-pandas`. I am pretty satisfied with the result, except for one thing : When creating pandas objects (Series of DataFrame), I have to explicitly specify what dtype (using my DtypeExtension for my "Quantity" class) pandas should use to cast my Quantity object to the correspond QuantityArrayExtension. Categorical objects kinda exhibit the same problem :
```python
# create indeed a Categorical dtype
s = pd.Series(["a", "b", "c", "a"], dtype="category")
# use "object" as dtype
pd.Series(["a", "b", "c", "a"])
from physipy import m # import the "meter" object
from physipy import QuantityDtype # import the DtypeExtension for Quantity object
# create indeed a QuantityDtype serie
s = pd.Series([1, 2, 3]*m, dtype=DtypeExtension)
# casts into integers, dropping the "unit" (because bypasses my object by accessing its "array" value directly
pd.Series([1, 2, 3]*m)
```
Now, I understand that for the Categorical example, it is not obvious what kind of dtype pandas should use, but for my custom class, I would like to be able to tell pandas how to behave.
#### Describe the solution you'd like
I would expect some interface like this :
```python
import pandas as pd
from physipy import Quantity, QuantityDtype
# tell pandas to use QuantityDtype when a Quantity object is passed
pd.dtype_lut[Quantity] = QuantityDtype
# then a series can be created directly
my_quantity_object = [1, 2, 3]*m # this is a Quantity object
s = pd.Series(my_quantity_object)) # note the absence of dtype specification
```
Here, pandas admits it doesn't know the passed object's type, and so check in its `dtype_lut` if a corresponding dtype is set.
Another interface would be to add a method, pandas-specifically named, to Quantity that does this look-up table :
```python
# into my Quantity object
class Quantity:
....
def pd_dtype(self):
return QuantityDtype
```
so that when pandas encounters an unknown object type, it first tries to get its Dtype using "obj.pd_type()"
Cheers
| {
"+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/41848/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41848/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/41849 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41849/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41849/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41849/events | https://github.com/pandas-dev/pandas/pull/41849 | 913,221,202 | MDExOlB1bGxSZXF1ZXN0NjYzMjgzNjIy | 41,849 | ⬆️ UPGRADE: Autoupdate pre-commit config | {
"avatar_url": "https://avatars.githubusercontent.com/in/15368?v=4",
"events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}",
"followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers",
"following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}",
"gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/apps/github-actions",
"id": 41898282,
"login": "github-actions[bot]",
"node_id": "MDM6Qm90NDE4OTgyODI=",
"organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs",
"received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events",
"repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions",
"type": "Bot",
"url": "https://api.github.com/users/github-actions%5Bbot%5D"
} | [] | closed | false | null | [] | null | 1 | "2021-06-07T07:34:39Z" | "2021-06-14T09:16:28Z" | "2021-06-07T07:38:39Z" | CONTRIBUTOR | null | <!-- START pr-commits -->
<!-- END pr-commits -->
## Base PullRequest
default branch (https://github.com/pandas-dev/pandas/tree/master)
## Command results
<details>
<summary>Details: </summary>
</details>
## Changed files
<details>
<summary>Changed file: </summary>
</details>
<hr>
[:octocat: Repo](https://github.com/technote-space/create-pr-action) | [:memo: Issues](https://github.com/technote-space/create-pr-action/issues) | [:department_store: Marketplace](https://github.com/marketplace/actions/create-pr-action) | {
"+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/41849/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41849/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41849.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41849",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/41849.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41849"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/41850 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41850/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41850/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41850/events | https://github.com/pandas-dev/pandas/pull/41850 | 913,403,068 | MDExOlB1bGxSZXF1ZXN0NjYzNDQwMjQ5 | 41,850 | DOC: sync doc/source/whatsnew/v1.2.5.rst with master | {
"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"
} | [
{
"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": "2021-06-22T09:35:40Z",
"closed_issues": 50,
"created_at": "2021-04-12T08:10: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.2.x",
"due_on": "2021-05-10T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/85",
"id": 6650632,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/85/labels",
"node_id": "MDk6TWlsZXN0b25lNjY1MDYzMg==",
"number": 85,
"open_issues": 0,
"state": "closed",
"title": "1.2.5",
"updated_at": "2021-06-23T08:13:15Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/85"
} | 0 | "2021-06-07T10:39:29Z" | "2021-06-07T12:22:37Z" | "2021-06-07T12:22:33Z" | MEMBER | 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/41850/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41850/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41850.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41850",
"merged_at": "2021-06-07T12:22:33Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/41850.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41850"
} |
|
https://api.github.com/repos/pandas-dev/pandas/issues/41851 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41851/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41851/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41851/events | https://github.com/pandas-dev/pandas/pull/41851 | 913,449,578 | MDExOlB1bGxSZXF1ZXN0NjYzNDgwMjQ4 | 41,851 | DOC: remove versionadded/changed:: 0.24 | {
"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"
} | [
{
"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": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"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": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 1 | "2021-06-07T11:31:06Z" | "2021-06-09T10:33:33Z" | "2021-06-08T20:50:15Z" | MEMBER | null | release Jan 25, 2019 https://github.com/pandas-dev/pandas/releases/tag/v0.24.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/41851/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41851/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41851.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41851",
"merged_at": "2021-06-08T20:50:14Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/41851.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41851"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/41852 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41852/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41852/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41852/events | https://github.com/pandas-dev/pandas/pull/41852 | 913,487,621 | MDExOlB1bGxSZXF1ZXN0NjYzNTEyNDIw | 41,852 | DOC/CLN versionadded etc for 1.3 -> 1.3.0 | {
"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"
} | [
{
"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": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"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": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 0 | "2021-06-07T12:19:36Z" | "2021-06-08T12:16:28Z" | "2021-06-08T12:16:23Z" | MEMBER | 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/41852/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41852/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41852.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41852",
"merged_at": "2021-06-08T12:16:23Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/41852.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41852"
} |
|
https://api.github.com/repos/pandas-dev/pandas/issues/41853 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41853/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41853/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41853/events | https://github.com/pandas-dev/pandas/pull/41853 | 913,659,822 | MDExOlB1bGxSZXF1ZXN0NjYzNjU4Mjkw | 41,853 | REF: split out grouped masked cummin/max algo | {
"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": "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": "729FCF",
"default": false,
"description": null,
"id": 233160,
"name": "Groupby",
"node_id": "MDU6TGFiZWwyMzMxNjA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Groupby"
},
{
"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-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"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": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 3 | "2021-06-07T15:10:59Z" | "2021-06-09T18:26:34Z" | "2021-06-09T18:17:56Z" | MEMBER | null | No user-facing change here, but I think makes logic clearer and future changes easier to understand
Benchmarks look unaffected:
<details>
```
before after ratio
[3f67dc33] [51f8f9c8]
<master> <masked_cummin_ref>
17.0±2ms 16.3±2ms 0.96 groupby.CumminMax.time_frame_transform('Float64', 'cummax')
17.7±2ms 18.4±2ms 1.04 groupby.CumminMax.time_frame_transform('Float64', 'cummin')
20.8±3ms 16.9±0.3ms ~0.81 groupby.CumminMax.time_frame_transform('Int64', 'cummax')
20.7±3ms 18.2±3ms ~0.88 groupby.CumminMax.time_frame_transform('Int64', 'cummin')
15.7±2ms 13.0±0.3ms ~0.83 groupby.CumminMax.time_frame_transform('float64', 'cummax')
15.5±0.7ms 13.6±0.7ms ~0.88 groupby.CumminMax.time_frame_transform('float64', 'cummin')
29.8±0.7ms 28.0±0.4ms 0.94 groupby.CumminMax.time_frame_transform('int64', 'cummax')
29.9±1ms 30.0±2ms 1.00 groupby.CumminMax.time_frame_transform('int64', 'cummin')
19.2±2ms 16.9±3ms ~0.88 groupby.CumminMax.time_frame_transform_many_nulls('Float64', 'cummax')
22.6±2ms 15.6±2ms ~0.69 groupby.CumminMax.time_frame_transform_many_nulls('Float64', 'cummin')
15.7±3ms 19.3±3ms ~1.23 groupby.CumminMax.time_frame_transform_many_nulls('Int64', 'cummax')
19.5±2ms 14.7±1ms ~0.75 groupby.CumminMax.time_frame_transform_many_nulls('Int64', 'cummin')
14.5±2ms 11.4±0.8ms ~0.79 groupby.CumminMax.time_frame_transform_many_nulls('float64', 'cummax')
13.2±1ms 12.4±0.2ms 0.94 groupby.CumminMax.time_frame_transform_many_nulls('float64', 'cummin')
14.2±1ms 13.1±0.1ms 0.92 groupby.CumminMax.time_frame_transform_many_nulls('int64', 'cummax')
14.1±0.5ms 13.4±0.4ms 0.95 groupby.CumminMax.time_frame_transform_many_nulls('int64', 'cummin')
```
</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/41853/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41853/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41853.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41853",
"merged_at": "2021-06-09T18:17:56Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/41853.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41853"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/41854 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41854/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41854/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41854/events | https://github.com/pandas-dev/pandas/pull/41854 | 913,687,725 | MDExOlB1bGxSZXF1ZXN0NjYzNjgyMzU2 | 41,854 | BUG/ENH: group cummin/max handle skipna | {
"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": "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"
},
{
"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": 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-06-07T15:38:49Z" | "2021-07-31T01:25:41Z" | "2021-07-31T00:58:17Z" | MEMBER | null | - [x] xref #34047
- [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
Built on #41853
Previously `skipna` was just ignored, so there was a behavior difference between cummin/max and other cumulative functions eg
```
>>> df = pd.DataFrame({"a": [1, np.nan, 1]})
>>> df.groupby([1, 1, 1]).cumsum(skipna=False)
a
0 1.0
1 NaN
2 NaN
>>> df.groupby([1, 1, 1]).cummax(skipna=False)
a
0 1.0
1 NaN
2 1.0
```
Benchmarks unaffected:
<details>
```
before after ratio
[3f67dc33] [3c869ce4]
<master> <group_cummin_max_skipna>
21.9±1ms 21.1±2ms 0.96 groupby.CumminMax.time_frame_transform('Float64', 'cummax')
22.8±2ms 23.4±2ms 1.02 groupby.CumminMax.time_frame_transform('Float64', 'cummin')
19.3±4ms 18.1±1ms 0.94 groupby.CumminMax.time_frame_transform('Int64', 'cummax')
26.3±2ms 22.2±3ms ~0.84 groupby.CumminMax.time_frame_transform('Int64', 'cummin')
19.7±0.7ms 13.7±1ms ~0.70 groupby.CumminMax.time_frame_transform('float64', 'cummax')
16.4±1ms 13.9±0.2ms ~0.84 groupby.CumminMax.time_frame_transform('float64', 'cummin')
34.6±3ms 31.1±4ms ~0.90 groupby.CumminMax.time_frame_transform('int64', 'cummax')
30.5±0.6ms 29.1±0.4ms 0.95 groupby.CumminMax.time_frame_transform('int64', 'cummin')
23.3±2ms 21.0±3ms ~0.90 groupby.CumminMax.time_frame_transform_many_nulls('Float64', 'cummax')
21.1±3ms 21.3±3ms 1.01 groupby.CumminMax.time_frame_transform_many_nulls('Float64', 'cummin')
21.1±1ms 22.2±2ms 1.06 groupby.CumminMax.time_frame_transform_many_nulls('Int64', 'cummax')
19.7±2ms 20.1±3ms 1.02 groupby.CumminMax.time_frame_transform_many_nulls('Int64', 'cummin')
16.1±0.8ms 13.6±1ms ~0.85 groupby.CumminMax.time_frame_transform_many_nulls('float64', 'cummax')
13.9±1ms 14.0±0.8ms 1.01 groupby.CumminMax.time_frame_transform_many_nulls('float64', 'cummin')
15.8±1ms 14.2±0.2ms ~0.90 groupby.CumminMax.time_frame_transform_many_nulls('int64', 'cummax')
15.0±0.6ms 16.6±0.9ms ~1.11 groupby.CumminMax.time_frame_transform_many_nulls('int64', 'cummin')
```
</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/41854/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41854/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41854.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41854",
"merged_at": "2021-07-31T00:58:17Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/41854.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41854"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/41855 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41855/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41855/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41855/events | https://github.com/pandas-dev/pandas/issues/41855 | 913,731,175 | MDU6SXNzdWU5MTM3MzExNzU= | 41,855 | pandas.notnull documentation showing code examples from pandas.notna | {
"avatar_url": "https://avatars.githubusercontent.com/u/24850405?v=4",
"events_url": "https://api.github.com/users/jenkc/events{/privacy}",
"followers_url": "https://api.github.com/users/jenkc/followers",
"following_url": "https://api.github.com/users/jenkc/following{/other_user}",
"gists_url": "https://api.github.com/users/jenkc/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jenkc",
"id": 24850405,
"login": "jenkc",
"node_id": "MDQ6VXNlcjI0ODUwNDA1",
"organizations_url": "https://api.github.com/users/jenkc/orgs",
"received_events_url": "https://api.github.com/users/jenkc/received_events",
"repos_url": "https://api.github.com/users/jenkc/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jenkc/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jenkc/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jenkc"
} | [
{
"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": "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"
}
] | open | false | {
"avatar_url": "https://avatars.githubusercontent.com/u/24741879?v=4",
"events_url": "https://api.github.com/users/koukyo1994/events{/privacy}",
"followers_url": "https://api.github.com/users/koukyo1994/followers",
"following_url": "https://api.github.com/users/koukyo1994/following{/other_user}",
"gists_url": "https://api.github.com/users/koukyo1994/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/koukyo1994",
"id": 24741879,
"login": "koukyo1994",
"node_id": "MDQ6VXNlcjI0NzQxODc5",
"organizations_url": "https://api.github.com/users/koukyo1994/orgs",
"received_events_url": "https://api.github.com/users/koukyo1994/received_events",
"repos_url": "https://api.github.com/users/koukyo1994/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/koukyo1994/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/koukyo1994/subscriptions",
"type": "User",
"url": "https://api.github.com/users/koukyo1994"
} | [
{
"avatar_url": "https://avatars.githubusercontent.com/u/24741879?v=4",
"events_url": "https://api.github.com/users/koukyo1994/events{/privacy}",
"followers_url": "https://api.github.com/users/koukyo1994/followers",
"following_url": "https://api.github.com/users/koukyo1994/following{/other_user}",
"gists_url": "https://api.github.com/users/koukyo1994/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/koukyo1994",
"id": 24741879,
"login": "koukyo1994",
"node_id": "MDQ6VXNlcjI0NzQxODc5",
"organizations_url": "https://api.github.com/users/koukyo1994/orgs",
"received_events_url": "https://api.github.com/users/koukyo1994/received_events",
"repos_url": "https://api.github.com/users/koukyo1994/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/koukyo1994/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/koukyo1994/subscriptions",
"type": "User",
"url": "https://api.github.com/users/koukyo1994"
}
] | {
"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"
} | 4 | "2021-06-07T16:28:36Z" | "2021-07-09T12:19:01Z" | null | NONE | null | The code examples are from the previous page in the documentation. Need examples for using notnull please.
Thanks!
https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.notnull.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/41855/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41855/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/41856 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41856/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41856/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41856/events | https://github.com/pandas-dev/pandas/issues/41856 | 913,805,034 | MDU6SXNzdWU5MTM4MDUwMzQ= | 41,856 | API: astype("string") behavior | {
"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"
} | [
{
"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": "AD7FA8",
"default": false,
"description": null,
"id": 35818298,
"name": "API Design",
"node_id": "MDU6TGFiZWwzNTgxODI5OA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/API%20Design"
},
{
"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"
}
] | open | false | null | [] | null | 0 | "2021-06-07T17:54:45Z" | "2021-08-21T02:21:46Z" | null | MEMBER | null | in https://github.com/pandas-dev/pandas/pull/39908#issuecomment-855889758 @jorisvandenbossche wrote
---
Bringing the "deferred" storage mode lookup for `StringDtype` discussion (originally here: https://github.com/pandas-dev/pandas/pull/39908#discussion_r585573328) in the main thread, and trying to recap.
Currently, doing `pd.StringDtype()` (without specifying the storage), will already look up the option. In the default case, you get:
```python
>>> pd.StringDtype().storage
'python'
```
which also means that `pandas_dtype()` already "fully initializes" the string dtype:
```python
>>> pd.api.types.pandas_dtype("string")
string[python]
```
As a consequence, doing `astype("string")` will actually convert the values if your string dtype doesn't match the globab setting:
```python
>>> s = pd.Series(['a', 'b'], dtype=pd.StringDtype(storage="pyarrow"))
>>> s.dtype
string[pyarrow]
>>> s.astype("string").dtype
string[python]
```
While I think it could make sense for `.astype("string")` to mean: "ensure I have *a* string dtype", and thus don't convert to another storage backend if I already had a string dtype to start with.
We do something similar for CategoricalDtype (`"category"` means a categorical dtype with no categories, but `astype("category")` does not remove your categories, it preserves any existing categorical dtype as is).
We could still have the `astype("string")` behave in the way I suggest by special casing this in the `astype` implementations (as suggested in https://github.com/pandas-dev/pandas/pull/39908#discussion_r643867763)), but I think that's something we would ideally avoid (any `astype` implementation accepting string dtype values as input would need to handle this case?) | {
"+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/41856/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41856/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/41857 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41857/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41857/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41857/events | https://github.com/pandas-dev/pandas/pull/41857 | 913,902,596 | MDExOlB1bGxSZXF1ZXN0NjYzODY4NjYz | 41,857 | PERF: nancorr_spearman | {
"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": "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": "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-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"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": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 9 | "2021-06-07T19:50:36Z" | "2021-06-09T00:39:38Z" | "2021-06-09T00:32:18Z" | MEMBER | null | - [x] xref #40956
- [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
Think a lot more can be squeezed out, so not closing the issue. Initial results:
<details>
```
before after ratio
[dae5c597] [d60902af]
<master> <perf/corr>
69M 69.7M 1.01 stat_ops.Correlation.peakmem_corr_wide('spearman')
1.47±0.02ms 1.60±0.6ms 1.09 stat_ops.Correlation.time_corr('spearman')
690±20μs 629±90μs 0.91 stat_ops.Correlation.time_corr_series('spearman')
- 30.4±1ms 13.9±0.4ms 0.46 stat_ops.Correlation.time_corr_wide('spearman')
589±60ms 528±20ms ~0.90 stat_ops.Correlation.time_corr_wide_nans('spearman')
12.0±2ms 9.02±0.9ms ~0.75 stat_ops.Correlation.time_corrwith_cols('spearman')
253±10ms 241±4ms 0.95 stat_ops.Correlation.time_corrwith_rows('spearman')
```
</details>
This speedup factor increases the larger the frame since more time gets spent in the ~O(N^2K) algo. With the nogil added, we could also explore using `prange` on the outer loop and exposing some new `kwarg` to allow cython parallelism. | {
"+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/41857/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41857/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41857.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41857",
"merged_at": "2021-06-09T00:32:18Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/41857.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41857"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/41858 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41858/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41858/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41858/events | https://github.com/pandas-dev/pandas/pull/41858 | 913,979,853 | MDExOlB1bGxSZXF1ZXN0NjYzOTM0OTk0 | 41,858 | BUG: groupby.shift returns different columns when fill_value is specified | {
"avatar_url": "https://avatars.githubusercontent.com/u/3813175?v=4",
"events_url": "https://api.github.com/users/smithto1/events{/privacy}",
"followers_url": "https://api.github.com/users/smithto1/followers",
"following_url": "https://api.github.com/users/smithto1/following{/other_user}",
"gists_url": "https://api.github.com/users/smithto1/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/smithto1",
"id": 3813175,
"login": "smithto1",
"node_id": "MDQ6VXNlcjM4MTMxNzU=",
"organizations_url": "https://api.github.com/users/smithto1/orgs",
"received_events_url": "https://api.github.com/users/smithto1/received_events",
"repos_url": "https://api.github.com/users/smithto1/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/smithto1/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/smithto1/subscriptions",
"type": "User",
"url": "https://api.github.com/users/smithto1"
} | [
{
"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": "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"
} | 12 | "2021-06-07T21:45:10Z" | "2021-07-28T22:55:27Z" | "2021-07-28T22:55:13Z" | MEMBER | null | - [x] closes #41556
- [x] closes #26615
- [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
This fixes the minimal reproducing examples from the original bug report #41556.
**With master**, specifying `fill_value` causes the index columns to be returned and to include the `fill_value` in the grouping columns.
```
In [4]: import pandas as pd
...:
...: df = pd.DataFrame({'a': [2, 1, 2, 1], 'b': ['x', 'x', 'y', 'y']})
...:
...: df.groupby('a').shift(1)
Out[4]:
b
0 NaN
1 NaN
2 x
3 x
In [5]: df.groupby('a').shift(1, fill_value='fill')
Out[5]:
a b
0 fill fill
1 fill fill
2 2 x
3 1 x
```
**With this PR**, only the value columns are returned in both cases, and the fill is applied correctly.
```
In [1]: import pandas as pd
...:
...: # On master, using fill_value causes the index columns to be returned
...: df = pd.DataFrame({'a': [2, 1, 2, 1], 'b': ['x', 'x', 'y', 'y']})
...:
...: df.groupby('a').shift(1)
Out[1]:
b
0 NaN
1 NaN
2 x
3 x
In [2]: df.groupby('a').shift(1, fill_value='fill')
Out[2]:
b
0 fill
1 fill
2 x
3 x
```
On master, if `fill_value=None` then `_get_cythonized_result` was used. But if `fill_value` was specified, then `self.apply` was used, because `_get_cythonized_result` couldn't take the `fill_value`. I've updated `_get_cythonized_result` so it can handle the `fill_value` itself. This means `Groupby.shift` follows the same code path and returns the same structure of output, whether or not `fill_value` is specified.
**Test**
The bug reported in the original issue should have been caught by an existing test, except that the existing test extracts the values columns ( `[['Z']]` ), before doing its comparison to the expected output. This was hiding the fact that the structure of the result depended on `fill_value` being specified.
https://github.com/pandas-dev/pandas/blob/1.2.x/pandas/tests/groupby/test_groupby_shift_diff.py#L52
Removing the extraction of the data column ( `[['Z']]` ) means we now have a test that catches the bug reported in the original issue. (The test fails on master, but passes on this 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/41858/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41858/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41858.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41858",
"merged_at": "2021-07-28T22:55:13Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/41858.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41858"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/41859 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41859/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41859/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41859/events | https://github.com/pandas-dev/pandas/pull/41859 | 914,014,443 | MDExOlB1bGxSZXF1ZXN0NjYzOTY1Mjc3 | 41,859 | TST: add ASV check for groupby with uint64 col | {
"avatar_url": "https://avatars.githubusercontent.com/u/3813175?v=4",
"events_url": "https://api.github.com/users/smithto1/events{/privacy}",
"followers_url": "https://api.github.com/users/smithto1/followers",
"following_url": "https://api.github.com/users/smithto1/following{/other_user}",
"gists_url": "https://api.github.com/users/smithto1/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/smithto1",
"id": 3813175,
"login": "smithto1",
"node_id": "MDQ6VXNlcjM4MTMxNzU=",
"organizations_url": "https://api.github.com/users/smithto1/orgs",
"received_events_url": "https://api.github.com/users/smithto1/received_events",
"repos_url": "https://api.github.com/users/smithto1/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/smithto1/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/smithto1/subscriptions",
"type": "User",
"url": "https://api.github.com/users/smithto1"
} | [
{
"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": "ae68cc",
"default": false,
"description": "Performance (ASV) benchmarks",
"id": 732775912,
"name": "Benchmark",
"node_id": "MDU6TGFiZWw3MzI3NzU5MTI=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Benchmark"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"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": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 3 | "2021-06-07T22:45:35Z" | "2021-06-08T20:49:55Z" | "2021-06-08T20:49:51Z" | MEMBER | null | - [x] closes #28122
- [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
The performance regression reported in the original issue was fixed somewhere between 0.25.1 and 1.2.4. This PR just adds an ASV test to monitor for the same regression in the future.
| {
"+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/41859/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41859/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41859.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41859",
"merged_at": "2021-06-08T20:49:51Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/41859.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41859"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/41860 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41860/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41860/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41860/events | https://github.com/pandas-dev/pandas/pull/41860 | 914,087,021 | MDExOlB1bGxSZXF1ZXN0NjY0MDMxMzE2 | 41,860 | TST/REF: split out group min/max tests | {
"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": "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": "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": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"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": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 0 | "2021-06-08T00:31:41Z" | "2021-06-08T21:07:08Z" | "2021-06-08T20:47:13Z" | MEMBER | null | Just a move | {
"+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/41860/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41860/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41860.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41860",
"merged_at": "2021-06-08T20:47:13Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/41860.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41860"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/41861 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41861/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41861/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41861/events | https://github.com/pandas-dev/pandas/pull/41861 | 914,110,352 | MDExOlB1bGxSZXF1ZXN0NjY0MDUzMjQx | 41,861 | PERF: is_bool_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": "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": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"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": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 1 | "2021-06-08T00:53:14Z" | "2021-06-08T20:48:20Z" | "2021-06-08T20:45:33Z" | MEMBER | null | Besides avoiding an array allocation, thus avoids the np.asarray call that was one of the main offenders in #41632 | {
"+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/41861/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41861/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41861.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41861",
"merged_at": "2021-06-08T20:45:33Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/41861.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41861"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/41862 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41862/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41862/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41862/events | https://github.com/pandas-dev/pandas/pull/41862 | 914,178,186 | MDExOlB1bGxSZXF1ZXN0NjY0MTE0MzY1 | 41,862 | API: make construct_array_type non-optional | {
"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": "AD7FA8",
"default": false,
"description": null,
"id": 35818298,
"name": "API Design",
"node_id": "MDU6TGFiZWwzNTgxODI5OA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/API%20Design"
},
{
"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-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"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": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 3 | "2021-06-08T02:24:24Z" | "2021-06-08T22:31:31Z" | "2021-06-08T22:05:59Z" | MEMBER | null | - [x] closes #24860
- [ ] 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/41862/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41862/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41862.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41862",
"merged_at": "2021-06-08T22:05:59Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/41862.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41862"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/41863 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41863/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41863/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41863/events | https://github.com/pandas-dev/pandas/pull/41863 | 914,188,518 | MDExOlB1bGxSZXF1ZXN0NjY0MTIzOTcw | 41,863 | BUG: IntervalIndex is_monotonic, get_loc, get_indexer_for, contains with np.nan | {
"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": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "009800",
"default": false,
"description": "Interval data type",
"id": 150096370,
"name": "Interval",
"node_id": "MDU6TGFiZWwxNTAwOTYzNzA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Interval"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"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": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 2 | "2021-06-08T02:33:50Z" | "2021-06-10T16:01:16Z" | "2021-06-10T15:52:25Z" | MEMBER | null | - [x] closes #41831
- [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/41863/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41863/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41863.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41863",
"merged_at": "2021-06-10T15:52:25Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/41863.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41863"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/41864 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41864/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41864/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41864/events | https://github.com/pandas-dev/pandas/pull/41864 | 914,237,758 | MDExOlB1bGxSZXF1ZXN0NjY0MTY5OTMz | 41,864 | Clean up ujson initialization | {
"avatar_url": "https://avatars.githubusercontent.com/u/609873?v=4",
"events_url": "https://api.github.com/users/WillAyd/events{/privacy}",
"followers_url": "https://api.github.com/users/WillAyd/followers",
"following_url": "https://api.github.com/users/WillAyd/following{/other_user}",
"gists_url": "https://api.github.com/users/WillAyd/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/WillAyd",
"id": 609873,
"login": "WillAyd",
"node_id": "MDQ6VXNlcjYwOTg3Mw==",
"organizations_url": "https://api.github.com/users/WillAyd/orgs",
"received_events_url": "https://api.github.com/users/WillAyd/received_events",
"repos_url": "https://api.github.com/users/WillAyd/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/WillAyd/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/WillAyd/subscriptions",
"type": "User",
"url": "https://api.github.com/users/WillAyd"
} | [
{
"color": "207de5",
"default": false,
"description": "read_json, to_json, json_normalize",
"id": 49379259,
"name": "IO JSON",
"node_id": "MDU6TGFiZWw0OTM3OTI1OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20JSON"
},
{
"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": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"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": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 1 | "2021-06-08T03:17:34Z" | "2021-06-08T20:48:42Z" | "2021-06-08T20:48:37Z" | MEMBER | null | The way we do this now is a little wonky as we are declaring the C API in the objToJSON file for re-use by JSONToObj; this happens to work because we call the objToJSON initialization function in the main extension module, but it's a bit funky and prone to errors on refactor
More background info:
https://numpy.org/doc/stable/reference/c-api/array.html#importing-the-api
https://stackoverflow.com/a/35362918/621736 | {
"+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/41864/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41864/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41864.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41864",
"merged_at": "2021-06-08T20:48:37Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/41864.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41864"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/41865 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41865/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41865/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41865/events | https://github.com/pandas-dev/pandas/issues/41865 | 914,243,317 | MDU6SXNzdWU5MTQyNDMzMTc= | 41,865 | Timezone specification like +HHMM without colon gives incorrect minutes | {
"avatar_url": "https://avatars.githubusercontent.com/u/1203825?v=4",
"events_url": "https://api.github.com/users/huonw/events{/privacy}",
"followers_url": "https://api.github.com/users/huonw/followers",
"following_url": "https://api.github.com/users/huonw/following{/other_user}",
"gists_url": "https://api.github.com/users/huonw/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/huonw",
"id": 1203825,
"login": "huonw",
"node_id": "MDQ6VXNlcjEyMDM4MjU=",
"organizations_url": "https://api.github.com/users/huonw/orgs",
"received_events_url": "https://api.github.com/users/huonw/received_events",
"repos_url": "https://api.github.com/users/huonw/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/huonw/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/huonw/subscriptions",
"type": "User",
"url": "https://api.github.com/users/huonw"
} | [
{
"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": "Timezone data dtype",
"id": 60458168,
"name": "Timezones",
"node_id": "MDU6TGFiZWw2MDQ1ODE2OA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Timezones"
}
] | open | false | null | [] | null | 0 | "2021-06-08T03:22:56Z" | "2021-08-21T02:22: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.
---
**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
# good:
# Australia/Adelaide
print(pd.Timestamp(0, tz="+09:30")) # 1970-01-01 09:30:00+09:30
# Asia/Kathmandu
print(pd.Timestamp(0, tz="+05:45")) # 1970-01-01 05:45:00+05:45
# bad:
print(pd.Timestamp(0, tz="+0930")) # 1970-01-01 09:00:00+09:00
print(pd.Timestamp(0, tz="+0545")) # 1970-01-01 05:05:00+05:05
# bonus:
# pd.Timestamp(0, tz="+09") # ValueError: invalid literal for int() with base 10: '+'
pd.show_versions()
```
#### Problem description
A timezone specified as an explicit offset without a colon (`[+-]HHMM`) is passed incorrectly through args like `Timestamp(tz=...)` and functions like `tz_localize`. In particular, it looks like the code assumes that any string that starts with `+` or `-` will be formatted like `[+-]HH:MM` without validation (and similarly `UTC[+-]HH:MM`):
https://github.com/pandas-dev/pandas/blob/dae5c5972aa539dcd5ba633e8d56735d61cfe7ae/pandas/_libs/tslibs/timezones.pyx#L125-L132
A timezone offset without a colon is apparently valid in ISO8601 https://en.wikipedia.org/wiki/ISO_8601#Time_offsets_from_UTC (it is not valid RFC3339, which requires a colon). `+HH` is also valid ISO8601, and that results in an exception (see "bonus" section in the example).
The lack of validation this also allows weird and wacky specifications, like `+09%30abcdef1234`, equivalent to `+09:30`.
#### Expected Output
The "bad" section should have the same output as the "good" section in the example, with the timezone passed through without losing the minutes details.
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit : 2cb96529396d93b46abab7bbc73a208e708c642e
python : 3.8.7.final.0
python-bits : 64
OS : Darwin
OS-release : 20.2.0
Version : Darwin Kernel Version 20.2.0: Wed Dec 2 20:40:21 PST 2020; root:xnu-7195.60.75~1/RELEASE_ARM64_T8101
machine : arm64
processor : arm
byteorder : little
LC_ALL : None
LANG : en_AU.UTF-8
LOCALE : en_AU.UTF-8
pandas : 1.2.4
numpy : 1.20.2
pytz : 2021.1
dateutil : 2.8.1
pip : 21.1.1
setuptools : 49.2.1
Cython : None
pytest : 6.1.2
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : 2.8.6 (dt dec pq3 ext lo64)
jinja2 : 2.11.3
IPython : 7.22.0
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 : 1.3.20
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/41865/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41865/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/41866 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41866/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41866/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41866/events | https://github.com/pandas-dev/pandas/pull/41866 | 914,452,646 | MDExOlB1bGxSZXF1ZXN0NjY0MzY2NjUz | 41,866 | ENH: add `environment`, e.g. "longtable", to `Styler.to_latex` | {
"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": "4E9A06",
"default": false,
"description": null,
"id": 76812,
"name": "Enhancement",
"node_id": "MDU6TGFiZWw3NjgxMg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Enhancement"
},
{
"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-06-08T07:07:18Z" | "2021-07-28T17:32:29Z" | "2021-07-28T01:15:43Z" | CONTRIBUTOR | null | checks an item off #41649
closes #37443
adds the longtable template, similar to DataFrame.to_latex.
also allows for a custom environment if \begin{table} should be replaced by \begin{figure} etc.
| {
"+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/41866/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41866/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41866.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41866",
"merged_at": "2021-07-28T01:15:42Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/41866.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41866"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/41867 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41867/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41867/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41867/events | https://github.com/pandas-dev/pandas/pull/41867 | 914,563,724 | MDExOlB1bGxSZXF1ZXN0NjY0NDY4Mjc3 | 41,867 | Update series.py | {
"avatar_url": "https://avatars.githubusercontent.com/u/57575138?v=4",
"events_url": "https://api.github.com/users/Omerdan03/events{/privacy}",
"followers_url": "https://api.github.com/users/Omerdan03/followers",
"following_url": "https://api.github.com/users/Omerdan03/following{/other_user}",
"gists_url": "https://api.github.com/users/Omerdan03/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Omerdan03",
"id": 57575138,
"login": "Omerdan03",
"node_id": "MDQ6VXNlcjU3NTc1MTM4",
"organizations_url": "https://api.github.com/users/Omerdan03/orgs",
"received_events_url": "https://api.github.com/users/Omerdan03/received_events",
"repos_url": "https://api.github.com/users/Omerdan03/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Omerdan03/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Omerdan03/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Omerdan03"
} | [] | closed | false | null | [] | null | 1 | "2021-06-08T08:21:39Z" | "2021-06-08T08:24:08Z" | "2021-06-08T08:24:08Z" | NONE | null | Added drop_duplicates_index function to base series object. very useful when working with time series.
- [ ] 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/41867/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41867/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41867.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41867",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/41867.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41867"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/41868 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41868/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41868/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41868/events | https://github.com/pandas-dev/pandas/pull/41868 | 914,574,151 | MDExOlB1bGxSZXF1ZXN0NjY0NDc3ODE5 | 41,868 | ENH: drop_duplicates_index function to base series object. | {
"avatar_url": "https://avatars.githubusercontent.com/u/57575138?v=4",
"events_url": "https://api.github.com/users/Omerdan03/events{/privacy}",
"followers_url": "https://api.github.com/users/Omerdan03/followers",
"following_url": "https://api.github.com/users/Omerdan03/following{/other_user}",
"gists_url": "https://api.github.com/users/Omerdan03/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Omerdan03",
"id": 57575138,
"login": "Omerdan03",
"node_id": "MDQ6VXNlcjU3NTc1MTM4",
"organizations_url": "https://api.github.com/users/Omerdan03/orgs",
"received_events_url": "https://api.github.com/users/Omerdan03/received_events",
"repos_url": "https://api.github.com/users/Omerdan03/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Omerdan03/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Omerdan03/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Omerdan03"
} | [
{
"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"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 2361,
"created_at": "2015-02-26T19:29:05Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/1020496?v=4",
"events_url": "https://api.github.com/users/jorisvandenbossche/events{/privacy}",
"followers_url": "https://api.github.com/users/jorisvandenbossche/followers",
"following_url": "https://api.github.com/users/jorisvandenbossche/following{/other_user}",
"gists_url": "https://api.github.com/users/jorisvandenbossche/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jorisvandenbossche",
"id": 1020496,
"login": "jorisvandenbossche",
"node_id": "MDQ6VXNlcjEwMjA0OTY=",
"organizations_url": "https://api.github.com/users/jorisvandenbossche/orgs",
"received_events_url": "https://api.github.com/users/jorisvandenbossche/received_events",
"repos_url": "https://api.github.com/users/jorisvandenbossche/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jorisvandenbossche/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jorisvandenbossche/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jorisvandenbossche"
},
"description": "A milestone for closed or open issues for which there is no action needed (eg not a bug, just a question / discussion, nothing to resolve, wontfix, etc).\r\n\r\n",
"due_on": null,
"html_url": "https://github.com/pandas-dev/pandas/milestone/33",
"id": 997544,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/33/labels",
"node_id": "MDk6TWlsZXN0b25lOTk3NTQ0",
"number": 33,
"open_issues": 11,
"state": "open",
"title": "No action",
"updated_at": "2021-11-19T17:33:16Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/33"
} | 1 | "2021-06-08T08:27:41Z" | "2021-10-04T00:18:38Z" | "2021-10-04T00:18:32Z" | NONE | null | Added drop_duplicates_index function to base series object. very useful when working with time series.
- [ ] 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/41868/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41868/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41868.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41868",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/41868.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41868"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/41869 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41869/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41869/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41869/events | https://github.com/pandas-dev/pandas/pull/41869 | 914,834,721 | MDExOlB1bGxSZXF1ZXN0NjY0NzE3MTE3 | 41,869 | PERF: clipping with scalar | {
"avatar_url": "https://avatars.githubusercontent.com/u/31036680?v=4",
"events_url": "https://api.github.com/users/TLouf/events{/privacy}",
"followers_url": "https://api.github.com/users/TLouf/followers",
"following_url": "https://api.github.com/users/TLouf/following{/other_user}",
"gists_url": "https://api.github.com/users/TLouf/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/TLouf",
"id": 31036680,
"login": "TLouf",
"node_id": "MDQ6VXNlcjMxMDM2Njgw",
"organizations_url": "https://api.github.com/users/TLouf/orgs",
"received_events_url": "https://api.github.com/users/TLouf/received_events",
"repos_url": "https://api.github.com/users/TLouf/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/TLouf/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/TLouf/subscriptions",
"type": "User",
"url": "https://api.github.com/users/TLouf"
} | [
{
"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"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"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": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 4 | "2021-06-08T11:05:42Z" | "2021-08-24T11:59:33Z" | "2021-06-09T12:17:06Z" | CONTRIBUTOR | null | Removes conversion of boolean series to array-like in `_clip_with_scalar`.
- [x] closes #41434
- [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
I may also add type annotations to `_clip_with_scalar`, let me know if that's welcome.
| {
"+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/41869/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41869/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41869.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41869",
"merged_at": "2021-06-09T12:17:05Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/41869.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41869"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/41870 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41870/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41870/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41870/events | https://github.com/pandas-dev/pandas/pull/41870 | 914,974,291 | MDExOlB1bGxSZXF1ZXN0NjY0ODQ2NzI3 | 41,870 | Tst interval index NaN uniqueness | {
"avatar_url": "https://avatars.githubusercontent.com/u/35864265?v=4",
"events_url": "https://api.github.com/users/r-toroxel/events{/privacy}",
"followers_url": "https://api.github.com/users/r-toroxel/followers",
"following_url": "https://api.github.com/users/r-toroxel/following{/other_user}",
"gists_url": "https://api.github.com/users/r-toroxel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/r-toroxel",
"id": 35864265,
"login": "r-toroxel",
"node_id": "MDQ6VXNlcjM1ODY0MjY1",
"organizations_url": "https://api.github.com/users/r-toroxel/orgs",
"received_events_url": "https://api.github.com/users/r-toroxel/received_events",
"repos_url": "https://api.github.com/users/r-toroxel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/r-toroxel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/r-toroxel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/r-toroxel"
} | [
{
"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": "009800",
"default": false,
"description": "Interval data type",
"id": 150096370,
"name": "Interval",
"node_id": "MDU6TGFiZWwxNTAwOTYzNzA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Interval"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"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": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 5 | "2021-06-08T12:31:42Z" | "2021-06-09T14:46:38Z" | "2021-06-09T14:06:14Z" | CONTRIBUTOR | null | add test cases for interval-indexer with unique NaN value and non-unique NaN values. | {
"+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/41870/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41870/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41870.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41870",
"merged_at": "2021-06-09T14:06:14Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/41870.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41870"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/41871 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41871/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41871/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41871/events | https://github.com/pandas-dev/pandas/issues/41871 | 915,010,469 | MDU6SXNzdWU5MTUwMTA0Njk= | 41,871 | ENH: Add option to surpress timezone warning | {
"avatar_url": "https://avatars.githubusercontent.com/u/30747514?v=4",
"events_url": "https://api.github.com/users/Tasty213/events{/privacy}",
"followers_url": "https://api.github.com/users/Tasty213/followers",
"following_url": "https://api.github.com/users/Tasty213/following{/other_user}",
"gists_url": "https://api.github.com/users/Tasty213/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Tasty213",
"id": 30747514,
"login": "Tasty213",
"node_id": "MDQ6VXNlcjMwNzQ3NTE0",
"organizations_url": "https://api.github.com/users/Tasty213/orgs",
"received_events_url": "https://api.github.com/users/Tasty213/received_events",
"repos_url": "https://api.github.com/users/Tasty213/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Tasty213/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Tasty213/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Tasty213"
} | [
{
"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": "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 | 1 | "2021-06-08T12:52:58Z" | "2021-06-08T14:23:46Z" | "2021-06-08T14:23:46Z" | NONE | null | I have a column of DateTime objects that includes their timezone information. However, I know that all the timezones will always be the same. When I call `df.dt.to_period('M')` I get the following error:
```
/home/$USER/anaconda3/envs/crime_data/lib/python3.6/site-packages/pandas/core/arrays/datetimes.py:1091: UserWarning: Converting to PeriodArray/Index representation will drop timezone information.
UserWarning,
```
Should be able to pass a variable to suppress the warning
| {
"+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/41871/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41871/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/41872 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41872/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41872/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41872/events | https://github.com/pandas-dev/pandas/issues/41872 | 915,061,454 | MDU6SXNzdWU5MTUwNjE0NTQ= | 41,872 | BUG: Pie chart with categorical values fails | {
"avatar_url": "https://avatars.githubusercontent.com/u/177976?v=4",
"events_url": "https://api.github.com/users/darkdragon-001/events{/privacy}",
"followers_url": "https://api.github.com/users/darkdragon-001/followers",
"following_url": "https://api.github.com/users/darkdragon-001/following{/other_user}",
"gists_url": "https://api.github.com/users/darkdragon-001/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/darkdragon-001",
"id": 177976,
"login": "darkdragon-001",
"node_id": "MDQ6VXNlcjE3Nzk3Ng==",
"organizations_url": "https://api.github.com/users/darkdragon-001/orgs",
"received_events_url": "https://api.github.com/users/darkdragon-001/received_events",
"repos_url": "https://api.github.com/users/darkdragon-001/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/darkdragon-001/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/darkdragon-001/subscriptions",
"type": "User",
"url": "https://api.github.com/users/darkdragon-001"
} | [
{
"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": "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 | 1 | "2021-06-08T13:36:15Z" | "2021-06-08T13:50:27Z" | "2021-06-08T13:50:27Z" | 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
pd.Series(pd.Categorical(['cat'], categories=['cat'], ordered=True)).plot.pie()
```
#### Problem description
It should be possible to plot a pie chart with categorical values.
Traceback:
<details><pre>
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3/dist-packages/pandas/plotting/_core.py", line 1528, in pie
return self(kind="pie", **kwargs)
File "/usr/lib/python3/dist-packages/pandas/plotting/_core.py", line 949, in __call__
return plot_backend.plot(data, kind=kind, **kwargs)
File "/usr/lib/python3/dist-packages/pandas/plotting/_matplotlib/__init__.py", line 60, in plot
plot_obj = PLOT_CLASSES[kind](data, **kwargs)
File "/usr/lib/python3/dist-packages/pandas/plotting/_matplotlib/core.py", line 1506, in __init__
data = data.fillna(value=0)
File "/usr/lib/python3/dist-packages/pandas/core/series.py", line 4530, in fillna
return super().fillna(
File "/usr/lib/python3/dist-packages/pandas/core/generic.py", line 6061, in fillna
new_data = self._mgr.fillna(
File "/usr/lib/python3/dist-packages/pandas/core/internals/managers.py", line 594, in fillna
return self.apply(
File "/usr/lib/python3/dist-packages/pandas/core/internals/managers.py", line 409, in apply
applied = getattr(b, f)(**kwargs)
File "/usr/lib/python3/dist-packages/pandas/core/internals/blocks.py", line 1779, in fillna
values = values.fillna(value=value, limit=limit)
File "/usr/lib/python3/dist-packages/pandas/core/arrays/categorical.py", line 1721, in fillna
raise ValueError("fill value must be in categories")
ValueError: fill value must be in categories
</pre></details>
#### Expected Output
It should generate pie chart without errors.
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit : b5958ee1999e9aead1938c0bba2b674378807b3d
python : 3.9.5.final.0
python-bits : 64
OS : Linux
OS-release : 5.8.0-50-generic
Version : #56-Ubuntu SMP Mon Apr 12 17:18:36 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.1.5
numpy : 1.19.5
pytz : 2021.1
dateutil : 2.8.1
pip : 20.3.4
setuptools : 52.0.0
Cython : 0.29.21
pytest : 6.0.2
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : 4.6.3
html5lib : 1.1
pymysql : None
psycopg2 : None
jinja2 : 2.11.2
IPython : None
pandas_datareader: None
bs4 : 4.9.3
bottleneck : 1.2.1
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : 3.3.4
numexpr : 2.7.2
odfpy : None
openpyxl : 3.0.3
pandas_gbq : None
pyarrow : None
pytables : None
pyxlsb : None
s3fs : None
scipy : 1.6.0
sqlalchemy : None
tables : 3.6.1
tabulate : None
xarray : None
xlrd : None
xlwt : 1.3.0
numba : None
</details>
#### Additional context
Might be linked to #39320 and #32414
| {
"+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/41872/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41872/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/41873 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41873/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41873/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41873/events | https://github.com/pandas-dev/pandas/issues/41873 | 915,126,758 | MDU6SXNzdWU5MTUxMjY3NTg= | 41,873 | PERF: performance regression in indexing UInt64Index with an array-like | {
"avatar_url": "https://avatars.githubusercontent.com/u/1020496?v=4",
"events_url": "https://api.github.com/users/jorisvandenbossche/events{/privacy}",
"followers_url": "https://api.github.com/users/jorisvandenbossche/followers",
"following_url": "https://api.github.com/users/jorisvandenbossche/following{/other_user}",
"gists_url": "https://api.github.com/users/jorisvandenbossche/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jorisvandenbossche",
"id": 1020496,
"login": "jorisvandenbossche",
"node_id": "MDQ6VXNlcjEwMjA0OTY=",
"organizations_url": "https://api.github.com/users/jorisvandenbossche/orgs",
"received_events_url": "https://api.github.com/users/jorisvandenbossche/received_events",
"repos_url": "https://api.github.com/users/jorisvandenbossche/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jorisvandenbossche/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jorisvandenbossche/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jorisvandenbossche"
} | [
{
"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": "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-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"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": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 1 | "2021-06-08T14:39:41Z" | "2021-06-15T21:05:57Z" | "2021-06-15T21:05:57Z" | MEMBER | null | See eg https://pandas.pydata.org/speed/pandas/#indexing.NumericSeriesIndexing.time_loc_list_like?python=3.8&Cython=0.29.21&p-index_dtype=%3Cclass%20'pandas.core.indexes.numeric.UInt64Index'%3E&p-index_structure='unique_monotonic_inc'
Up to 180x slowdown in the `indexing.NumericSeriesIndexing.time_loc_array/time_loc_list_like` benchmarks with UInt64Index.
Indicated range of responsible commits is https://github.com/pandas-dev/pandas/compare/21d61451...c9d50d82
Didn't check, but potential candidate: https://github.com/pandas-dev/pandas/pull/41777 or #41804
cc @jbrockmendel | {
"+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/41873/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41873/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/41874 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41874/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41874/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41874/events | https://github.com/pandas-dev/pandas/pull/41874 | 915,228,216 | MDExOlB1bGxSZXF1ZXN0NjY1MDY4MTAz | 41,874 | CLN/PERF: no need for kahan for int group_cumsum | {
"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": "729FCF",
"default": false,
"description": null,
"id": 233160,
"name": "Groupby",
"node_id": "MDU6TGFiZWwyMzMxNjA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Groupby"
},
{
"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": "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": "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": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"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": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 2 | "2021-06-08T16:23:04Z" | "2021-06-09T12:48:56Z" | "2021-06-09T12:19:22Z" | MEMBER | null | Surprised at lack of impact here - doesn't noticeably affect benchmarks.
Targeting the cython algo specifically shows an improvement (but smaller than I'd expect given the removed operations):
```
import numpy as np
import pandas._libs.groupby as libgroupby
N = 4_000_000
vals = np.random.randint(0, 10, (N, 5), dtype=np.int64)
result = np.empty_like(vals)
%timeit libgroupby.group_cumsum(result, vals, np.ones(N, dtype="int"), 1, False)
# 28.9 ms ± 805 µs per loop (mean ± std. dev. of 7 runs, 10 loops each) # this pr
# 37.3 ms ± 206 µs per loop (mean ± std. dev. of 7 runs, 10 loops each) # master
``` | {
"+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/41874/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41874/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41874.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41874",
"merged_at": "2021-06-09T12:19:22Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/41874.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41874"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/41875 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41875/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41875/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41875/events | https://github.com/pandas-dev/pandas/pull/41875 | 915,259,536 | MDExOlB1bGxSZXF1ZXN0NjY1MDk0NjQx | 41,875 | BUG: unstack with object dtype of tzaware timestamps | {
"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": "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": "5319e7",
"default": false,
"description": "Timezone data dtype",
"id": 60458168,
"name": "Timezones",
"node_id": "MDU6TGFiZWw2MDQ1ODE2OA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Timezones"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"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": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 3 | "2021-06-08T17:02:07Z" | "2021-06-17T00:49:11Z" | "2021-06-17T00:31:19Z" | MEMBER | null | - [ ] closes #xxxx
- [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/41875/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41875/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41875.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41875",
"merged_at": "2021-06-17T00:31:19Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/41875.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41875"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/41876 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41876/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41876/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41876/events | https://github.com/pandas-dev/pandas/issues/41876 | 915,266,146 | MDU6SXNzdWU5MTUyNjYxNDY= | 41,876 | BUG: seemingly unexpected behavior with errrors='ignore' in json_normalize() | {
"avatar_url": "https://avatars.githubusercontent.com/u/42706631?v=4",
"events_url": "https://api.github.com/users/neelmraman/events{/privacy}",
"followers_url": "https://api.github.com/users/neelmraman/followers",
"following_url": "https://api.github.com/users/neelmraman/following{/other_user}",
"gists_url": "https://api.github.com/users/neelmraman/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/neelmraman",
"id": 42706631,
"login": "neelmraman",
"node_id": "MDQ6VXNlcjQyNzA2NjMx",
"organizations_url": "https://api.github.com/users/neelmraman/orgs",
"received_events_url": "https://api.github.com/users/neelmraman/received_events",
"repos_url": "https://api.github.com/users/neelmraman/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/neelmraman/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/neelmraman/subscriptions",
"type": "User",
"url": "https://api.github.com/users/neelmraman"
} | [
{
"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": "read_json, to_json, json_normalize",
"id": 49379259,
"name": "IO JSON",
"node_id": "MDU6TGFiZWw0OTM3OTI1OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20JSON"
}
] | closed | false | {
"avatar_url": "https://avatars.githubusercontent.com/u/42706631?v=4",
"events_url": "https://api.github.com/users/neelmraman/events{/privacy}",
"followers_url": "https://api.github.com/users/neelmraman/followers",
"following_url": "https://api.github.com/users/neelmraman/following{/other_user}",
"gists_url": "https://api.github.com/users/neelmraman/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/neelmraman",
"id": 42706631,
"login": "neelmraman",
"node_id": "MDQ6VXNlcjQyNzA2NjMx",
"organizations_url": "https://api.github.com/users/neelmraman/orgs",
"received_events_url": "https://api.github.com/users/neelmraman/received_events",
"repos_url": "https://api.github.com/users/neelmraman/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/neelmraman/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/neelmraman/subscriptions",
"type": "User",
"url": "https://api.github.com/users/neelmraman"
} | [
{
"avatar_url": "https://avatars.githubusercontent.com/u/42706631?v=4",
"events_url": "https://api.github.com/users/neelmraman/events{/privacy}",
"followers_url": "https://api.github.com/users/neelmraman/followers",
"following_url": "https://api.github.com/users/neelmraman/following{/other_user}",
"gists_url": "https://api.github.com/users/neelmraman/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/neelmraman",
"id": 42706631,
"login": "neelmraman",
"node_id": "MDQ6VXNlcjQyNzA2NjMx",
"organizations_url": "https://api.github.com/users/neelmraman/orgs",
"received_events_url": "https://api.github.com/users/neelmraman/received_events",
"repos_url": "https://api.github.com/users/neelmraman/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/neelmraman/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/neelmraman/subscriptions",
"type": "User",
"url": "https://api.github.com/users/neelmraman"
}
] | {
"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-06-08T17:11:05Z" | "2021-07-15T04:21:22Z" | "2021-07-15T04:21:22Z" | 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
```python
# raises a KeyError due to the missing 'id' in the second element, even though errors='ignore' was passed
pd.json_normalize(
data=[{"id": 1, "outer": {"inner": [{"field": 2}]}}, {"outer": {"inner": [{"field": 3}]}}],
record_path=["outer", "inner"],
meta=["id"],
errors="ignore",
)
# no issues since both elements have an 'id', and shows that it is looking for 'id' at the right level
pd.json_normalize(
data=[{"id": 1, "outer": {"inner": [{"field": 2}]}}, {"id": 4, "outer": {"inner": [{"field": 3}]}}],
record_path=["outer", "inner"],
meta=["id"],
errors="ignore",
)
# no issues when record_path has length 1
pd.json_normalize(
data=[{"id": 1, "outer": [{"field": 2}]}, {"outer": [{"field": 3}]}],
record_path=["outer"],
meta=["id"],
errors="ignore",
)
```
#### Problem description
I would expect the first case above to return the same output as the third case (i.e., with missing ids filled with `np.nan`). Is the absence of a try...except around the [first _pull_field() call](https://github.com/pandas-dev/pandas/blob/1cad9e52ee1028db3bb4b9e86998104eb4d6b0ee/pandas/io/json/_normalize.py#L304) intentional?
#### Expected Output
```
field id
0 2 1
1 3 NaN
```
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit : None
python : 3.7.9.final.0
python-bits : 64
OS : Linux
OS-release : 4.14.67-ts1
machine : x86_64
processor :
byteorder : little
LC_ALL : None
LANG : en_US.utf8
LOCALE : en_US.UTF-8
pandas : 1.0.5
numpy : 1.16.6
pytz : 2020.4
dateutil : 2.8.0
pip : 19.3.1
setuptools : 42.0.2
Cython : None
pytest : 5.3.1
hypothesis : 3.57.0
sphinx : 3.2.1
blosc : None
feather : None
xlsxwriter : None
lxml.etree : 4.5.2
html5lib : 1.0.1
pymysql : None
psycopg2 : 2.8.5 (dt dec pq3 ext lo64)
jinja2 : 2.11.1
IPython : 7.14.0
pandas_datareader: None
bs4 : 4.9.1
bottleneck : 1.2.1
fastparquet : None
gcsfs : None
lxml.etree : 4.5.2
matplotlib : 3.0.3
numexpr : 2.6.4
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : 1.0.1
pytables : None
pytest : 5.3.1
pyxlsb : None
s3fs : 0.4.2
scipy : 1.5.1
sqlalchemy : 1.3.18
tables : None
tabulate : 0.8.3
xarray : None
xlrd : 1.1.0
xlwt : None
xlsxwriter : None
numba : 0.50.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/41876/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41876/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/41877 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41877/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41877/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41877/events | https://github.com/pandas-dev/pandas/issues/41877 | 915,315,673 | MDU6SXNzdWU5MTUzMTU2NzM= | 41,877 | QST: ExtensionDtype made available with arguments to `astype` method | {
"avatar_url": "https://avatars.githubusercontent.com/u/15252203?v=4",
"events_url": "https://api.github.com/users/thomassajot/events{/privacy}",
"followers_url": "https://api.github.com/users/thomassajot/followers",
"following_url": "https://api.github.com/users/thomassajot/following{/other_user}",
"gists_url": "https://api.github.com/users/thomassajot/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/thomassajot",
"id": 15252203,
"login": "thomassajot",
"node_id": "MDQ6VXNlcjE1MjUyMjAz",
"organizations_url": "https://api.github.com/users/thomassajot/orgs",
"received_events_url": "https://api.github.com/users/thomassajot/received_events",
"repos_url": "https://api.github.com/users/thomassajot/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/thomassajot/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/thomassajot/subscriptions",
"type": "User",
"url": "https://api.github.com/users/thomassajot"
} | [
{
"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"
},
{
"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 | 10 | "2021-06-08T18:01:37Z" | "2021-06-26T17:41:24Z" | "2021-06-09T18:06:21Z" | NONE | null | - [x] I have searched the [[pandas] tag](https://stackoverflow.com/questions/tagged/pandas) on StackOverflow for similar questions.
- [ ] I have asked my usage related question on [StackOverflow](https://stackoverflow.com).
---
#### Question about pandas
Hello,
I have been attempting to create a new ExtensionDtype and ExtensionArray. The Dtype can take in arguments. I was looking into how to replicate the behaviour of `Categorical` when assigning a dtype to a series.
If the user does not provide arguments
```python
pd.Series(['a', 'b', 'c']).astype('category') # or pd.Series(['a', 'b', 'c']).astype(pd.CategoricalDtype())
```
Returns:
```
0 a
1 b
2 c
dtype: category
Categories (2, object): ['a', 'b']
```
If the user provides the `categories` list:
```python
pd.Series(['a', 'b', 'c']).astype(pd.CategoricalDtype(['a', 'b']))
```
Then the argument is given to the Array constructor which now returns a missing value:
```
0 a
1 b
2 NaN
dtype: category
Categories (2, object): ['a', 'b']
```
But for now, with my custom Dtype called in a similar fashion, the default values are used no matter the given arguments:
Running:
```python
pd.Series([1, 2, 3]).astype(DiscreteNumericalDtype(lower=0, upper=3, inc=1))
```
expected to return
```
0 1.0
1 2.0
2 3.0
dtype: discrete
```
but actually returns:
```
0 1.0
1 NaN
2 NaN
dtype: discrete
```
which is the results of using the default argument (lower=0, upper=1, inc=.1)
### More detail about the custom types:
The goal is to create an array where float values have to be between a min and a max value, [lower, upper] and at an interval `inc`. For example, [0, 1, 5.3] mapped onto [1, 6] with an inc=1 should return: [NaN, 1, 5], and with an inc=0.2 should return [NaN, 1, 5.2].
Here is the full code I have so far.
I did not ask the question on StackOverflow as I believe the answer to this question should be added into panda's Documentation as well.
**Note**: If you'd still like to submit a question, 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 question.
```python
from typing import Type, List, Optional
import numpy as np
from druid.pandas.dtypes import DiscreteNumericalDtype
from pandas._typing import DtypeObj
from pandas.core.arrays import ExtensionArray
from pandas.core.dtypes.base import register_extension_dtype, ExtensionDtype
class DiscreteNumericalDtypeType(type):
"""
the type of DiscreteNumericalDtype, this metaclass determines subclass ability
"""
pass
@register_extension_dtype
class DiscreteNumericalDtype(ExtensionDtype):
name = 'discrete'
type: Type[DiscreteNumericalDtypeType] = DiscreteNumericalDtypeType
base = np.dtype("O")
def __init__(self, lower: float = 0., upper: float = 1., inc: float = 0.1):
self.lower = lower
self.upper = upper
self.inc = inc
@property
def type(self) -> Type:
return np.float
@classmethod
def construct_array_type(cls) -> Type['DiscreteNumericalArray']:
from druid.pandas.arrays import DiscreteNumericalArray
return DiscreteNumericalArray
def _is_numeric(self) -> bool:
return True
def _is_boolean(self) -> bool:
return False
def _get_common_dtype(self, dtypes: List[DtypeObj]) -> Optional[DtypeObj]:
raise NotImplementedError('TODO')
class DiscreteNumericalArray(ExtensionArray):
"""
Represent a Continuous value into bins between [Lower, Upper] and a step size.
"""
_dtype = DiscreteNumericalDtype()
ndim: int = 1
def __init__(self,
values,
lower: Optional[float] = 0.,
upper: Optional[float] = 1.,
inc: float = 0.1):
values = np.asarray(values, dtype=float)
if lower is None:
lower = np.min(values)
if upper is None:
upper = np.max(values)
values[values > upper] = np.nan
values[values < lower] = np.nan
self._dtype = DiscreteNumericalDtype(lower=lower, upper=upper + inc, inc=inc)
bins = self.bins
self.codes = np.searchsorted(bins, values, side='right') - 1
self.codes[np.isnan(values)] = -1
@property
def values(self):
values = self.bins[self.codes]
values[self.codes == -1] = np.nan
return values
@property
def dtype(self) -> DiscreteNumericalDtype:
return self._dtype
@property
def bins(self):
return np.arange(start=self.dtype.lower,
stop=self.dtype.upper,
step=self.dtype.inc,
dtype=float)
@classmethod
def _from_sequence(cls, scalars, *, dtype=None, copy=False):
return DiscreteNumericalArray(scalars)
@property
def _constructor(self) -> Type['DiscreteNumericalArray']:
return DiscreteNumericalArray
@classmethod
def _from_factorized(cls, values, original):
return original._constructor(values,
lower=original.dtype.lower,
upper=original.dtype.upper,
inc=original.dtype.inc)
def astype(self, dtype, copy=True):
raise NotImplementedError('TODO')
def isna(self):
return self.codes == -1
def __len__(self):
return len(self.codes)
def __getitem__(self, key):
return self.values[key]
```
| {
"+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/41877/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41877/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/41878 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41878/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41878/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41878/events | https://github.com/pandas-dev/pandas/pull/41878 | 915,371,227 | MDExOlB1bGxSZXF1ZXN0NjY1MTkxOTcz | 41,878 | Proof of concept for Copy-on-Write implementation | {
"avatar_url": "https://avatars.githubusercontent.com/u/1020496?v=4",
"events_url": "https://api.github.com/users/jorisvandenbossche/events{/privacy}",
"followers_url": "https://api.github.com/users/jorisvandenbossche/followers",
"following_url": "https://api.github.com/users/jorisvandenbossche/following{/other_user}",
"gists_url": "https://api.github.com/users/jorisvandenbossche/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jorisvandenbossche",
"id": 1020496,
"login": "jorisvandenbossche",
"node_id": "MDQ6VXNlcjEwMjA0OTY=",
"organizations_url": "https://api.github.com/users/jorisvandenbossche/orgs",
"received_events_url": "https://api.github.com/users/jorisvandenbossche/received_events",
"repos_url": "https://api.github.com/users/jorisvandenbossche/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jorisvandenbossche/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jorisvandenbossche/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jorisvandenbossche"
} | [
{
"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": "70e5ca",
"default": false,
"description": "",
"id": 2085877452,
"name": "Copy / view semantics",
"node_id": "MDU6TGFiZWwyMDg1ODc3NDUy",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Copy%20/%20view%20semantics"
}
] | open | false | null | [] | null | 15 | "2021-06-08T19:09:17Z" | "2021-11-16T12:04:59Z" | null | MEMBER | null | An experiment to implement one of the proposals discussed in https://github.com/pandas-dev/pandas/issues/36195/, described in more detail in https://docs.google.com/document/d/1ZCQ9mx3LBMy-nhwRl33_jgcvWo9IWdEfxDNQ2thyTb0/edit
This PR adds Copy-on-Write (CoW) functionality to the DataFrame/Series when using ArrayManager.
It does this by adding a new `.refs` attribute to the `ArrayManager` that, if populated, keeps a list of `weakref` references (one per columns, so `len(mgr.arrays) == len(mgr.refs)` to the array it is viewing.
This ensures that if we are modifying an array of a child manager, we can check if it is referencing (viewing) another array, and if needed do a copy on write. And also if we are modifying an array of a parent manager, we can check if that array is being referenced by another array and if needed do a copy on write in this parent frame. (of course, a manager can both be parent and child at the same time, so those two checks always happen both)
A very brief summary of the behaviour you get (longer description at https://github.com/pandas-dev/pandas/issues/36195#issuecomment-786654449):
- *Any* subset (so also a slice, single column access, etc) uses CoW (or is already a copy)
- DataFrame methods that return a new DataFrame return shallow copies (using CoW) if applicable (for this POC I implemented that for `reset_index` and `rename` to test, needs to be expanded to other methods)
I added a `test_copy_on_write.py` which already tests a set of cases (which of course needs to be expanded), going through that file should give an idea of the kind of behaviours (and how it changes compared to current master/BlockManager). Link to that file in the diff: [click here](https://github.com/pandas-dev/pandas/pull/41878/files#diff-2abca9577897e44acf7b37c1412c9fc324b0464723cdf1d68a0f1467834a9245)
(I only added new, targeted tests in that file, I didn't yet start updating existing tests, as I imagine there will be quite a lot)
This is a proof-of-concept PR, so the feedback I am looking for / what I want to get out of it:
- A concrete starting point for an implementation, to stir the discussion on this topic https://github.com/pandas-dev/pandas/issues/36195/ (and a concrete implementation you can play with, to get feedback on the proposed semantics)
- Review of the actual implementation using `weakrefs` (it's quite simple at the moment, but not too simple? Will this be robust enough?)
- Other corner cases that should certainly be tested
- ...
And to be clear, not yet everything is covered (there are some `# TODO`'s in `array_manager.py`, but only fixing those while also adding tests that require it)
TODO:
- [ ] Series and DataFrame constructors
cc @pandas-dev/pandas-core | {
"+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/41878/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41878/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41878.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41878",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/41878.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41878"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/41879 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41879/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41879/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41879/events | https://github.com/pandas-dev/pandas/pull/41879 | 915,425,761 | MDExOlB1bGxSZXF1ZXN0NjY1MjQxMzcw | 41,879 | REF: avoid mutating Series._values directly in setitem but defer to Manager method | {
"avatar_url": "https://avatars.githubusercontent.com/u/1020496?v=4",
"events_url": "https://api.github.com/users/jorisvandenbossche/events{/privacy}",
"followers_url": "https://api.github.com/users/jorisvandenbossche/followers",
"following_url": "https://api.github.com/users/jorisvandenbossche/following{/other_user}",
"gists_url": "https://api.github.com/users/jorisvandenbossche/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jorisvandenbossche",
"id": 1020496,
"login": "jorisvandenbossche",
"node_id": "MDQ6VXNlcjEwMjA0OTY=",
"organizations_url": "https://api.github.com/users/jorisvandenbossche/orgs",
"received_events_url": "https://api.github.com/users/jorisvandenbossche/received_events",
"repos_url": "https://api.github.com/users/jorisvandenbossche/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jorisvandenbossche/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jorisvandenbossche/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jorisvandenbossche"
} | [
{
"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": "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"
}
] | 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-06-08T19:59:16Z" | "2021-08-07T16:32:27Z" | "2021-08-07T16:32:23Z" | MEMBER | null | There are currently two cases where the Series code directly modifies the underlying values itself (`self._values[..] = ..`), while most setitem code paths end up going through a specific indexing method that all end up in the Manager doing the actual modification of the values.
Apart from being a bit inconsistent (it's good to have all eventual modifications consistently happening inside the manager, I think), I also need to move this to the manager for being able to check for copy-on-write in https://github.com/pandas-dev/pandas/pull/41878.
Since I think this is a generally useful change, moving it out of the CoW 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/41879/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41879/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41879.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41879",
"merged_at": "2021-08-07T16:32:23Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/41879.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41879"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/41880 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41880/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41880/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41880/events | https://github.com/pandas-dev/pandas/pull/41880 | 915,486,552 | MDExOlB1bGxSZXF1ZXN0NjY1Mjk1ODY4 | 41,880 | Replaced value assignment by location accessor. | {
"avatar_url": "https://avatars.githubusercontent.com/u/23101198?v=4",
"events_url": "https://api.github.com/users/kosmitive/events{/privacy}",
"followers_url": "https://api.github.com/users/kosmitive/followers",
"following_url": "https://api.github.com/users/kosmitive/following{/other_user}",
"gists_url": "https://api.github.com/users/kosmitive/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kosmitive",
"id": 23101198,
"login": "kosmitive",
"node_id": "MDQ6VXNlcjIzMTAxMTk4",
"organizations_url": "https://api.github.com/users/kosmitive/orgs",
"received_events_url": "https://api.github.com/users/kosmitive/received_events",
"repos_url": "https://api.github.com/users/kosmitive/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kosmitive/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kosmitive/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kosmitive"
} | [
{
"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": "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": "7fcce8",
"default": false,
"description": "",
"id": 2347992045,
"name": "Stale",
"node_id": "MDU6TGFiZWwyMzQ3OTkyMDQ1",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Stale"
}
] | closed | false | null | [] | null | 6 | "2021-06-08T20:48:12Z" | "2021-08-17T02:16:46Z" | "2021-08-17T02:16:45Z" | NONE | null | Changed self.obj[key] = value to self.obj.loc[:, key] = value to disable warning.
- [ ] 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/41880/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41880/timeline | null | 1 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41880.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41880",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/41880.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41880"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/41881 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41881/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41881/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41881/events | https://github.com/pandas-dev/pandas/pull/41881 | 915,544,235 | MDExOlB1bGxSZXF1ZXN0NjY1MzQ4NjY0 | 41,881 | REF: simplify indexes.base._maybe_cast_data_without_dtype | {
"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": "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": "d4c5f9",
"default": false,
"description": "Series/DataFrame/Index/pd.array Constructors",
"id": 1465286368,
"name": "Constructors",
"node_id": "MDU6TGFiZWwxNDY1Mjg2MzY4",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Constructors"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"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": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 1 | "2021-06-08T21:38:12Z" | "2021-06-10T16:00:21Z" | "2021-06-10T15:51:46Z" | 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/41881/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41881/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41881.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41881",
"merged_at": "2021-06-10T15:51:46Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/41881.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41881"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/41882 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41882/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41882/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41882/events | https://github.com/pandas-dev/pandas/issues/41882 | 915,547,112 | MDU6SXNzdWU5MTU1NDcxMTI= | 41,882 | BUG: Index.get_indexer_for with mixed tuples | {
"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": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"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"
}
] | open | false | null | [] | null | 0 | "2021-06-08T21:40:55Z" | "2021-06-08T21:41:04Z" | null | MEMBER | null | ```
idx = pd.Index(["i", "i", "j"])
other = pd.Index([('i', 'i'), ('i', 'j'), ('j', 'i'), 'j'])
>>> idx.get_indexer_for(other)
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
mi = pd.MultiIndex.from_tuples(other[:-1])
mi.get_indexer(other) # works!
``` | {
"+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/41882/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41882/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/41883 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41883/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41883/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41883/events | https://github.com/pandas-dev/pandas/pull/41883 | 915,664,583 | MDExOlB1bGxSZXF1ZXN0NjY1NDU2MDEz | 41,883 | BUG: IntervalIndex.intersection | {
"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": "009800",
"default": false,
"description": "Interval data type",
"id": 150096370,
"name": "Interval",
"node_id": "MDU6TGFiZWwxNTAwOTYzNzA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Interval"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"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": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 1 | "2021-06-09T00:34:16Z" | "2021-06-09T01:52:54Z" | "2021-06-09T01:52:45Z" | MEMBER | null | aimed at current failures on master | {
"+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/41883/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41883/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41883.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41883",
"merged_at": "2021-06-09T01:52:45Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/41883.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41883"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/41884 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41884/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41884/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41884/events | https://github.com/pandas-dev/pandas/pull/41884 | 915,666,186 | MDExOlB1bGxSZXF1ZXN0NjY1NDU3Mzg3 | 41,884 | REF: remove Index._convert_arr_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": "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": "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"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"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": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 0 | "2021-06-09T00:37:34Z" | "2021-06-09T15:01:14Z" | "2021-06-09T12:20: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/41884/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41884/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41884.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41884",
"merged_at": "2021-06-09T12:20:43Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/41884.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41884"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/41885 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41885/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41885/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41885/events | https://github.com/pandas-dev/pandas/pull/41885 | 915,697,419 | MDExOlB1bGxSZXF1ZXN0NjY1NDgyNzkx | 41,885 | PERF: nancorr_spearman fastpath | {
"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": "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": "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-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"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": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 2 | "2021-06-09T01:58:13Z" | "2021-06-09T19:18:05Z" | "2021-06-09T18:17:00Z" | MEMBER | null | xref #40956
The diff looks much more complicated than it is because of indentation changes - the change is basically allowing a fast path for computation without nans by pulling up a slightly modified computation of `sumx, sumxx, sumyy` before missing value handling.
Benchmarks:
```
before after ratio
[b73c38e2] [efeac916]
<perf/grp_cumsum_int~7> <nancorr_spearman_perf2>
70.3M 71M 1.01 stat_ops.Correlation.peakmem_corr_wide('spearman')
- 1.39±0.06ms 1.01±0.02ms 0.73 stat_ops.Correlation.time_corr('spearman')
669±20μs 641±40μs 0.96 stat_ops.Correlation.time_corr_series('spearman')
- 26.3±0.6ms 8.36±0.3ms 0.32 stat_ops.Correlation.time_corr_wide('spearman')
491±3ms 473±9ms 0.96 stat_ops.Correlation.time_corr_wide_nans('spearman')
8.04±0.5ms 7.97±0.6ms 0.99 stat_ops.Correlation.time_corrwith_cols('spearman')
215±1ms 213±2ms 0.99 stat_ops.Correlation.time_corrwith_rows('spearman')
``` | {
"+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/41885/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41885/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41885.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41885",
"merged_at": "2021-06-09T18:17:00Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/41885.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41885"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/41886 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41886/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41886/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41886/events | https://github.com/pandas-dev/pandas/pull/41886 | 915,731,155 | MDExOlB1bGxSZXF1ZXN0NjY1NTEwMjUw | 41,886 | TST/CLN: test_cov_corr | {
"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": "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": "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": "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": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"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": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 0 | "2021-06-09T03:18:26Z" | "2021-06-10T00:33:15Z" | "2021-06-10T00:17:19Z" | MEMBER | null | Some parameterizations, removal of unused vars. | {
"+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/41886/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41886/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41886.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41886",
"merged_at": "2021-06-10T00:17:19Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/41886.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41886"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/41887 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41887/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41887/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41887/events | https://github.com/pandas-dev/pandas/issues/41887 | 915,764,511 | MDU6SXNzdWU5MTU3NjQ1MTE= | 41,887 | BUG: Incorrect read_csv values for NaN when using regex sep argument | {
"avatar_url": "https://avatars.githubusercontent.com/u/10884874?v=4",
"events_url": "https://api.github.com/users/adamerose/events{/privacy}",
"followers_url": "https://api.github.com/users/adamerose/followers",
"following_url": "https://api.github.com/users/adamerose/following{/other_user}",
"gists_url": "https://api.github.com/users/adamerose/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/adamerose",
"id": 10884874,
"login": "adamerose",
"node_id": "MDQ6VXNlcjEwODg0ODc0",
"organizations_url": "https://api.github.com/users/adamerose/orgs",
"received_events_url": "https://api.github.com/users/adamerose/received_events",
"repos_url": "https://api.github.com/users/adamerose/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/adamerose/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/adamerose/subscriptions",
"type": "User",
"url": "https://api.github.com/users/adamerose"
} | [
{
"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": "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": "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"
}
] | open | false | null | [] | null | 0 | "2021-06-09T04:38:33Z" | "2021-08-21T02:23:17Z" | null | NONE | null | #### Code Sample
```python
import numpy as np
import pandas as pd
file_path = "temp.csv"
df1 = pd.DataFrame({"x": [np.nan, 1]})
df1.to_csv(file_path, index=False)
df1_regex = pd.read_csv(file_path, sep=',|\t')
df2 = pd.DataFrame({"x1": [np.nan, 1],
"x2": [np.nan, np.nan]})
df2.to_csv(file_path, index=False)
df2_regex = pd.read_csv(file_path, sep=',|\t')
print(f"-----------\ndf1\n{df1}")
print(f"-----------\ndf1_regex\n{df1_regex}")
print(f"-----------\ndf2\n{df2}")
print(f"-----------\ndf2_regex\n{df2_regex}")
```
**Output**
```python
-----------
df1
x
0 NaN
1 1.0
-----------
df1_regex
x
0 ""
1 1.0
-----------
df2
x1 x2
0 NaN NaN
1 1.0 NaN
-----------
df2_regex
x1 x2
0 NaN NaN
1 1.0 NaN
```
#### Problem description
- When I provide any regex value for `sep` in `read_csv`, I get `""` instead of `NaN` for blank cells
- This only happens if the CSV only has a single column
#### Expected Output
`df1_regex` should have `NaN` in the first column like `df2_regex` does, not `""`
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit : 2cb96529396d93b46abab7bbc73a208e708c642e
python : 3.8.9.final.0
python-bits : 64
OS : Windows
OS-release : 10
Version : 10.0.19041
machine : AMD64
processor : AMD64 Family 25 Model 33 Stepping 0, AuthenticAMD
byteorder : little
LC_ALL : None
LANG : None
LOCALE : English_United States.1252
pandas : 1.2.4
numpy : 1.20.2
pytz : 2021.1
dateutil : 2.8.1
pip : 21.1.2
setuptools : 49.2.1
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.3
IPython : 7.21.0
pandas_datareader: None
bs4 : 4.9.3
bottleneck : None
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : 3.3.4
numexpr : None
odfpy : None
openpyxl : 3.0.7
pandas_gbq : None
pyarrow : 3.0.0
pyxlsb : None
s3fs : None
scipy : 1.6.1
sqlalchemy : 1.4.11
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/41887/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41887/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/41888 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41888/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41888/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41888/events | https://github.com/pandas-dev/pandas/pull/41888 | 915,770,787 | MDExOlB1bGxSZXF1ZXN0NjY1NTQzMTMy | 41,888 | ENH: Add online operations for EWM.mean | {
"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": "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": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"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": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 6 | "2021-06-09T04:52:50Z" | "2021-06-12T18:09:31Z" | "2021-06-12T07:34:34Z" | MEMBER | null | - [x] xref #41673
- [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/41888/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41888/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41888.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41888",
"merged_at": "2021-06-12T07:34:34Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/41888.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41888"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/41889 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41889/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41889/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41889/events | https://github.com/pandas-dev/pandas/pull/41889 | 915,785,721 | MDExOlB1bGxSZXF1ZXN0NjY1NTU2MTkx | 41,889 | BENCH: Remove unnecessary random seeds | {
"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": "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": "ae68cc",
"default": false,
"description": "Performance (ASV) benchmarks",
"id": 732775912,
"name": "Benchmark",
"node_id": "MDU6TGFiZWw3MzI3NzU5MTI=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Benchmark"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"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": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 1 | "2021-06-09T05:19:37Z" | "2021-06-09T15:49:17Z" | "2021-06-09T12:18:14Z" | MEMBER | null | - [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
We are implementing a common seed explained in https://asv.readthedocs.io/en/latest/writing_benchmarks.html.
Added a code check as well
| {
"+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/41889/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41889/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41889.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41889",
"merged_at": "2021-06-09T12:18:14Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/41889.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41889"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/41890 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41890/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41890/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41890/events | https://github.com/pandas-dev/pandas/pull/41890 | 915,877,582 | MDExOlB1bGxSZXF1ZXN0NjY1NjM0NzEy | 41,890 | ENH: Add `drop_na` keyword to "to_json()" function | {
"avatar_url": "https://avatars.githubusercontent.com/u/18103560?v=4",
"events_url": "https://api.github.com/users/romanhaa/events{/privacy}",
"followers_url": "https://api.github.com/users/romanhaa/followers",
"following_url": "https://api.github.com/users/romanhaa/following{/other_user}",
"gists_url": "https://api.github.com/users/romanhaa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/romanhaa",
"id": 18103560,
"login": "romanhaa",
"node_id": "MDQ6VXNlcjE4MTAzNTYw",
"organizations_url": "https://api.github.com/users/romanhaa/orgs",
"received_events_url": "https://api.github.com/users/romanhaa/received_events",
"repos_url": "https://api.github.com/users/romanhaa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/romanhaa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/romanhaa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/romanhaa"
} | [
{
"color": "7fcce8",
"default": false,
"description": "",
"id": 2347992045,
"name": "Stale",
"node_id": "MDU6TGFiZWwyMzQ3OTkyMDQ1",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Stale"
}
] | closed | false | null | [] | null | 8 | "2021-06-09T07:19:14Z" | "2021-08-17T02:18:55Z" | "2021-08-17T02:18:55Z" | NONE | null | __What's new__
This PR introduces a new keyword, `drop_na`, to the `to_json()` function. It can be set to either `True` or `False`.
When `drop_na=False`, `to_json()` works just like it did before.
When `drop_na=True`, items with value `null` in the output of `to_json()` will be removed. Using this feature is (currently) only possible in combination with `orient="records"` and when the input object is of type `pd.DataFrame`. Removing the `null` items is done through string substitution with `re.sub()` in a new helper function (`remove_null_items()` in `_normalize.py`).
- [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
__Notes__
I imagine that, ideally, the `ultrajson`/`ujson` package had a `drop_none` parameter that would be adapted to include `NaN` values from pandas. IMO, this would be a better solution because it 1) is likely much faster and 2) avoids the use of regex. I started implementing such a parameter in `ujson` (see [here](https://github.com/romanhaa/ultrajson/commits/drop_none)), but and wondered whether it would introduce too much conditionality to be compatible with their philosophy (being ultra-fast). That's why I decided to propose a sub-optimal but working solution to `pandas` directly.
__Performance__
I ran some performance tests and compared it to a [workaround](https://stackoverflow.com/a/46955083) intended to achieve the same goal.
The input is a dataframe with 214,066 rows and 12 columns (read from a `.json` file, 58M in size, that can be found [here](http://ftp.ebi.ac.uk/pub/databases/opentargets/genetics/20022712/v2g/)).
Code snippet for testing:
```py
df = pd.read_json('part-00001-7a4fb376-056a-4f34-ad92-248989cd92d4-c000.json', lines=True)
print("export with `drop_na=False`")
start_time = time.time()
df.to_json("~/some_file_1.json", orient="records", lines=False, drop_na=False)
print("--- %s seconds ---" % (time.time() - start_time))
print("export with `drop_na=True`")
start_time = time.time()
df.to_json("~/some_file_2.json", orient="records", lines=False, drop_na=True)
print("--- %s seconds ---" % (time.time() - start_time))
print("export with workaround")
start_time = time.time()
with open("/Users/roman/some_file_3.json", "w", encoding="utf-8") as f:
json.dump([row.dropna().to_dict() for index, row in df.iterrows()], f)
print("--- %s seconds ---" % (time.time() - start_time))
```
Output:
```
export with `to_json(orient='records', drop_na=False)`
--- 0.4323728084564209 seconds ---
export with `to_json(orient='records', drop_na=True)`
--- 1.6985130310058594 seconds ---
export with workaround
--- 79.73292803764343 seconds ---
```
The implementation I propose is not only (much) faster than the workaround, but is also compatible with generating output in `jsonlines` format. | {
"+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/41890/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41890/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41890.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41890",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/41890.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41890"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/41891 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41891/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41891/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41891/events | https://github.com/pandas-dev/pandas/issues/41891 | 915,945,880 | MDU6SXNzdWU5MTU5NDU4ODA= | 41,891 | BUG: Setting column on empty DataFrame with loc / avoiding SettingWithCopyWarning for potentially empty DataFrames/copies/views | {
"avatar_url": "https://avatars.githubusercontent.com/u/13602468?v=4",
"events_url": "https://api.github.com/users/klieret/events{/privacy}",
"followers_url": "https://api.github.com/users/klieret/followers",
"following_url": "https://api.github.com/users/klieret/following{/other_user}",
"gists_url": "https://api.github.com/users/klieret/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/klieret",
"id": 13602468,
"login": "klieret",
"node_id": "MDQ6VXNlcjEzNjAyNDY4",
"organizations_url": "https://api.github.com/users/klieret/orgs",
"received_events_url": "https://api.github.com/users/klieret/received_events",
"repos_url": "https://api.github.com/users/klieret/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/klieret/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/klieret/subscriptions",
"type": "User",
"url": "https://api.github.com/users/klieret"
} | [
{
"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": "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": "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": "f2f074",
"default": false,
"description": "Warnings that appear or should be added to pandas",
"id": 1628184320,
"name": "Warnings",
"node_id": "MDU6TGFiZWwxNjI4MTg0MzIw",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Warnings"
},
{
"color": "70e5ca",
"default": false,
"description": "",
"id": 2085877452,
"name": "Copy / view semantics",
"node_id": "MDU6TGFiZWwyMDg1ODc3NDUy",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Copy%20/%20view%20semantics"
}
] | open | false | null | [] | null | 5 | "2021-06-09T08:39:01Z" | "2021-08-21T02:23:48Z" | 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.
#### Code Sample, a copy-pastable example
```python
import pandas as pd
df = pd.DataFrame()
# Option 1: works on empty dataframes (adding an empty column)
# but shows the SettingWithCopyWarning for non-empty views/copies
df["a"] = 1
# Option 2: works without warning for views/copies but raises ValueError on empty dataframe
df.loc[:, "a"] = 1
```
#### Problem description
Let's consider a function `add_column` that adds a column.
* If we use `df[column] = value` (Option 1), then the function will throw the `SettingWithCopyWarning` whenever it is called on a copy/view (even if we don't care about propagating the change to the original dataframe).
* The recommended workaround for this warning is to use `df.loc[:, column] = value` (Option 2). However this throws, as soon as the dataframe is empty, i.e. doesn't contain any rows
This then requires ugly solutions like the following
```python
def add_column(df):
if df.empty:
# Still want to make sure to add the column to avoid KeyErrors later
df["column"] = 1 # doesn't show SettingWithCopyWarning
return
df.loc[:, "column"] = 1
```
whenever we might be dealing with dataframes or their copies/views that are possibly empty.
<details>
INSTALLED VERSIONS
------------------
commit : 2cb96529396d93b46abab7bbc73a208e708c642e
python : 3.7.5.final.0
python-bits : 64
OS : Linux
OS-release : 5.3.0-64-generic
Version : #58-Ubuntu SMP Fri Jul 10 19:33:51 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.2.4
numpy : 1.18.1
pytz : 2019.2
dateutil : 2.7.3
pip : 20.3.3
setuptools : 41.1.0
Cython : None
pytest : 5.3.2
hypothesis : None
sphinx : 3.0.0
blosc : None
feather : None
xlsxwriter : None
lxml.etree : 4.5.0
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 2.10.3
IPython : 5.8.0
pandas_datareader: None
bs4 : 4.9.1
bottleneck : None
fsspec : 0.7.4
fastparquet : None
gcsfs : None
matplotlib : 3.4.2
numexpr : 2.7.1
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : 3.0.0
pyxlsb : None
s3fs : None
scipy : 1.4.1
sqlalchemy : 1.3.16
tables : 3.6.1
tabulate : 0.8.7
xarray : 0.17.0
xlrd : 2.0.1
xlwt : None
numba : 0.51.2
</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/41891/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41891/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/41892 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41892/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41892/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41892/events | https://github.com/pandas-dev/pandas/pull/41892 | 916,178,687 | MDExOlB1bGxSZXF1ZXN0NjY1ODg3OTk2 | 41,892 | TYP: use from __future__ import annotations more - batch 1 | {
"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"
} | [
{
"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": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"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": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 8 | "2021-06-09T13:04:27Z" | "2021-06-11T02:31:56Z" | "2021-06-09T18:29:42Z" | MEMBER | null | I'm fairly sure that we agreed we would do this but leave it to just before the 1.3 release to reduce the chance of auto backports failing
| {
"+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/41892/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41892/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41892.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41892",
"merged_at": "2021-06-09T18:29:42Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/41892.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41892"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/41893 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41893/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41893/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41893/events | https://github.com/pandas-dev/pandas/pull/41893 | 916,179,291 | MDExOlB1bGxSZXF1ZXN0NjY1ODg4NDkw | 41,893 | ENH: `Styler.apply_index` and `Styler.applymap_index` for conditional formatting of column/index headers | {
"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": "4E9A06",
"default": false,
"description": null,
"id": 76812,
"name": "Enhancement",
"node_id": "MDU6TGFiZWw3NjgxMg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Enhancement"
},
{
"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-06-09T13:04:59Z" | "2021-08-12T07:30:22Z" | "2021-08-11T19:56:48Z" | CONTRIBUTOR | null | Checks an item on #41648 and #41693
Currently Styler has the `apply` and `applymap` methods to **perform conditional styling on the data elements**.
Recent additions to `Styler.set_table_styles` allows styling of index and column headers if the key-labels are directly specified. But this solution cannot work with LaTeX, nor excel output, and is obviously not conditionally applied.
This PR adds the mechanics to **perform conditional styling on per level index labels**
Follow-ons are:
- [x] updating LaTeX templates to incorporate the styles. (#41993)
- [x] updating Excel output to incorporate the styles. (#41995)
- [x] update Styler user guide

| {
"+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/41893/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41893/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41893.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41893",
"merged_at": "2021-08-11T19:56:48Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/41893.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41893"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/41894 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41894/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41894/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41894/events | https://github.com/pandas-dev/pandas/pull/41894 | 916,196,748 | MDExOlB1bGxSZXF1ZXN0NjY1OTAzMDMy | 41,894 | TYP: use from __future__ import annotations more - batch 2 | {
"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"
} | [
{
"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": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"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": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 0 | "2021-06-09T13:22:34Z" | "2021-06-10T12:00:06Z" | "2021-06-09T15:42:38Z" | MEMBER | 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/41894/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41894/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41894.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41894",
"merged_at": "2021-06-09T15:42:38Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/41894.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41894"
} |
|
https://api.github.com/repos/pandas-dev/pandas/issues/41895 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41895/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41895/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41895/events | https://github.com/pandas-dev/pandas/pull/41895 | 916,211,690 | MDExOlB1bGxSZXF1ZXN0NjY1OTE1NDEw | 41,895 | TYP: use from __future__ import annotations more - batch 3 | {
"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"
} | [
{
"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": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"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": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 0 | "2021-06-09T13:36:59Z" | "2021-06-10T11:59:51Z" | "2021-06-09T15:42:51Z" | MEMBER | 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/41895/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41895/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41895.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41895",
"merged_at": "2021-06-09T15:42:51Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/41895.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41895"
} |
|
https://api.github.com/repos/pandas-dev/pandas/issues/41896 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41896/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41896/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41896/events | https://github.com/pandas-dev/pandas/pull/41896 | 916,247,513 | MDExOlB1bGxSZXF1ZXN0NjY1OTQ2Mjky | 41,896 | TYP: use from __future__ import annotations more - batch 4 | {
"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"
} | [
{
"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": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"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": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 1 | "2021-06-09T14:05:51Z" | "2021-06-10T11:59:39Z" | "2021-06-09T16:14:23Z" | MEMBER | 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/41896/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41896/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41896.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41896",
"merged_at": "2021-06-09T16:14:23Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/41896.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41896"
} |
|
https://api.github.com/repos/pandas-dev/pandas/issues/41897 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41897/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41897/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41897/events | https://github.com/pandas-dev/pandas/pull/41897 | 916,267,372 | MDExOlB1bGxSZXF1ZXN0NjY1OTYyOTQ3 | 41,897 | BUG: to_hdf append string column to incompatible column | {
"avatar_url": "https://avatars.githubusercontent.com/u/6302028?v=4",
"events_url": "https://api.github.com/users/lrepiton/events{/privacy}",
"followers_url": "https://api.github.com/users/lrepiton/followers",
"following_url": "https://api.github.com/users/lrepiton/following{/other_user}",
"gists_url": "https://api.github.com/users/lrepiton/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/lrepiton",
"id": 6302028,
"login": "lrepiton",
"node_id": "MDQ6VXNlcjYzMDIwMjg=",
"organizations_url": "https://api.github.com/users/lrepiton/orgs",
"received_events_url": "https://api.github.com/users/lrepiton/received_events",
"repos_url": "https://api.github.com/users/lrepiton/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/lrepiton/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/lrepiton/subscriptions",
"type": "User",
"url": "https://api.github.com/users/lrepiton"
} | [
{
"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": "read_hdf, HDFStore",
"id": 47229190,
"name": "IO HDF5",
"node_id": "MDU6TGFiZWw0NzIyOTE5MA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20HDF5"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"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": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 4 | "2021-06-09T14:24:34Z" | "2021-06-17T16:20:07Z" | "2021-06-17T13:15:46Z" | CONTRIBUTOR | null | - [ ] closes #xxxx
- [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
- [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/41897/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41897/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41897.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41897",
"merged_at": "2021-06-17T13:15:46Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/41897.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41897"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/41898 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41898/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41898/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41898/events | https://github.com/pandas-dev/pandas/pull/41898 | 916,299,203 | MDExOlB1bGxSZXF1ZXN0NjY1OTg5NDM3 | 41,898 | TYP: use from __future__ import annotations more - batch 5 | {
"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"
} | [
{
"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": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"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": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 0 | "2021-06-09T14:51:13Z" | "2021-06-10T11:59:25Z" | "2021-06-09T16:14:38Z" | MEMBER | 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/41898/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41898/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41898.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41898",
"merged_at": "2021-06-09T16:14:38Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/41898.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41898"
} |
|
https://api.github.com/repos/pandas-dev/pandas/issues/41899 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41899/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41899/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41899/events | https://github.com/pandas-dev/pandas/pull/41899 | 916,307,489 | MDExOlB1bGxSZXF1ZXN0NjY1OTk2MTY0 | 41,899 | DOC: update the msgpack IO section to not refer to pyarrow.serialize | {
"avatar_url": "https://avatars.githubusercontent.com/u/1020496?v=4",
"events_url": "https://api.github.com/users/jorisvandenbossche/events{/privacy}",
"followers_url": "https://api.github.com/users/jorisvandenbossche/followers",
"following_url": "https://api.github.com/users/jorisvandenbossche/following{/other_user}",
"gists_url": "https://api.github.com/users/jorisvandenbossche/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jorisvandenbossche",
"id": 1020496,
"login": "jorisvandenbossche",
"node_id": "MDQ6VXNlcjEwMjA0OTY=",
"organizations_url": "https://api.github.com/users/jorisvandenbossche/orgs",
"received_events_url": "https://api.github.com/users/jorisvandenbossche/received_events",
"repos_url": "https://api.github.com/users/jorisvandenbossche/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jorisvandenbossche/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jorisvandenbossche/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jorisvandenbossche"
} | [
{
"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": "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 | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"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": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 1 | "2021-06-09T14:58:23Z" | "2021-06-11T11:18:50Z" | "2021-06-11T11:18:47Z" | MEMBER | null | Closes #39956
Stop referring to pyarrow.serialize/deserialize, since those are deprecated (see https://arrow.apache.org/docs/python/ipc.html#arbitrary-object-serialization) | {
"+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/41899/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41899/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41899.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41899",
"merged_at": "2021-06-11T11:18:47Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/41899.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41899"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/41900 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41900/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41900/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41900/events | https://github.com/pandas-dev/pandas/pull/41900 | 916,366,912 | MDExOlB1bGxSZXF1ZXN0NjY2MDQ1MjMx | 41,900 | TYP: use from __future__ import annotations more - batch 6 | {
"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"
} | [
{
"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": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"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": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 0 | "2021-06-09T15:55:58Z" | "2021-06-10T11:59:14Z" | "2021-06-09T18:15:56Z" | MEMBER | null | last one. | {
"+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/41900/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41900/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41900.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41900",
"merged_at": "2021-06-09T18:15:56Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/41900.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41900"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/41901 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41901/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41901/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41901/events | https://github.com/pandas-dev/pandas/issues/41901 | 916,377,515 | MDU6SXNzdWU5MTYzNzc1MTU= | 41,901 | STYLE add check for future annotations | {
"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": "eb6420",
"default": false,
"description": "Code style, linting, code_checks",
"id": 106935113,
"name": "Code Style",
"node_id": "MDU6TGFiZWwxMDY5MzUxMTM=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Code%20Style"
},
{
"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"
}
] | 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"
} | 21 | "2021-06-09T16:07:14Z" | "2021-07-16T09:08:33Z" | null | MEMBER | null | xref https://github.com/pandas-dev/pandas/pull/41892#issuecomment-857834651 | {
"+1": 1,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 1,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/41901/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41901/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/41902 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41902/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41902/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41902/events | https://github.com/pandas-dev/pandas/pull/41902 | 916,421,545 | MDExOlB1bGxSZXF1ZXN0NjY2MDkwMDA1 | 41,902 | Initial draft: from_dummies | {
"avatar_url": "https://avatars.githubusercontent.com/u/54398132?v=4",
"events_url": "https://api.github.com/users/pckSF/events{/privacy}",
"followers_url": "https://api.github.com/users/pckSF/followers",
"following_url": "https://api.github.com/users/pckSF/following{/other_user}",
"gists_url": "https://api.github.com/users/pckSF/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/pckSF",
"id": 54398132,
"login": "pckSF",
"node_id": "MDQ6VXNlcjU0Mzk4MTMy",
"organizations_url": "https://api.github.com/users/pckSF/orgs",
"received_events_url": "https://api.github.com/users/pckSF/received_events",
"repos_url": "https://api.github.com/users/pckSF/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/pckSF/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/pckSF/subscriptions",
"type": "User",
"url": "https://api.github.com/users/pckSF"
} | [
{
"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": "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"
}
] | open | false | null | [] | null | 4 | "2021-06-09T17:01:24Z" | "2021-11-07T21:32:47Z" | null | CONTRIBUTOR | null | Converts dummy codes to categorical variables.
- [x] Closes [#8745](https://github.com/pandas-dev/pandas/issues/8745)
- [x] Passes atomic options tests
- [x] Passes linting tests
- [ ] Whatsnew entry
Tests will be expaneded with composite options and edgecases as soon as definition of final scope is complete.
~~I tried to mirror the `get_dummes` function wherever possible to ensure an as close inverse of the function as possible~~
Primary goal of the draft is to demonstrate the options I had in mind, optimization is the next step as soon as we decided what we want to keep, cut, or add.
(Docstrings etc. will be added based on results)
Integration as method of `categorical`, as proposed in [#34426](https://github.com/pandas-dev/pandas/pull/34426), can be considerd as a next step if moving in that direction is planed.
## Current Options:
### no arguments
- Assumes all columns to be cateogries of the same variable which is called `categories`
- example:
```python
>>> dummies
a b c d
0 1 0 0 0
1 0 1 0 0
2 1 0 0 0
3 0 0 0 1
4 0 0 1 0
>>> from_dummies(dummies)
categories
0 a
1 b
2 a
3 d
4 c
```
### subset
- Select which columns of the input `DataFrame` to include for decoding.
- `None`:
- Assumes the entire passed `DataFrame` consists of dummy coded variables
- `List` or `Index`:
- Just returns the decoded subset passed in the list.
- example:
```python
>>> dummies
C col1_a col1_b col2_a col2_b col2_c
0 1 1 0 0 1 0
1 2 0 1 1 0 0
2 3 1 0 0 0 1
>>> from_dummies(dummies, sep="_", subset=["col1_a", "col1_b", "col2_a", "col2_b", "col2_c"])
col1 col2
0 a b
1 b a
2 a c
```
### variables **-- [REMOVED](https://github.com/pandas-dev/pandas/pull/41902#discussion_r650566136) --**
- Inverts the `prefix` argument of `get_dummies`
- Using:
```python
>>> dummies
col1_a col1_b col2_a col2_b col2_c
0 1 0 0 1 0
1 0 1 1 0 0
2 1 0 0 0 1
```
- `None`:
- Variable names are taken from prefix.
- example:
```python
>>> from_dummies(dummies, sep="_", variables=None)
col1 col2
0 a b
1 b a
2 a c
```
- `str`:
- Variable names are numbered from the passed string.
- example:
```python
>>> from_dummies(dummies, sep="_", variables="Varname")
Varname1 Varname2
0 a b
1 b a
2 a c
```
- `List`:
- Variable names are obtained (in order) from the passed list.
- example:
```python
>>> from_dummies(dummies, sep="_", variables=["One", "Two"])
One Two
0 a b
1 b a
2 a c
```
- `Dict`:
- Variable names are obtained from passed prefix to variable mapping.
- Currently orders the returned columns by index in the passed dictionary, not sure if that should be changed to strictly follow the order of prefixes in the dummy-data.
- example:
```python
>>> from_dummies(dummies, sep="_", variables={"col2": "One", "col1": "Two"})
One Two
0 b a
1 a b
2 c a
```
### sep
- Separator used in the column names of the dummy categories they are character indicating the separation of the categorical names from the prefixes. For example, if your column names are `prefix_A` and `prefix_B`, you can strip the underscore by specifying `sep='_'`.
- Required argument if prefixes are to be separated as there is no default separator.
- `str`:
- Splits columns by first instance of passed string to obtain variables and elements.
- example:
```python
>>> dummies
col1_a col1_b col2_a col2_b col2_c
0 1 0 0 1 0
1 0 1 1 0 0
2 1 0 0 0 1
>>> from_dummies(dummies, sep="_")
col1 col2
0 a b
1 b a
2 a c
```
- `list`:
- Splits columns by first instance of any of the seperators passed in the list.
- example:
```python
>>> dummies
col1_a col1_b col2-a col2-b col2-c
0 1 0 0 1 0
1 0 1 1 0 0
2 1 0 0 0 1
>>> from_dummies(dummies, sep=["_", "-"])
col1 col2
0 a b
1 b a
2 a c
```
- `list`:
- Splits columns with prefix by first instance of corresponding seperator.
- example:
```python
>>> dummies
col1_a-a col1_b-b col_2-a col_2-b col_2-c
0 1 0 0 1 0
1 0 1 1 0 0
2 1 0 0 0 1
>>> from_dummies(dummies, sep={"col1": "_", "col_2": "-"})
col1 col_2
0 a-a b
1 b-b a
2 a-a c
```
### dummy_na **-- [REMOVED](https://github.com/pandas-dev/pandas/pull/41902#discussion_r652048588) --**
- mirrors the `dummy_na` argument of `get_dummies`
- `False` but contains NaN:
- Considers row with no assignments as NaN.
- example:
```python
>>> dummies
col1_a col1_b col2_a col2_b col2_c
0 1 0 0 0 0
1 0 1 1 0 0
2 0 0 0 0 1
>>> from_dummies(dummies, sep="_", dummy_na=False)
col1 col2
0 a NaN
1 b a
2 NaN c
```
- `True`:
- Considers row with no assignments as NaN.
- example:
```python
>>> dummies
col1_a col1_b col1_NaN col2_a col2_b col2_c col2_NaN
0 1 0 0 0 0 0 1
1 0 1 0 1 0 0 0
2 0 0 1 0 0 1 0
>>> from_dummies(dummies, sep="_", dummy_na=True)
col1 col2
0 a NaN
1 b a
2 NaN c
```
### dropped_first
- Inverts the `drop_first` argument of `get_dummies`
- Using:
```python
>>> dummies
col1_a col1_b col2_a col2_b col2_c
0 1 0 0 0 0
1 0 1 1 0 0
2 0 0 0 0 1
```
- `None`: **-- [REMOVED](https://github.com/pandas-dev/pandas/pull/41902#discussion_r683637232) --**
- Without `dummy_na=True` non-asigned rows are considered NaN.
- example:
```python
>>> from_dummies(dummies, sep="_", dropped_first=None)
col1 col2
0 a NaN
1 b a
2 NaN c
```
- `str`:
- Assumes all missing assignemtns to be dropped category of the passed type.
- example:
```python
>>> from_dummies(dummies, sep="_", dropped_first="x")
col1 col2
0 a x
1 b a
2 x c
```
- `List`:
- Dropped cateogries for variables are obtained (in order) from the passed list.
- example:
```python
>>> from_dummies(dummies, sep="_", dropped_first=["x", "y"])
col1 col2
0 a y
1 b a
2 x c
```
- `Dict`:
- Dropped cateogries for variables are obtained from the passed prefix to dropped category mapping.
- example:
```python
>>> from_dummies(dummies, sep="_", dropped_first={"col2": "x", "col1": "y"})
col1 col2
0 a x
1 b a
2 y c
```
### fillna **-- [REMOVED](https://github.com/pandas-dev/pandas/pull/41902#discussion_r663350073) --**
- Using:
```bash
>>> dummies
col1_a col1_b col2_a col2_b col2_c
0 1 0 0 NaN 0
1 0 1 1 0 0
2 0 Nan 0 0 1
```
- `True`:
- Can result in double assignemnt, which will raise the respective error.
- example:
```bash
>>> from_dummies(dummies, sep="_", fillna=True)
col1 col2
0 a b
1 b a
2 b c
```
- `False`:
- Can result in unassigned row which will be treated as any other unassigned row.
- example:
```bash
>>> from_dummies(dummies, sep="_", fillna=False)
col1 col2
0 a NaN
1 b a
2 NaN c
```
## To Discuss:
1. Change, remove, or add options?
## To-Do
- [x] Add handling of NA values in input
- [ ] Adapt discussed changes ([~~C1~~](https://github.com/pandas-dev/pandas/pull/41902#discussion_r650566136), [~~C2~~](https://github.com/pandas-dev/pandas/pull/41902#discussion_r652048588))
- [ ] Expand tests
- [ ] Work on optimization ([O1](https://github.com/pandas-dev/pandas/pull/41902#discussion_r652048104))
- [ ] Raise relevant errors
- [ ] 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/41902/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41902/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41902.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41902",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/41902.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41902"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/41903 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41903/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41903/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41903/events | https://github.com/pandas-dev/pandas/pull/41903 | 916,433,549 | MDExOlB1bGxSZXF1ZXN0NjY2MTAwMDM4 | 41,903 | TYP: to_csv accepts IO[bytes] and fix FilePathOrBuffer | {
"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": "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": "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": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"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": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 5 | "2021-06-09T17:16:48Z" | "2021-06-11T11:27:29Z" | "2021-06-10T22:59:39Z" | CONTRIBUTOR | null | Two small typing fixes:
- `to_csv` accepts `IO[bytes]` (replace `FilePathOrBuffer[str]` with `FilePathOrBuffer[AnyStr]`)
- pyright was not able to parse `FilePathOrBuffer` because the unconstrained TypeVar `pandas._typing.T` was used when the constrained TyepVar `typing.AnyStr` should have been used: Could not specialize type "Buffer[AnyStr@Buffer]" Type "T@FileOrBuffer" is incompatible with constrained type variable "AnyStr" | {
"+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/41903/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41903/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41903.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41903",
"merged_at": "2021-06-10T22:59:39Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/41903.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41903"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/41904 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41904/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41904/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41904/events | https://github.com/pandas-dev/pandas/pull/41904 | 916,444,947 | MDExOlB1bGxSZXF1ZXN0NjY2MTA5OTM5 | 41,904 | Fixed file format based on coding standards | {
"avatar_url": "https://avatars.githubusercontent.com/u/47838927?v=4",
"events_url": "https://api.github.com/users/ranOutaNames/events{/privacy}",
"followers_url": "https://api.github.com/users/ranOutaNames/followers",
"following_url": "https://api.github.com/users/ranOutaNames/following{/other_user}",
"gists_url": "https://api.github.com/users/ranOutaNames/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ranOutaNames",
"id": 47838927,
"login": "ranOutaNames",
"node_id": "MDQ6VXNlcjQ3ODM4OTI3",
"organizations_url": "https://api.github.com/users/ranOutaNames/orgs",
"received_events_url": "https://api.github.com/users/ranOutaNames/received_events",
"repos_url": "https://api.github.com/users/ranOutaNames/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ranOutaNames/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ranOutaNames/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ranOutaNames"
} | [] | closed | false | null | [] | null | 3 | "2021-06-09T17:29:35Z" | "2021-06-11T03:11:00Z" | "2021-06-11T03:11:00Z" | NONE | null | Moved late imports, fixed whitespace issues, cleaned up comments. | {
"+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/41904/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41904/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41904.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41904",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/41904.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41904"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/41905 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41905/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41905/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41905/events | https://github.com/pandas-dev/pandas/issues/41905 | 916,477,766 | MDU6SXNzdWU5MTY0Nzc3NjY= | 41,905 | BUG: read_json chunksize parameter does not work | {
"avatar_url": "https://avatars.githubusercontent.com/u/1199593?v=4",
"events_url": "https://api.github.com/users/simonm3/events{/privacy}",
"followers_url": "https://api.github.com/users/simonm3/followers",
"following_url": "https://api.github.com/users/simonm3/following{/other_user}",
"gists_url": "https://api.github.com/users/simonm3/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/simonm3",
"id": 1199593,
"login": "simonm3",
"node_id": "MDQ6VXNlcjExOTk1OTM=",
"organizations_url": "https://api.github.com/users/simonm3/orgs",
"received_events_url": "https://api.github.com/users/simonm3/received_events",
"repos_url": "https://api.github.com/users/simonm3/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/simonm3/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/simonm3/subscriptions",
"type": "User",
"url": "https://api.github.com/users/simonm3"
} | [
{
"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": "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-06-09T17:57:44Z" | "2021-06-10T11:06:07Z" | "2021-06-10T11:06:07Z" | NONE | null | If I set chunksize=100 without nrows then it crashes with a memory error. If I set chunksize and nrows then it returns the maximum rows of the two. The workaround of setting nrows to a high number does not work as it just crashes with a memory error even with low chunksize.
I am using ubuntu20 wsl2/windows10, python=3.8, pandas=1.2.4
This has been reported in other closed issues but does not seem to be fixed.
https://github.com/pandas-dev/pandas/issues/34548
https://github.com/pandas-dev/pandas/issues/36791 | {
"+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/41905/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41905/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/41906 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41906/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41906/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41906/events | https://github.com/pandas-dev/pandas/issues/41906 | 916,521,929 | MDU6SXNzdWU5MTY1MjE5Mjk= | 41,906 | BUG: pytz.AmbiguousTimeError not caught in hypothesis `test_on_offset_implementations` | {
"avatar_url": "https://avatars.githubusercontent.com/u/5811028?v=4",
"events_url": "https://api.github.com/users/jackzyliu/events{/privacy}",
"followers_url": "https://api.github.com/users/jackzyliu/followers",
"following_url": "https://api.github.com/users/jackzyliu/following{/other_user}",
"gists_url": "https://api.github.com/users/jackzyliu/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jackzyliu",
"id": 5811028,
"login": "jackzyliu",
"node_id": "MDQ6VXNlcjU4MTEwMjg=",
"organizations_url": "https://api.github.com/users/jackzyliu/orgs",
"received_events_url": "https://api.github.com/users/jackzyliu/received_events",
"repos_url": "https://api.github.com/users/jackzyliu/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jackzyliu/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jackzyliu/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jackzyliu"
} | [
{
"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": "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": "0052cc",
"default": false,
"description": "DateOffsets",
"id": 53181044,
"name": "Frequency",
"node_id": "MDU6TGFiZWw1MzE4MTA0NA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Frequency"
}
] | 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-06-09T18:25:15Z" | "2021-06-16T00:28:31Z" | "2021-06-16T00:17:20Z" | CONTRIBUTOR | null | - [x] I have checked that this issue has not already been reported.
- [ ] 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.
---
**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
(Hypothesis) Test name: `test_on_offset_implementations`
Test location: `pandas/tests/tseries/offsets/test_offsets_properties.py`
The following pair of test inputs at some point came up as failed for the hypothesis test in the checks for #41488, with `pytz.AmbiguousTimeError`.
```
dt = datetime.datetime(1900, 1, 1, 0, 0, tzinfo=pytz.timezone('Africa/Kinshasa'))
offset = pd.offsets.MonthBegin(66)
```
I didn't get the blob for `@reproduce_failure`, but we can similarly reproduce with `@example` as follows. **Please let me know if there is less messy, more copy-and-paste-able way to reproduce the test failure.**
```python
from hypothesis import example
import datetime
dt = datetime.datetime(1900, 1, 1, 0, 0, tzinfo=pytz.timezone('Africa/Kinshasa'))
offset = MonthBegin(66)
@example(dt, offset)
# ------ prepend the code snippet above to reproduce test failure ------
@pytest.mark.arm_slow
@given(gen_random_datetime, gen_yqm_offset)
def test_on_offset_implementations(dt, offset):
assume(not offset.normalize)
# check that the class-specific implementations of is_on_offset match
# the general case definition:
# (dt + offset) - offset == dt
try:
compare = (dt + offset) - offset
except pytz.NonExistentTimeError:
# dt + offset does not exist, assume(False) to indicate
# to hypothesis that this is not a valid test case
assume(False)
assert offset.is_on_offset(dt) == (compare == dt)
```
#### Expected Output
`dt + offset` yields `pd.Timestamp('1905-07-01', tzinfo=pytz.timezone('Africa/Kinshasa'))`, which I think is correctly an DST-ambiguous timestamp given the following `pytz` specifications. So we should probably **catch the exception and directly assume(False)**.
```
In[16]: import pytz
...: print(pytz.timezone('Africa/Kinshasa')._utc_transition_times[1])
...: print(pytz.timezone('Africa/Kinshasa')._transition_info[1])
...:
1905-06-30 23:46:25
(datetime.timedelta(0), datetime.timedelta(0), 'GMT')
```
#### Actual Output
```
============================================== FAILURES ==============================================
___________________________________ test_on_offset_implementations ___________________________________
@example(dt, offset)
> # ------ prepend code snippet to reproduce test failure ------
@pytest.mark.arm_slow
@given(gen_random_datetime, gen_yqm_offset)
pandas/tests/tseries/offsets/test_offsets_properties.py:99:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
pandas/tests/tseries/offsets/test_offsets_properties.py:108: in test_on_offset_implementations
compare = (dt + offset) - offset
pandas/_libs/tslibs/offsets.pyx:430: in pandas._libs.tslibs.offsets.BaseOffset.__add__
return other.__add__(self)
pandas/_libs/tslibs/offsets.pyx:432: in pandas._libs.tslibs.offsets.BaseOffset.__add__
return self.apply(other)
pandas/_libs/tslibs/offsets.pyx:178: in pandas._libs.tslibs.offsets.apply_wraps.wrapper
result = result.tz_localize(tz)
pandas/_libs/tslibs/timestamps.pyx:1705: in pandas._libs.tslibs.timestamps.Timestamp.tz_localize
value = tz_localize_to_utc_single(self.value, tz,
pandas/_libs/tslibs/tzconversion.pyx:74: in pandas._libs.tslibs.tzconversion.tz_localize_to_utc_single
return tz_localize_to_utc(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> raise pytz.AmbiguousTimeError(
E pytz.exceptions.AmbiguousTimeError: Cannot infer dst time from 1905-07-01 00:00:00, try using the 'ambiguous' argument
pandas/_libs/tslibs/tzconversion.pyx:284: AmbiguousTimeError
--------------------------------------------- Hypothesis ---------------------------------------------
Falsifying explicit example: test_on_offset_implementations(
dt=datetime.datetime(1900, 1, 1, 0, 0, tzinfo=<DstTzInfo 'Africa/Kinshasa' LMT+0:14:00 STD>),
offset=<66 * MonthBegins>,
)
```
</details>
#### Problem description
See above.
#### Output of ``pd.show_versions()``
```
INSTALLED VERSIONS
------------------
commit : 4d1019487a73d3e1791e1bace774522307ec2bbc
python : 3.8.8.final.0
python-bits : 64
OS : Linux
OS-release : 5.8.0-55-generic
Version : #62~20.04.1-Ubuntu SMP Wed Jun 2 08:55:04 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.0.dev0+1850.g4d1019487a.dirty
numpy : 1.20.1
pytz : 2021.1
dateutil : 2.8.1
pip : 21.0.1
setuptools : 49.6.0.post20210108
Cython : 0.29.22
pytest : 6.2.2
hypothesis : 6.8.1
sphinx : 3.5.3
blosc : None
feather : None
xlsxwriter : 1.3.7
lxml.etree : 4.6.2
html5lib : 1.1
pymysql : None
psycopg2 : None
jinja2 : 2.11.3
IPython : 7.21.0
pandas_datareader: None
bs4 : 4.9.3
bottleneck : 1.3.2
fsspec : 0.8.7
fastparquet : 0.5.0
gcsfs : 0.7.2
matplotlib : 3.3.4
numexpr : 2.7.3
odfpy : None
openpyxl : 3.0.7
pandas_gbq : None
pyarrow : 3.0.0
pyxlsb : None
s3fs : 0.5.2
scipy : 1.6.1
sqlalchemy : 1.4.2
tables : 3.6.1
tabulate : 0.8.9
xarray : 0.17.0
xlrd : 2.0.1
xlwt : 1.3.0
numba : 0.53.0
```
</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/41906/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41906/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/41907 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41907/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41907/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41907/events | https://github.com/pandas-dev/pandas/pull/41907 | 916,540,578 | MDExOlB1bGxSZXF1ZXN0NjY2MTk3MjU3 | 41,907 | BUG: pytz.AmbiguousTimeError not caught in hypothesis test test_on_offset_implementations (GH41906) | {
"avatar_url": "https://avatars.githubusercontent.com/u/5811028?v=4",
"events_url": "https://api.github.com/users/jackzyliu/events{/privacy}",
"followers_url": "https://api.github.com/users/jackzyliu/followers",
"following_url": "https://api.github.com/users/jackzyliu/following{/other_user}",
"gists_url": "https://api.github.com/users/jackzyliu/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jackzyliu",
"id": 5811028,
"login": "jackzyliu",
"node_id": "MDQ6VXNlcjU4MTEwMjg=",
"organizations_url": "https://api.github.com/users/jackzyliu/orgs",
"received_events_url": "https://api.github.com/users/jackzyliu/received_events",
"repos_url": "https://api.github.com/users/jackzyliu/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jackzyliu/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jackzyliu/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jackzyliu"
} | [
{
"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": "0052cc",
"default": false,
"description": "DateOffsets",
"id": 53181044,
"name": "Frequency",
"node_id": "MDU6TGFiZWw1MzE4MTA0NA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Frequency"
}
] | 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"
} | 7 | "2021-06-09T18:39:28Z" | "2021-06-16T00:17:24Z" | "2021-06-16T00:17:21Z" | CONTRIBUTOR | null | - [x] closes #41906
- [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: let me know if 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/41907/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41907/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41907.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41907",
"merged_at": "2021-06-16T00:17:20Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/41907.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41907"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/41908 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41908/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41908/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41908/events | https://github.com/pandas-dev/pandas/pull/41908 | 916,555,061 | MDExOlB1bGxSZXF1ZXN0NjY2MjEwNTI2 | 41,908 | DOC clean up positional-args deprecation warnings in whatsnew | {
"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": "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": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"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": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 2 | "2021-06-09T18:50:18Z" | "2021-06-10T12:18:24Z" | "2021-06-10T11:04:03Z" | 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/41908/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41908/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41908.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41908",
"merged_at": "2021-06-10T11:04:03Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/41908.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41908"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/41909 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41909/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41909/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41909/events | https://github.com/pandas-dev/pandas/issues/41909 | 916,642,949 | MDU6SXNzdWU5MTY2NDI5NDk= | 41,909 | ENH: Add subset to fillna | {
"avatar_url": "https://avatars.githubusercontent.com/u/1563963?v=4",
"events_url": "https://api.github.com/users/eikevons/events{/privacy}",
"followers_url": "https://api.github.com/users/eikevons/followers",
"following_url": "https://api.github.com/users/eikevons/following{/other_user}",
"gists_url": "https://api.github.com/users/eikevons/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/eikevons",
"id": 1563963,
"login": "eikevons",
"node_id": "MDQ6VXNlcjE1NjM5NjM=",
"organizations_url": "https://api.github.com/users/eikevons/orgs",
"received_events_url": "https://api.github.com/users/eikevons/received_events",
"repos_url": "https://api.github.com/users/eikevons/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/eikevons/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/eikevons/subscriptions",
"type": "User",
"url": "https://api.github.com/users/eikevons"
} | [
{
"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": "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": "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 | 3 | "2021-06-09T20:20:55Z" | "2021-08-21T02:24:17Z" | null | NONE | null | #### Is your feature request related to a problem?
When filling NAs, I need to use different methods for different columns or ignore some columns. Filling with different values per column works by passing a dict to `values` but it's not possible to do something similar for `method`-based filling, e.g. bfill `x` and ffill `y` of
```python
>>> df = pd.DataFrame({'x':[1, None, 2]}).assign(y=lambda df: df.x)
>>> df
x y
0 1.0 1.0
1 NaN NaN
2 3.0 3.0
```
#### Describe the solution you'd like
I see 3 options to implement this in pandas (with examples how to solve the task above):
1. Allow the `method` argument of `fillna` to accept a dict mapping column/index-label to requested method (similar to how the `value` argument is working)
```python
df.fillna(method={'x':'bfill', 'y':'ffill'})
```
when dealing with many columns, this will turn into:
```python
df.fillna(method={'col1': 'bfill', 'col2': 'ffill', 'col3': 'nearest', 'col4': 'bfill', 'col5': 'bfill'})
```
2. Allow `method` to take a dict which maps methods to lists of column/index-labels. This would allow more-concise code than the 1. option but will also add inconsistency between `method` and `value` arguments.
```python
df.fillna(method={'bfill': 'x', 'ffill':'y'})
```
when dealing with many columns, this will turn into:
```python
df.fillna(method={'bfill':['col1', 'col4', 'col5'], 'ffill':'col2', 'nearest':'col3'})
```
3. Add a `subset` argument working the same as with [`dropna()`](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.dropna.html) and [`drop_duplicates()`](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.drop_duplicates.html). This should also be available in the method-specific methods, e.g. [`bfill()`](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.bfill.html)
```python
df.bfill(subset=['x']).ffill(subset=['y'])
```
and
```python
df.bfill(subset=['col1', 'col4', 'col5']).ffill(subset='col2').fillna(method='nearest', subset='col3')
```
#### API breaking implications
There should be none because arguments will added or existing arguments will accept types currently not allowed.
#### Describe alternatives you've considered
It's always possible to re-assign subsets of the data frame, e.g.
```python
df['x'] = df['x'].bfill()
df['y'] = df['y'].ffill()
```
But this involves a lot of boilerplate code which adds noise to the code in total. | {
"+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/41909/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41909/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/41910 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41910/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41910/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41910/events | https://github.com/pandas-dev/pandas/pull/41910 | 916,649,724 | MDExOlB1bGxSZXF1ZXN0NjY2Mjk0NzY0 | 41,910 | REF: split out sorted_rank algo | {
"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": "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": "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-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"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": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 3 | "2021-06-09T20:30:45Z" | "2021-06-10T00:33:46Z" | "2021-06-10T00:26:49Z" | MEMBER | null | No behavior change here, but two main advantages can follow this refactor:
- Right now `rank_2d` does the ranking portion of the algo with different logic. `rank_2d` can instead call this function, which will allow removing lots of `rank_2d` code and make keeping behaviors in sync easier. `rank_2d` also does not use `nogil`, which this would fix.
- `nancorr_spearman` can use this for a simplified (and hopefully faster) reranking handling when nulls are present.
The diff looks more complicated than it is because the structure was changed from
```
if object:
...
else:
with nogil:
....
```
to
```
if object:
with gil:
...
else:
....
```
Benchmarks look unaffected:
<details>
```
before after ratio
[8b9b1a1d] [c7a91ac3]
<master> <ref/rank_1d_sorted>
264±10μs 297±20μs ~1.13 groupby.GroupByMethods.time_dtype_as_field('datetime', 'rank', 'direct')
259±10μs 293±8μs ~1.13 groupby.GroupByMethods.time_dtype_as_field('datetime', 'rank', 'transformation')
416±20μs 399±10μs 0.96 groupby.GroupByMethods.time_dtype_as_field('float', 'rank', 'direct')
414±4μs 405±40μs 0.98 groupby.GroupByMethods.time_dtype_as_field('float', 'rank', 'transformation')
406±30μs 374±8μs 0.92 groupby.GroupByMethods.time_dtype_as_field('int', 'rank', 'direct')
509±200μs 413±40μs ~0.81 groupby.GroupByMethods.time_dtype_as_field('int', 'rank', 'transformation')
1.31±0.03ms 1.42±0.03ms 1.09 groupby.GroupByMethods.time_dtype_as_field('object', 'rank', 'direct')
1.37±0.06ms 1.41±0.09ms 1.03 groupby.GroupByMethods.time_dtype_as_field('object', 'rank', 'transformation')
354±40μs 406±9μs ~1.15 groupby.GroupByMethods.time_dtype_as_field('uint', 'rank', 'direct')
387±10μs 368±7μs 0.95 groupby.GroupByMethods.time_dtype_as_field('uint', 'rank', 'transformation')
350±9μs 378±20μs 1.08 groupby.GroupByMethods.time_dtype_as_group('datetime', 'rank', 'direct')
366±20μs 390±10μs 1.06 groupby.GroupByMethods.time_dtype_as_group('datetime', 'rank', 'transformation')
339±10μs 368±10μs 1.09 groupby.GroupByMethods.time_dtype_as_group('float', 'rank', 'direct')
350±20μs 375±20μs 1.07 groupby.GroupByMethods.time_dtype_as_group('float', 'rank', 'transformation')
347±30μs 370±10μs 1.07 groupby.GroupByMethods.time_dtype_as_group('int', 'rank', 'direct')
348±30μs 380±20μs 1.09 groupby.GroupByMethods.time_dtype_as_group('int', 'rank', 'transformation')
270±20μs 277±10μs 1.03 groupby.GroupByMethods.time_dtype_as_group('object', 'rank', 'direct')
259±10μs 272±20μs 1.05 groupby.GroupByMethods.time_dtype_as_group('object', 'rank', 'transformation')
340±20μs 377±20μs ~1.11 groupby.GroupByMethods.time_dtype_as_group('uint', 'rank', 'direct')
364±7μs 387±20μs 1.06 groupby.GroupByMethods.time_dtype_as_group('uint', 'rank', 'transformation')
1.05±0.07ms 1.02±0.04ms 0.98 groupby.RankWithTies.time_rank_ties('datetime64', 'average')
1.04±0.05ms 1.05±0.04ms 1.00 groupby.RankWithTies.time_rank_ties('datetime64', 'dense')
1.12±0.1ms 1.10±0.04ms 0.98 groupby.RankWithTies.time_rank_ties('datetime64', 'first')
1.21±0.2ms 1.01±0.02ms ~0.84 groupby.RankWithTies.time_rank_ties('datetime64', 'max')
1.01±0.03ms 996±30μs 0.99 groupby.RankWithTies.time_rank_ties('datetime64', 'min')
1.03±0.03ms 997±20μs 0.97 groupby.RankWithTies.time_rank_ties('float32', 'average')
1.06±0.05ms 1.03±0.02ms 0.97 groupby.RankWithTies.time_rank_ties('float32', 'dense')
1.07±0.03ms 1.22±0.2ms ~1.14 groupby.RankWithTies.time_rank_ties('float32', 'first')
1.02±0.04ms 1.02±0.06ms 1.01 groupby.RankWithTies.time_rank_ties('float32', 'max')
1.06±0.03ms 1.08±0.1ms 1.02 groupby.RankWithTies.time_rank_ties('float32', 'min')
1.08±0.03ms 1.03±0.04ms 0.96 groupby.RankWithTies.time_rank_ties('float64', 'average')
1.03±0.04ms 1.01±0.06ms 0.98 groupby.RankWithTies.time_rank_ties('float64', 'dense')
1.04±0.06ms 995±30μs 0.95 groupby.RankWithTies.time_rank_ties('float64', 'first')
1.05±0.04ms 1.03±0.06ms 0.98 groupby.RankWithTies.time_rank_ties('float64', 'max')
1.11±0.05ms 1.01±0.04ms ~0.91 groupby.RankWithTies.time_rank_ties('float64', 'min')
1.09±0.09ms 1.15±0.07ms 1.06 groupby.RankWithTies.time_rank_ties('int64', 'average')
1.12±0.1ms 1.04±0.07ms 0.93 groupby.RankWithTies.time_rank_ties('int64', 'dense')
1.05±0.09ms 1.02±0.03ms 0.97 groupby.RankWithTies.time_rank_ties('int64', 'first')
1.15±0.1ms 1.07±0.07ms 0.93 groupby.RankWithTies.time_rank_ties('int64', 'max')
1.02±0.2ms 999±30μs 0.98 groupby.RankWithTies.time_rank_ties('int64', 'min')
10.1±0.8ms 10.0±0.9ms 0.99 series_methods.Rank.time_rank('float')
7.71±0.4ms 7.99±0.9ms 1.04 series_methods.Rank.time_rank('int')
48.4±0.7ms 57.1±2ms ~1.18 series_methods.Rank.time_rank('object')
8.09±0.7ms 7.07±0.3ms ~0.87 series_methods.Rank.time_rank('uint')
```
</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/41910/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41910/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41910.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41910",
"merged_at": "2021-06-10T00:26:49Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/41910.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41910"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/41911 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41911/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41911/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41911/events | https://github.com/pandas-dev/pandas/pull/41911 | 916,678,869 | MDExOlB1bGxSZXF1ZXN0NjY2MzE5NDQ0 | 41,911 | PERF: reductions | {
"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 | [] | null | 11 | "2021-06-09T21:14:30Z" | "2021-06-10T14:40:44Z" | "2021-06-10T11:20:37Z" | MEMBER | null | Discussed on today's call | {
"+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/41911/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41911/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41911.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41911",
"merged_at": "2021-06-10T11:20:37Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/41911.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41911"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/41912 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41912/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41912/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41912/events | https://github.com/pandas-dev/pandas/pull/41912 | 916,685,270 | MDExOlB1bGxSZXF1ZXN0NjY2MzI0ODE3 | 41,912 | REF: simplify Series.__setitem__ | {
"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": "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": "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 | 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-06-09T21:24:39Z" | "2021-06-18T02:05:32Z" | "2021-06-18T01:49:03Z" | MEMBER | null | Motivating goal is to get rid of the Series methods that use `self.index._engine.get_loc`, as these are a mine field (xref #41846). The correct method would be to use `self.index.get_loc`, the trouble being that we are inconsistent about what kinds of exceptions we raise in engine.get_loc vs Index.get_loc (and Index subclasses). This is a bite-size step towards this goal. | {
"+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/41912/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41912/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41912.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41912",
"merged_at": "2021-06-18T01:49:03Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/41912.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41912"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/41913 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41913/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41913/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41913/events | https://github.com/pandas-dev/pandas/pull/41913 | 916,714,181 | MDExOlB1bGxSZXF1ZXN0NjY2MzQ5NTIy | 41,913 | Revert "CI: Pin jinja2 to version lower than 3.0" | {
"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": "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": "d93f0b",
"default": false,
"description": "Required and optional dependencies",
"id": 527603109,
"name": "Dependencies",
"node_id": "MDU6TGFiZWw1Mjc2MDMxMDk=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Dependencies"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"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": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 2 | "2021-06-09T22:17:35Z" | "2021-06-10T02:23:19Z" | "2021-06-10T00:13:28Z" | MEMBER | null | closes #41450
Reverts pandas-dev/pandas#41452 | {
"+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/41913/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41913/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41913.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41913",
"merged_at": "2021-06-10T00:13:28Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/41913.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41913"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/41914 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41914/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41914/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41914/events | https://github.com/pandas-dev/pandas/pull/41914 | 916,733,830 | MDExOlB1bGxSZXF1ZXN0NjY2MzY2MzEz | 41,914 | BUG: Categorical.fillna with non-category tuple | {
"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": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"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": "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-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"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": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 0 | "2021-06-09T23:02:46Z" | "2021-06-10T23:32:17Z" | "2021-06-10T22:58:36Z" | MEMBER | null | - [ ] closes #xxxx
- [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/41914/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41914/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41914.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41914",
"merged_at": "2021-06-10T22:58:35Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/41914.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41914"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/41915 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41915/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41915/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41915/events | https://github.com/pandas-dev/pandas/pull/41915 | 916,794,754 | MDExOlB1bGxSZXF1ZXN0NjY2NDE5MDYz | 41,915 | BUG: MultiIndex.difference incorrectly raising TypeError when indexes contain non-sortable entries | {
"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": "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": "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"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"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": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 5 | "2021-06-10T01:18:17Z" | "2021-06-17T18:53:11Z" | "2021-06-17T17:51:36Z" | MEMBER | null | - [ ] closes #xxxx
- [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/41915/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41915/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41915.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41915",
"merged_at": "2021-06-17T17:51:36Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/41915.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41915"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/41916 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41916/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41916/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41916/events | https://github.com/pandas-dev/pandas/pull/41916 | 916,799,729 | MDExOlB1bGxSZXF1ZXN0NjY2NDIzMTU2 | 41,916 | REF: give rank1d/2d same nan filling | {
"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": "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": "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": 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-06-10T01:30:01Z" | "2021-06-17T17:08:08Z" | "2021-06-17T14:19:29Z" | MEMBER | null | A piece broken off the `rank_2d` deduplication
| {
"+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/41916/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41916/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41916.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41916",
"merged_at": "2021-06-17T14:19:29Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/41916.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41916"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/41917 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41917/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41917/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41917/events | https://github.com/pandas-dev/pandas/pull/41917 | 916,854,630 | MDExOlB1bGxSZXF1ZXN0NjY2NDY5MjE4 | 41,917 | PERF: cache _should_fallback_to_positional | {
"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"
}
] | 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-06-10T03:38:32Z" | "2021-06-17T18:48:24Z" | "2021-06-17T17:54:22Z" | MEMBER | null | Doesn't really make a difference ATM, but some of the possible solutions to #33469 may be affected, so getting this out of the way to trim that diff. | {
"+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/41917/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41917/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41917.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41917",
"merged_at": "2021-06-17T17:54:22Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/41917.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41917"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/41918 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41918/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41918/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41918/events | https://github.com/pandas-dev/pandas/pull/41918 | 916,915,122 | MDExOlB1bGxSZXF1ZXN0NjY2NTIxNTQ0 | 41,918 | BUG: inconsistent validation for 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": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"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"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"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": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 2 | "2021-06-10T05:25:54Z" | "2021-06-10T23:44:39Z" | "2021-06-10T23:37:05Z" | MEMBER | null | By putting all the validation up-front, we'll be able to safely move some short-circuiting checks from the subclasses _get_indexer methods up to the single get_indexer 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/41918/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41918/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41918.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41918",
"merged_at": "2021-06-10T23:37:05Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/41918.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41918"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/41919 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/41919/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/41919/comments | https://api.github.com/repos/pandas-dev/pandas/issues/41919/events | https://github.com/pandas-dev/pandas/pull/41919 | 916,917,326 | MDExOlB1bGxSZXF1ZXN0NjY2NTIzNDQy | 41,919 | REF: de-duplicate Categorical _validate_foo_value | {
"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": "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"
},
{
"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": 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-06-10T05:29:37Z" | "2021-07-16T04:51:00Z" | "2021-07-15T23:55:08Z" | MEMBER | null | - [ ] closes #xxxx
- [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
TypeError is "more correct" for these anyway, and we come within striking distance of sharing with datetimelike. | {
"+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/41919/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/41919/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/41919.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/41919",
"merged_at": "2021-07-15T23:55:08Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/41919.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/41919"
} |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.