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
timestamp[us, tz=UTC] | updated_at
timestamp[us, tz=UTC] | closed_at
timestamp[us, tz=UTC] | 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/33617
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33617/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33617/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33617/events
|
https://github.com/pandas-dev/pandas/pull/33617
| 602,351,790
|
MDExOlB1bGxSZXF1ZXN0NDA1NDI1Mjg4
| 33,617
|
CLN: Cython warnings for type declartions
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/16733618?v=4",
"events_url": "https://api.github.com/users/alimcmaster1/events{/privacy}",
"followers_url": "https://api.github.com/users/alimcmaster1/followers",
"following_url": "https://api.github.com/users/alimcmaster1/following{/other_user}",
"gists_url": "https://api.github.com/users/alimcmaster1/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/alimcmaster1",
"id": 16733618,
"login": "alimcmaster1",
"node_id": "MDQ6VXNlcjE2NzMzNjE4",
"organizations_url": "https://api.github.com/users/alimcmaster1/orgs",
"received_events_url": "https://api.github.com/users/alimcmaster1/received_events",
"repos_url": "https://api.github.com/users/alimcmaster1/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/alimcmaster1/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/alimcmaster1/subscriptions",
"type": "User",
"url": "https://api.github.com/users/alimcmaster1"
}
|
[
{
"color": "207de5",
"default": false,
"description": null,
"id": 211029535,
"name": "Clean",
"node_id": "MDU6TGFiZWwyMTEwMjk1MzU=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Clean"
},
{
"color": "ea91a4",
"default": false,
"description": "type annotations, mypy/pyright type checking",
"id": 1280988427,
"name": "Typing",
"node_id": "MDU6TGFiZWwxMjgwOTg4NDI3",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Typing"
}
] |
closed
| false
| null |
[] |
{
"closed_at": "2020-07-28T18:13:47Z",
"closed_issues": 2378,
"created_at": "2019-12-02T12:52:48Z",
"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": "2020-08-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/68",
"id": 4894670,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68/labels",
"node_id": "MDk6TWlsZXN0b25lNDg5NDY3MA==",
"number": 68,
"open_issues": 0,
"state": "closed",
"title": "1.1",
"updated_at": "2021-07-17T17:25:28Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68"
}
| 7
| 2020-04-18T01:37:29Z
| 2020-05-01T22:03:19Z
| 2020-04-19T21:15:19Z
|
CONTRIBUTOR
| null |
```
warning: pandas/_libs/internals.pyx:144:29: Strings should no longer be used for type declarations. Use 'cython.int' etc. directly.
warning: pandas/_libs/internals.pyx:147:32: Strings should no longer be used for type declarations. Use 'cython.int' etc. directly.
warning: pandas/_libs/internals.pyx:188:28: Strings should no longer be used for type declarations. Use 'cython.int' etc. directly.
```
(Against cython 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/33617/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33617/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/33617.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/33617",
"merged_at": "2020-04-19T21:15:19Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/33617.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/33617"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33618
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33618/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33618/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33618/events
|
https://github.com/pandas-dev/pandas/pull/33618
| 602,352,157
|
MDExOlB1bGxSZXF1ZXN0NDA1NDI1NTUz
| 33,618
|
CLN: Remove unrequired imports
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/16733618?v=4",
"events_url": "https://api.github.com/users/alimcmaster1/events{/privacy}",
"followers_url": "https://api.github.com/users/alimcmaster1/followers",
"following_url": "https://api.github.com/users/alimcmaster1/following{/other_user}",
"gists_url": "https://api.github.com/users/alimcmaster1/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/alimcmaster1",
"id": 16733618,
"login": "alimcmaster1",
"node_id": "MDQ6VXNlcjE2NzMzNjE4",
"organizations_url": "https://api.github.com/users/alimcmaster1/orgs",
"received_events_url": "https://api.github.com/users/alimcmaster1/received_events",
"repos_url": "https://api.github.com/users/alimcmaster1/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/alimcmaster1/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/alimcmaster1/subscriptions",
"type": "User",
"url": "https://api.github.com/users/alimcmaster1"
}
|
[
{
"color": "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": "2020-07-28T18:13:47Z",
"closed_issues": 2378,
"created_at": "2019-12-02T12:52:48Z",
"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": "2020-08-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/68",
"id": 4894670,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68/labels",
"node_id": "MDk6TWlsZXN0b25lNDg5NDY3MA==",
"number": 68,
"open_issues": 0,
"state": "closed",
"title": "1.1",
"updated_at": "2021-07-17T17:25:28Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68"
}
| 1
| 2020-04-18T01:40:11Z
| 2020-04-19T18:47:01Z
| 2020-04-19T18:46:52Z
|
CONTRIBUTOR
| null |
Looks like these are no longer 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/33618/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33618/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/33618.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/33618",
"merged_at": "2020-04-19T18:46:52Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/33618.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/33618"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33619
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33619/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33619/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33619/events
|
https://github.com/pandas-dev/pandas/pull/33619
| 602,352,562
|
MDExOlB1bGxSZXF1ZXN0NDA1NDI1ODY1
| 33,619
|
CLN: isort core/api.py
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/16733618?v=4",
"events_url": "https://api.github.com/users/alimcmaster1/events{/privacy}",
"followers_url": "https://api.github.com/users/alimcmaster1/followers",
"following_url": "https://api.github.com/users/alimcmaster1/following{/other_user}",
"gists_url": "https://api.github.com/users/alimcmaster1/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/alimcmaster1",
"id": 16733618,
"login": "alimcmaster1",
"node_id": "MDQ6VXNlcjE2NzMzNjE4",
"organizations_url": "https://api.github.com/users/alimcmaster1/orgs",
"received_events_url": "https://api.github.com/users/alimcmaster1/received_events",
"repos_url": "https://api.github.com/users/alimcmaster1/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/alimcmaster1/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/alimcmaster1/subscriptions",
"type": "User",
"url": "https://api.github.com/users/alimcmaster1"
}
|
[
{
"color": "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": "2020-07-28T18:13:47Z",
"closed_issues": 2378,
"created_at": "2019-12-02T12:52:48Z",
"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": "2020-08-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/68",
"id": 4894670,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68/labels",
"node_id": "MDk6TWlsZXN0b25lNDg5NDY3MA==",
"number": 68,
"open_issues": 0,
"state": "closed",
"title": "1.1",
"updated_at": "2021-07-17T17:25:28Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68"
}
| 1
| 2020-04-18T01:43:11Z
| 2020-04-18T03:40:18Z
| 2020-04-18T03:40:13Z
|
CONTRIBUTOR
| null |
```isort --quiet --recursive --check-only pandas asv_bench scripts``` runs fine
|
{
"+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/33619/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33619/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/33619.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/33619",
"merged_at": "2020-04-18T03:40:13Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/33619.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/33619"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33620
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33620/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33620/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33620/events
|
https://github.com/pandas-dev/pandas/issues/33620
| 602,359,774
|
MDU6SXNzdWU2MDIzNTk3NzQ=
| 33,620
|
ENH: add row and column options to margin parameter in pd.DataFrame.pivot_table
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/56904329?v=4",
"events_url": "https://api.github.com/users/pshMsGsAZL2n07ohWBCAGX9cC/events{/privacy}",
"followers_url": "https://api.github.com/users/pshMsGsAZL2n07ohWBCAGX9cC/followers",
"following_url": "https://api.github.com/users/pshMsGsAZL2n07ohWBCAGX9cC/following{/other_user}",
"gists_url": "https://api.github.com/users/pshMsGsAZL2n07ohWBCAGX9cC/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/pshMsGsAZL2n07ohWBCAGX9cC",
"id": 56904329,
"login": "pshMsGsAZL2n07ohWBCAGX9cC",
"node_id": "MDQ6VXNlcjU2OTA0MzI5",
"organizations_url": "https://api.github.com/users/pshMsGsAZL2n07ohWBCAGX9cC/orgs",
"received_events_url": "https://api.github.com/users/pshMsGsAZL2n07ohWBCAGX9cC/received_events",
"repos_url": "https://api.github.com/users/pshMsGsAZL2n07ohWBCAGX9cC/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/pshMsGsAZL2n07ohWBCAGX9cC/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/pshMsGsAZL2n07ohWBCAGX9cC/subscriptions",
"type": "User",
"url": "https://api.github.com/users/pshMsGsAZL2n07ohWBCAGX9cC"
}
|
[
{
"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": "Clarification about behavior needed to assess issue",
"id": 307649777,
"name": "Needs Info",
"node_id": "MDU6TGFiZWwzMDc2NDk3Nzc=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Needs%20Info"
}
] |
closed
| false
| null |
[] | null | 3
| 2020-04-18T02:32:20Z
| 2021-03-26T05:44:19Z
| 2021-03-26T05:44:19Z
|
NONE
| null |
#### Is your feature request related to a problem?
Currently, the margin parameter is a simply boolean value that controls showing totals for all rows **and** columns. However, there are times when it is either necessary or desirable to show grand totals for only rows or only columns. I discovered this limitation when I had a pivot_table that was constructed using cumsum() over time. As a result, the grand totals along one of the dimensions were incorrect, and I needed to use a less-than-ideal workaround solution. While I absolutely love pandas (still in my first year with it), Excel has a simple checkbox setting to set grand totals.
#### Describe the solution you'd like
Rather than margins=True (or False), I would suggest changing the options to the following: Both (i.e., True in current implementation), Row, Columns, or None (i.e., False). If desired, the rows or columns could use the standard axis=0 or axis=1 terms. Regardless of whether or not this enhancement happens, thank you for your efforts. Pandas has been a wonderful discovery.
|
{
"+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/33620/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33620/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/33621
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33621/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33621/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33621/events
|
https://github.com/pandas-dev/pandas/pull/33621
| 602,379,762
|
MDExOlB1bGxSZXF1ZXN0NDA1NDQ1NjUy
| 33,621
|
REF: Make numba function cache globally accessible
|
{
"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": "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"
}
] |
closed
| false
| null |
[] |
{
"closed_at": "2020-07-28T18:13:47Z",
"closed_issues": 2378,
"created_at": "2019-12-02T12:52:48Z",
"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": "2020-08-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/68",
"id": 4894670,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68/labels",
"node_id": "MDk6TWlsZXN0b25lNDg5NDY3MA==",
"number": 68,
"open_issues": 0,
"state": "closed",
"title": "1.1",
"updated_at": "2021-07-17T17:25:28Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68"
}
| 3
| 2020-04-18T05:03:47Z
| 2020-04-20T00:45:53Z
| 2020-04-19T22:23:37Z
|
MEMBER
| null |
- [x] tests passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
For all the numba accessible operations, we use a cache to store compiled JIT'd functions for performance.
This `_numba_func_cache` used to be an attribute of `Rolling` and `Groupby` objects before, but while working on https://github.com/pandas-dev/pandas/pull/33388, I cannot easily rely on having access to those objects.
This PR moves `_numba_func_cache` to `pandas/core/util/numba_.py`. Since this cache is now globally shared, the key has changed from `_numba_func_cache[func] = compiled_func` to `_numba_func_cache[(func, op)] = compiled_func`
|
{
"+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/33621/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33621/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/33621.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/33621",
"merged_at": "2020-04-19T22:23:37Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/33621.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/33621"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33622
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33622/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33622/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33622/events
|
https://github.com/pandas-dev/pandas/pull/33622
| 602,395,231
|
MDExOlB1bGxSZXF1ZXN0NDA1NDU1ODUw
| 33,622
|
BUG: pd.Series.replace does not preserve the original dtype
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/22385925?v=4",
"events_url": "https://api.github.com/users/kotamatsuoka/events{/privacy}",
"followers_url": "https://api.github.com/users/kotamatsuoka/followers",
"following_url": "https://api.github.com/users/kotamatsuoka/following{/other_user}",
"gists_url": "https://api.github.com/users/kotamatsuoka/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kotamatsuoka",
"id": 22385925,
"login": "kotamatsuoka",
"node_id": "MDQ6VXNlcjIyMzg1OTI1",
"organizations_url": "https://api.github.com/users/kotamatsuoka/orgs",
"received_events_url": "https://api.github.com/users/kotamatsuoka/received_events",
"repos_url": "https://api.github.com/users/kotamatsuoka/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kotamatsuoka/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kotamatsuoka/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kotamatsuoka"
}
|
[
{
"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": "5319e7",
"default": false,
"description": "String extension data type and string data",
"id": 57522093,
"name": "Strings",
"node_id": "MDU6TGFiZWw1NzUyMjA5Mw==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Strings"
},
{
"color": "01a886",
"default": false,
"description": "replace method",
"id": 1652721180,
"name": "replace",
"node_id": "MDU6TGFiZWwxNjUyNzIxMTgw",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/replace"
},
{
"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 | 3
| 2020-04-18T06:57:53Z
| 2020-09-25T09:33:30Z
| 2020-09-25T09:33:29Z
|
CONTRIBUTOR
| null |
- [ ] closes #33484
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] 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/33622/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33622/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/33622.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/33622",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/33622.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/33622"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33623
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33623/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33623/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33623/events
|
https://github.com/pandas-dev/pandas/issues/33623
| 602,401,968
|
MDU6SXNzdWU2MDI0MDE5Njg=
| 33,623
|
BUG: Create empty dataframe with string dtype fails "data type not understood"
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1328688?v=4",
"events_url": "https://api.github.com/users/selik/events{/privacy}",
"followers_url": "https://api.github.com/users/selik/followers",
"following_url": "https://api.github.com/users/selik/following{/other_user}",
"gists_url": "https://api.github.com/users/selik/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/selik",
"id": 1328688,
"login": "selik",
"node_id": "MDQ6VXNlcjEzMjg2ODg=",
"organizations_url": "https://api.github.com/users/selik/orgs",
"received_events_url": "https://api.github.com/users/selik/received_events",
"repos_url": "https://api.github.com/users/selik/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/selik/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/selik/subscriptions",
"type": "User",
"url": "https://api.github.com/users/selik"
}
|
[
{
"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": "6138b5",
"default": false,
"description": "Extending pandas with custom dtypes or arrays.",
"id": 849023693,
"name": "ExtensionArray",
"node_id": "MDU6TGFiZWw4NDkwMjM2OTM=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/ExtensionArray"
},
{
"color": "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": "2020-07-28T18:13:47Z",
"closed_issues": 2378,
"created_at": "2019-12-02T12:52:48Z",
"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": "2020-08-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/68",
"id": 4894670,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68/labels",
"node_id": "MDk6TWlsZXN0b25lNDg5NDY3MA==",
"number": 68,
"open_issues": 0,
"state": "closed",
"title": "1.1",
"updated_at": "2021-07-17T17:25:28Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68"
}
| 2
| 2020-04-18T07:45:49Z
| 2020-05-09T19:56:15Z
| 2020-05-09T19:56:15Z
|
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
```python
In [1]: import pandas as pd
In [2]: pd.DataFrame({'a': ['b']}, dtype='string')
Out[2]:
a
0 b
In [3]: pd.DataFrame(columns=['a'], dtype='string')
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-3-2e577cc30885> in <module>
----> 1 pd.DataFrame(columns=['a'], dtype='string')
~/lib/miniconda/envs/xport/lib/python3.8/site-packages/pandas/core/frame.py in __init__(self, data, index, columns, dtype, copy)
433 )
434 elif isinstance(data, dict):
--> 435 mgr = init_dict(data, index, columns, dtype=dtype)
436 elif isinstance(data, ma.MaskedArray):
437 import numpy.ma.mrecords as mrecords
~/lib/miniconda/envs/xport/lib/python3.8/site-packages/pandas/core/internals/construction.py in init_dict(data, index, columns, dtype)
232 # no obvious "empty" int column
233 if missing.any() and not is_integer_dtype(dtype):
--> 234 if dtype is None or np.issubdtype(dtype, np.flexible):
235 # GH#1783
236 nan_dtype = object
~/lib/miniconda/envs/xport/lib/python3.8/site-packages/numpy/core/numerictypes.py in issubdtype(arg1, arg2)
391 """
392 if not issubclass_(arg1, generic):
--> 393 arg1 = dtype(arg1).type
394 if not issubclass_(arg2, generic):
395 arg2_orig = arg2
TypeError: data type not understood
In [4]: pd.DataFrame(columns=['a'], dtype='float')
Out[4]:
Empty DataFrame
Columns: [a]
Index: []
```
#### Problem description
When trying to create an empty dataframe, one can specify some dtypes, like `'float'`, but `dtype='string'` raises `TypeError: data type not understood`.
#### Expected Output
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit : None
python : 3.8.2.final.0
python-bits : 64
OS : Darwin
OS-release : 19.4.0
machine : x86_64
processor : i386
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.0.3
numpy : 1.18.2
pytz : 2019.3
dateutil : 2.8.1
pip : 20.0.2
setuptools : 46.1.3.post20200330
Cython : None
pytest : 5.4.1
hypothesis : None
sphinx : 3.0.1
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 2.11.2
IPython : 7.13.0
pandas_datareader: None
bs4 : None
bottleneck : None
fastparquet : None
gcsfs : None
lxml.etree : None
matplotlib : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pytables : None
pytest : 5.4.1
pyxlsb : None
s3fs : None
scipy : None
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
xlsxwriter : 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/33623/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33623/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/33624
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33624/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33624/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33624/events
|
https://github.com/pandas-dev/pandas/issues/33624
| 602,429,615
|
MDU6SXNzdWU2MDI0Mjk2MTU=
| 33,624
|
ENH: Prettier printing of DataFrames with nested objects, discuss?
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/33928921?v=4",
"events_url": "https://api.github.com/users/bwllc/events{/privacy}",
"followers_url": "https://api.github.com/users/bwllc/followers",
"following_url": "https://api.github.com/users/bwllc/following{/other_user}",
"gists_url": "https://api.github.com/users/bwllc/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/bwllc",
"id": 33928921,
"login": "bwllc",
"node_id": "MDQ6VXNlcjMzOTI4OTIx",
"organizations_url": "https://api.github.com/users/bwllc/orgs",
"received_events_url": "https://api.github.com/users/bwllc/received_events",
"repos_url": "https://api.github.com/users/bwllc/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/bwllc/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bwllc/subscriptions",
"type": "User",
"url": "https://api.github.com/users/bwllc"
}
|
[
{
"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": "ededed",
"default": false,
"description": "__repr__ of pandas objects, to_string",
"id": 13101118,
"name": "Output-Formatting",
"node_id": "MDU6TGFiZWwxMzEwMTExOA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Output-Formatting"
}
] |
open
| false
| null |
[] | null | 0
| 2020-04-18T10:36:52Z
| 2020-06-05T20:38:08Z
| null |
NONE
| null |
I frequently place objects which are not strings or numbers in my DataFrames. I've read many Stack Overflow comments which discourage this, and I know that it general it should be avoided, but I believe that I have a valid use case. If the objects are iterable (like another DataFrame), I protect them from Pandas attempt to broadcast the elements by wrapping the object in a single-element list. This all works, but it doesn't print nicely.
I looked into `pandas.set_option()` to see whether there was a way to clean up printing in the way that I wanted. When I didn't find it, I wrote a work-around. I defined a PrettyDataFrame subclass which has only one method, `__str__()`. When a column's dtype is `"object"`, I assume that object is a list, and I print the dtype of element zero. A typical output from an IPython interpreter session looks like this:
```
In [3]: exp
Out[3]:
embed_dim kernel_size min_loss best_epoch elapsed_time history embedding best_weights
0 1 3 -0.717174 32 361.163418 <PrettyDataFrame> <DataFrame> <Series>
1 1 3 -0.717349 34 424.519406 <PrettyDataFrame> <DataFrame> <Series>
2 1 3 -0.717181 25 287.420010 <PrettyDataFrame> <DataFrame> <Series>
3 1 3 -0.717192 31 327.283332 <PrettyDataFrame> <DataFrame> <Series>
In [4]: exp.loc[2].history
Out[4]:
initial_epoch final_epoch min_loss best_epoch best_weights loss
0 0 19 -0.717125 19 <list> <ndarray>
1 20 28 -0.717181 25 <list> <ndarray>
```
As the Pandas GitHub guide recommends, [I posted to Stack Overflow first, asking whether the feature I wanted exists](https://stackoverflow.com/questions/61184181/pretty-printing-pandas-dataframes-with-complex-objects-inside-individual-cells). After waiting for several days and receiving no replies, I'm moving here to continue the discussion.
I'm not ready to submit a pull request because what I wrote is rather specific to my needs. I don't know if anyone else would find this useful, or if they would want it to look different. Additionally, if this kind of pretty-printing was part of a standard DataFrame instead of a weird subclass, the printing behavior would presumably have to be configurable through set_option(), and I haven't begun to think about how to define that.
Looking forward to any discussions. Thanks.
|
{
"+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/33624/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33624/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/33625
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33625/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33625/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33625/events
|
https://github.com/pandas-dev/pandas/pull/33625
| 602,430,629
|
MDExOlB1bGxSZXF1ZXN0NDA1NDgwNDQ2
| 33,625
|
CLN: simplify info
|
{
"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": "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": "2020-07-28T18:13:47Z",
"closed_issues": 2378,
"created_at": "2019-12-02T12:52:48Z",
"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": "2020-08-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/68",
"id": 4894670,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68/labels",
"node_id": "MDk6TWlsZXN0b25lNDg5NDY3MA==",
"number": 68,
"open_issues": 0,
"state": "closed",
"title": "1.1",
"updated_at": "2021-07-17T17:25:28Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68"
}
| 1
| 2020-04-18T10:43:15Z
| 2020-04-19T19:02:02Z
| 2020-04-19T18:59:29Z
|
MEMBER
| null |
precursor to #31796
|
{
"+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/33625/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33625/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/33625.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/33625",
"merged_at": "2020-04-19T18:59:29Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/33625.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/33625"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33626
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33626/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33626/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33626/events
|
https://github.com/pandas-dev/pandas/pull/33626
| 602,432,887
|
MDExOlB1bGxSZXF1ZXN0NDA1NDgyMDkz
| 33,626
|
BUG: support median function for custom BaseIndexer rolling windows
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/23253999?v=4",
"events_url": "https://api.github.com/users/AlexKirko/events{/privacy}",
"followers_url": "https://api.github.com/users/AlexKirko/followers",
"following_url": "https://api.github.com/users/AlexKirko/following{/other_user}",
"gists_url": "https://api.github.com/users/AlexKirko/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/AlexKirko",
"id": 23253999,
"login": "AlexKirko",
"node_id": "MDQ6VXNlcjIzMjUzOTk5",
"organizations_url": "https://api.github.com/users/AlexKirko/orgs",
"received_events_url": "https://api.github.com/users/AlexKirko/received_events",
"repos_url": "https://api.github.com/users/AlexKirko/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/AlexKirko/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/AlexKirko/subscriptions",
"type": "User",
"url": "https://api.github.com/users/AlexKirko"
}
|
[
{
"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": "2020-07-28T18:13:47Z",
"closed_issues": 2378,
"created_at": "2019-12-02T12:52:48Z",
"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": "2020-08-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/68",
"id": 4894670,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68/labels",
"node_id": "MDk6TWlsZXN0b25lNDg5NDY3MA==",
"number": 68,
"open_issues": 0,
"state": "closed",
"title": "1.1",
"updated_at": "2021-07-17T17:25:28Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68"
}
| 7
| 2020-04-18T10:56:16Z
| 2020-04-26T11:34:35Z
| 2020-04-21T12:56:43Z
|
MEMBER
| null |
- [X] xref #32865
- [X] 1 tests added / 1 passed
- [X] passes `black pandas`
- [X] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [X] whatsnew entry
## Scope of PR
This PR makes sure that when we calculate the median in `roll_median_c`, we override the maximum window width with the correct value, and the function doesn't shortcut by returning all NaNs.
## Details
The `median` function eventually calls `roll_median_c` which accepts a `win` parameter (maximum window width) to correctly allocate memory and initialize the skiplist data structure which is the backbone of the rolling median algorithm. Currently, `win` is determined by the `_get_window` function which returns `min_periods or 0` for custom `BaseIndexer` subclasses:
```python
def _get_window(self, other=None, win_type: Optional[str] = None) -> int:
"""
Return window length.
Parameters
----------
other :
ignored, exists for compatibility
win_type :
ignored, exists for compatibility
Returns
-------
window : int
"""
if isinstance(self.window, BaseIndexer):
return self.min_periods or 0
return self.window
```
Thus, `roll_median_c` either shortcuts or initializes to incorrect depth:
```python
...
if win == 0 or (end - start).max() == 0:
output[:] = NaN
return output
win = (end - start).max()
sl = skiplist_init(<int>win)
...
```
<s>I propose we determine max window length directly in the `median` function. This means that `start` and `end` arrays get calculated twice: here and in `_apply`. However, I belive this is better than injecting a median-specific crutch into `_apply` or messing with the shortcut in `roll_median_c` (we could attempt to override `win` if `(end - start).max() > 0`. This other option is explored below.</s>
After discussing with @mroeschke , we decided to implement the bugfix directly in `roll_median_c`. Details below.
Please say if you think another approach would be preferable.
## Background on the wider issue
We currently don't support several rolling window functions when building a rolling window object using a custom class descended from `pandas.api.indexers.Baseindexer`. The implementations were written with backward-looking windows in mind, and this led to these functions breaking.
Currently, using these functions returns a `NotImplemented` error thanks to #33057, but ideally we want to update the implementations, so that they will work without a performance hit. This is what I aim to do over a series of PRs.
## Perf notes
The function currently shortcuts because of the bug or initializes the main datastructure incorrectly. For this reason, benchmarks are meaningless.
Ran benchmarks vs. the shortcut anyway:
```
asv continuous -f 1.1 master HEAD -b ^rolling.ForwardWindowMethods
...
before after ratio
[b630cdbc] [ce82372f]
<master> <rolling-median>
+ 3.55▒0.2ms 75.2▒0.9ms 21.19 rolling.ForwardWindowMethods.time_rolling('DataFrame', 1000, 'float', 'median')
+ 4.25▒0.08ms 76.7▒2ms 18.06 rolling.ForwardWindowMethods.time_rolling('Series', 1000, 'float', 'median')
+ 4.02▒0.4ms 60.3▒0.5ms 14.99 rolling.ForwardWindowMethods.time_rolling('DataFrame', 1000, 'int', 'median')
+ 3.42▒0.2ms 47.4▒1ms 13.86 rolling.ForwardWindowMethods.time_rolling('DataFrame', 10, 'float', 'median')
+ 4.80▒0.1ms 61.2▒0.5ms 12.74 rolling.ForwardWindowMethods.time_rolling('Series', 1000, 'int', 'median')
+ 4.58▒0.06ms 49.7▒0.9ms 10.85 rolling.ForwardWindowMethods.time_rolling('Series', 10, 'float', 'median')
+ 4.45▒0.5ms 45.0▒0.8ms 10.10 rolling.ForwardWindowMethods.time_rolling('DataFrame', 10, 'int', 'median')
+ 5.02▒0.07ms 45.9▒0.6ms 9.14 rolling.ForwardWindowMethods.time_rolling('Series', 10, 'int', 'median')
SOME BENCHMARKS HAVE CHANGED SIGNIFICANTLY.
PERFORMANCE DECREASED.
```
|
{
"+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/33626/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33626/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/33626.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/33626",
"merged_at": "2020-04-21T12:56:43Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/33626.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/33626"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33627
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33627/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33627/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33627/events
|
https://github.com/pandas-dev/pandas/pull/33627
| 602,440,049
|
MDExOlB1bGxSZXF1ZXN0NDA1NDg2NTg5
| 33,627
|
TST: Groupby first/last/nth nan column test
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/4970459?v=4",
"events_url": "https://api.github.com/users/jamescobonkerr/events{/privacy}",
"followers_url": "https://api.github.com/users/jamescobonkerr/followers",
"following_url": "https://api.github.com/users/jamescobonkerr/following{/other_user}",
"gists_url": "https://api.github.com/users/jamescobonkerr/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jamescobonkerr",
"id": 4970459,
"login": "jamescobonkerr",
"node_id": "MDQ6VXNlcjQ5NzA0NTk=",
"organizations_url": "https://api.github.com/users/jamescobonkerr/orgs",
"received_events_url": "https://api.github.com/users/jamescobonkerr/received_events",
"repos_url": "https://api.github.com/users/jamescobonkerr/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jamescobonkerr/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jamescobonkerr/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jamescobonkerr"
}
|
[
{
"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"
}
] |
closed
| false
| null |
[] |
{
"closed_at": "2020-07-28T18:13:47Z",
"closed_issues": 2378,
"created_at": "2019-12-02T12:52:48Z",
"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": "2020-08-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/68",
"id": 4894670,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68/labels",
"node_id": "MDk6TWlsZXN0b25lNDg5NDY3MA==",
"number": 68,
"open_issues": 0,
"state": "closed",
"title": "1.1",
"updated_at": "2021-07-17T17:25:28Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68"
}
| 4
| 2020-04-18T11:37:32Z
| 2020-04-23T21:31:06Z
| 2020-04-23T21:30:56Z
|
CONTRIBUTOR
| null |
- [X] xref https://github.com/pandas-dev/pandas/issues/33591#issuecomment-615365647
- [X] tests added / passed
- [X] passes `black pandas`
- [X] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
The first two asserts (`first()`/`last()`) fail on `1.0.3`, as expected.
|
{
"+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/33627/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33627/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/33627.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/33627",
"merged_at": "2020-04-23T21:30:56Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/33627.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/33627"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33628
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33628/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33628/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33628/events
|
https://github.com/pandas-dev/pandas/pull/33628
| 602,468,271
|
MDExOlB1bGxSZXF1ZXN0NDA1NTA0NTY0
| 33,628
|
inspect-safety for DataFrame._constructor_expanddim
|
{
"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": "0052cc",
"default": false,
"description": "pandas objects compatability with Numpy or Python functions",
"id": 76865106,
"name": "Compat",
"node_id": "MDU6TGFiZWw3Njg2NTEwNg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Compat"
}
] |
closed
| false
| null |
[] |
{
"closed_at": "2020-07-28T18:13:47Z",
"closed_issues": 2378,
"created_at": "2019-12-02T12:52:48Z",
"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": "2020-08-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/68",
"id": 4894670,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68/labels",
"node_id": "MDk6TWlsZXN0b25lNDg5NDY3MA==",
"number": 68,
"open_issues": 0,
"state": "closed",
"title": "1.1",
"updated_at": "2021-07-17T17:25:28Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68"
}
| 4
| 2020-04-18T14:07:48Z
| 2020-04-21T14:37:23Z
| 2020-04-21T12:53:51Z
|
MEMBER
| null |
- [x] closes #31549, closes #31474
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] 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/33628/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33628/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/33628.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/33628",
"merged_at": "2020-04-21T12:53:51Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/33628.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/33628"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33629
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33629/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33629/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33629/events
|
https://github.com/pandas-dev/pandas/pull/33629
| 602,472,051
|
MDExOlB1bGxSZXF1ZXN0NDA1NTA3MDUw
| 33,629
|
BUG: Fix Categorical use_inf_as_na bug
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/2658661?v=4",
"events_url": "https://api.github.com/users/dsaxton/events{/privacy}",
"followers_url": "https://api.github.com/users/dsaxton/followers",
"following_url": "https://api.github.com/users/dsaxton/following{/other_user}",
"gists_url": "https://api.github.com/users/dsaxton/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dsaxton",
"id": 2658661,
"login": "dsaxton",
"node_id": "MDQ6VXNlcjI2NTg2NjE=",
"organizations_url": "https://api.github.com/users/dsaxton/orgs",
"received_events_url": "https://api.github.com/users/dsaxton/received_events",
"repos_url": "https://api.github.com/users/dsaxton/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dsaxton/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dsaxton/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dsaxton"
}
|
[
{
"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": "2020-05-30T15:21:05Z",
"closed_issues": 94,
"created_at": "2020-03-19T21:32:28Z",
"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": "on-merge: backport to 1.0.x",
"due_on": "2020-06-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/72",
"id": 5219206,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/72/labels",
"node_id": "MDk6TWlsZXN0b25lNTIxOTIwNg==",
"number": 72,
"open_issues": 0,
"state": "closed",
"title": "1.0.4",
"updated_at": "2020-06-24T17:57:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/72"
}
| 2
| 2020-04-18T14:25:58Z
| 2020-05-26T09:34:25Z
| 2020-04-27T21:07:23Z
|
MEMBER
| null |
- [x] closes #33594
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [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/33629/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33629/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/33629.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/33629",
"merged_at": "2020-04-27T21:07:23Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/33629.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/33629"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33630
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33630/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33630/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33630/events
|
https://github.com/pandas-dev/pandas/pull/33630
| 602,483,790
|
MDExOlB1bGxSZXF1ZXN0NDA1NTE0MjMx
| 33,630
|
BUG: DataFrameGroupby std/sem modify grouped column when as_index=False
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/45562402?v=4",
"events_url": "https://api.github.com/users/rhshadrach/events{/privacy}",
"followers_url": "https://api.github.com/users/rhshadrach/followers",
"following_url": "https://api.github.com/users/rhshadrach/following{/other_user}",
"gists_url": "https://api.github.com/users/rhshadrach/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/rhshadrach",
"id": 45562402,
"login": "rhshadrach",
"node_id": "MDQ6VXNlcjQ1NTYyNDAy",
"organizations_url": "https://api.github.com/users/rhshadrach/orgs",
"received_events_url": "https://api.github.com/users/rhshadrach/received_events",
"repos_url": "https://api.github.com/users/rhshadrach/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/rhshadrach/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rhshadrach/subscriptions",
"type": "User",
"url": "https://api.github.com/users/rhshadrach"
}
|
[
{
"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": "2020-07-28T18:13:47Z",
"closed_issues": 2378,
"created_at": "2019-12-02T12:52:48Z",
"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": "2020-08-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/68",
"id": 4894670,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68/labels",
"node_id": "MDk6TWlsZXN0b25lNDg5NDY3MA==",
"number": 68,
"open_issues": 0,
"state": "closed",
"title": "1.1",
"updated_at": "2021-07-17T17:25:28Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68"
}
| 7
| 2020-04-18T15:18:20Z
| 2020-07-11T16:02:09Z
| 2020-05-19T12:56:49Z
|
MEMBER
| null |
- [x] closes #10355
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry
When working on this, I noticed an unrelated line of code that could be moved inside an if-block and made the change. Should unrelated cleanups like this be left to a separate PR? Can revert if that's the 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/33630/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33630/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/33630.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/33630",
"merged_at": "2020-05-19T12:56:49Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/33630.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/33630"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33631
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33631/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33631/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33631/events
|
https://github.com/pandas-dev/pandas/pull/33631
| 602,484,383
|
MDExOlB1bGxSZXF1ZXN0NDA1NTE0NTg2
| 33,631
|
CLN: Clean missing.py
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/2658661?v=4",
"events_url": "https://api.github.com/users/dsaxton/events{/privacy}",
"followers_url": "https://api.github.com/users/dsaxton/followers",
"following_url": "https://api.github.com/users/dsaxton/following{/other_user}",
"gists_url": "https://api.github.com/users/dsaxton/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dsaxton",
"id": 2658661,
"login": "dsaxton",
"node_id": "MDQ6VXNlcjI2NTg2NjE=",
"organizations_url": "https://api.github.com/users/dsaxton/orgs",
"received_events_url": "https://api.github.com/users/dsaxton/received_events",
"repos_url": "https://api.github.com/users/dsaxton/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dsaxton/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dsaxton/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dsaxton"
}
|
[
{
"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": "2020-07-28T18:13:47Z",
"closed_issues": 2378,
"created_at": "2019-12-02T12:52:48Z",
"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": "2020-08-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/68",
"id": 4894670,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68/labels",
"node_id": "MDk6TWlsZXN0b25lNDg5NDY3MA==",
"number": 68,
"open_issues": 0,
"state": "closed",
"title": "1.1",
"updated_at": "2021-07-17T17:25:28Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68"
}
| 2
| 2020-04-18T15:21:01Z
| 2020-04-19T22:25:25Z
| 2020-04-19T22:24:25Z
|
MEMBER
| null |
Random nitpick here
|
{
"+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/33631/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33631/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/33631.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/33631",
"merged_at": "2020-04-19T22:24:24Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/33631.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/33631"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33632
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33632/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33632/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33632/events
|
https://github.com/pandas-dev/pandas/pull/33632
| 602,492,739
|
MDExOlB1bGxSZXF1ZXN0NDA1NTIwMzEw
| 33,632
|
IO: Fix parquet read from s3 directory
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/16733618?v=4",
"events_url": "https://api.github.com/users/alimcmaster1/events{/privacy}",
"followers_url": "https://api.github.com/users/alimcmaster1/followers",
"following_url": "https://api.github.com/users/alimcmaster1/following{/other_user}",
"gists_url": "https://api.github.com/users/alimcmaster1/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/alimcmaster1",
"id": 16733618,
"login": "alimcmaster1",
"node_id": "MDQ6VXNlcjE2NzMzNjE4",
"organizations_url": "https://api.github.com/users/alimcmaster1/orgs",
"received_events_url": "https://api.github.com/users/alimcmaster1/received_events",
"repos_url": "https://api.github.com/users/alimcmaster1/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/alimcmaster1/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/alimcmaster1/subscriptions",
"type": "User",
"url": "https://api.github.com/users/alimcmaster1"
}
|
[
{
"color": "5319e7",
"default": false,
"description": "parquet, feather",
"id": 685114413,
"name": "IO Parquet",
"node_id": "MDU6TGFiZWw2ODUxMTQ0MTM=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20Parquet"
}
] |
closed
| false
| null |
[] |
{
"closed_at": "2020-05-30T15:21:05Z",
"closed_issues": 94,
"created_at": "2020-03-19T21:32:28Z",
"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": "on-merge: backport to 1.0.x",
"due_on": "2020-06-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/72",
"id": 5219206,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/72/labels",
"node_id": "MDk6TWlsZXN0b25lNTIxOTIwNg==",
"number": 72,
"open_issues": 0,
"state": "closed",
"title": "1.0.4",
"updated_at": "2020-06-24T17:57:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/72"
}
| 4
| 2020-04-18T16:01:56Z
| 2020-05-29T22:14:08Z
| 2020-04-26T21:41:16Z
|
CONTRIBUTOR
| null |
- [x] closes https://github.com/pandas-dev/pandas/issues/26388
- [x] closes https://github.com/pandas-dev/pandas/issues/27596
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry
(Seems to have also fixed the xfailing test in https://github.com/pandas-dev/pandas/issues/33077)
NOTE: lets merge https://github.com/pandas-dev/pandas/pull/33645 first - since that fixes up a crucial bit of error handling around this functionality.
|
{
"+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/33632/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33632/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/33632.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/33632",
"merged_at": "2020-04-26T21:41:15Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/33632.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/33632"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33633
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33633/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33633/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33633/events
|
https://github.com/pandas-dev/pandas/pull/33633
| 602,496,631
|
MDExOlB1bGxSZXF1ZXN0NDA1NTIzMTEy
| 33,633
|
CLN: replaced Appender with doc
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/61093810?v=4",
"events_url": "https://api.github.com/users/smartvinnetou/events{/privacy}",
"followers_url": "https://api.github.com/users/smartvinnetou/followers",
"following_url": "https://api.github.com/users/smartvinnetou/following{/other_user}",
"gists_url": "https://api.github.com/users/smartvinnetou/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/smartvinnetou",
"id": 61093810,
"login": "smartvinnetou",
"node_id": "MDQ6VXNlcjYxMDkzODEw",
"organizations_url": "https://api.github.com/users/smartvinnetou/orgs",
"received_events_url": "https://api.github.com/users/smartvinnetou/received_events",
"repos_url": "https://api.github.com/users/smartvinnetou/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/smartvinnetou/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/smartvinnetou/subscriptions",
"type": "User",
"url": "https://api.github.com/users/smartvinnetou"
}
|
[
{
"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": "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": "2020-12-26T13:57:50Z",
"closed_issues": 1768,
"created_at": "2020-05-29T23:47:32Z",
"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.2.x",
"due_on": "2020-12-15T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/73",
"id": 5479819,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/73/labels",
"node_id": "MDk6TWlsZXN0b25lNTQ3OTgxOQ==",
"number": 73,
"open_issues": 0,
"state": "closed",
"title": "1.2",
"updated_at": "2021-04-13T15:46:43Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/73"
}
| 8
| 2020-04-18T16:20:35Z
| 2020-09-13T22:21:03Z
| 2020-09-13T22:20:56Z
|
CONTRIBUTOR
| null |
- [x] ref #31942
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] replaced the Appender/Substitute decorators with doc
|
{
"+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/33633/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33633/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/33633.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/33633",
"merged_at": "2020-09-13T22:20:56Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/33633.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/33633"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33634
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33634/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33634/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33634/events
|
https://github.com/pandas-dev/pandas/issues/33634
| 602,498,562
|
MDU6SXNzdWU2MDI0OTg1NjI=
| 33,634
|
BUG: If aggregation function returns NaN the order of the index on the resulting df is not maintained
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/12527?v=4",
"events_url": "https://api.github.com/users/mfcabrera/events{/privacy}",
"followers_url": "https://api.github.com/users/mfcabrera/followers",
"following_url": "https://api.github.com/users/mfcabrera/following{/other_user}",
"gists_url": "https://api.github.com/users/mfcabrera/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mfcabrera",
"id": 12527,
"login": "mfcabrera",
"node_id": "MDQ6VXNlcjEyNTI3",
"organizations_url": "https://api.github.com/users/mfcabrera/orgs",
"received_events_url": "https://api.github.com/users/mfcabrera/received_events",
"repos_url": "https://api.github.com/users/mfcabrera/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mfcabrera/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mfcabrera/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mfcabrera"
}
|
[
{
"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": "fbca04",
"default": false,
"description": "Apply, Aggregate, Transform",
"id": 697792067,
"name": "Apply",
"node_id": "MDU6TGFiZWw2OTc3OTIwNjc=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Apply"
}
] |
closed
| false
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5946712?v=4",
"events_url": "https://api.github.com/users/DriesSchaumont/events{/privacy}",
"followers_url": "https://api.github.com/users/DriesSchaumont/followers",
"following_url": "https://api.github.com/users/DriesSchaumont/following{/other_user}",
"gists_url": "https://api.github.com/users/DriesSchaumont/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/DriesSchaumont",
"id": 5946712,
"login": "DriesSchaumont",
"node_id": "MDQ6VXNlcjU5NDY3MTI=",
"organizations_url": "https://api.github.com/users/DriesSchaumont/orgs",
"received_events_url": "https://api.github.com/users/DriesSchaumont/received_events",
"repos_url": "https://api.github.com/users/DriesSchaumont/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/DriesSchaumont/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/DriesSchaumont/subscriptions",
"type": "User",
"url": "https://api.github.com/users/DriesSchaumont"
}
|
[
{
"avatar_url": "https://avatars.githubusercontent.com/u/5946712?v=4",
"events_url": "https://api.github.com/users/DriesSchaumont/events{/privacy}",
"followers_url": "https://api.github.com/users/DriesSchaumont/followers",
"following_url": "https://api.github.com/users/DriesSchaumont/following{/other_user}",
"gists_url": "https://api.github.com/users/DriesSchaumont/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/DriesSchaumont",
"id": 5946712,
"login": "DriesSchaumont",
"node_id": "MDQ6VXNlcjU5NDY3MTI=",
"organizations_url": "https://api.github.com/users/DriesSchaumont/orgs",
"received_events_url": "https://api.github.com/users/DriesSchaumont/received_events",
"repos_url": "https://api.github.com/users/DriesSchaumont/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/DriesSchaumont/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/DriesSchaumont/subscriptions",
"type": "User",
"url": "https://api.github.com/users/DriesSchaumont"
}
] |
{
"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
| 2020-04-18T16:30:35Z
| 2021-05-21T01:16:05Z
| 2021-05-21T01:16:05Z
|
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
df = pd.DataFrame(
[
("1", 1, 0, 0),
("2", 2, 0, 0),
("3", 3, 0, 0),
("4", 4, 5, 4),
("5", 5, 6, 6),
("6", 6, 7, 7),
],
columns=("item", "att1", "att2", "att3"),
)
def myagg1(s):
return s.sum()
def myagg2(s):
return s.sum() / 2
aggs1 = ["sum", myagg1, "count", "min"]
aggs2 = ["sum", myagg1, "count", "min"]
df.agg(aggs1) # order of the index is maintained
# item att1 att2 att3
# sum 123456 21 18 17
# myagg1 123456 21 18 17
# count 6 6 6 6
# min 1 1 0 0
df.agg(aggs2) # myagg2 returns nan and the result is sent to the last row
# item att1 att2 att3
# sum 123456 21.0 18.0 17.0
# count 6 6.0 6.0 6.0
# min 1 1.0 0.0 0.0
# myagg2 NaN 10.5 9.0 8.5
```
#### Problem description
the order of the index on the resulting dataframe should not affected by the result of one of the aggregation functions.
#### Expected Output
```python
df.agg(aggs2) # Regardless of the result the order is maintained
# item att1 att2 att3
# sum 123456 21.0 18.0 17.0
# myagg2 NaN 10.5 9.0 8.5
# count 6 6.0 6.0 6.0
# min 1 1.0 0.0 0.0
```
#### Output of ``pd.show_versions()``
<details>
```
INSTALLED VERSIONS
------------------
commit : None
python : 3.8.1.final.0
python-bits : 64
OS : Darwin
OS-release : 19.0.0
machine : x86_64
processor : i386
byteorder : little
LC_ALL : None
LANG : de_DE.UTF-8
LOCALE : de_DE.UTF-8
pandas : 1.0.3
numpy : 1.18.1
pytz : 2019.3
dateutil : 2.8.1
pip : 20.0.2
setuptools : 45.2.0.post20200210
Cython : None
pytest : 5.4.1
hypothesis : 5.8.0
sphinx : 2.4.4
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 2.11.1
IPython : 7.12.0
pandas_datareader: None
bs4 : None
bottleneck : None
fastparquet : None
gcsfs : None
lxml.etree : None
matplotlib : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pytables : None
pytest : 5.4.1
pyxlsb : None
s3fs : None
scipy : 1.4.1
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
xlsxwriter : 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/33634/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33634/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/33635
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33635/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33635/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33635/events
|
https://github.com/pandas-dev/pandas/pull/33635
| 602,504,383
|
MDExOlB1bGxSZXF1ZXN0NDA1NTI4NjA5
| 33,635
|
ENH: allow passing freq=None to DatetimeIndex/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": "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": "2020-07-28T18:13:47Z",
"closed_issues": 2378,
"created_at": "2019-12-02T12:52:48Z",
"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": "2020-08-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/68",
"id": 4894670,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68/labels",
"node_id": "MDk6TWlsZXN0b25lNDg5NDY3MA==",
"number": 68,
"open_issues": 0,
"state": "closed",
"title": "1.1",
"updated_at": "2021-07-17T17:25:28Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68"
}
| 2
| 2020-04-18T17:00:30Z
| 2020-04-26T00:11:17Z
| 2020-04-25T23:54:10Z
|
MEMBER
| null |
cc @jreback discussed elsewhere
|
{
"+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/33635/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33635/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/33635.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/33635",
"merged_at": "2020-04-25T23:54:10Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/33635.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/33635"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33636
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33636/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33636/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33636/events
|
https://github.com/pandas-dev/pandas/issues/33636
| 602,513,365
|
MDU6SXNzdWU2MDI1MTMzNjU=
| 33,636
|
ENH: snapshot testing of dataframes
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/10199742?v=4",
"events_url": "https://api.github.com/users/fkromer/events{/privacy}",
"followers_url": "https://api.github.com/users/fkromer/followers",
"following_url": "https://api.github.com/users/fkromer/following{/other_user}",
"gists_url": "https://api.github.com/users/fkromer/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/fkromer",
"id": 10199742,
"login": "fkromer",
"node_id": "MDQ6VXNlcjEwMTk5NzQy",
"organizations_url": "https://api.github.com/users/fkromer/orgs",
"received_events_url": "https://api.github.com/users/fkromer/received_events",
"repos_url": "https://api.github.com/users/fkromer/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/fkromer/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/fkromer/subscriptions",
"type": "User",
"url": "https://api.github.com/users/fkromer"
}
|
[
{
"color": "4E9A06",
"default": false,
"description": null,
"id": 76812,
"name": "Enhancement",
"node_id": "MDU6TGFiZWw3NjgxMg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Enhancement"
}
] |
closed
| false
| null |
[] | null | 8
| 2020-04-18T17:47:12Z
| 2020-10-01T08:54:23Z
| 2020-05-07T08:19:02Z
|
NONE
| null |
#### Is your feature request related to a problem?
When testing dataframe manipulating functions defining explicit expected dataframes takes a lot of time.
#### Describe the solution you'd like
I've used [snapshottest](https://github.com/syrusakbary/snapshottest) to test GraphQl APIs. The same approach could be implemented in a pytest plugin for pandas as well.
#### API breaking implications
[this should provide a description of how this feature will affect the API]
#### Describe alternatives you've considered
[this should provide a description of any alternative solutions or features you've considered]
#### Additional context
[add any other context, code examples, or references to existing implementations about the feature request here]
```python
# Your code here, if applicable
```
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/33636/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33636/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/33637
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33637/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33637/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33637/events
|
https://github.com/pandas-dev/pandas/pull/33637
| 602,541,421
|
MDExOlB1bGxSZXF1ZXN0NDA1NTUzNDE5
| 33,637
|
REF: _AXIS_TO_AXIS_NUMBER to simplify axis access
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/26364415?v=4",
"events_url": "https://api.github.com/users/topper-123/events{/privacy}",
"followers_url": "https://api.github.com/users/topper-123/followers",
"following_url": "https://api.github.com/users/topper-123/following{/other_user}",
"gists_url": "https://api.github.com/users/topper-123/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/topper-123",
"id": 26364415,
"login": "topper-123",
"node_id": "MDQ6VXNlcjI2MzY0NDE1",
"organizations_url": "https://api.github.com/users/topper-123/orgs",
"received_events_url": "https://api.github.com/users/topper-123/received_events",
"repos_url": "https://api.github.com/users/topper-123/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/topper-123/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/topper-123/subscriptions",
"type": "User",
"url": "https://api.github.com/users/topper-123"
}
|
[
{
"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"
}
] |
closed
| false
| null |
[] |
{
"closed_at": "2020-07-28T18:13:47Z",
"closed_issues": 2378,
"created_at": "2019-12-02T12:52:48Z",
"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": "2020-08-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/68",
"id": 4894670,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68/labels",
"node_id": "MDk6TWlsZXN0b25lNDg5NDY3MA==",
"number": 68,
"open_issues": 0,
"state": "closed",
"title": "1.1",
"updated_at": "2021-07-17T17:25:28Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68"
}
| 7
| 2020-04-18T20:09:29Z
| 2020-04-21T13:32:25Z
| 2020-04-21T12:43:17Z
|
CONTRIBUTOR
| null |
This adds a dict called ``_AXIS_TO_AXIS_NUMBER `` to NDFrame/DataFrame where the keys are the allowed parameter values for the ``axis`` parameter in various ndframe methods and the dict values are the related axis number. This makes getting to the correct axis more straight forward, see for example the new ``_get_axis_number``, and makes adding type hints to the ``axis`` parameter easier.
|
{
"+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/33637/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33637/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/33637.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/33637",
"merged_at": "2020-04-21T12:43:17Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/33637.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/33637"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33638
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33638/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33638/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33638/events
|
https://github.com/pandas-dev/pandas/pull/33638
| 602,552,807
|
MDExOlB1bGxSZXF1ZXN0NDA1NTYwODk2
| 33,638
|
TST: groupby-reindex on DTI
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/31857876?v=4",
"events_url": "https://api.github.com/users/CloseChoice/events{/privacy}",
"followers_url": "https://api.github.com/users/CloseChoice/followers",
"following_url": "https://api.github.com/users/CloseChoice/following{/other_user}",
"gists_url": "https://api.github.com/users/CloseChoice/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/CloseChoice",
"id": 31857876,
"login": "CloseChoice",
"node_id": "MDQ6VXNlcjMxODU3ODc2",
"organizations_url": "https://api.github.com/users/CloseChoice/orgs",
"received_events_url": "https://api.github.com/users/CloseChoice/received_events",
"repos_url": "https://api.github.com/users/CloseChoice/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/CloseChoice/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/CloseChoice/subscriptions",
"type": "User",
"url": "https://api.github.com/users/CloseChoice"
}
|
[
{
"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": "AFEEEE",
"default": false,
"description": null,
"id": 211840,
"name": "Timeseries",
"node_id": "MDU6TGFiZWwyMTE4NDA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Timeseries"
},
{
"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": "2020-07-28T18:13:47Z",
"closed_issues": 2378,
"created_at": "2019-12-02T12:52:48Z",
"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": "2020-08-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/68",
"id": 4894670,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68/labels",
"node_id": "MDk6TWlsZXN0b25lNDg5NDY3MA==",
"number": 68,
"open_issues": 0,
"state": "closed",
"title": "1.1",
"updated_at": "2021-07-17T17:25:28Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68"
}
| 4
| 2020-04-18T21:12:01Z
| 2020-04-25T22:05:14Z
| 2020-04-25T22:05:11Z
|
MEMBER
| null |
Add test to check whether reindexing works correctly.
- [ ] closes #26209
- [ ] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] 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/33638/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33638/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/33638.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/33638",
"merged_at": "2020-04-25T22:05:11Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/33638.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/33638"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33639
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33639/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33639/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33639/events
|
https://github.com/pandas-dev/pandas/issues/33639
| 602,557,714
|
MDU6SXNzdWU2MDI1NTc3MTQ=
| 33,639
|
use s3fs authentication if provided
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/14917972?v=4",
"events_url": "https://api.github.com/users/cc-jj/events{/privacy}",
"followers_url": "https://api.github.com/users/cc-jj/followers",
"following_url": "https://api.github.com/users/cc-jj/following{/other_user}",
"gists_url": "https://api.github.com/users/cc-jj/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cc-jj",
"id": 14917972,
"login": "cc-jj",
"node_id": "MDQ6VXNlcjE0OTE3OTcy",
"organizations_url": "https://api.github.com/users/cc-jj/orgs",
"received_events_url": "https://api.github.com/users/cc-jj/received_events",
"repos_url": "https://api.github.com/users/cc-jj/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cc-jj/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cc-jj/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cc-jj"
}
|
[
{
"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"
}
] |
closed
| false
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/16733618?v=4",
"events_url": "https://api.github.com/users/alimcmaster1/events{/privacy}",
"followers_url": "https://api.github.com/users/alimcmaster1/followers",
"following_url": "https://api.github.com/users/alimcmaster1/following{/other_user}",
"gists_url": "https://api.github.com/users/alimcmaster1/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/alimcmaster1",
"id": 16733618,
"login": "alimcmaster1",
"node_id": "MDQ6VXNlcjE2NzMzNjE4",
"organizations_url": "https://api.github.com/users/alimcmaster1/orgs",
"received_events_url": "https://api.github.com/users/alimcmaster1/received_events",
"repos_url": "https://api.github.com/users/alimcmaster1/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/alimcmaster1/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/alimcmaster1/subscriptions",
"type": "User",
"url": "https://api.github.com/users/alimcmaster1"
}
|
[
{
"avatar_url": "https://avatars.githubusercontent.com/u/16733618?v=4",
"events_url": "https://api.github.com/users/alimcmaster1/events{/privacy}",
"followers_url": "https://api.github.com/users/alimcmaster1/followers",
"following_url": "https://api.github.com/users/alimcmaster1/following{/other_user}",
"gists_url": "https://api.github.com/users/alimcmaster1/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/alimcmaster1",
"id": 16733618,
"login": "alimcmaster1",
"node_id": "MDQ6VXNlcjE2NzMzNjE4",
"organizations_url": "https://api.github.com/users/alimcmaster1/orgs",
"received_events_url": "https://api.github.com/users/alimcmaster1/received_events",
"repos_url": "https://api.github.com/users/alimcmaster1/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/alimcmaster1/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/alimcmaster1/subscriptions",
"type": "User",
"url": "https://api.github.com/users/alimcmaster1"
}
] | null | 2
| 2020-04-18T21:39:10Z
| 2020-09-04T23:55:28Z
| 2020-09-04T23:55:28Z
|
NONE
| null |
I have a use case where I need to download dataframes from multiple s3 buckets with different credentials.
By default, s3fs uses env variables such as `AWS_PROFILE` `AWS_ACCESS_KEY_ID` etc to determine credentials. However, this will not work for me as I need different credentials for different buckets.
The s3fs docs show you can alternatively authenticate like so:
https://fs-s3fs.readthedocs.io/en/latest/#authentication
```python
s3fs = open_fs('s3://<access key>:<secret key>@mybucket')
```
I attempted to use this idea with pandas
```python
df = pd.read_csv("s3://<access key>:<secret key>@mybucket/csv_key")
```
but this raised an exception deep within s3fs saying invalid bucket name. potentially caused by stripping logic here:
https://github.com/pandas-dev/pandas/blob/master/pandas/io/s3.py#L29
I think we could easily support authentication using this syntax:
```python
pd.read_csv("s3://<access key>:<secret key>@mybucket/csv_key")
```
By modifying the code here:
https://github.com/pandas-dev/pandas/blob/master/pandas/io/s3.py#L27
The idea being we first attempt to match the `filepath_or_buffer` for the access key and secret key. If matched, we pass these into `s3fs.FileSystem`
```python
m = re.match(pattern, filepath_or_buffer)
if match is not None:
access_key, secret_key, bucket_name = match.groups()
fs = s3fs.FileSystem(bucket_name, aws_access_key_id=access_key, aws_secret_key=secret_key)
...
```
|
{
"+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/33639/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33639/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/33640
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33640/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33640/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33640/events
|
https://github.com/pandas-dev/pandas/pull/33640
| 602,568,339
|
MDExOlB1bGxSZXF1ZXN0NDA1NTcwODc4
| 33,640
|
DOC: Fix: single
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/69120?v=4",
"events_url": "https://api.github.com/users/kwadrat/events{/privacy}",
"followers_url": "https://api.github.com/users/kwadrat/followers",
"following_url": "https://api.github.com/users/kwadrat/following{/other_user}",
"gists_url": "https://api.github.com/users/kwadrat/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kwadrat",
"id": 69120,
"login": "kwadrat",
"node_id": "MDQ6VXNlcjY5MTIw",
"organizations_url": "https://api.github.com/users/kwadrat/orgs",
"received_events_url": "https://api.github.com/users/kwadrat/received_events",
"repos_url": "https://api.github.com/users/kwadrat/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kwadrat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kwadrat/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kwadrat"
}
|
[
{
"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": "2020-07-28T18:13:47Z",
"closed_issues": 2378,
"created_at": "2019-12-02T12:52:48Z",
"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": "2020-08-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/68",
"id": 4894670,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68/labels",
"node_id": "MDk6TWlsZXN0b25lNDg5NDY3MA==",
"number": 68,
"open_issues": 0,
"state": "closed",
"title": "1.1",
"updated_at": "2021-07-17T17:25:28Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68"
}
| 1
| 2020-04-18T22:42:49Z
| 2020-04-19T15:02:59Z
| 2020-04-18T23:27:41Z
|
CONTRIBUTOR
| null |
One word in documentation was misspelled: single
|
{
"+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/33640/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33640/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/33640.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/33640",
"merged_at": "2020-04-18T23:27:41Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/33640.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/33640"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33641
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33641/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33641/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33641/events
|
https://github.com/pandas-dev/pandas/pull/33641
| 602,576,854
|
MDExOlB1bGxSZXF1ZXN0NDA1NTc2Nzgz
| 33,641
|
CLN: remove unnecessary non-scalar code in maybe_upcast_putmask
|
{
"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": "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": "2020-07-28T18:13:47Z",
"closed_issues": 2378,
"created_at": "2019-12-02T12:52:48Z",
"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": "2020-08-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/68",
"id": 4894670,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68/labels",
"node_id": "MDk6TWlsZXN0b25lNDg5NDY3MA==",
"number": 68,
"open_issues": 0,
"state": "closed",
"title": "1.1",
"updated_at": "2021-07-17T17:25:28Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68"
}
| 1
| 2020-04-18T23:42:08Z
| 2020-04-19T18:44:57Z
| 2020-04-19T18:40:54Z
|
MEMBER
| null |
A few months ago we got rid of the non-scalar case, so some of this became unnecessary
|
{
"+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/33641/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33641/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/33641.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/33641",
"merged_at": "2020-04-19T18:40:54Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/33641.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/33641"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33642
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33642/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33642/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33642/events
|
https://github.com/pandas-dev/pandas/issues/33642
| 602,578,168
|
MDU6SXNzdWU2MDI1NzgxNjg=
| 33,642
|
API: Series[index_with_no_matches] vs Series[list_with_no_matches]
|
{
"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"
}
] |
closed
| false
| null |
[] |
{
"closed_at": "2020-07-28T18:13:47Z",
"closed_issues": 2378,
"created_at": "2019-12-02T12:52:48Z",
"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": "2020-08-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/68",
"id": 4894670,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68/labels",
"node_id": "MDk6TWlsZXN0b25lNDg5NDY3MA==",
"number": 68,
"open_issues": 0,
"state": "closed",
"title": "1.1",
"updated_at": "2021-07-17T17:25:28Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68"
}
| 0
| 2020-04-18T23:51:37Z
| 2020-04-19T21:14:40Z
| 2020-04-19T21:14:40Z
|
MEMBER
| null |
We treat list indexers differently from array-like indexers:
```
ser = pd.Series(["A", "B"])
key = pd.Series(["C"])
>>> ser[key]
C NaN
dtype: object
>>> ser[pd.Index(key)]
C NaN
dtype: object
>>> ser[np.array(key)]
C NaN
dtype: object
>>> ser[list(key)]
Traceback (most recent call last):
[...]
File "/Users/bmendel/Desktop/pd/pandas/pandas/core/indexing.py", line 1312, in _validate_read_indexer
raise KeyError(f"None of [{key}] are in the [{axis_name}]")
KeyError: "None of [Index(['C'], dtype='object')] are in the [index]"
```
Also inconsistent because `ser.loc[key]` raises for all 4 cases.
Is there a compelling reason for this? I tried making all of these behave like the list case and only one test broke (that test being the example above). The test was added in #5880.
|
{
"+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/33642/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33642/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/33643
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33643/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33643/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33643/events
|
https://github.com/pandas-dev/pandas/pull/33643
| 602,578,819
|
MDExOlB1bGxSZXF1ZXN0NDA1NTc4MTA2
| 33,643
|
REF: dispatch Series.__setitem__ to loc/iloc, remove redundant helpers
|
{
"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": "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": "2020-07-28T18:13:47Z",
"closed_issues": 2378,
"created_at": "2019-12-02T12:52:48Z",
"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": "2020-08-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/68",
"id": 4894670,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68/labels",
"node_id": "MDk6TWlsZXN0b25lNDg5NDY3MA==",
"number": 68,
"open_issues": 0,
"state": "closed",
"title": "1.1",
"updated_at": "2021-07-17T17:25:28Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68"
}
| 1
| 2020-04-18T23:56:25Z
| 2020-04-19T21:30:23Z
| 2020-04-19T21:12:39Z
|
MEMBER
| null |
This will entail some extra overhead, but we get a) de-duplication and b) the structure of `__setitem__` comes to parallel the structure of `__getitem__`, which i find helpful grok-wise.
|
{
"+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/33643/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33643/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/33643.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/33643",
"merged_at": "2020-04-19T21:12:39Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/33643.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/33643"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33644
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33644/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33644/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33644/events
|
https://github.com/pandas-dev/pandas/pull/33644
| 602,585,014
|
MDExOlB1bGxSZXF1ZXN0NDA1NTgyMDYx
| 33,644
|
BUG: Groupby quantiles incorrect bins #33200
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/15342068?v=4",
"events_url": "https://api.github.com/users/mabelvj/events{/privacy}",
"followers_url": "https://api.github.com/users/mabelvj/followers",
"following_url": "https://api.github.com/users/mabelvj/following{/other_user}",
"gists_url": "https://api.github.com/users/mabelvj/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mabelvj",
"id": 15342068,
"login": "mabelvj",
"node_id": "MDQ6VXNlcjE1MzQyMDY4",
"organizations_url": "https://api.github.com/users/mabelvj/orgs",
"received_events_url": "https://api.github.com/users/mabelvj/received_events",
"repos_url": "https://api.github.com/users/mabelvj/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mabelvj/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mabelvj/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mabelvj"
}
|
[
{
"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": "2020-05-30T15:21:05Z",
"closed_issues": 94,
"created_at": "2020-03-19T21:32:28Z",
"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": "on-merge: backport to 1.0.x",
"due_on": "2020-06-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/72",
"id": 5219206,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/72/labels",
"node_id": "MDk6TWlsZXN0b25lNTIxOTIwNg==",
"number": 72,
"open_issues": 0,
"state": "closed",
"title": "1.0.4",
"updated_at": "2020-06-24T17:57:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/72"
}
| 7
| 2020-04-19T00:34:00Z
| 2020-05-26T08:31:01Z
| 2020-05-25T21:58:07Z
|
CONTRIBUTOR
| null |
Maintain the order of the bins in group_quantile. Updated tests #33200
- [x] closes #33200, closes #33569
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [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/33644/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33644/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/33644.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/33644",
"merged_at": "2020-05-25T21:58:07Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/33644.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/33644"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33645
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33645/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33645/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33645/events
|
https://github.com/pandas-dev/pandas/pull/33645
| 602,586,084
|
MDExOlB1bGxSZXF1ZXN0NDA1NTgyNzIx
| 33,645
|
IO: Fix S3 Error Handling
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/16733618?v=4",
"events_url": "https://api.github.com/users/alimcmaster1/events{/privacy}",
"followers_url": "https://api.github.com/users/alimcmaster1/followers",
"following_url": "https://api.github.com/users/alimcmaster1/following{/other_user}",
"gists_url": "https://api.github.com/users/alimcmaster1/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/alimcmaster1",
"id": 16733618,
"login": "alimcmaster1",
"node_id": "MDQ6VXNlcjE2NzMzNjE4",
"organizations_url": "https://api.github.com/users/alimcmaster1/orgs",
"received_events_url": "https://api.github.com/users/alimcmaster1/received_events",
"repos_url": "https://api.github.com/users/alimcmaster1/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/alimcmaster1/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/alimcmaster1/subscriptions",
"type": "User",
"url": "https://api.github.com/users/alimcmaster1"
}
|
[
{
"color": "5319e7",
"default": false,
"description": "read_csv, to_csv",
"id": 47229171,
"name": "IO CSV",
"node_id": "MDU6TGFiZWw0NzIyOTE3MQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20CSV"
},
{
"color": "5319e7",
"default": false,
"description": "parquet, feather",
"id": 685114413,
"name": "IO Parquet",
"node_id": "MDU6TGFiZWw2ODUxMTQ0MTM=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20Parquet"
}
] |
closed
| false
| null |
[] |
{
"closed_at": "2020-05-30T15:21:05Z",
"closed_issues": 94,
"created_at": "2020-03-19T21:32:28Z",
"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": "on-merge: backport to 1.0.x",
"due_on": "2020-06-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/72",
"id": 5219206,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/72/labels",
"node_id": "MDk6TWlsZXN0b25lNTIxOTIwNg==",
"number": 72,
"open_issues": 0,
"state": "closed",
"title": "1.0.4",
"updated_at": "2020-06-24T17:57:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/72"
}
| 4
| 2020-04-19T00:40:51Z
| 2020-05-26T09:30:12Z
| 2020-04-21T12:39:06Z
|
CONTRIBUTOR
| null |
closes #27679
closes #32486
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [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/33645/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33645/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/33645.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/33645",
"merged_at": "2020-04-21T12:39:06Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/33645.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/33645"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33646
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33646/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33646/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33646/events
|
https://github.com/pandas-dev/pandas/pull/33646
| 602,600,399
|
MDExOlB1bGxSZXF1ZXN0NDA1NTkxNzEy
| 33,646
|
BUG/API: getitem behavior with list match ndarray/index/series
|
{
"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"
}
] |
closed
| false
| null |
[] |
{
"closed_at": "2020-07-28T18:13:47Z",
"closed_issues": 2378,
"created_at": "2019-12-02T12:52:48Z",
"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": "2020-08-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/68",
"id": 4894670,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68/labels",
"node_id": "MDk6TWlsZXN0b25lNDg5NDY3MA==",
"number": 68,
"open_issues": 0,
"state": "closed",
"title": "1.1",
"updated_at": "2021-07-17T17:25:28Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68"
}
| 2
| 2020-04-19T02:18:36Z
| 2020-04-19T21:30:44Z
| 2020-04-19T21:14:41Z
|
MEMBER
| null |
- [x] closes #33642
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [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/33646/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33646/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/33646.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/33646",
"merged_at": "2020-04-19T21:14:40Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/33646.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/33646"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33647
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33647/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33647/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33647/events
|
https://github.com/pandas-dev/pandas/issues/33647
| 602,607,869
|
MDU6SXNzdWU2MDI2MDc4Njk=
| 33,647
|
ENH: Add level to asfreq for MultiIndex
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/18562882?v=4",
"events_url": "https://api.github.com/users/MaxPowerWasTaken/events{/privacy}",
"followers_url": "https://api.github.com/users/MaxPowerWasTaken/followers",
"following_url": "https://api.github.com/users/MaxPowerWasTaken/following{/other_user}",
"gists_url": "https://api.github.com/users/MaxPowerWasTaken/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/MaxPowerWasTaken",
"id": 18562882,
"login": "MaxPowerWasTaken",
"node_id": "MDQ6VXNlcjE4NTYyODgy",
"organizations_url": "https://api.github.com/users/MaxPowerWasTaken/orgs",
"received_events_url": "https://api.github.com/users/MaxPowerWasTaken/received_events",
"repos_url": "https://api.github.com/users/MaxPowerWasTaken/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/MaxPowerWasTaken/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/MaxPowerWasTaken/subscriptions",
"type": "User",
"url": "https://api.github.com/users/MaxPowerWasTaken"
}
|
[
{
"color": "4E9A06",
"default": false,
"description": null,
"id": 76812,
"name": "Enhancement",
"node_id": "MDU6TGFiZWw3NjgxMg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Enhancement"
},
{
"color": "0052cc",
"default": false,
"description": "DateOffsets",
"id": 53181044,
"name": "Frequency",
"node_id": "MDU6TGFiZWw1MzE4MTA0NA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Frequency"
},
{
"color": "207de5",
"default": false,
"description": null,
"id": 71268330,
"name": "MultiIndex",
"node_id": "MDU6TGFiZWw3MTI2ODMzMA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/MultiIndex"
}
] |
open
| false
| null |
[] | null | 2
| 2020-04-19T03:14:49Z
| 2021-03-27T01:07:47Z
| null |
NONE
| null |
- [x] I have searched the [[pandas] tag](https://stackoverflow.com/questions/tagged/pandas) on StackOverflow for similar questions.
- [x] I have asked my usage related question on [StackOverflow](https://stackoverflow.com).
---
#### Question about pandas
I posted my question with a bit more context [on Stack Overflow here](https://stackoverflow.com/q/61297399/1870832), and got an impressive answer, but I doubt (or want to doubt) that the answer I got is the simplest way to set the `freq` attribute of a DateTime index that's part of a MultiIndex
Given a MultiIndexed Series loaded from a CSV that looks like this...
```python
# generate example data
users = ['A', 'B', 'C', 'D']
#dates = pd.date_range("2020-02-01 00:00:00", "2020-04-04 20:00:00", freq="H")
dates = pd.date_range("2020-02-01 00:00:00", "2020-02-04 20:00:00", freq="H")
idx = pd.MultiIndex.from_product([users, dates])
idx.names = ["user", "datehour"]
y = pd.Series(np.random.choice(a=[0, 1], size=len(idx)), index=idx).rename('y')
# write to csv and reload (turns out this matters)
y.to_csv('reprod_example.csv')
y = pd.read_csv('reprod_example.csv', parse_dates=['datehour'])
y = y.set_index(['user', 'datehour']).y
>>> y.head()
user datehour
A 2020-02-01 00:00:00 0
2020-02-01 01:00:00 0
2020-02-01 02:00:00 1
2020-02-01 03:00:00 0
2020-02-01 04:00:00 0
Name: y, dtype: int64
```
...is there a way to set the `freq` attribute of the DateTime index level that's simpler / more intuitive than this answer I received?...
```
y = pd.read_csv('reprod_example.csv', parse_dates=['datehour'])
y = y.groupby('user').apply(lambda df: df.set_index('datehour').asfreq('H')).y
```
... setting an index inside a groupby/apply/lambda in order to update the `freq` attribute is not what I expected this would take. Certainly not the first thing I (or the answerer) tried.
Thanks! Love Pandas, just thought this was maybe a good opportunity to check if there's a more idiomatic way to do this, since the use case seems not super atypical.
|
{
"+1": 5,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 5,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/33647/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33647/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/33648
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33648/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33648/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33648/events
|
https://github.com/pandas-dev/pandas/issues/33648
| 602,653,574
|
MDU6SXNzdWU2MDI2NTM1NzQ=
| 33,648
|
DOC: convert_dtypes method is not converted to URL
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/2835259?v=4",
"events_url": "https://api.github.com/users/jorijnsmit/events{/privacy}",
"followers_url": "https://api.github.com/users/jorijnsmit/followers",
"following_url": "https://api.github.com/users/jorijnsmit/following{/other_user}",
"gists_url": "https://api.github.com/users/jorijnsmit/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jorijnsmit",
"id": 2835259,
"login": "jorijnsmit",
"node_id": "MDQ6VXNlcjI4MzUyNTk=",
"organizations_url": "https://api.github.com/users/jorijnsmit/orgs",
"received_events_url": "https://api.github.com/users/jorijnsmit/received_events",
"repos_url": "https://api.github.com/users/jorijnsmit/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jorijnsmit/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jorijnsmit/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jorijnsmit"
}
|
[
{
"color": "3465A4",
"default": false,
"description": null,
"id": 134699,
"name": "Docs",
"node_id": "MDU6TGFiZWwxMzQ2OTk=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Docs"
},
{
"color": "009800",
"default": false,
"description": "Duplicate issue or pull request",
"id": 40153326,
"name": "Duplicate Report",
"node_id": "MDU6TGFiZWw0MDE1MzMyNg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Duplicate%20Report"
}
] |
closed
| false
| null |
[] | null | 1
| 2020-04-19T08:13:30Z
| 2020-04-19T18:11:41Z
| 2020-04-19T18:11:41Z
|
NONE
| null |
Somehow the method `convert_dtypes` in the "See also" box is not a URL, whereas all the other ones are: https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.to_numeric.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/33648/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33648/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/33649
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33649/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33649/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33649/events
|
https://github.com/pandas-dev/pandas/issues/33649
| 602,672,138
|
MDU6SXNzdWU2MDI2NzIxMzg=
| 33,649
|
ENH: add a float_precision='low' option to read_csv
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/2835259?v=4",
"events_url": "https://api.github.com/users/jorijnsmit/events{/privacy}",
"followers_url": "https://api.github.com/users/jorijnsmit/followers",
"following_url": "https://api.github.com/users/jorijnsmit/following{/other_user}",
"gists_url": "https://api.github.com/users/jorijnsmit/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jorijnsmit",
"id": 2835259,
"login": "jorijnsmit",
"node_id": "MDQ6VXNlcjI4MzUyNTk=",
"organizations_url": "https://api.github.com/users/jorijnsmit/orgs",
"received_events_url": "https://api.github.com/users/jorijnsmit/received_events",
"repos_url": "https://api.github.com/users/jorijnsmit/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jorijnsmit/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jorijnsmit/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jorijnsmit"
}
|
[
{
"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": "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": "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": "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
| 2020-04-19T09:50:58Z
| 2020-04-20T16:46:06Z
| null |
NONE
| null |
#### Problem
Unless we know the column names in advance, it is impossible to prevent `read_csv` from loading all floats as `np.float64` when loading in a csv file with mixed data types. This can create a great (unnecessary) strain on memory.
#### Possible solution
If we would be able to specify a C parser which outputs `np.float16` or `np.float32` instead of `np.float64`, we could save half of the resulting memory footprint or more. In practice this could look like this:
```python
pd.read_csv('data.csv', float_precision='low')
```
Or better yet, accepting [descriptors](https://docs.scipy.org/doc/numpy/reference/arrays.scalars.html) such as `'half'`, `'single'` or `'double'`.
#### Alternatives
- The best alternative right now is to hack your way around reading in the csv file completely by only reading in the first couple of lines of the file first, extracting the necessary column names and then specifying these as a lower float type using another instance of `read_csv` using the `dtype` argument.
- All other alternatives require to read in the file in its entirety, e.g. (incredibly slow):
```python
df = read_csv('data.csv')
doubles = df.select_dtypes('float64').columns
df[doubles] = df[doubles].astype('float32')
```
- `pd.to_numeric` has a downcasting option but will try to convert all columns.
- `pd.convert_dtypes` will always convert to `float64`.
#### API breaking implications
Not sure. I see an option to add another `self.parser.double_converter` in [`parsers.pyx`](https://github.com/pandas-dev/pandas/blob/e878fdc4170f6a2aee8d7b42aa39a438fdf6c67f/pandas/_libs/parsers.pyx#L455) but I don't speak enough C to know what this would imply.
Or am I missing something? What other ways are there to minimise memory footprint?
|
{
"+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/33649/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33649/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/33650
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33650/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33650/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33650/events
|
https://github.com/pandas-dev/pandas/pull/33650
| 602,676,539
|
MDExOlB1bGxSZXF1ZXN0NDA1NjM4ODA5
| 33,650
|
TST: add messages to pytest.raises
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/34047134?v=4",
"events_url": "https://api.github.com/users/proost/events{/privacy}",
"followers_url": "https://api.github.com/users/proost/followers",
"following_url": "https://api.github.com/users/proost/following{/other_user}",
"gists_url": "https://api.github.com/users/proost/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/proost",
"id": 34047134,
"login": "proost",
"node_id": "MDQ6VXNlcjM0MDQ3MTM0",
"organizations_url": "https://api.github.com/users/proost/orgs",
"received_events_url": "https://api.github.com/users/proost/received_events",
"repos_url": "https://api.github.com/users/proost/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/proost/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/proost/subscriptions",
"type": "User",
"url": "https://api.github.com/users/proost"
}
|
[
{
"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"
}
] |
closed
| false
| null |
[] |
{
"closed_at": "2020-07-28T18:13:47Z",
"closed_issues": 2378,
"created_at": "2019-12-02T12:52:48Z",
"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": "2020-08-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/68",
"id": 4894670,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68/labels",
"node_id": "MDk6TWlsZXN0b25lNDg5NDY3MA==",
"number": 68,
"open_issues": 0,
"state": "closed",
"title": "1.1",
"updated_at": "2021-07-17T17:25:28Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68"
}
| 1
| 2020-04-19T10:12:48Z
| 2020-04-20T01:31:58Z
| 2020-04-19T18:39:40Z
|
CONTRIBUTOR
| null |
- [x] xref #30999
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] 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/33650/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33650/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/33650.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/33650",
"merged_at": "2020-04-19T18:39:39Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/33650.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/33650"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33651
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33651/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33651/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33651/events
|
https://github.com/pandas-dev/pandas/pull/33651
| 602,699,355
|
MDExOlB1bGxSZXF1ZXN0NDA1NjU0MDkw
| 33,651
|
BUG: Create empty dataframe with string dtype fails
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/22385925?v=4",
"events_url": "https://api.github.com/users/kotamatsuoka/events{/privacy}",
"followers_url": "https://api.github.com/users/kotamatsuoka/followers",
"following_url": "https://api.github.com/users/kotamatsuoka/following{/other_user}",
"gists_url": "https://api.github.com/users/kotamatsuoka/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kotamatsuoka",
"id": 22385925,
"login": "kotamatsuoka",
"node_id": "MDQ6VXNlcjIyMzg1OTI1",
"organizations_url": "https://api.github.com/users/kotamatsuoka/orgs",
"received_events_url": "https://api.github.com/users/kotamatsuoka/received_events",
"repos_url": "https://api.github.com/users/kotamatsuoka/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kotamatsuoka/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kotamatsuoka/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kotamatsuoka"
}
|
[
{
"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": "6138b5",
"default": false,
"description": "Extending pandas with custom dtypes or arrays.",
"id": 849023693,
"name": "ExtensionArray",
"node_id": "MDU6TGFiZWw4NDkwMjM2OTM=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/ExtensionArray"
},
{
"color": "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": "2020-07-28T18:13:47Z",
"closed_issues": 2378,
"created_at": "2019-12-02T12:52:48Z",
"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": "2020-08-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/68",
"id": 4894670,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68/labels",
"node_id": "MDk6TWlsZXN0b25lNDg5NDY3MA==",
"number": 68,
"open_issues": 0,
"state": "closed",
"title": "1.1",
"updated_at": "2021-07-17T17:25:28Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68"
}
| 3
| 2020-04-19T12:10:29Z
| 2020-05-09T19:56:19Z
| 2020-05-09T19:56:15Z
|
CONTRIBUTOR
| null |
- [ ] closes #33623, closes #27953
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [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/33651/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33651/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/33651.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/33651",
"merged_at": "2020-05-09T19:56:15Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/33651.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/33651"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33652
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33652/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33652/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33652/events
|
https://github.com/pandas-dev/pandas/pull/33652
| 602,706,709
|
MDExOlB1bGxSZXF1ZXN0NDA1NjU5MDY4
| 33,652
|
Value counts normalize
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/28422436?v=4",
"events_url": "https://api.github.com/users/DataInformer/events{/privacy}",
"followers_url": "https://api.github.com/users/DataInformer/followers",
"following_url": "https://api.github.com/users/DataInformer/following{/other_user}",
"gists_url": "https://api.github.com/users/DataInformer/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/DataInformer",
"id": 28422436,
"login": "DataInformer",
"node_id": "MDQ6VXNlcjI4NDIyNDM2",
"organizations_url": "https://api.github.com/users/DataInformer/orgs",
"received_events_url": "https://api.github.com/users/DataInformer/received_events",
"repos_url": "https://api.github.com/users/DataInformer/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/DataInformer/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/DataInformer/subscriptions",
"type": "User",
"url": "https://api.github.com/users/DataInformer"
}
|
[
{
"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": "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": "78bced",
"default": false,
"description": "Waiting for review/response from a maintainer.",
"id": 2324533627,
"name": "Needs Review",
"node_id": "MDU6TGFiZWwyMzI0NTMzNjI3",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Needs%20Review"
},
{
"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 | 21
| 2020-04-19T12:48:00Z
| 2021-06-16T13:59:03Z
| 2021-06-16T13:59:03Z
|
NONE
| null |
- [x] closes #25970
- [x] closes #32471
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry
This pull request resolves issues with binning and NA values in both ``Series.value_counts`` and ``SeriesGroupBy.value_counts,`` adding new tests to check the problematic cases.
|
{
"+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/33652/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33652/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/33652.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/33652",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/33652.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/33652"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33653
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33653/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33653/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33653/events
|
https://github.com/pandas-dev/pandas/pull/33653
| 602,708,019
|
MDExOlB1bGxSZXF1ZXN0NDA1NjU5OTU1
| 33,653
|
DOC: Fix heading capitalization in doc/source/whatsnew - part6 (#32550)
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/24496267?v=4",
"events_url": "https://api.github.com/users/cleconte987/events{/privacy}",
"followers_url": "https://api.github.com/users/cleconte987/followers",
"following_url": "https://api.github.com/users/cleconte987/following{/other_user}",
"gists_url": "https://api.github.com/users/cleconte987/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cleconte987",
"id": 24496267,
"login": "cleconte987",
"node_id": "MDQ6VXNlcjI0NDk2MjY3",
"organizations_url": "https://api.github.com/users/cleconte987/orgs",
"received_events_url": "https://api.github.com/users/cleconte987/received_events",
"repos_url": "https://api.github.com/users/cleconte987/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cleconte987/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cleconte987/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cleconte987"
}
|
[
{
"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 |
[] | null | 4
| 2020-04-19T12:54:28Z
| 2020-07-21T20:15:17Z
| 2020-07-21T20:15:16Z
|
CONTRIBUTOR
| null |
- [ ] Modify files v0.22.0.rst, v0.23.1.rst, v0.19.0.rst, v0.24.0.rst, v0.24.2.rst
-[ ] Add exceptions in 'validate_rst_title_capitalization.py'
|
{
"+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/33653/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33653/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/33653.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/33653",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/33653.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/33653"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33654
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33654/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33654/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33654/events
|
https://github.com/pandas-dev/pandas/issues/33654
| 602,736,456
|
MDU6SXNzdWU2MDI3MzY0NTY=
| 33,654
|
BUG: can't concatenate DataFrame with Series with duplicate keys
|
{
"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": "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"
}
] |
closed
| false
| null |
[] |
{
"closed_at": "2020-07-28T18:13:47Z",
"closed_issues": 2378,
"created_at": "2019-12-02T12:52:48Z",
"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": "2020-08-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/68",
"id": 4894670,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68/labels",
"node_id": "MDk6TWlsZXN0b25lNDg5NDY3MA==",
"number": 68,
"open_issues": 0,
"state": "closed",
"title": "1.1",
"updated_at": "2021-07-17T17:25:28Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68"
}
| 0
| 2020-04-19T14:58:58Z
| 2020-05-01T16:50:31Z
| 2020-05-01T16:50:31Z
|
MEMBER
| null |
- [x] I have checked that this issue has not already been reported.
- [x] I have confirmed this bug exists on the latest version of pandas.
- [x] (optional) I have confirmed this bug exists on the master branch of pandas.
---
**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
>>> df = pd.DataFrame({'a': [1,2,3], 'b': [1,2,3]})
>>> s1 = pd.Series([1,2,3], name='a')
>>> s2 = pd.Series([1,2,3], name='a')
>>>pd.concat([df, s1, s2], axis=1, keys=['a', 'b', 'b'])
TypeError: int() argument must be a string, a bytes-like object or a number, not 'slice'
```
<details>
<summary>full traceback</summary>
```
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-2-f6a5f4790f76> in <module>
3 s1 = pd.Series([1,2,3], name='a')
4 s2 = pd.Series([1,2,3], name='a')
----> 5 pd.concat([df, s1, s2], axis=1, keys=['a', 'b', 'b'])
~/pandas-dev/pandas/core/reshape/concat.py in concat(objs, axis, join, ignore_index, keys, levels, names, verify_integrity, sort, copy)
269 ValueError: Indexes have overlapping values: ['a']
270 """
--> 271 op = _Concatenator(
272 objs,
273 axis=axis,
~/pandas-dev/pandas/core/reshape/concat.py in __init__(self, objs, axis, join, keys, levels, names, ignore_index, verify_integrity, copy, sort)
449 self.copy = copy
450
--> 451 self.new_axes = self._get_new_axes()
452
453 def get_result(self):
~/pandas-dev/pandas/core/reshape/concat.py in _get_new_axes(self)
512 def _get_new_axes(self) -> List[Index]:
513 ndim = self._get_result_dim()
--> 514 return [
515 self._get_concat_axis() if i == self.bm_axis else self._get_comb_axis(i)
516 for i in range(ndim)
~/pandas-dev/pandas/core/reshape/concat.py in <listcomp>(.0)
513 ndim = self._get_result_dim()
514 return [
--> 515 self._get_concat_axis() if i == self.bm_axis else self._get_comb_axis(i)
516 for i in range(ndim)
517 ]
~/pandas-dev/pandas/core/reshape/concat.py in _get_concat_axis(self)
569 concat_axis = _concat_indexes(indexes)
570 else:
--> 571 concat_axis = _make_concat_multiindex(
572 indexes, self.keys, self.levels, self.names
573 )
~/pandas-dev/pandas/core/reshape/concat.py in _make_concat_multiindex(indexes, keys, levels, names)
651 names = names + get_consensus_names(indexes)
652
--> 653 return MultiIndex(
654 levels=levels, codes=codes_list, names=names, verify_integrity=False
655 )
~/pandas-dev/pandas/core/indexes/multi.py in __new__(cls, levels, codes, sortorder, names, dtype, copy, name, verify_integrity, _set_identity)
281 # we've already validated levels and codes, so shortcut here
282 result._set_levels(levels, copy=copy, validate=False)
--> 283 result._set_codes(codes, copy=copy, validate=False)
284
285 result._names = [None] * len(levels)
~/pandas-dev/pandas/core/indexes/multi.py in _set_codes(self, codes, level, copy, validate, verify_integrity)
880
881 if level is None:
--> 882 new_codes = FrozenList(
883 _coerce_indexer_frozen(level_codes, lev, copy=copy).view()
884 for lev, level_codes in zip(self._levels, codes)
~/pandas-dev/pandas/core/indexes/multi.py in <genexpr>(.0)
881 if level is None:
882 new_codes = FrozenList(
--> 883 _coerce_indexer_frozen(level_codes, lev, copy=copy).view()
884 for lev, level_codes in zip(self._levels, codes)
885 )
~/pandas-dev/pandas/core/indexes/multi.py in _coerce_indexer_frozen(array_like, categories, copy)
3681 Non-writeable.
3682 """
-> 3683 array_like = coerce_indexer_dtype(array_like, categories)
3684 if copy:
3685 array_like = array_like.copy()
~/pandas-dev/pandas/core/dtypes/cast.py in coerce_indexer_dtype(indexer, categories)
866 length = len(categories)
867 if length < _int8_max:
--> 868 return ensure_int8(indexer)
869 elif length < _int16_max:
870 return ensure_int16(indexer)
~/pandas-dev/pandas/_libs/algos_common_helper.pxi in pandas._libs.algos.ensure_int8()
59 return arr
60 else:
---> 61 return arr.astype(np.int8, copy=copy)
62 else:
63 return np.array(arr, dtype=np.int8)
TypeError: int() argument must be a string, a bytes-like object or a number, not 'slice'
```
</details>
#### Problem description
Noticed while working on #30858, I think this one needs to be solved first if we want to solve the `ohlc` case
#### Expected Output
```python
a b b
a b a a
0 1 1 1 1
1 2 2 2 2
2 3 3 3 3
```
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit : e878fdc4170f6a2aee8d7b42aa39a438fdf6c67f
python : 3.8.2.final.0
python-bits : 64
OS : Linux
OS-release : 5.3.0-46-generic
Version : #38~18.04.1-Ubuntu SMP Tue Mar 31 04:17:56 UTC 2020
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_GB.UTF-8
LOCALE : en_GB.UTF-8
pandas : 1.1.0.dev0+1302.ge878fdc41
numpy : 1.18.1
pytz : 2019.3
dateutil : 2.8.1
pip : 20.0.2
setuptools : 46.1.3.post20200325
Cython : 0.29.16
pytest : 5.4.1
hypothesis : 5.8.0
sphinx : 3.0.0
blosc : None
feather : None
xlsxwriter : 1.2.8
lxml.etree : 4.5.0
html5lib : 1.0.1
pymysql : None
psycopg2 : None
jinja2 : 2.11.1
IPython : 7.13.0
pandas_datareader: None
bs4 : 4.9.0
bottleneck : 1.3.2
fastparquet : 0.3.3
gcsfs : None
matplotlib : 3.2.1
numexpr : 2.7.1
odfpy : None
openpyxl : 3.0.3
pandas_gbq : None
pyarrow : 0.16.0
pytables : None
pyxlsb : None
s3fs : 0.4.2
scipy : 1.4.1
sqlalchemy : 1.3.16
tables : 3.6.1
tabulate : 0.8.7
xarray : 0.15.1
xlrd : 1.2.0
xlwt : 1.3.0
numba : 0.48.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/33654/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33654/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/33655
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33655/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33655/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33655/events
|
https://github.com/pandas-dev/pandas/issues/33655
| 602,747,636
|
MDU6SXNzdWU2MDI3NDc2MzY=
| 33,655
|
BUG: pandas.options.mode.use_inf_as_na disables NA checking for StringArray
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/2658661?v=4",
"events_url": "https://api.github.com/users/dsaxton/events{/privacy}",
"followers_url": "https://api.github.com/users/dsaxton/followers",
"following_url": "https://api.github.com/users/dsaxton/following{/other_user}",
"gists_url": "https://api.github.com/users/dsaxton/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dsaxton",
"id": 2658661,
"login": "dsaxton",
"node_id": "MDQ6VXNlcjI2NTg2NjE=",
"organizations_url": "https://api.github.com/users/dsaxton/orgs",
"received_events_url": "https://api.github.com/users/dsaxton/received_events",
"repos_url": "https://api.github.com/users/dsaxton/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dsaxton/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dsaxton/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dsaxton"
}
|
[
{
"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": "8cc645",
"default": false,
"description": "Related to pd.NA and nullable extension arrays",
"id": 1817503692,
"name": "NA - MaskedArrays",
"node_id": "MDU6TGFiZWwxODE3NTAzNjky",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/NA%20-%20MaskedArrays"
}
] |
closed
| false
| null |
[] |
{
"closed_at": "2020-07-28T18:13:47Z",
"closed_issues": 2378,
"created_at": "2019-12-02T12:52:48Z",
"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": "2020-08-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/68",
"id": 4894670,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68/labels",
"node_id": "MDk6TWlsZXN0b25lNDg5NDY3MA==",
"number": 68,
"open_issues": 0,
"state": "closed",
"title": "1.1",
"updated_at": "2021-07-17T17:25:28Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68"
}
| 0
| 2020-04-19T15:42:11Z
| 2020-05-10T17:12:46Z
| 2020-05-10T17:12:46Z
|
MEMBER
| null |
1.0.3 or master:
```python
import pandas as pd
pd.options.mode.use_inf_as_na = True
arr = pd.array(["a", "b", None])
arr.isna()
# array([False, False, False])
```
Setting use_inf_as_na to True breaks isna for StringArray as shown above; it seems to work fine for other ExtensionArrays I checked (IntegerArray, BooleanArray).
|
{
"+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/33655/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33655/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/33656
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33656/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33656/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33656/events
|
https://github.com/pandas-dev/pandas/pull/33656
| 602,750,949
|
MDExOlB1bGxSZXF1ZXN0NDA1Njg3MzQw
| 33,656
|
BUG: Fix StringArray use_inf_as_na bug
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/2658661?v=4",
"events_url": "https://api.github.com/users/dsaxton/events{/privacy}",
"followers_url": "https://api.github.com/users/dsaxton/followers",
"following_url": "https://api.github.com/users/dsaxton/following{/other_user}",
"gists_url": "https://api.github.com/users/dsaxton/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dsaxton",
"id": 2658661,
"login": "dsaxton",
"node_id": "MDQ6VXNlcjI2NTg2NjE=",
"organizations_url": "https://api.github.com/users/dsaxton/orgs",
"received_events_url": "https://api.github.com/users/dsaxton/received_events",
"repos_url": "https://api.github.com/users/dsaxton/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dsaxton/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dsaxton/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dsaxton"
}
|
[
{
"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": "8cc645",
"default": false,
"description": "Related to pd.NA and nullable extension arrays",
"id": 1817503692,
"name": "NA - MaskedArrays",
"node_id": "MDU6TGFiZWwxODE3NTAzNjky",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/NA%20-%20MaskedArrays"
}
] |
closed
| false
| null |
[] |
{
"closed_at": "2020-07-28T18:13:47Z",
"closed_issues": 2378,
"created_at": "2019-12-02T12:52:48Z",
"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": "2020-08-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/68",
"id": 4894670,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68/labels",
"node_id": "MDk6TWlsZXN0b25lNDg5NDY3MA==",
"number": 68,
"open_issues": 0,
"state": "closed",
"title": "1.1",
"updated_at": "2021-07-17T17:25:28Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68"
}
| 11
| 2020-04-19T15:54:24Z
| 2020-05-10T17:40:00Z
| 2020-05-10T17:12:46Z
|
MEMBER
| null |
- [x] closes #33655
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [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/33656/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33656/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/33656.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/33656",
"merged_at": "2020-05-10T17:12:46Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/33656.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/33656"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33657
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33657/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33657/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33657/events
|
https://github.com/pandas-dev/pandas/issues/33657
| 602,784,606
|
MDU6SXNzdWU2MDI3ODQ2MDY=
| 33,657
|
ENH: favor columns over index levels when groupby-ing over ambiguous label
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1224492?v=4",
"events_url": "https://api.github.com/users/toobaz/events{/privacy}",
"followers_url": "https://api.github.com/users/toobaz/followers",
"following_url": "https://api.github.com/users/toobaz/following{/other_user}",
"gists_url": "https://api.github.com/users/toobaz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/toobaz",
"id": 1224492,
"login": "toobaz",
"node_id": "MDQ6VXNlcjEyMjQ0OTI=",
"organizations_url": "https://api.github.com/users/toobaz/orgs",
"received_events_url": "https://api.github.com/users/toobaz/received_events",
"repos_url": "https://api.github.com/users/toobaz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/toobaz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/toobaz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/toobaz"
}
|
[
{
"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": "3465A4",
"default": false,
"description": null,
"id": 134699,
"name": "Docs",
"node_id": "MDU6TGFiZWwxMzQ2OTk=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Docs"
}
] |
open
| false
| null |
[] | null | 0
| 2020-04-19T18:15:25Z
| 2020-04-19T18:15:25Z
| null |
MEMBER
| null |
- [x] I have checked that this issue has not already been reported.
- [x] I have confirmed this bug exists on the latest version of pandas.
- [ ] (optional) I have confirmed this bug exists on the master branch of pandas.
---
#### Code Sample, a copy-pastable example
```python3
In [2]: df = pd.DataFrame(2, index=pd.MultiIndex.from_product([range(4), list('abcd')], names=['I', 'II']), columns=['I'])
In [3]: df.groupby('I')
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-3-8e63025e89e4> in <module>
----> 1 df.groupby('I')
~/nobackup/repo/pandas/pandas/core/frame.py in groupby(self, by, axis, level, as_index, sort, group_keys, squeeze, observed)
5881 group_keys=group_keys,
5882 squeeze=squeeze,
-> 5883 observed=observed,
5884 )
5885
~/nobackup/repo/pandas/pandas/core/groupby/groupby.py in __init__(self, obj, keys, axis, level, grouper, exclusions, selection, as_index, sort, group_keys, squeeze, observed, mutated)
407 sort=sort,
408 observed=observed,
--> 409 mutated=self.mutated,
410 )
411
~/nobackup/repo/pandas/pandas/core/groupby/grouper.py in get_grouper(obj, key, axis, level, sort, observed, mutated, validate)
591 if gpr in obj:
592 if validate:
--> 593 obj._check_label_or_level_ambiguity(gpr, axis=axis)
594 in_axis, name, gpr = True, gpr, obj[gpr]
595 exclusions.append(name)
~/nobackup/repo/pandas/pandas/core/generic.py in _check_label_or_level_ambiguity(self, key, axis)
1556 f"{label_article} {label_type} label, which is ambiguous."
1557 )
-> 1558 raise ValueError(msg)
1559
1560 def _get_label_or_level_values(self, key: str, axis: int = 0) -> np.ndarray:
ValueError: 'I' is both an index level and a column label, which is ambiguous.
```
#### Problem description
1. The ``groupby`` docs [don't even mention](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.groupby.html) the possibility that a label is interpreted as an index level. They only say "``A label or list of labels may be passed to group by the columns in self``".
2. There is an explicit way to resolve the ambiguity in favor of an index level, which is the ``level=`` argument
3. In my experience (and I do use ``MultiIndex``es a lot), grouping on index levels is far less common than grouping on columns
4. ... but there is no easy way to resolve the ambiguity in favor of a column (other than changing the columns/levels names, or explicitly passing the corresponding series)
All this said, I propose to suppress the ``ValueError`` above and just intepret the name as a column name. Given that we suppress an error, this shouldn't break any working code. This is the outcome which was agreed on in #5677 , but then in the PR Jeff [suggested](14432#issuecomment-254802493) to implement the current behavior. I think the rationale made sense but should reconsidered in the context of the typical usage (also reflected in the docs).
Moreover, while Jeff suggested to use a ``pd.Grouper`` in that case, it doesn't allow to group on an ambiguous column name _and_ an index level in the desired order, which was precisely [one of the arguments](5677#issuecomment-30432682) for allowing passing levels to ``by=``.
#### Expected Output
```python3
In [9]: df.reset_index(drop=True).groupby('I')
Out[9]: <pandas.core.groupby.generic.DataFrameGroupBy object at 0x7f70e60e3828>
```
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit : None
python : 3.7.3.final.0
python-bits : 64
OS : Linux
OS-release : 4.19.0-8-amd64
machine : x86_64
processor :
byteorder : little
LC_ALL : None
LANG : it_IT.UTF-8
LOCALE : it_IT.UTF-8
pandas : 1.1.0.dev0+276.g2495068ad
numpy : 1.16.4
pytz : 2019.2
dateutil : 2.8.0
pip : 18.1
setuptools : 41.0.1
Cython : 0.29.13
pytest : 4.6.3
hypothesis : 3.71.11
sphinx : 1.8.4
blosc : 1.7.0
feather : None
xlsxwriter : 0.9.3
lxml.etree : 4.3.2
html5lib : 1.0.1
pymysql : None
psycopg2 : 2.7.7 (dt dec pq3 ext lo64)
jinja2 : 2.10.1
IPython : 7.5.0
pandas_datareader: 0.8.1
bs4 : 4.8.0
bottleneck : 1.2.1
fastparquet : None
gcsfs : None
lxml.etree : 4.3.2
matplotlib : 3.0.2
numexpr : 2.6.9
odfpy : None
openpyxl : 2.4.9
pandas_gbq : None
pyarrow : None
pytables : None
pytest : 4.6.3
pyxlsb : None
s3fs : None
scipy : 1.1.0
sqlalchemy : 1.2.18
tables : 3.4.4
tabulate : 0.8.3
xarray : 0.11.3
xlrd : 1.2.0
xlwt : 1.3.0
xlsxwriter : 0.9.3
numba : 0.45.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/33657/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33657/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/33658
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33658/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33658/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33658/events
|
https://github.com/pandas-dev/pandas/issues/33658
| 602,804,860
|
MDU6SXNzdWU2MDI4MDQ4NjA=
| 33,658
|
ENH: optimized Groupby.diff()
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/30231949?v=4",
"events_url": "https://api.github.com/users/dequadras/events{/privacy}",
"followers_url": "https://api.github.com/users/dequadras/followers",
"following_url": "https://api.github.com/users/dequadras/following{/other_user}",
"gists_url": "https://api.github.com/users/dequadras/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dequadras",
"id": 30231949,
"login": "dequadras",
"node_id": "MDQ6VXNlcjMwMjMxOTQ5",
"organizations_url": "https://api.github.com/users/dequadras/orgs",
"received_events_url": "https://api.github.com/users/dequadras/received_events",
"repos_url": "https://api.github.com/users/dequadras/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dequadras/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dequadras/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dequadras"
}
|
[
{
"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": "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"
}
] |
open
| false
| null |
[] | null | 1
| 2020-04-19T19:51:35Z
| 2020-04-19T22:56:38Z
| null |
CONTRIBUTOR
| null |
#### Is your feature request related to a problem?
Doing groupby().diff() with a big dataset and many groups is quite slow. In this image, it is shown how in certain cases optimizing it with numba can get 1000x speed.

#### Describe the solution you'd like
Now, my question is, can this be optimized in pandas?
I realise the case is somehow special, but i've had to work with small groups and I'm finding some speed issues.
#### API breaking implications
[this should provide a description of how this feature will affect the API]
#### Describe alternatives you've considered
[this should provide a description of any alternative solutions or features you've considered]
#### Additional context
Here's the python code in text format
```python
import numpy as np
import pandas as pd
from numba import njit
# create dataframe with many groups
GROUPS = 100000
SIZE = 1000000
df = pd.DataFrame()
df["groups"]=np.random.choice(np.arange(GROUPS), size=SIZE)
df["values"] = np.random.random(size=SIZE)
df.sort_values("groups", inplace=True)
diff_pandas = df.groupby("groups")["values"].diff().values
@njit
def group_diff(groups: np.array, values: np.array, lag: int) -> np.array:
result_exp_mean = np.empty_like(values, dtype=np.float64)
for i in range(values.shape[0]):
if groups[i] == groups[i - lag]:
result_exp_mean[i] = values[i] - values[i - lag]
else:
result_exp_mean[i] = np.nan
return result_exp_mean
groups = df.groupby("groups").ngroup().values
values = df["values"].values
diff_numba = group_diff(groups, values, 1)
# check that it is equal
np.isclose(diff_pandas, diff_numba, equal_nan=True).all()
```
|
{
"+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/33658/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33658/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/33659
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33659/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33659/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33659/events
|
https://github.com/pandas-dev/pandas/pull/33659
| 602,816,759
|
MDExOlB1bGxSZXF1ZXN0NDA1NzMxODk4
| 33,659
|
ENH: Add optional argument index to pd.melt to maintain index values
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/32839123?v=4",
"events_url": "https://api.github.com/users/Rik-de-Kort/events{/privacy}",
"followers_url": "https://api.github.com/users/Rik-de-Kort/followers",
"following_url": "https://api.github.com/users/Rik-de-Kort/following{/other_user}",
"gists_url": "https://api.github.com/users/Rik-de-Kort/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Rik-de-Kort",
"id": 32839123,
"login": "Rik-de-Kort",
"node_id": "MDQ6VXNlcjMyODM5MTIz",
"organizations_url": "https://api.github.com/users/Rik-de-Kort/orgs",
"received_events_url": "https://api.github.com/users/Rik-de-Kort/received_events",
"repos_url": "https://api.github.com/users/Rik-de-Kort/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Rik-de-Kort/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Rik-de-Kort/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Rik-de-Kort"
}
|
[
{
"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": "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"
}
] |
closed
| false
| null |
[] |
{
"closed_at": "2020-07-28T18:13:47Z",
"closed_issues": 2378,
"created_at": "2019-12-02T12:52:48Z",
"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": "2020-08-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/68",
"id": 4894670,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68/labels",
"node_id": "MDk6TWlsZXN0b25lNDg5NDY3MA==",
"number": 68,
"open_issues": 0,
"state": "closed",
"title": "1.1",
"updated_at": "2021-07-17T17:25:28Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68"
}
| 8
| 2020-04-19T20:49:20Z
| 2020-07-10T07:44:49Z
| 2020-07-09T23:34:45Z
|
CONTRIBUTOR
| null |
Finishing up a stale PR idea: #28859 and #17459
Has some tests and better code.
I think it's fair to duplicate the index values and not bend over backwards to maintain uniqueness like in previous iterations.
Apologies for the mess, it was a quick job and I didn't want to spend an hour fiddling with the commits.
Finally, I deleted some ignore type comments for mypy because the commits weren't going on my system. Is there some other fix for that? Other than that I think it's good to go.
- [X] closes #17440
- [X] tests added / passed
- [X] passes `black pandas`
- [X] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [X] whatsnew entry
- [x] Reconsider API design
- [x] Add usage examples in whatsnew, docstring, and reshaping.rst.
|
{
"+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/33659/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33659/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/33659.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/33659",
"merged_at": "2020-07-09T23:34:45Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/33659.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/33659"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33660
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33660/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33660/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33660/events
|
https://github.com/pandas-dev/pandas/pull/33660
| 602,819,629
|
MDExOlB1bGxSZXF1ZXN0NDA1NzMzOTQ4
| 33,660
|
REF: Implement NDArrayBackedExtensionArray
|
{
"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": "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": "2020-07-28T18:13:47Z",
"closed_issues": 2378,
"created_at": "2019-12-02T12:52:48Z",
"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": "2020-08-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/68",
"id": 4894670,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68/labels",
"node_id": "MDk6TWlsZXN0b25lNDg5NDY3MA==",
"number": 68,
"open_issues": 0,
"state": "closed",
"title": "1.1",
"updated_at": "2021-07-17T17:25:28Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68"
}
| 0
| 2020-04-19T21:04:25Z
| 2020-04-25T21:30:13Z
| 2020-04-25T20:58:51Z
|
MEMBER
| null |
Many EAs are thin wrappers around np.ndarray. We can both de-duplicate a bunch of code and make things easier on downstream authors by implementing `NDArrayBackedExtensionArray` as a base class for such EAs.
This PR only implements `NDArrayBackedExtensionArray.take`, but there is quite a bit more that can be shared in follow-ups:
- copy, delete, repeat
- mix in to PandasArray
- with small changes, `__getitem__`, `__setitem__`, reductions, ...
The only change in logic this PR makes is to make `Categorical.take` raise a ValueError instead of a `TypeError`, matching DTA/TDA/PA.
|
{
"+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/33660/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33660/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/33660.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/33660",
"merged_at": "2020-04-25T20:58:51Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/33660.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/33660"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33661
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33661/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33661/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33661/events
|
https://github.com/pandas-dev/pandas/pull/33661
| 602,835,371
|
MDExOlB1bGxSZXF1ZXN0NDA1NzQ1NTE0
| 33,661
|
TST: Dtype constants into pandas._testing to avoid direct imports from conftest
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/17853006?v=4",
"events_url": "https://api.github.com/users/SaturnFromTitan/events{/privacy}",
"followers_url": "https://api.github.com/users/SaturnFromTitan/followers",
"following_url": "https://api.github.com/users/SaturnFromTitan/following{/other_user}",
"gists_url": "https://api.github.com/users/SaturnFromTitan/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/SaturnFromTitan",
"id": 17853006,
"login": "SaturnFromTitan",
"node_id": "MDQ6VXNlcjE3ODUzMDA2",
"organizations_url": "https://api.github.com/users/SaturnFromTitan/orgs",
"received_events_url": "https://api.github.com/users/SaturnFromTitan/received_events",
"repos_url": "https://api.github.com/users/SaturnFromTitan/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/SaturnFromTitan/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/SaturnFromTitan/subscriptions",
"type": "User",
"url": "https://api.github.com/users/SaturnFromTitan"
}
|
[
{
"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"
}
] |
closed
| false
| null |
[] |
{
"closed_at": "2020-07-28T18:13:47Z",
"closed_issues": 2378,
"created_at": "2019-12-02T12:52:48Z",
"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": "2020-08-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/68",
"id": 4894670,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68/labels",
"node_id": "MDk6TWlsZXN0b25lNDg5NDY3MA==",
"number": 68,
"open_issues": 0,
"state": "closed",
"title": "1.1",
"updated_at": "2021-07-17T17:25:28Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68"
}
| 4
| 2020-04-19T22:17:43Z
| 2020-04-20T00:38:26Z
| 2020-04-20T00:38:22Z
|
CONTRIBUTOR
| null |
part of #30914
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
---------------------------------------------------------------------------------------
Took a naive approach to move these constants into `pandas._testing`. Could also move them to a separate module instead. Let me know what you think is best.
|
{
"+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/33661/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33661/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/33661.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/33661",
"merged_at": "2020-04-20T00:38:22Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/33661.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/33661"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33662
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33662/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33662/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33662/events
|
https://github.com/pandas-dev/pandas/issues/33662
| 602,836,228
|
MDU6SXNzdWU2MDI4MzYyMjg=
| 33,662
|
BUG: mix of int and pd.NA defaults to object dtype
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/2772505?v=4",
"events_url": "https://api.github.com/users/eddy-geek/events{/privacy}",
"followers_url": "https://api.github.com/users/eddy-geek/followers",
"following_url": "https://api.github.com/users/eddy-geek/following{/other_user}",
"gists_url": "https://api.github.com/users/eddy-geek/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/eddy-geek",
"id": 2772505,
"login": "eddy-geek",
"node_id": "MDQ6VXNlcjI3NzI1MDU=",
"organizations_url": "https://api.github.com/users/eddy-geek/orgs",
"received_events_url": "https://api.github.com/users/eddy-geek/received_events",
"repos_url": "https://api.github.com/users/eddy-geek/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/eddy-geek/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/eddy-geek/subscriptions",
"type": "User",
"url": "https://api.github.com/users/eddy-geek"
}
|
[
{
"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": "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": "6138b5",
"default": false,
"description": "Extending pandas with custom dtypes or arrays.",
"id": 849023693,
"name": "ExtensionArray",
"node_id": "MDU6TGFiZWw4NDkwMjM2OTM=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/ExtensionArray"
},
{
"color": "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"
},
{
"color": "8cc645",
"default": false,
"description": "Related to pd.NA and nullable extension arrays",
"id": 1817503692,
"name": "NA - MaskedArrays",
"node_id": "MDU6TGFiZWwxODE3NTAzNjky",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/NA%20-%20MaskedArrays"
}
] |
open
| false
| null |
[] | null | 1
| 2020-04-19T22:21:02Z
| 2021-07-31T04:25:37Z
| 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
On pandas 1.0.3:
```python
df = pd.DataFrame([7,8,9,pd.NA])
print(df.dtypes)
# 0 object
# dtype: object
```
#### Problem description
Creating a DataFrame with mixed int and pd.NA defaults to `object` instead of `Int64`
According to @simonjayhawkins in #32931
> since pd.NA is experimental, changing the constructor to default to the best possible dtypes using dtypes supporting pd.NA seems reasonable.
#### Expected Output
```python
pd.DataFrame([7,8,9,pd.NA]).dtypes
# 0 Int64
# dtype: object
```
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/33662/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33662/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/33663
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33663/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33663/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33663/events
|
https://github.com/pandas-dev/pandas/pull/33663
| 602,855,118
|
MDExOlB1bGxSZXF1ZXN0NDA1NzU5ODU3
| 33,663
|
REF: use array_algos shift for Categorical.shift
|
{
"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"
}
] |
closed
| false
| null |
[] |
{
"closed_at": "2020-07-28T18:13:47Z",
"closed_issues": 2378,
"created_at": "2019-12-02T12:52:48Z",
"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": "2020-08-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/68",
"id": 4894670,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68/labels",
"node_id": "MDk6TWlsZXN0b25lNDg5NDY3MA==",
"number": 68,
"open_issues": 0,
"state": "closed",
"title": "1.1",
"updated_at": "2021-07-17T17:25:28Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68"
}
| 3
| 2020-04-19T23:51:41Z
| 2020-04-20T01:35:37Z
| 2020-04-20T01:21:05Z
|
MEMBER
| null |
We have duplicate code in Categorical.shift and Categorical.take that can be refactored out into Categorical._validate_fill_value (which is the name that DTA/TDA/PA use for the same method, which I intend to share eventually, xref #33660). From there the rest of Categorical.shift can dispatch to array_algos.transforms.shift.
The logic changed here is a TypeError becoming a ValueError (which matches what DTA/TDA/PA do)
|
{
"+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/33663/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33663/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/33663.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/33663",
"merged_at": "2020-04-20T01:21:05Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/33663.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/33663"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33664
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33664/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33664/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33664/events
|
https://github.com/pandas-dev/pandas/pull/33664
| 602,867,498
|
MDExOlB1bGxSZXF1ZXN0NDA1NzY4Nzcy
| 33,664
|
TST: CI checks against direct imports from conftest.py
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/17853006?v=4",
"events_url": "https://api.github.com/users/SaturnFromTitan/events{/privacy}",
"followers_url": "https://api.github.com/users/SaturnFromTitan/followers",
"following_url": "https://api.github.com/users/SaturnFromTitan/following{/other_user}",
"gists_url": "https://api.github.com/users/SaturnFromTitan/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/SaturnFromTitan",
"id": 17853006,
"login": "SaturnFromTitan",
"node_id": "MDQ6VXNlcjE3ODUzMDA2",
"organizations_url": "https://api.github.com/users/SaturnFromTitan/orgs",
"received_events_url": "https://api.github.com/users/SaturnFromTitan/received_events",
"repos_url": "https://api.github.com/users/SaturnFromTitan/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/SaturnFromTitan/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/SaturnFromTitan/subscriptions",
"type": "User",
"url": "https://api.github.com/users/SaturnFromTitan"
}
|
[
{
"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": "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"
}
] |
closed
| false
| null |
[] |
{
"closed_at": "2020-07-28T18:13:47Z",
"closed_issues": 2378,
"created_at": "2019-12-02T12:52:48Z",
"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": "2020-08-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/68",
"id": 4894670,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68/labels",
"node_id": "MDk6TWlsZXN0b25lNDg5NDY3MA==",
"number": 68,
"open_issues": 0,
"state": "closed",
"title": "1.1",
"updated_at": "2021-07-17T17:25:28Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68"
}
| 1
| 2020-04-20T00:47:16Z
| 2020-04-20T22:34:40Z
| 2020-04-20T22:34:37Z
|
CONTRIBUTOR
| null |
- [x] closes #30914
|
{
"+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/33664/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33664/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/33664.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/33664",
"merged_at": "2020-04-20T22:34:36Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/33664.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/33664"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33665
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33665/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33665/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33665/events
|
https://github.com/pandas-dev/pandas/pull/33665
| 602,873,488
|
MDExOlB1bGxSZXF1ZXN0NDA1NzcyOTQ1
| 33,665
|
CLN: make DTA/TDA check clearer
|
{
"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": "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": "2020-07-28T18:13:47Z",
"closed_issues": 2378,
"created_at": "2019-12-02T12:52:48Z",
"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": "2020-08-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/68",
"id": 4894670,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68/labels",
"node_id": "MDk6TWlsZXN0b25lNDg5NDY3MA==",
"number": 68,
"open_issues": 0,
"state": "closed",
"title": "1.1",
"updated_at": "2021-07-17T17:25:28Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68"
}
| 2
| 2020-04-20T01:13:28Z
| 2021-04-22T21:01:22Z
| 2020-04-20T22:38:27Z
|
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/33665/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33665/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/33665.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/33665",
"merged_at": "2020-04-20T22:38:27Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/33665.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/33665"
}
|
|
https://api.github.com/repos/pandas-dev/pandas/issues/33666
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33666/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33666/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33666/events
|
https://github.com/pandas-dev/pandas/issues/33666
| 602,905,060
|
MDU6SXNzdWU2MDI5MDUwNjA=
| 33,666
|
`read_spss` only accepts `str`, not `Path`
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/25303826?v=4",
"events_url": "https://api.github.com/users/cantudiaz/events{/privacy}",
"followers_url": "https://api.github.com/users/cantudiaz/followers",
"following_url": "https://api.github.com/users/cantudiaz/following{/other_user}",
"gists_url": "https://api.github.com/users/cantudiaz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cantudiaz",
"id": 25303826,
"login": "cantudiaz",
"node_id": "MDQ6VXNlcjI1MzAzODI2",
"organizations_url": "https://api.github.com/users/cantudiaz/orgs",
"received_events_url": "https://api.github.com/users/cantudiaz/received_events",
"repos_url": "https://api.github.com/users/cantudiaz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cantudiaz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cantudiaz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cantudiaz"
}
|
[
{
"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": "b60205",
"default": false,
"description": "Internal Consistency of API/Behavior",
"id": 1741841389,
"name": "API - Consistency",
"node_id": "MDU6TGFiZWwxNzQxODQxMzg5",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/API%20-%20Consistency"
}
] |
closed
| false
| null |
[] |
{
"closed_at": "2020-10-05T18:41:57Z",
"closed_issues": 106,
"created_at": "2020-09-07T09:13:14Z",
"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.1.x",
"due_on": "2020-09-29T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/77",
"id": 5850626,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/77/labels",
"node_id": "MDk6TWlsZXN0b25lNTg1MDYyNg==",
"number": 77,
"open_issues": 0,
"state": "closed",
"title": "1.1.3",
"updated_at": "2020-10-29T13:15:36Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/77"
}
| 1
| 2020-04-20T03:07:49Z
| 2020-09-13T20:29:42Z
| 2020-09-13T20:29:42Z
|
NONE
| null |
`pandas` documentation states that the `read_spss` function can take either strings or `pathlih.Path` as input. It probably has something to do with `pyreadstat.read_sav`.
Example:
```python
>>> import pandas as pd
>>> from pathlib import Path
>>> filepath = Path("Documents/test.sav")
>>> pd.read_spss(filepath)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/user/anaconda3/envs/env/lib/python3.7/site-packages/pandas/io/spss.py", line 43, in read_spss
path, usecols=usecols, apply_value_formats=convert_categoricals
TypeError: Argument 'filename_path' has incorrect type (expected str, got PosixPath)
```
Libraries versions:
```python
INSTALLED VERSIONS
------------------
commit : None
python : 3.7.7.final.0
python-bits : 64
OS : Linux
OS-release : 5.0.0-32-generic
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.0.3
numpy : 1.18.3
pytz : 2019.3
dateutil : 2.8.1
pip : 19.0.3
setuptools : 46.1.3.post20200330
Cython : None
pytest : 4.3.1
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.13.0
pandas_datareader: None
bs4 : None
bottleneck : None
fastparquet : None
gcsfs : None
lxml.etree : None
matplotlib : 3.0.3
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pytables : None
pytest : 4.3.1
pyxlsb : None
s3fs : None
scipy : 1.2.3
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
xlsxwriter : None
numba : None
```
|
{
"+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/33666/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33666/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/33667
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33667/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33667/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33667/events
|
https://github.com/pandas-dev/pandas/pull/33667
| 602,905,637
|
MDExOlB1bGxSZXF1ZXN0NDA1Nzk3MjAz
| 33,667
|
CLN: make Categorical.codes a simpler property
|
{
"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": "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"
},
{
"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": "2020-07-28T18:13:47Z",
"closed_issues": 2378,
"created_at": "2019-12-02T12:52:48Z",
"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": "2020-08-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/68",
"id": 4894670,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68/labels",
"node_id": "MDk6TWlsZXN0b25lNDg5NDY3MA==",
"number": 68,
"open_issues": 0,
"state": "closed",
"title": "1.1",
"updated_at": "2021-07-17T17:25:28Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68"
}
| 1
| 2020-04-20T03:10:11Z
| 2020-04-20T15:29:47Z
| 2020-04-20T15:20:52Z
|
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/33667/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33667/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/33667.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/33667",
"merged_at": "2020-04-20T15:20:52Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/33667.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/33667"
}
|
|
https://api.github.com/repos/pandas-dev/pandas/issues/33668
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33668/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33668/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33668/events
|
https://github.com/pandas-dev/pandas/issues/33668
| 602,915,015
|
MDU6SXNzdWU2MDI5MTUwMTU=
| 33,668
|
Vectorize DataFrame `first_valid_index()` and `last_valid_index()`
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/931505?v=4",
"events_url": "https://api.github.com/users/jkleint/events{/privacy}",
"followers_url": "https://api.github.com/users/jkleint/followers",
"following_url": "https://api.github.com/users/jkleint/following{/other_user}",
"gists_url": "https://api.github.com/users/jkleint/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jkleint",
"id": 931505,
"login": "jkleint",
"node_id": "MDQ6VXNlcjkzMTUwNQ==",
"organizations_url": "https://api.github.com/users/jkleint/orgs",
"received_events_url": "https://api.github.com/users/jkleint/received_events",
"repos_url": "https://api.github.com/users/jkleint/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jkleint/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jkleint/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jkleint"
}
|
[
{
"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": "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 | 0
| 2020-04-20T03:39:36Z
| 2020-09-02T22:32:10Z
| null |
NONE
| null |
Is there a reason why `DataFrame` `first_valid_index()` and `last_valid_index()` don't return a Series with the first/last valid index for each column? It seems a little inconsistent with the rest of the API, and working around it isn't straightfoward.
This wouldn't be so bad if `df.apply('first_valid_index')` actually applied to each column, but it does not. And finally, `df.apply(lambda c: c.first_valid_index())` only works on DataFrame, but not Series, so there is no way to generically vectorize / broadcast it yourself without type introspection.
I recognize the API is frozen now, but either a parameter or new functions that do the helpful and unsurprising thing would be nice.
|
{
"+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/33668/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33668/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/33669
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33669/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33669/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33669/events
|
https://github.com/pandas-dev/pandas/issues/33669
| 602,926,051
|
MDU6SXNzdWU2MDI5MjYwNTE=
| 33,669
|
BUG: Python any() on a dataframe is returning True always
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/33701124?v=4",
"events_url": "https://api.github.com/users/Dergel0806/events{/privacy}",
"followers_url": "https://api.github.com/users/Dergel0806/followers",
"following_url": "https://api.github.com/users/Dergel0806/following{/other_user}",
"gists_url": "https://api.github.com/users/Dergel0806/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Dergel0806",
"id": 33701124,
"login": "Dergel0806",
"node_id": "MDQ6VXNlcjMzNzAxMTI0",
"organizations_url": "https://api.github.com/users/Dergel0806/orgs",
"received_events_url": "https://api.github.com/users/Dergel0806/received_events",
"repos_url": "https://api.github.com/users/Dergel0806/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Dergel0806/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Dergel0806/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Dergel0806"
}
|
[
{
"color": "0052cc",
"default": false,
"description": null,
"id": 34444536,
"name": "Usage Question",
"node_id": "MDU6TGFiZWwzNDQ0NDUzNg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Usage%20Question"
}
] |
closed
| false
| null |
[] | null | 2
| 2020-04-20T04:17:17Z
| 2020-04-21T02:46:02Z
| 2020-04-21T02:46:02Z
|
NONE
| null |
- [Yes ] I have checked that this issue has not already been reported.
- [ Yes] 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
df = pd.DataFrame([[False, False], [False, False]])
print(any(df))
print(df.any().any())
```
#### Problem description
Calling python `any()` on a pandas DataFrame return True even if all elements are False, which is counterintuitive and even misleading. A way that gives correct result is to call `.any().any()`.
**Example of use case:**
I found this bug when I was using `isna()` and it lead me to a conclusion that there are some missing values, while that was not true.
#### Expected Output
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit : None
python : 3.6.6.final.0
python-bits : 64
OS : Linux
OS-release : 4.19.112+
machine : x86_64
processor :
byteorder : little
LC_ALL : C.UTF-8
LANG : C.UTF-8
LOCALE : en_US.UTF-8
pandas : 0.25.3
numpy : 1.18.2
pytz : 2019.3
dateutil : 2.8.1
pip : 20.0.2
setuptools : 46.1.3.post20200330
Cython : 0.29.16
pytest : 5.0.1
hypothesis : 5.5.4
sphinx : 2.4.4
blosc : None
feather : 0.4.0
xlsxwriter : 1.2.8
lxml.etree : 4.5.0
html5lib : 1.0.1
pymysql : None
psycopg2 : None
jinja2 : 2.11.1
IPython : 7.13.0
pandas_datareader: 0.8.1
bs4 : 4.8.2
bottleneck : 1.3.2
fastparquet : None
gcsfs : None
lxml.etree : 4.5.0
matplotlib : 3.2.1
numexpr : 2.6.9
odfpy : None
openpyxl : 3.0.3
pandas_gbq : None
pyarrow : 0.16.0
pytables : None
s3fs : 0.4.1
scipy : 1.4.1
sqlalchemy : 1.3.15
tables : 3.5.1
xarray : 0.15.1
xlrd : 1.2.0
xlwt : 1.3.0
xlsxwriter : 1.2.8
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/33669/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33669/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/33670
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33670/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33670/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33670/events
|
https://github.com/pandas-dev/pandas/pull/33670
| 602,981,533
|
MDExOlB1bGxSZXF1ZXN0NDA1ODU3Njk3
| 33,670
|
Solve missing interpolation method (cubicspline)
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/4109713?v=4",
"events_url": "https://api.github.com/users/khyox/events{/privacy}",
"followers_url": "https://api.github.com/users/khyox/followers",
"following_url": "https://api.github.com/users/khyox/following{/other_user}",
"gists_url": "https://api.github.com/users/khyox/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/khyox",
"id": 4109713,
"login": "khyox",
"node_id": "MDQ6VXNlcjQxMDk3MTM=",
"organizations_url": "https://api.github.com/users/khyox/orgs",
"received_events_url": "https://api.github.com/users/khyox/received_events",
"repos_url": "https://api.github.com/users/khyox/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/khyox/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/khyox/subscriptions",
"type": "User",
"url": "https://api.github.com/users/khyox"
}
|
[
{
"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": "006b75",
"default": false,
"description": "Arithmetic, Comparison, and Logical operations",
"id": 47223669,
"name": "Numeric Operations",
"node_id": "MDU6TGFiZWw0NzIyMzY2OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Numeric%20Operations"
}
] |
closed
| false
| null |
[] |
{
"closed_at": "2020-07-28T18:13:47Z",
"closed_issues": 2378,
"created_at": "2019-12-02T12:52:48Z",
"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": "2020-08-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/68",
"id": 4894670,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68/labels",
"node_id": "MDk6TWlsZXN0b25lNDg5NDY3MA==",
"number": 68,
"open_issues": 0,
"state": "closed",
"title": "1.1",
"updated_at": "2021-07-17T17:25:28Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68"
}
| 2
| 2020-04-20T06:35:41Z
| 2020-04-23T20:10:28Z
| 2020-04-23T17:39:03Z
|
CONTRIBUTOR
| null |
By commit 8bb2cc1 scipy.interpolate.CubicSpline method is
referenced in the pandas documentation (see pandas/core/generic.py)
but it is not wrapped by any interpolation method. This PR solves
this by adding the corresponding wrapper. SciPy's CubicSpline
is a cubic spline data interpolator that allows explicit control
of the boundary conditions for the interval.
Changes to be committed:
modified: pandas/core/missing.py
modified: pandas/tests/series/methods/test_interpolate.py
- [x] closes #xxxx (no issue opened but PR #20270 commented instead)
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [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/33670/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33670/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/33670.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/33670",
"merged_at": "2020-04-23T17:39:03Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/33670.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/33670"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33671
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33671/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33671/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33671/events
|
https://github.com/pandas-dev/pandas/issues/33671
| 603,059,347
|
MDU6SXNzdWU2MDMwNTkzNDc=
| 33,671
|
BUG: Multiplication of two serieses changes the the timezone from the given serieses
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/64003376?v=4",
"events_url": "https://api.github.com/users/eyjay-ok/events{/privacy}",
"followers_url": "https://api.github.com/users/eyjay-ok/followers",
"following_url": "https://api.github.com/users/eyjay-ok/following{/other_user}",
"gists_url": "https://api.github.com/users/eyjay-ok/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/eyjay-ok",
"id": 64003376,
"login": "eyjay-ok",
"node_id": "MDQ6VXNlcjY0MDAzMzc2",
"organizations_url": "https://api.github.com/users/eyjay-ok/orgs",
"received_events_url": "https://api.github.com/users/eyjay-ok/received_events",
"repos_url": "https://api.github.com/users/eyjay-ok/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/eyjay-ok/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/eyjay-ok/subscriptions",
"type": "User",
"url": "https://api.github.com/users/eyjay-ok"
}
|
[
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "AFEEEE",
"default": false,
"description": null,
"id": 211840,
"name": "Timeseries",
"node_id": "MDU6TGFiZWwyMTE4NDA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Timeseries"
},
{
"color": "006b75",
"default": false,
"description": "Arithmetic, Comparison, and Logical operations",
"id": 47223669,
"name": "Numeric Operations",
"node_id": "MDU6TGFiZWw0NzIyMzY2OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Numeric%20Operations"
},
{
"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": "2020-12-26T13:57:50Z",
"closed_issues": 1768,
"created_at": "2020-05-29T23:47:32Z",
"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.2.x",
"due_on": "2020-12-15T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/73",
"id": 5479819,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/73/labels",
"node_id": "MDk6TWlsZXN0b25lNTQ3OTgxOQ==",
"number": 73,
"open_issues": 0,
"state": "closed",
"title": "1.2",
"updated_at": "2021-04-13T15:46:43Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/73"
}
| 7
| 2020-04-20T08:50:56Z
| 2020-09-25T00:31:58Z
| 2020-09-25T00:31:58Z
|
NONE
| null |
(since this is my first bug report I am happy for any feedback :) )
```python
import pandas as pd
cet_idx = pd.date_range(start=pd.to_datetime('today').normalize(), periods=10, freq='15min', tz='CET')
utc_idx = cet_idx.tz_convert('utc')
cet_series = pd.Series(data=2, index=cet_idx)
utc_series = pd.Series(data=2, index=utc_idx)
print(cet_series.index.tz)
>> <DstTzInfo 'CET' CET+1:00:00 STD>
out_series = utc_series * cet_series # The output is irrelevant
print(cet_series.index.tz)
>> <UTC>
```
#### Problem description
The timezone of the series 'cet_series' changes by the multiplication. Since it is only an input series the timezone should stay the same.
#### Expected Output
```python
... # the same initialization as above
print(cet_series.index.tz)
>> <DstTzInfo 'CET' CET+1:00:00 STD>
utc_series * cet_series # The output is irrelevant
print(cet_series.index.tz)
>> <DstTzInfo 'CET' CET+1:00:00 STD>
```
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit : None
python : 3.8.2.final.0
python-bits : 64
OS : Linux
OS-release : 5.3.0-46-generic
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.0.1
numpy : 1.18.1
pytz : 2019.3
dateutil : 2.8.1
pip : 19.2.3
setuptools : 41.2.0
Cython : None
pytest : None
hypothesis : None
sphinx : 2.4.4
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 2.11.1
IPython : 7.13.0
pandas_datareader: None
bs4 : None
bottleneck : None
fastparquet : None
gcsfs : None
lxml.etree : None
matplotlib : None
numexpr : None
odfpy : None
openpyxl : 3.0.3
pandas_gbq : None
pyarrow : None
pytables : None
pytest : None
pyxlsb : None
s3fs : None
scipy : None
sqlalchemy : 1.3.13
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
xlsxwriter : 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/33671/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33671/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/33672
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33672/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33672/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33672/events
|
https://github.com/pandas-dev/pandas/issues/33672
| 603,137,954
|
MDU6SXNzdWU2MDMxMzc5NTQ=
| 33,672
|
BUG: Assertion error : Gaps in blk ref_locs in pandas profiling
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/63166468?v=4",
"events_url": "https://api.github.com/users/saten25/events{/privacy}",
"followers_url": "https://api.github.com/users/saten25/followers",
"following_url": "https://api.github.com/users/saten25/following{/other_user}",
"gists_url": "https://api.github.com/users/saten25/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/saten25",
"id": 63166468,
"login": "saten25",
"node_id": "MDQ6VXNlcjYzMTY2NDY4",
"organizations_url": "https://api.github.com/users/saten25/orgs",
"received_events_url": "https://api.github.com/users/saten25/received_events",
"repos_url": "https://api.github.com/users/saten25/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/saten25/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/saten25/subscriptions",
"type": "User",
"url": "https://api.github.com/users/saten25"
}
|
[] |
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"
}
| 3
| 2020-04-20T10:45:37Z
| 2020-05-06T19:46:03Z
| 2020-04-20T14:35:22Z
|
NONE
| null |
Hi Everyone,
I think i am facing a similar kind of issue.
I have created a django utility that is using pandas profiling.
The steps that i am doing is python are-
1-Uploading a file
df = pd.read_csv(path)
2- Changing the datatypes of columns from objects to category
df.select_dtypes(['object']).apply(pd.Series.astype, dtype='category')], axis=1).reindex(df.columns, axis=1)
3- Separating continuous and categorical variables from the dataframe and sending this information to multiselect dropdown in HTML
4- As per user selection from continuous and categorical variables dropdown, storing the selections in form of list.
context['selectedContinousValues'] = request.POST.getlist('continous')
context['selectedCategoricalValues'] = request.POST.getlist('categorical')
5- Combining both list and keeping the list items from df.
Profiling_variables=context['selectedContinousValues']+context['selectedCategoricalValues']
print(Profiling_variables)
profile=df[Profiling_variables]
6- Using this selected df in pandas profiling
profile_final = ProfileReport(profile)
Error: Error is coming when profile_final is having all categorical variables. I am using pandas profiling version 2.6.
Please note that error is not hitting in following cases:
1- Selecting categorical variables only.
2- if we are not changing the datatypes of columns from objects to category. I have added this steps because i wanted to include a functionality where user could convert selected continuous variable to categorical variables. i tried to change them from continuous to object but as soon as this object variable(say eg: variable having values like 1,2,3,4,1,2,3,4,1,2,3,4 where i want to treat this variable as object) is being used by pandas profiling, it is considering this object variable as numeric in output. but i want to treat it as categories.
Request Method: | POST
-- | --
http://localhost:8000/selected-data/ |
3.0.5 |
AssertionError Gaps in blk ref_locs |
C:\Users\myname\AppData\Local\Continuum\anaconda3\lib\site-packages\pandas\core\internals\managers.py in _rebuild_blknos_and_blklocs, line 231 |
C:\Users\myname\AppData\Local\Continuum\anaconda3\python.exe |
3.7.4 |
['C:\Users\myname\Desktop\EDA Pandas Profiling V4\file-upload', 'C:\Users\myname\AppData\Local\Continuum\anaconda3\python37.zip', 'C:\Users\myname\AppData\Local\Continuum\anaconda3\DLLs', 'C:\Users\myname\AppData\Local\Continuum\anaconda3\lib', 'C:\Users\myname\AppData\Local\Continuum\anaconda3', 'C:\Users\myname\AppData\Local\Continuum\anaconda3\lib\site-packages', 'C:\Users\myname\AppData\Local\Continuum\anaconda3\lib\site-packages\django_crispy_forms-1.9.0-py3.7.egg', 'C:\Users\myname\AppData\Local\Continuum\anaconda3\lib\site-packages\win32', 'C:\Users\myname\AppData\Local\Continuum\anaconda3\lib\site-packages\win32\lib', 'C:\Users\myname\AppData\Local\Continuum\anaconda3\lib\site-packages\Pythonwin', 'C:\Users\myname\AppData\Local\Continuum\anaconda3\lib\site-packages\IPython\extensions']
|
{
"+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/33672/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33672/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/33673
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33673/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33673/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33673/events
|
https://github.com/pandas-dev/pandas/pull/33673
| 603,146,631
|
MDExOlB1bGxSZXF1ZXN0NDA1OTg5Njk0
| 33,673
|
CLN,TYP: Use subsitutions in info docstrings
|
{
"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": "2020-07-28T18:13:47Z",
"closed_issues": 2378,
"created_at": "2019-12-02T12:52:48Z",
"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": "2020-08-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/68",
"id": 4894670,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68/labels",
"node_id": "MDk6TWlsZXN0b25lNDg5NDY3MA==",
"number": 68,
"open_issues": 0,
"state": "closed",
"title": "1.1",
"updated_at": "2021-07-17T17:25:28Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68"
}
| 2
| 2020-04-20T10:59:19Z
| 2020-04-22T16:11:58Z
| 2020-04-22T14:13:21Z
|
MEMBER
| null |
Another precursor to #31796, which should make it easier to review/merge
----
screenshots of docs




|
{
"+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/33673/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33673/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/33673.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/33673",
"merged_at": "2020-04-22T14:13:21Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/33673.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/33673"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33674
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33674/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33674/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33674/events
|
https://github.com/pandas-dev/pandas/pull/33674
| 603,226,191
|
MDExOlB1bGxSZXF1ZXN0NDA2MDUzOTI4
| 33,674
|
BUG: value_counts not working correctly on ExtensionArrays
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/22385925?v=4",
"events_url": "https://api.github.com/users/kotamatsuoka/events{/privacy}",
"followers_url": "https://api.github.com/users/kotamatsuoka/followers",
"following_url": "https://api.github.com/users/kotamatsuoka/following{/other_user}",
"gists_url": "https://api.github.com/users/kotamatsuoka/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kotamatsuoka",
"id": 22385925,
"login": "kotamatsuoka",
"node_id": "MDQ6VXNlcjIyMzg1OTI1",
"organizations_url": "https://api.github.com/users/kotamatsuoka/orgs",
"received_events_url": "https://api.github.com/users/kotamatsuoka/received_events",
"repos_url": "https://api.github.com/users/kotamatsuoka/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kotamatsuoka/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kotamatsuoka/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kotamatsuoka"
}
|
[
{
"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": "006b75",
"default": false,
"description": "Arithmetic, Comparison, and Logical operations",
"id": 47223669,
"name": "Numeric Operations",
"node_id": "MDU6TGFiZWw0NzIyMzY2OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Numeric%20Operations"
},
{
"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": "2020-07-28T18:13:47Z",
"closed_issues": 2378,
"created_at": "2019-12-02T12:52:48Z",
"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": "2020-08-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/68",
"id": 4894670,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68/labels",
"node_id": "MDk6TWlsZXN0b25lNDg5NDY3MA==",
"number": 68,
"open_issues": 0,
"state": "closed",
"title": "1.1",
"updated_at": "2021-07-17T17:25:28Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68"
}
| 14
| 2020-04-20T13:10:13Z
| 2020-05-01T00:58:27Z
| 2020-05-01T00:34:44Z
|
CONTRIBUTOR
| null |
- [ ] closes #33172
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [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/33674/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33674/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/33674.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/33674",
"merged_at": "2020-05-01T00:34:43Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/33674.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/33674"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33675
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33675/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33675/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33675/events
|
https://github.com/pandas-dev/pandas/issues/33675
| 603,287,425
|
MDU6SXNzdWU2MDMyODc0MjU=
| 33,675
|
Inconsistent retrieval of DataFrame columns as Series.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/7973615?v=4",
"events_url": "https://api.github.com/users/geppi/events{/privacy}",
"followers_url": "https://api.github.com/users/geppi/followers",
"following_url": "https://api.github.com/users/geppi/following{/other_user}",
"gists_url": "https://api.github.com/users/geppi/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/geppi",
"id": 7973615,
"login": "geppi",
"node_id": "MDQ6VXNlcjc5NzM2MTU=",
"organizations_url": "https://api.github.com/users/geppi/orgs",
"received_events_url": "https://api.github.com/users/geppi/received_events",
"repos_url": "https://api.github.com/users/geppi/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/geppi/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/geppi/subscriptions",
"type": "User",
"url": "https://api.github.com/users/geppi"
}
|
[
{
"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"
}
] |
closed
| false
| null |
[] |
{
"closed_at": "2020-09-09T09:07:44Z",
"closed_issues": 94,
"created_at": "2020-08-17T19:11:56Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/13159005?v=4",
"events_url": "https://api.github.com/users/simonjayhawkins/events{/privacy}",
"followers_url": "https://api.github.com/users/simonjayhawkins/followers",
"following_url": "https://api.github.com/users/simonjayhawkins/following{/other_user}",
"gists_url": "https://api.github.com/users/simonjayhawkins/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/simonjayhawkins",
"id": 13159005,
"login": "simonjayhawkins",
"node_id": "MDQ6VXNlcjEzMTU5MDA1",
"organizations_url": "https://api.github.com/users/simonjayhawkins/orgs",
"received_events_url": "https://api.github.com/users/simonjayhawkins/received_events",
"repos_url": "https://api.github.com/users/simonjayhawkins/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/simonjayhawkins/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/simonjayhawkins/subscriptions",
"type": "User",
"url": "https://api.github.com/users/simonjayhawkins"
},
"description": "on-merge: backport to 1.1.x",
"due_on": "2020-09-08T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/76",
"id": 5781056,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/76/labels",
"node_id": "MDk6TWlsZXN0b25lNTc4MTA1Ng==",
"number": 76,
"open_issues": 0,
"state": "closed",
"title": "1.1.2",
"updated_at": "2020-10-02T11:57:23Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/76"
}
| 2
| 2020-04-20T14:35:50Z
| 2020-09-02T15:43:17Z
| 2020-09-02T15:43:17Z
|
NONE
| null |
1. Retrieve a DataFrame column by attribute as a Series.
2. Modify an element of this series.
3. As expected the modification has no effect on the original DataFrame.
4. But it changes the Series that is retrieved from a column by attribute or with the 'loc' method.
5. In contrast the Series retrieved from a column using the 'iloc' method is still the original.
This is at least inconsistent. However, I would also expect to see no change of the retrieved Series under point 4.
```python
import pandas as pd
pd.show_versions()
```
INSTALLED VERSIONS
------------------
commit : None
python : 3.7.4.final.0
python-bits : 64
OS : Windows
OS-release : 10
machine : AMD64
processor : Intel64 Family 6 Model 78 Stepping 3, GenuineIntel
byteorder : little
LC_ALL : None
LANG : None
LOCALE : None.None
pandas : 1.0.3
numpy : 1.18.1
pytz : 2019.3
dateutil : 2.8.1
pip : 20.0.2
setuptools : 40.8.0
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : 1.2.8
lxml.etree : 4.5.0
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 2.10.3
IPython : 7.11.1
pandas_datareader: None
bs4 : None
bottleneck : None
fastparquet : None
gcsfs : None
lxml.etree : 4.5.0
matplotlib : 3.1.3
numexpr : None
odfpy : None
openpyxl : 3.0.3
pandas_gbq : None
pyarrow : None
pytables : None
pytest : None
pyxlsb : None
s3fs : None
scipy : None
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
xlsxwriter : 1.2.8
numba : None
```python
df = pd.DataFrame([[1,2], [3,4]], index= ['a', 'b'], columns=['A', 'B'])
df
```
<div>
<table border="1" class="dataframe">
<thead>
<tr style="text-align: right;">
<th></th>
<th>A</th>
<th>B</th>
</tr>
</thead>
<tbody>
<tr>
<th>a</th>
<td>1</td>
<td>2</td>
</tr>
<tr>
<th>b</th>
<td>3</td>
<td>4</td>
</tr>
</tbody>
</table>
</div>
```python
s = df.A
s
```
a 1
b 3
Name: A, dtype: int64
```python
s['c'] = 5
s
```
a 1
b 3
c 5
Name: A, dtype: int64
```python
df
```
<div>
<table border="1" class="dataframe">
<thead>
<tr style="text-align: right;">
<th></th>
<th>A</th>
<th>B</th>
</tr>
</thead>
<tbody>
<tr>
<th>a</th>
<td>1</td>
<td>2</td>
</tr>
<tr>
<th>b</th>
<td>3</td>
<td>4</td>
</tr>
</tbody>
</table>
</div>
```python
df.A
```
a 1
b 3
c 5
Name: A, dtype: int64
```python
df.loc[:,'A']
```
a 1
b 3
c 5
Name: A, dtype: int64
```python
df.iloc[:,0]
```
a 1
b 3
Name: A, dtype: int64
```python
s['b'] = 2
```
```python
s
```
a 1
b 2
c 5
Name: A, dtype: int64
```python
df
```
<div>
<table border="1" class="dataframe">
<thead>
<tr style="text-align: right;">
<th></th>
<th>A</th>
<th>B</th>
</tr>
</thead>
<tbody>
<tr>
<th>a</th>
<td>1</td>
<td>2</td>
</tr>
<tr>
<th>b</th>
<td>3</td>
<td>4</td>
</tr>
</tbody>
</table>
</div>
```python
df.A
```
a 1
b 2
c 5
Name: A, dtype: int64
```python
df.loc[:,'A']
```
a 1
b 2
c 5
Name: A, dtype: int64
```python
df.iloc[:,0]
```
a 1
b 3
Name: A, dtype: int64
```python
```
|
{
"+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/33675/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33675/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/33676
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33676/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33676/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33676/events
|
https://github.com/pandas-dev/pandas/issues/33676
| 603,303,464
|
MDU6SXNzdWU2MDMzMDM0NjQ=
| 33,676
|
BUG: repr of Categorical does not distinguish int and str.
|
{
"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": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "ededed",
"default": false,
"description": "__repr__ of pandas objects, to_string",
"id": 13101118,
"name": "Output-Formatting",
"node_id": "MDU6TGFiZWwxMzEwMTExOA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Output-Formatting"
},
{
"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": "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"
},
{
"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": "2020-07-28T18:13:47Z",
"closed_issues": 2378,
"created_at": "2019-12-02T12:52:48Z",
"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": "2020-08-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/68",
"id": 4894670,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68/labels",
"node_id": "MDk6TWlsZXN0b25lNDg5NDY3MA==",
"number": 68,
"open_issues": 0,
"state": "closed",
"title": "1.1",
"updated_at": "2021-07-17T17:25:28Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68"
}
| 4
| 2020-04-20T14:57:13Z
| 2020-06-24T22:40:21Z
| 2020-06-24T22:40:21Z
|
MEMBER
| null |
- [x] I have checked that this issue has not already been reported.
- [x] I have confirmed this bug exists on the latest version of pandas.
- [x] (optional) I have confirmed this bug exists on the master branch of pandas.
---
**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
>>> pd.Categorical([1, "2", 3, 4])
[1, 2, 3, 4]
Categories (4, object): [1, 3, 4, 2]
```
#### Problem description
does not show the string elements quoted. This is inconsistent with numpy.
```python
>>> np.array([1, "2", 3, 4], dtype="object")
array([1, '2', 3, 4], dtype=object)
```
#### Expected Output
```python
>>> pd.Categorical([1, "2", 3, 4])
[1, '2', 3, 4]
Categories (4, object): [1, 3, 4, '2']
```
#### Output of ``pd.show_versions()``
<details>
[paste the output of ``pd.show_versions()`` here leaving a blank line after the details tag]
</details>
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/33676/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33676/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/33677
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33677/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33677/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33677/events
|
https://github.com/pandas-dev/pandas/issues/33677
| 603,343,811
|
MDU6SXNzdWU2MDMzNDM4MTE=
| 33,677
|
BUG: frequency attribute lost if datetimeindex is localized
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/4106013?v=4",
"events_url": "https://api.github.com/users/rwijtvliet/events{/privacy}",
"followers_url": "https://api.github.com/users/rwijtvliet/followers",
"following_url": "https://api.github.com/users/rwijtvliet/following{/other_user}",
"gists_url": "https://api.github.com/users/rwijtvliet/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/rwijtvliet",
"id": 4106013,
"login": "rwijtvliet",
"node_id": "MDQ6VXNlcjQxMDYwMTM=",
"organizations_url": "https://api.github.com/users/rwijtvliet/orgs",
"received_events_url": "https://api.github.com/users/rwijtvliet/received_events",
"repos_url": "https://api.github.com/users/rwijtvliet/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/rwijtvliet/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rwijtvliet/subscriptions",
"type": "User",
"url": "https://api.github.com/users/rwijtvliet"
}
|
[
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "AFEEEE",
"default": false,
"description": null,
"id": 211840,
"name": "Timeseries",
"node_id": "MDU6TGFiZWwyMTE4NDA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Timeseries"
},
{
"color": "0052cc",
"default": false,
"description": "DateOffsets",
"id": 53181044,
"name": "Frequency",
"node_id": "MDU6TGFiZWw1MzE4MTA0NA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Frequency"
}
] |
open
| false
| null |
[] | null | 7
| 2020-04-20T15:52:33Z
| 2020-09-23T13:23:22Z
| null |
NONE
| null |
- [x] I have checked that this issue has not already been reported.
(Might be related to [33647](https://github.com/pandas-dev/pandas/issues/33647), though there localization does not seem to play a role)
- [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
s = pd.Series([2,5,3], index=pd.date_range('2020-01-01', periods=3,
freq='M', tz='Europe/Berlin'))
s.index #freq correctly set
```
```
DatetimeIndex(['2020-01-31 00:00:00+01:00', '2020-02-29 00:00:00+01:00',
'2020-03-31 00:00:00+02:00'],
dtype='datetime64[ns, Europe/Berlin]', name='ts', freq='M')
```
Then changing to `MultiIndex`:
```python
s.index = pd.MultiIndex.from_arrays([s.index, s.index.month])
s.index.get_level_values(0) #freq has been lost
```
```
DatetimeIndex(['2020-01-31 00:00:00+01:00', '2020-02-29 00:00:00+01:00',
'2020-03-31 00:00:00+02:00'],
dtype='datetime64[ns, Europe/Berlin]', name='ts', freq=None
```
Notice the `freq=None`.
#### Problem description
In the snipped above, the `freq` attribute of the `DateTimeIndex` is lost when a `MultiIndex` is created from it.
The problem seems to stem from the localization. It's equally present in DataFrames and when using `set_index`/`tz_localize` to promote a normal datetime column to index.
#### Expected Output
I expect the `freq` attribute to persist, as it does in this snippet, when I do not localize the index:
```python
s2 = pd.Series([2,5,3], index=pd.date_range('2020-01-01', periods=3,
freq='M')) #NB no localization
s2.index = pd.MultiIndex.from_arrays([s2.index, s2.index.month]) #same as above
s2.index.get_level_values(0)
```
```
DatetimeIndex(['2020-01-31', '2020-02-29', '2020-03-31'],
dtype='datetime64[ns]', freq='M')
```
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit : None
python : 3.8.2.final.0
python-bits : 64
OS : Windows
OS-release : 10
machine : AMD64
processor : Intel64 Family 6 Model 158 Stepping 10, GenuineIntel
byteorder : little
LC_ALL : None
LANG : en
LOCALE : de_DE.cp1252
pandas : 1.0.3
numpy : 1.18.1
pytz : 2019.3
dateutil : 2.8.1
pip : 20.0.2
setuptools : 46.1.3.post20200330
Cython : None
pytest : 5.4.1
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : None
IPython : 7.13.0
pandas_datareader: None
bs4 : None
bottleneck : None
fastparquet : None
gcsfs : None
lxml.etree : None
matplotlib : 3.1.3
numexpr : None
odfpy : None
openpyxl : 3.0.3
pandas_gbq : None
pyarrow : None
pytables : None
pytest : 5.4.1
pyxlsb : None
s3fs : None
scipy : 1.4.1
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : 1.2.0
xlwt : None
xlsxwriter : 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/33677/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33677/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/33678
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33678/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33678/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33678/events
|
https://github.com/pandas-dev/pandas/pull/33678
| 603,379,974
|
MDExOlB1bGxSZXF1ZXN0NDA2MTc3MDI3
| 33,678
|
REF: remove single-tuple special case for Categorical.__hash__
|
{
"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": "b60205",
"default": false,
"description": "Temporarily-closed PR the author plans to return to",
"id": 1991290519,
"name": "Mothballed",
"node_id": "MDU6TGFiZWwxOTkxMjkwNTE5",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Mothballed"
}
] |
closed
| false
| null |
[] | null | 2
| 2020-04-20T16:45:14Z
| 2020-04-21T22:58:49Z
| 2020-04-20T19:20:12Z
|
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/33678/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33678/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/33678.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/33678",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/33678.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/33678"
}
|
|
https://api.github.com/repos/pandas-dev/pandas/issues/33679
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33679/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33679/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33679/events
|
https://github.com/pandas-dev/pandas/pull/33679
| 603,383,372
|
MDExOlB1bGxSZXF1ZXN0NDA2MTc5Njkz
| 33,679
|
CLN: Remove redundant mixin to 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": "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"
},
{
"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": "2020-07-28T18:13:47Z",
"closed_issues": 2378,
"created_at": "2019-12-02T12:52:48Z",
"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": "2020-08-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/68",
"id": 4894670,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68/labels",
"node_id": "MDk6TWlsZXN0b25lNDg5NDY3MA==",
"number": 68,
"open_issues": 0,
"state": "closed",
"title": "1.1",
"updated_at": "2021-07-17T17:25:28Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68"
}
| 0
| 2020-04-20T16:50:25Z
| 2020-04-20T22:16:42Z
| 2020-04-20T22:14:17Z
|
MEMBER
| null |
we already pass-through the relevant attributes
|
{
"+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/33679/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33679/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/33679.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/33679",
"merged_at": "2020-04-20T22:14:17Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/33679.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/33679"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33680
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33680/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33680/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33680/events
|
https://github.com/pandas-dev/pandas/pull/33680
| 603,429,099
|
MDExOlB1bGxSZXF1ZXN0NDA2MjE1OTAy
| 33,680
|
TST: Remove some old xfails
|
{
"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": "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"
}
] |
closed
| false
| null |
[] |
{
"closed_at": "2020-07-28T18:13:47Z",
"closed_issues": 2378,
"created_at": "2019-12-02T12:52:48Z",
"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": "2020-08-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/68",
"id": 4894670,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68/labels",
"node_id": "MDk6TWlsZXN0b25lNDg5NDY3MA==",
"number": 68,
"open_issues": 0,
"state": "closed",
"title": "1.1",
"updated_at": "2021-07-17T17:25:28Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68"
}
| 3
| 2020-04-20T18:04:52Z
| 2020-04-20T21:43:52Z
| 2020-04-20T21:35:28Z
|
MEMBER
| null |
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --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/33680/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33680/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/33680.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/33680",
"merged_at": "2020-04-20T21:35:28Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/33680.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/33680"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33681
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33681/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33681/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33681/events
|
https://github.com/pandas-dev/pandas/issues/33681
| 603,463,460
|
MDU6SXNzdWU2MDM0NjM0NjA=
| 33,681
|
BUG: pd.Series.value_counts with pd.NA implies ValueError
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/45821223?v=4",
"events_url": "https://api.github.com/users/mariusgarbowski/events{/privacy}",
"followers_url": "https://api.github.com/users/mariusgarbowski/followers",
"following_url": "https://api.github.com/users/mariusgarbowski/following{/other_user}",
"gists_url": "https://api.github.com/users/mariusgarbowski/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mariusgarbowski",
"id": 45821223,
"login": "mariusgarbowski",
"node_id": "MDQ6VXNlcjQ1ODIxMjIz",
"organizations_url": "https://api.github.com/users/mariusgarbowski/orgs",
"received_events_url": "https://api.github.com/users/mariusgarbowski/received_events",
"repos_url": "https://api.github.com/users/mariusgarbowski/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mariusgarbowski/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mariusgarbowski/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mariusgarbowski"
}
|
[
{
"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": "Duplicate issue or pull request",
"id": 40153326,
"name": "Duplicate Report",
"node_id": "MDU6TGFiZWw0MDE1MzMyNg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Duplicate%20Report"
}
] |
closed
| false
| null |
[] | null | 2
| 2020-04-20T19:02:52Z
| 2020-04-22T00:39:33Z
| 2020-04-22T00:39:33Z
|
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.
The new pd.NA seems to have an issues with the pandas.Series method value_counts:
#### Code Sample, a copy-pastable example
```python
import pandas as pd
import numpy as np
s1 = pd.Series([np.nan, np.nan], dtype='float')
s2 = pd.Series([None, None], dtype='str')
s3 = pd.Series([pd.NA, pd.NA], dtype='Int64')
print(s1.value_counts())
print(s2.value_counts())
print(s3.value_counts()))
```
#### Problem description
The current output (with the new pd.NA values) raises a ValueError (see below). I would expect a blank pandas.Series as output (analogous to np.nan or None values with it's dtypes).
This issues regards pandas/python in my home pc as well as python installed on an ubuntu EC2 instance (see below).
#### Current Output:
Series([], dtype: int64)
Series([], dtype: int64)
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-17-a787e255adb5> in <module>
1 print(s1.value_counts())
2 print(s2.value_counts())
----> 3 print(s3.value_counts())
~\Miniconda3\lib\site-packages\pandas\core\base.py in value_counts(self, normalize, sort, ascending, bins, dropna)
1233 normalize=normalize,
1234 bins=bins,
-> 1235 dropna=dropna,
1236 )
1237 return result
~\Miniconda3\lib\site-packages\pandas\core\algorithms.py in value_counts(values, sort, ascending, normalize, bins, dropna)
726
727 if sort:
--> 728 result = result.sort_values(ascending=ascending)
729
730 if normalize:
~\Miniconda3\lib\site-packages\pandas\core\series.py in sort_values(self, axis, ascending, inplace, kind, na_position, ignore_index)
2960 idx = ibase.default_index(len(self))
2961
-> 2962 argsorted = _try_kind_sort(arr[good])
2963
2964 if is_list_like(ascending):
~\Miniconda3\lib\site-packages\pandas\core\series.py in _try_kind_sort(arr)
2946 try:
2947 # if kind==mergesort, it can fail for object dtype
-> 2948 return arr.argsort(kind=kind)
2949 except TypeError:
2950 # stable sort not available for object dtype
~\Miniconda3\lib\site-packages\pandas\core\arrays\base.py in argsort(self, ascending, kind, *args, **kwargs)
514 ascending = nv.validate_argsort_with_ascending(ascending, args, kwargs)
515
--> 516 result = nargsort(self, kind=kind, ascending=ascending, na_position="last")
517 return result
518
~\Miniconda3\lib\site-packages\pandas\core\sorting.py in nargsort(items, kind, ascending, na_position)
261
262 if is_extension_array_dtype(items):
--> 263 items = items._values_for_argsort()
264 else:
265 items = np.asanyarray(items)
~\Miniconda3\lib\site-packages\pandas\core\arrays\integer.py in _values_for_argsort(self)
500 """
501 data = self._data.copy()
--> 502 data[self._mask] = data.min() - 1
503 return data
504
~\Miniconda3\lib\site-packages\numpy\core\_methods.py in _amin(a, axis, out, keepdims, initial, where)
32 def _amin(a, axis=None, out=None, keepdims=False,
33 initial=_NoValue, where=True):
---> 34 return umr_minimum(a, axis, None, out, keepdims, initial, where)
35
36 def _sum(a, axis=None, dtype=None, out=None, keepdims=False,
ValueError: zero-size array to reduction operation minimum which has no identity
#### Expected Output
Series([], dtype: int64)
Series([], dtype: int64)
Series([], dtype: int64)
Implemented temporal workaround:
```python
def get_value_counts(s: pd.Series) -> pd.Series:
try:
unique_values = s.value_counts()
except ValueError:
unique_values = pd.Series(dtype='int64')
return unique_values
```
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit : None
python : 3.7.6.final.0
python-bits : 64
OS : Windows
OS-release : 10
machine : AMD64
processor : Intel64 Family 6 Model 78 Stepping 3, GenuineIntel
byteorder : little
LC_ALL : None
LANG : None
LOCALE : None.None
pandas : 1.0.3
numpy : 1.18.1
pytz : 2019.3
dateutil : 2.8.1
pip : 20.0.2
setuptools : 46.1.3.post20200330
Cython : None
pytest : 5.4.1
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : 4.4.1
html5lib : 1.0.1
pymysql : None
psycopg2 : 2.8.5 (dt dec pq3 ext lo64)
jinja2 : 2.11.1
IPython : 7.13.0
pandas_datareader: None
bs4 : 4.8.1
bottleneck : None
fastparquet : None
gcsfs : None
lxml.etree : 4.4.1
matplotlib : 3.1.1
numexpr : None
odfpy : None
openpyxl : 3.0.3
pandas_gbq : None
pyarrow : None
pytables : None
pytest : 5.4.1
pyxlsb : None
s3fs : 0.4.0
scipy : 1.4.1
sqlalchemy : 1.3.16
tables : None
tabulate : None
xarray : None
xlrd : 1.2.0
xlwt : 1.3.0
xlsxwriter : None
numba : None
Same issue on Ubutnu Server:
INSTALLED VERSIONS
------------------
commit : None
python : 3.7.3.final.0
python-bits : 64
OS : Linux
OS-release : 4.15.0-1065-aws
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : C.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.0.3
numpy : 1.16.4
pytz : 2019.1
dateutil : 2.8.0
pip : 19.0.3
setuptools : 41.0.0
Cython : None
pytest : 5.4.1
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : 4.3.4
html5lib : None
pymysql : None
psycopg2 : 2.8.4 (dt dec pq3 ext lo64)
jinja2 : None
IPython : None
pandas_datareader: None
bs4 : 4.7.1
bottleneck : None
fastparquet : None
gcsfs : None
lxml.etree : 4.3.4
matplotlib : 3.1.1
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pytables : None
pytest : 5.4.1
pyxlsb : None
s3fs : 0.4.0
scipy : None
sqlalchemy : 1.3.13
tables : None
tabulate : None
xarray : None
xlrd : 1.2.0
xlwt : None
xlsxwriter : 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/33681/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33681/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/33682
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33682/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33682/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33682/events
|
https://github.com/pandas-dev/pandas/issues/33682
| 603,491,011
|
MDU6SXNzdWU2MDM0OTEwMTE=
| 33,682
|
BUG: timestamp subtraction of business hour offset (BH) is incorrect
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/10575616?v=4",
"events_url": "https://api.github.com/users/ahyerman/events{/privacy}",
"followers_url": "https://api.github.com/users/ahyerman/followers",
"following_url": "https://api.github.com/users/ahyerman/following{/other_user}",
"gists_url": "https://api.github.com/users/ahyerman/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ahyerman",
"id": 10575616,
"login": "ahyerman",
"node_id": "MDQ6VXNlcjEwNTc1NjE2",
"organizations_url": "https://api.github.com/users/ahyerman/orgs",
"received_events_url": "https://api.github.com/users/ahyerman/received_events",
"repos_url": "https://api.github.com/users/ahyerman/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ahyerman/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ahyerman/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ahyerman"
}
|
[
{
"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"
}
] |
open
| false
| null |
[] | null | 4
| 2020-04-20T19:49:15Z
| 2020-06-05T18:54:05Z
| 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
from pandas.tseries.frequencies import to_offset
pandas.Timestamp('2000-01-10 10:00') - to_offset('BH')
```
#### Problem description
This issue causes the business hour 09:00 to be skipped when subtracting, leading to an incorrect time. The current output is: `Timestamp('2000-01-07 17:00')`. This issue only occurs to the 10:00 time, other times appear to work as expected. Additionally, this issue only appears during subtraction, not addition.
#### Expected Output
`Timestamp('2000-01-10 09:00')`
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit : None
python : 3.6.10.final.0
python-bits : 64
OS : Windows
OS-release : 10
machine : AMD64
processor : Intel64 Family 6 Model 142 Stepping 10, GenuineIntel
byteorder : little
LC_ALL : None
LANG : None
LOCALE : None.None
pandas : 1.0.3
numpy : 1.18.2
pytz : 2019.3
dateutil : 2.8.1
pip : 20.0.2
setuptools : 46.1.3.post20200330
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : None
IPython : None
pandas_datareader: None
bs4 : None
bottleneck : None
fastparquet : None
gcsfs : None
lxml.etree : None
matplotlib : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pytables : None
pytest : None
pyxlsb : None
s3fs : None
scipy : 1.4.1
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
xlsxwriter : 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/33682/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33682/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/33683
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33683/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33683/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33683/events
|
https://github.com/pandas-dev/pandas/issues/33683
| 603,505,750
|
MDU6SXNzdWU2MDM1MDU3NTA=
| 33,683
|
BUG: multiplying Business Hour (BH) offset by zero results in strange behavior
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/10575616?v=4",
"events_url": "https://api.github.com/users/ahyerman/events{/privacy}",
"followers_url": "https://api.github.com/users/ahyerman/followers",
"following_url": "https://api.github.com/users/ahyerman/following{/other_user}",
"gists_url": "https://api.github.com/users/ahyerman/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ahyerman",
"id": 10575616,
"login": "ahyerman",
"node_id": "MDQ6VXNlcjEwNTc1NjE2",
"organizations_url": "https://api.github.com/users/ahyerman/orgs",
"received_events_url": "https://api.github.com/users/ahyerman/received_events",
"repos_url": "https://api.github.com/users/ahyerman/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ahyerman/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ahyerman/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ahyerman"
}
|
[
{
"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"
}
] |
open
| false
| null |
[] | null | 0
| 2020-04-20T20:15:25Z
| 2020-06-05T18:53:51Z
| 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
from pandas.tseries.frequencies import to_offset
pandas.Timestamp('2000-01-10 10:00') + to_offset('BH') * 0
```
#### Problem description
This appears to be a regression in behavior as pandas 0.23.4 did not experience this behavior. I do not know exactly when this was introduced, but the result is `Timestamp('2000-01-11 09:00')`, which is unexpected and incorrect functionality. Additionally, this behavior does not repro for hourly data, for instance:
`pandas.Timestamp('2000-01-10 10:00') + to_offset('H') * 0`
#### Expected Output
`Timestamp('2000-01-10 10:00')`
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit : None
python : 3.6.10.final.0
python-bits : 64
OS : Windows
OS-release : 10
machine : AMD64
processor : Intel64 Family 6 Model 142 Stepping 10, GenuineIntel
byteorder : little
LC_ALL : None
LANG : None
LOCALE : None.None
pandas : 1.0.3
numpy : 1.18.2
pytz : 2019.3
dateutil : 2.8.1
pip : 20.0.2
setuptools : 46.1.3.post20200330
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : None
IPython : None
pandas_datareader: None
bs4 : None
bottleneck : None
fastparquet : None
gcsfs : None
lxml.etree : None
matplotlib : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pytables : None
pytest : None
pyxlsb : None
s3fs : None
scipy : 1.4.1
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
xlsxwriter : 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/33683/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33683/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/33684
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33684/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33684/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33684/events
|
https://github.com/pandas-dev/pandas/pull/33684
| 603,514,595
|
MDExOlB1bGxSZXF1ZXN0NDA2Mjg1NDc3
| 33,684
|
REF: update unbox_scalar for better shareability
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
}
|
[] |
closed
| false
| null |
[] | null | 1
| 2020-04-20T20:30:16Z
| 2021-03-02T15:51:39Z
| 2020-04-20T21:32:53Z
|
MEMBER
| null |
I'm finding this will make it easier to share a bunch of unpacking/validation code
|
{
"+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/33684/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33684/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/33684.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/33684",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/33684.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/33684"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33685
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33685/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33685/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33685/events
|
https://github.com/pandas-dev/pandas/pull/33685
| 603,541,774
|
MDExOlB1bGxSZXF1ZXN0NDA2MzA3ODk2
| 33,685
|
BUG: arg validation in DTA/TDA/PA.take, DTI/TDI/PI.where
|
{
"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": "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"
}
] |
closed
| false
| null |
[] |
{
"closed_at": "2020-07-28T18:13:47Z",
"closed_issues": 2378,
"created_at": "2019-12-02T12:52:48Z",
"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": "2020-08-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/68",
"id": 4894670,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68/labels",
"node_id": "MDk6TWlsZXN0b25lNDg5NDY3MA==",
"number": 68,
"open_issues": 0,
"state": "closed",
"title": "1.1",
"updated_at": "2021-07-17T17:25:28Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68"
}
| 2
| 2020-04-20T21:18:24Z
| 2020-04-25T21:10:13Z
| 2020-04-25T21:06:22Z
|
MEMBER
| null |
We have a _lot_ of really similar validation/casting methods in these classes. This is a step in smoothing out the differences between them so we can share them.
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/33685/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33685/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/33685.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/33685",
"merged_at": "2020-04-25T21:06:22Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/33685.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/33685"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33686
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33686/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33686/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33686/events
|
https://github.com/pandas-dev/pandas/pull/33686
| 603,543,030
|
MDExOlB1bGxSZXF1ZXN0NDA2MzA4OTMx
| 33,686
|
BLD: Set max version of numba to 0.48.0
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/124705?v=4",
"events_url": "https://api.github.com/users/mgmarino/events{/privacy}",
"followers_url": "https://api.github.com/users/mgmarino/followers",
"following_url": "https://api.github.com/users/mgmarino/following{/other_user}",
"gists_url": "https://api.github.com/users/mgmarino/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mgmarino",
"id": 124705,
"login": "mgmarino",
"node_id": "MDQ6VXNlcjEyNDcwNQ==",
"organizations_url": "https://api.github.com/users/mgmarino/orgs",
"received_events_url": "https://api.github.com/users/mgmarino/received_events",
"repos_url": "https://api.github.com/users/mgmarino/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mgmarino/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mgmarino/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mgmarino"
}
|
[
{
"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": "2020-07-28T18:13:47Z",
"closed_issues": 2378,
"created_at": "2019-12-02T12:52:48Z",
"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": "2020-08-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/68",
"id": 4894670,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68/labels",
"node_id": "MDk6TWlsZXN0b25lNDg5NDY3MA==",
"number": 68,
"open_issues": 0,
"state": "closed",
"title": "1.1",
"updated_at": "2021-07-17T17:25:28Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68"
}
| 5
| 2020-04-20T21:20:36Z
| 2020-05-27T08:23:27Z
| 2020-04-20T21:43:13Z
|
CONTRIBUTOR
| null |
This should fix the errors in the CI (Travis) builds, e.g.
```
E AttributeError: module 'numba' has no attribute 'targets'
```
|
{
"+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/33686/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33686/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/33686.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/33686",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/33686.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/33686"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33687
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33687/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33687/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33687/events
|
https://github.com/pandas-dev/pandas/pull/33687
| 603,551,902
|
MDExOlB1bGxSZXF1ZXN0NDA2MzE2MjAz
| 33,687
|
CI/DEP: Use numba.extending.is_jitted for numba version > 0.49.0
|
{
"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": "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": "2020-05-30T15:21:05Z",
"closed_issues": 94,
"created_at": "2020-03-19T21:32:28Z",
"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": "on-merge: backport to 1.0.x",
"due_on": "2020-06-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/72",
"id": 5219206,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/72/labels",
"node_id": "MDk6TWlsZXN0b25lNTIxOTIwNg==",
"number": 72,
"open_issues": 0,
"state": "closed",
"title": "1.0.4",
"updated_at": "2020-06-24T17:57:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/72"
}
| 3
| 2020-04-20T21:37:24Z
| 2020-05-26T09:38:20Z
| 2020-04-20T22:50:06Z
|
MEMBER
| null |
- [x] xref #33686
- [ ] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --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/33687/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33687/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/33687.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/33687",
"merged_at": "2020-04-20T22:50:06Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/33687.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/33687"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33688
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33688/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33688/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33688/events
|
https://github.com/pandas-dev/pandas/pull/33688
| 603,593,694
|
MDExOlB1bGxSZXF1ZXN0NDA2MzUwMTA1
| 33,688
|
Grammatically updated HTML Footer
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/52355455?v=4",
"events_url": "https://api.github.com/users/mayank98x/events{/privacy}",
"followers_url": "https://api.github.com/users/mayank98x/followers",
"following_url": "https://api.github.com/users/mayank98x/following{/other_user}",
"gists_url": "https://api.github.com/users/mayank98x/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mayank98x",
"id": 52355455,
"login": "mayank98x",
"node_id": "MDQ6VXNlcjUyMzU1NDU1",
"organizations_url": "https://api.github.com/users/mayank98x/orgs",
"received_events_url": "https://api.github.com/users/mayank98x/received_events",
"repos_url": "https://api.github.com/users/mayank98x/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mayank98x/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mayank98x/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mayank98x"
}
|
[
{
"color": "23ef97",
"default": false,
"description": "pandas website",
"id": 1508144531,
"name": "Web",
"node_id": "MDU6TGFiZWwxNTA4MTQ0NTMx",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Web"
}
] |
closed
| false
| null |
[] |
{
"closed_at": "2020-07-28T18:13:47Z",
"closed_issues": 2378,
"created_at": "2019-12-02T12:52:48Z",
"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": "2020-08-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/68",
"id": 4894670,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68/labels",
"node_id": "MDk6TWlsZXN0b25lNDg5NDY3MA==",
"number": 68,
"open_issues": 0,
"state": "closed",
"title": "1.1",
"updated_at": "2021-07-17T17:25:28Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68"
}
| 1
| 2020-04-20T23:16:53Z
| 2020-04-22T02:34:33Z
| 2020-04-22T02:34:25Z
|
CONTRIBUTOR
| null |
Grammatically updated HTML Footer, Adding a period in the 89th line.
- [x] closes #xxxx
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [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/33688/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33688/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/33688.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/33688",
"merged_at": "2020-04-22T02:34:25Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/33688.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/33688"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33689
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33689/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33689/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33689/events
|
https://github.com/pandas-dev/pandas/pull/33689
| 603,602,935
|
MDExOlB1bGxSZXF1ZXN0NDA2MzU4MTg2
| 33,689
|
REF: collect validator methods for DTA/TDA/PA
|
{
"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": "2020-07-28T18:13:47Z",
"closed_issues": 2378,
"created_at": "2019-12-02T12:52:48Z",
"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": "2020-08-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/68",
"id": 4894670,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68/labels",
"node_id": "MDk6TWlsZXN0b25lNDg5NDY3MA==",
"number": 68,
"open_issues": 0,
"state": "closed",
"title": "1.1",
"updated_at": "2021-07-17T17:25:28Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68"
}
| 1
| 2020-04-20T23:36:19Z
| 2020-04-21T14:29:17Z
| 2020-04-21T12:51:41Z
|
MEMBER
| null |
Zero logic changes in this PR.
xref #33685
We have a _lot_ of methods for converting arguments to DTA/TDA/PA/DTI/TDI/PI methods to/from i8 representations. ATM these have slightly different behavior, which we should try to bring into sync (and then de-duplicate the code).
This PR just collects all those methods in one place to make the upcoming steps easier.
Two more methods that I think/hope can eventually be added to this grouping are the comparisons and get_loc, but those are more complicated, but those are more complicated, so holding off on those for now.
|
{
"+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/33689/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33689/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/33689.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/33689",
"merged_at": "2020-04-21T12:51:41Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/33689.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/33689"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33690
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33690/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33690/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33690/events
|
https://github.com/pandas-dev/pandas/pull/33690
| 603,619,371
|
MDExOlB1bGxSZXF1ZXN0NDA2MzcxNjEy
| 33,690
|
CLN: Split dtype inference tests
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/2658661?v=4",
"events_url": "https://api.github.com/users/dsaxton/events{/privacy}",
"followers_url": "https://api.github.com/users/dsaxton/followers",
"following_url": "https://api.github.com/users/dsaxton/following{/other_user}",
"gists_url": "https://api.github.com/users/dsaxton/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dsaxton",
"id": 2658661,
"login": "dsaxton",
"node_id": "MDQ6VXNlcjI2NTg2NjE=",
"organizations_url": "https://api.github.com/users/dsaxton/orgs",
"received_events_url": "https://api.github.com/users/dsaxton/received_events",
"repos_url": "https://api.github.com/users/dsaxton/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dsaxton/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dsaxton/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dsaxton"
}
|
[
{
"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": "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": "2020-07-28T18:13:47Z",
"closed_issues": 2378,
"created_at": "2019-12-02T12:52:48Z",
"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": "2020-08-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/68",
"id": 4894670,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68/labels",
"node_id": "MDk6TWlsZXN0b25lNDg5NDY3MA==",
"number": 68,
"open_issues": 0,
"state": "closed",
"title": "1.1",
"updated_at": "2021-07-17T17:25:28Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68"
}
| 3
| 2020-04-21T00:28:15Z
| 2020-04-21T12:51:03Z
| 2020-04-21T12:41:01Z
|
MEMBER
| null |
Breaking up some very large tests in dtypes/test_inference.py
|
{
"+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/33690/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33690/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/33690.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/33690",
"merged_at": "2020-04-21T12:41:01Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/33690.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/33690"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33691
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33691/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33691/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33691/events
|
https://github.com/pandas-dev/pandas/pull/33691
| 603,647,575
|
MDExOlB1bGxSZXF1ZXN0NDA2MzkzMjk0
| 33,691
|
CLN: remove shallow_copy_with_infer
|
{
"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": "207de5",
"default": false,
"description": null,
"id": 211029535,
"name": "Clean",
"node_id": "MDU6TGFiZWwyMTEwMjk1MzU=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Clean"
},
{
"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": "2020-07-28T18:13:47Z",
"closed_issues": 2378,
"created_at": "2019-12-02T12:52:48Z",
"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": "2020-08-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/68",
"id": 4894670,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68/labels",
"node_id": "MDk6TWlsZXN0b25lNDg5NDY3MA==",
"number": 68,
"open_issues": 0,
"state": "closed",
"title": "1.1",
"updated_at": "2021-07-17T17:25:28Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68"
}
| 0
| 2020-04-21T01:57:47Z
| 2020-04-22T02:48:25Z
| 2020-04-22T02:31:37Z
|
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/33691/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33691/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/33691.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/33691",
"merged_at": "2020-04-22T02:31:37Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/33691.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/33691"
}
|
|
https://api.github.com/repos/pandas-dev/pandas/issues/33692
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33692/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33692/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33692/events
|
https://github.com/pandas-dev/pandas/issues/33692
| 603,701,114
|
MDU6SXNzdWU2MDM3MDExMTQ=
| 33,692
|
Join several dataframes with MultiIndex containing dates raises ValueError
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/39845080?v=4",
"events_url": "https://api.github.com/users/neshitov/events{/privacy}",
"followers_url": "https://api.github.com/users/neshitov/followers",
"following_url": "https://api.github.com/users/neshitov/following{/other_user}",
"gists_url": "https://api.github.com/users/neshitov/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/neshitov",
"id": 39845080,
"login": "neshitov",
"node_id": "MDQ6VXNlcjM5ODQ1MDgw",
"organizations_url": "https://api.github.com/users/neshitov/orgs",
"received_events_url": "https://api.github.com/users/neshitov/received_events",
"repos_url": "https://api.github.com/users/neshitov/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/neshitov/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/neshitov/subscriptions",
"type": "User",
"url": "https://api.github.com/users/neshitov"
}
|
[
{
"color": "AFEEEE",
"default": false,
"description": null,
"id": 211840,
"name": "Timeseries",
"node_id": "MDU6TGFiZWwyMTE4NDA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Timeseries"
},
{
"color": "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": "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"
},
{
"color": "cdea3c",
"default": false,
"description": "Unit test(s) needed to prevent regressions",
"id": 986278782,
"name": "Needs Tests",
"node_id": "MDU6TGFiZWw5ODYyNzg3ODI=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Needs%20Tests"
},
{
"color": "bfd4f2",
"default": false,
"description": "stdlib datetime.date support",
"id": 3059772828,
"name": "datetime.date",
"node_id": "MDU6TGFiZWwzMDU5NzcyODI4",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/datetime.date"
}
] |
open
| false
| null |
[] | null | 6
| 2020-04-21T04:44:13Z
| 2021-08-29T08:25:43Z
| null |
NONE
| null |
- [x] I have checked that this issue has not already been reported.
- [x] I have confirmed this bug exists on the latest version of pandas.
- [ ] (optional) I have confirmed this bug exists on the master branch of pandas.
---
#### Code Sample
When I try to join 3 dataframes with multiindices containing dates I got ValueError:
```python
import pandas as pd
date = pd.Timestamp(2000, 1, 1).date()
df1 = pd.DataFrame({'index_0': 0, 'date': date, 'col1': [0]})
df2 = pd.DataFrame({'index_0': 0, 'date': date, 'col2': [0]})
df1 = df1.groupby(by=['index_0', 'date']).first()
df2 = df2.groupby(by=['index_0', 'date']).first()
multi_index = pd.MultiIndex.from_tuples([(0, date)], names=['index_0', 'date'])
df3 = pd.DataFrame(index=multi_index, columns=['col3'], data=[0])
result = df1.join([df2, df3])
```
### Traceback
<details>
```code
ValueError Traceback (most recent call last)
<ipython-input-555-5947f20f11fd> in <module>
9 df3 = pd.DataFrame(index=multi_index, columns=['col3'], data=[0])
10
---> 11 result = df1.join([df2, df3])
12
/opt/anaconda3/lib/python3.7/site-packages/pandas/core/frame.py in join(self, other, on, how, lsuffix, rsuffix, sort)
7207 """
7208 return self._join_compat(
-> 7209 other, on=on, how=how, lsuffix=lsuffix, rsuffix=rsuffix, sort=sort
7210 )
7211
/opt/anaconda3/lib/python3.7/site-packages/pandas/core/frame.py in _join_compat(self, other, on, how, lsuffix, rsuffix, sort)
7248 frames, axis=1, join="outer", verify_integrity=True, sort=sort
7249 )
-> 7250 return res.reindex(self.index, copy=False)
7251 else:
7252 return concat(
/opt/anaconda3/lib/python3.7/site-packages/pandas/util/_decorators.py in wrapper(*args, **kwargs)
225 @wraps(func)
226 def wrapper(*args, **kwargs) -> Callable[..., Any]:
--> 227 return func(*args, **kwargs)
228
229 kind = inspect.Parameter.POSITIONAL_OR_KEYWORD
/opt/anaconda3/lib/python3.7/site-packages/pandas/core/frame.py in reindex(self, *args, **kwargs)
3854 kwargs.pop("axis", None)
3855 kwargs.pop("labels", None)
-> 3856 return super().reindex(**kwargs)
3857
3858 def drop(
/opt/anaconda3/lib/python3.7/site-packages/pandas/core/generic.py in reindex(self, *args, **kwargs)
4542 # perform the reindex on the axes
4543 return self._reindex_axes(
-> 4544 axes, level, limit, tolerance, method, fill_value, copy
4545 ).__finalize__(self)
4546
/opt/anaconda3/lib/python3.7/site-packages/pandas/core/frame.py in _reindex_axes(self, axes, level, limit, tolerance, method, fill_value, copy)
3742 if index is not None:
3743 frame = frame._reindex_index(
-> 3744 index, method, copy, level, fill_value, limit, tolerance
3745 )
3746
/opt/anaconda3/lib/python3.7/site-packages/pandas/core/frame.py in _reindex_index(self, new_index, method, copy, level, fill_value, limit, tolerance)
3758 ):
3759 new_index, indexer = self.index.reindex(
-> 3760 new_index, method=method, level=level, limit=limit, tolerance=tolerance
3761 )
3762 return self._reindex_with_indexers(
/opt/anaconda3/lib/python3.7/site-packages/pandas/core/indexes/multi.py in reindex(self, target, method, level, limit, tolerance)
2414 )
2415 else:
-> 2416 raise ValueError("cannot handle a non-unique multi-index!")
2417
2418 if not isinstance(target, MultiIndex):
ValueError: cannot handle a non-unique multi-index!
```
</details>
#### Problem description
The issue seems to be that groupby produces dataframes df1 and df2 having multiindex with level 'date' consisting of 'dateteime.date' objects, while in df3 we get multiindex with level 'date' consisting of 'pandas._libs.tslibs.timestamps.Timestamp' objects. This does not lead to an error in subsequent joins:
```python
result = df1.join(df2)
result = result.join(df3)
```
or when dealing with single level indices, but creates a problem when joining 3 dataframes at once.
#### Expected Output
```code
col1 col2 col3
index_0 date
0 2000-01-01 0 0 0
```
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit : None
python : 3.7.6.final.0
python-bits : 64
OS : Linux
OS-release : 4.4.0-124-generic
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.0.3
numpy : 1.18.1
pytz : 2019.1
dateutil : 2.8.0
pip : 19.1.1
setuptools : 45.2.0.post20200210
Cython : 0.29.12
pytest : 5.0.1
hypothesis : None
sphinx : 2.1.2
blosc : None
feather : None
xlsxwriter : 1.1.8
lxml.etree : 4.3.4
html5lib : 1.0.1
pymysql : None
psycopg2 : 2.8.4 (dt dec pq3 ext lo64)
jinja2 : 2.11.1
IPython : 7.7.0
pandas_datareader: None
bs4 : 4.7.1
bottleneck : 1.2.1
fastparquet : None
gcsfs : 0.3.0
lxml.etree : 4.3.4
matplotlib : 3.1.0
numexpr : 2.6.9
odfpy : None
openpyxl : 2.6.2
pandas_gbq : None
pyarrow : 0.15.1
pytables : None
pytest : 5.0.1
pyxlsb : None
s3fs : None
scipy : 1.4.1
sqlalchemy : 1.3.5
tables : 3.5.2
tabulate : 0.8.3
xarray : None
xlrd : 1.2.0
xlwt : 1.3.0
xlsxwriter : 1.1.8
numba : 0.45.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/33692/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33692/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/33693
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33693/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33693/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33693/events
|
https://github.com/pandas-dev/pandas/pull/33693
| 603,786,630
|
MDExOlB1bGxSZXF1ZXN0NDA2NTAyMzgx
| 33,693
|
BUG: Fix memory issues in rolling.min/max
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/24706421?v=4",
"events_url": "https://api.github.com/users/s-scherrer/events{/privacy}",
"followers_url": "https://api.github.com/users/s-scherrer/followers",
"following_url": "https://api.github.com/users/s-scherrer/following{/other_user}",
"gists_url": "https://api.github.com/users/s-scherrer/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/s-scherrer",
"id": 24706421,
"login": "s-scherrer",
"node_id": "MDQ6VXNlcjI0NzA2NDIx",
"organizations_url": "https://api.github.com/users/s-scherrer/orgs",
"received_events_url": "https://api.github.com/users/s-scherrer/received_events",
"repos_url": "https://api.github.com/users/s-scherrer/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/s-scherrer/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/s-scherrer/subscriptions",
"type": "User",
"url": "https://api.github.com/users/s-scherrer"
}
|
[
{
"color": "a10c02",
"default": false,
"description": "Memory or execution speed performance",
"id": 8935311,
"name": "Performance",
"node_id": "MDU6TGFiZWw4OTM1MzEx",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Performance"
},
{
"color": "d4c5f9",
"default": false,
"description": "rolling, ewma, expanding",
"id": 1045950827,
"name": "Window",
"node_id": "MDU6TGFiZWwxMDQ1OTUwODI3",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Window"
}
] |
closed
| false
| null |
[] |
{
"closed_at": "2020-05-30T15:21:05Z",
"closed_issues": 94,
"created_at": "2020-03-19T21:32:28Z",
"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": "on-merge: backport to 1.0.x",
"due_on": "2020-06-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/72",
"id": 5219206,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/72/labels",
"node_id": "MDk6TWlsZXN0b25lNTIxOTIwNg==",
"number": 72,
"open_issues": 0,
"state": "closed",
"title": "1.0.4",
"updated_at": "2020-06-24T17:57:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/72"
}
| 17
| 2020-04-21T07:52:23Z
| 2020-05-26T09:32:45Z
| 2020-04-28T14:48:42Z
|
CONTRIBUTOR
| null |
This fixes at least the reproducible part of #30726. I am not
totally sure what is going on here (is this a true memory leak?), and whether this fixes all issues, but it does strongly reduce memory usage as measured by `psutil`.
My tests have shown that there are two solutions that avoid growing memory
usage:
- pass memoryviews (`float64_t[:]`) instead of `ndarray[float64_t]`
- remove `starti` and `endi` as arguments to `_roll_min_max_fixed`
This commit implements both, since `_roll_min_max_fixed` doesn't use `starti` and `endi` anyways.
- [x] fixes at least part of
closes #30726
closes #32466
- [ ] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry
I am unsure about testing: Does this need a test? If so, what would be a good way to go about testing? The tests I performed (example code in the linked issue) are probably very system specific.
|
{
"+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/33693/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33693/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/33693.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/33693",
"merged_at": "2020-04-28T14:48:41Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/33693.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/33693"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33694
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33694/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33694/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33694/events
|
https://github.com/pandas-dev/pandas/issues/33694
| 603,872,717
|
MDU6SXNzdWU2MDM4NzI3MTc=
| 33,694
|
BUG: Wrong expression `np.multiply` to validate overflow exception in pandas.core.reshape.reshape.py#L118
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/49483542?v=4",
"events_url": "https://api.github.com/users/chjinche/events{/privacy}",
"followers_url": "https://api.github.com/users/chjinche/followers",
"following_url": "https://api.github.com/users/chjinche/following{/other_user}",
"gists_url": "https://api.github.com/users/chjinche/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/chjinche",
"id": 49483542,
"login": "chjinche",
"node_id": "MDQ6VXNlcjQ5NDgzNTQy",
"organizations_url": "https://api.github.com/users/chjinche/orgs",
"received_events_url": "https://api.github.com/users/chjinche/received_events",
"repos_url": "https://api.github.com/users/chjinche/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/chjinche/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/chjinche/subscriptions",
"type": "User",
"url": "https://api.github.com/users/chjinche"
}
|
[
{
"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": "Duplicate issue or pull request",
"id": 40153326,
"name": "Duplicate Report",
"node_id": "MDU6TGFiZWw0MDE1MzMyNg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Duplicate%20Report"
}
] |
closed
| false
| null |
[] |
{
"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"
}
| 3
| 2020-04-21T10:04:24Z
| 2020-04-21T11:50:36Z
| 2020-04-21T11:50:36Z
|
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.
- [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
```python
# bug code block: pandas.core.reshape.reshape.py#L118
# GH20601: This forces an overflow if the number of cells is too high.
num_cells = np.multiply(num_rows, num_columns, dtype=np.int32)
if num_rows > 0 and num_columns > 0 and num_cells <= 0:
raise ValueError("Unstacked DataFrame is too big, causing int32 overflow")
# Repro codes. `np.multiply` result cannot validate overflow exceptions. For example,
>>> num_rows = 66000
>>> num_columns = 66000
>>> num_cells = np.multiply(num_rows, num_columns, dtype=np.int32)
>>> num_cells
61032704
>>> num_rows > 0 and num_columns > 0 and num_cells <= 0
False
# 66000*66000 is overflow for np.int32
>>> np.int32(66000*66000)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OverflowError: Python int too large to convert to C long
```
#### Problem description
`np.multiply` result cannot validate overflow exceptions. If overflow, `x` will be `x % 2**32`, which can be negative, positive, zero, depending on its first bit.
See above example codes, where `66000*66000` is overflow for `np.int32` but its `multiply` res is positive.
[this should explain **why** the current behaviour is a problem and why the expected output is a better solution]
#### Expected Output
#### Output of ``pd.show_versions()``
<details>
[paste the output of ``pd.show_versions()`` here leaving a blank line after the details tag]
</details>
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/33694/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33694/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/33695
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33695/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33695/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33695/events
|
https://github.com/pandas-dev/pandas/issues/33695
| 603,878,355
|
MDU6SXNzdWU2MDM4NzgzNTU=
| 33,695
|
ENH: Enable rolling.apply on custom function that requires multiple columns of data frame
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/7237145?v=4",
"events_url": "https://api.github.com/users/bbkaran/events{/privacy}",
"followers_url": "https://api.github.com/users/bbkaran/followers",
"following_url": "https://api.github.com/users/bbkaran/following{/other_user}",
"gists_url": "https://api.github.com/users/bbkaran/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/bbkaran",
"id": 7237145,
"login": "bbkaran",
"node_id": "MDQ6VXNlcjcyMzcxNDU=",
"organizations_url": "https://api.github.com/users/bbkaran/orgs",
"received_events_url": "https://api.github.com/users/bbkaran/received_events",
"repos_url": "https://api.github.com/users/bbkaran/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/bbkaran/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bbkaran/subscriptions",
"type": "User",
"url": "https://api.github.com/users/bbkaran"
}
|
[
{
"color": "4E9A06",
"default": false,
"description": null,
"id": 76812,
"name": "Enhancement",
"node_id": "MDU6TGFiZWw3NjgxMg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Enhancement"
}
] |
closed
| false
| null |
[] | null | 1
| 2020-04-21T10:13:27Z
| 2020-08-21T17:06:02Z
| 2020-04-21T10:54:18Z
|
NONE
| null |
#### Is your feature request related to a problem?
Yes.
I wish I could use pandas to:
create an additional column ` 'newc' ` of my dataframe `df` as `df['newc']` through rolling.apply on `df['cond']` with a custom function. The custom function requires two columns of `df`.
#### Describe the solution you'd like
I prefer the solution to look something like:
`df['newc'] = df['cond'].rolling(4).apply(T_correction,
args = (df['temp'].rolling(4))) `
where
```
>>> df.head()
temp cond
ts
2018-06-01 00:00:00 51.908 27.83
2018-06-01 00:05:00 52.144 27.83
2018-06-01 00:10:00 51.880 27.83
2018-06-01 00:15:00 52.001 27.83
2018-06-01 00:20:00 51.835 27.83
def T_correction(df, d):
df = pd.DataFrame(data = df)
df.columns = ['cond']
df['temp'] = d
X = df.drop(['cond'], axis = 1) # X features: temp
X = sm.add_constant(X) # add intercept
lmodel = sm.OLS(df.cond, X) # fit cond = a + b*temp
results = lmodel.fit() #
Op = results.predict(X) # derive 'cond' as explained by temp
Tc1 = df.cond - Op # remove the linear influence
#---conditional correction --------------------------------------
Tc = np.where(df.temp > (np.mean(df.temp) + 0.5*np.std(df.temp)), df.cond, Tc1)
return Tc[-1] # returning the last value
```
I understand it may be related to the issue:
```
raise NotImplementedError('See issue #11704 {url}'.format(url=url))
NotImplementedError: See issue #11704 https://github.com/pandas-dev/pandas/issues/11704
```
This may not have reached high enough importance for someone to look into it. Or there may be other ways we could achieve this. I am not experienced enough with pandas code to start looking into myself but I am happy try if some guidance is available.
#### API breaking implications
No changes in the way we call the API
#### Describe alternatives you've considered
Ended up using loop - much slower
|
{
"+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/33695/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33695/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/33696
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33696/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33696/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33696/events
|
https://github.com/pandas-dev/pandas/issues/33696
| 603,879,235
|
MDU6SXNzdWU2MDM4NzkyMzU=
| 33,696
|
DOC: pd.Categorical does not throw ValueError, converts to NaN instead
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1408034?v=4",
"events_url": "https://api.github.com/users/behrenhoff/events{/privacy}",
"followers_url": "https://api.github.com/users/behrenhoff/followers",
"following_url": "https://api.github.com/users/behrenhoff/following{/other_user}",
"gists_url": "https://api.github.com/users/behrenhoff/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/behrenhoff",
"id": 1408034,
"login": "behrenhoff",
"node_id": "MDQ6VXNlcjE0MDgwMzQ=",
"organizations_url": "https://api.github.com/users/behrenhoff/orgs",
"received_events_url": "https://api.github.com/users/behrenhoff/received_events",
"repos_url": "https://api.github.com/users/behrenhoff/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/behrenhoff/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/behrenhoff/subscriptions",
"type": "User",
"url": "https://api.github.com/users/behrenhoff"
}
|
[
{
"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 |
[] | null | 5
| 2020-04-21T10:14:49Z
| 2020-06-24T15:30:32Z
| 2020-06-24T15:30:32Z
|
NONE
| null |
My problem might be a bug or just a documentation issue. Consider this two-liner:
```python
import pandas as pd
print(pd.Categorical([*'abc'], categories=[*'ab']))
```
The output is:
```
[a, b, NaN]
Categories (2, object): [a, b]
```
According to the docs:
> All values of the Categorical are either in categories or np.nan. **Assigning values outside of categories will raise a ValueError.**
And further:
> Raises ValueError If the categories do not validate.
However, no ValueError is thrown, instead 'c' is converted to NaN silently.
Either this is intended - then the docu needs update.
Or it is not intended - then it is a bug - and it should throw a ValueError("c not in categories")
Tested with Pandas 0.25.3 and 1.0.3 on Python 3.6.9.
I tried in a fresh venv:
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit : None
python : 3.6.9.final.0
python-bits : 64
OS : Linux
OS-release : 4.15.0-96-generic
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : de_DE.UTF-8
LOCALE : de_DE.UTF-8
pandas : 1.0.3
numpy : 1.18.3
pytz : 2019.3
dateutil : 2.8.1
pip : 9.0.1
setuptools : 39.0.1
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : 0.999999999
pymysql : None
psycopg2 : None
jinja2 : None
IPython : None
pandas_datareader: None
bs4 : None
bottleneck : None
fastparquet : None
gcsfs : None
lxml.etree : None
matplotlib : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pytables : None
pytest : None
pyxlsb : None
s3fs : None
scipy : None
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
xlsxwriter : 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/33696/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33696/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/33697
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33697/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33697/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33697/events
|
https://github.com/pandas-dev/pandas/pull/33697
| 603,944,814
|
MDExOlB1bGxSZXF1ZXN0NDA2NjMwOTk4
| 33,697
|
fix bug of overflow validaion in 'reshape'
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/49483542?v=4",
"events_url": "https://api.github.com/users/chjinche/events{/privacy}",
"followers_url": "https://api.github.com/users/chjinche/followers",
"following_url": "https://api.github.com/users/chjinche/following{/other_user}",
"gists_url": "https://api.github.com/users/chjinche/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/chjinche",
"id": 49483542,
"login": "chjinche",
"node_id": "MDQ6VXNlcjQ5NDgzNTQy",
"organizations_url": "https://api.github.com/users/chjinche/orgs",
"received_events_url": "https://api.github.com/users/chjinche/received_events",
"repos_url": "https://api.github.com/users/chjinche/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/chjinche/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/chjinche/subscriptions",
"type": "User",
"url": "https://api.github.com/users/chjinche"
}
|
[
{
"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": "006b75",
"default": false,
"description": "Arithmetic, Comparison, and Logical operations",
"id": 47223669,
"name": "Numeric Operations",
"node_id": "MDU6TGFiZWw0NzIyMzY2OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Numeric%20Operations"
}
] |
closed
| false
| null |
[] | null | 3
| 2020-04-21T12:05:23Z
| 2020-05-22T11:03:07Z
| 2020-05-22T11:03:07Z
|
NONE
| null |
- [x] closes #26314
- [ ] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] 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/33697/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33697/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/33697.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/33697",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/33697.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/33697"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33698
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33698/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33698/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33698/events
|
https://github.com/pandas-dev/pandas/issues/33698
| 603,969,199
|
MDU6SXNzdWU2MDM5NjkxOTk=
| 33,698
|
BUG: Incorrect dtypes after resetting a multi-index for a data frame with no rows
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/9409000?v=4",
"events_url": "https://api.github.com/users/pkarol/events{/privacy}",
"followers_url": "https://api.github.com/users/pkarol/followers",
"following_url": "https://api.github.com/users/pkarol/following{/other_user}",
"gists_url": "https://api.github.com/users/pkarol/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/pkarol",
"id": 9409000,
"login": "pkarol",
"node_id": "MDQ6VXNlcjk0MDkwMDA=",
"organizations_url": "https://api.github.com/users/pkarol/orgs",
"received_events_url": "https://api.github.com/users/pkarol/received_events",
"repos_url": "https://api.github.com/users/pkarol/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/pkarol/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/pkarol/subscriptions",
"type": "User",
"url": "https://api.github.com/users/pkarol"
}
|
[
{
"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 |
[] | null | 3
| 2020-04-21T12:45:22Z
| 2020-08-21T17:06:03Z
| 2020-04-21T18:47:04Z
|
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
>>> df = pd.DataFrame({'a': [1], 'b': [pd.Timestamp('2020-04-21')]})
>>> df = df[df['a'] == 0]
>>> df
Empty DataFrame
Columns: [a, b]
Index: []
>>> df['time'] = pd.Timestamp.now()
>>> df['index'] = 0
>>> df
Empty DataFrame
Columns: [a, b, time, index]
Index: []
>>> df.dtypes
a int64
b datetime64[ns]
time datetime64[ns]
index int64
dtype: object
>>> df = df.set_index(['time', 'index'])
>>> df.dtypes
a int64
b datetime64[ns]
dtype: object
>>> df.index.get_level_values(0)
DatetimeIndex([], dtype='datetime64[ns]', name='time', freq=None)
>>> df.index.get_level_values(1)
Int64Index([], dtype='int64', name='index')
>>> df.reset_index().dtypes
time float64
index float64
a int64
b datetime64[ns]
dtype: object
```
#### Problem description
The dtypes on a data frame multi-index with no rows are lost when the index is reset. As you can see from the above sample, setting the index preserves the correct dtypes in the multi-index levels. When the index is reset, the dtypes become `float64`. Instead, I would expect the dtypes for `time` and `index` to be `datetime64[ns]` and `int64` when the index is reset.
Note: The behavior is correct when there is at least one row in the data frame and this bug only occurs when the data frame has no rows.
#### Expected Output
```python
time datetime64[ns]
index int64
a int64
b datetime64[ns]
dtype: object
```
#### Output of ``pd.show_versions()``
<details>
```
INSTALLED VERSIONS
------------------
commit : None
python : 3.6.10.final.0
python-bits : 64
OS : Linux
OS-release : 5.0.0-29-generic
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : C.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.0.3
numpy : 1.16.2
pytz : 2019.3
dateutil : 2.8.1
pip : None
setuptools : 46.1.3.post20200325
Cython : None
pytest : 5.4.1
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : None
IPython : None
pandas_datareader: None
bs4 : None
bottleneck : None
fastparquet : None
gcsfs : None
lxml.etree : None
matplotlib : 3.2.1
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : 0.16.0
pytables : None
pytest : 5.4.1
pyxlsb : None
s3fs : None
scipy : 1.2.1
sqlalchemy : 1.3.15
tables : None
tabulate : None
xarray : 0.14.1
xlrd : 1.2.0
xlwt : None
xlsxwriter : None
numba : 0.48.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/33698/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33698/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/33699
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33699/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33699/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33699/events
|
https://github.com/pandas-dev/pandas/issues/33699
| 603,992,826
|
MDU6SXNzdWU2MDM5OTI4MjY=
| 33,699
|
BUG: read_csv with both names and parse_date raises 'NoneType' TypeError
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/302587?v=4",
"events_url": "https://api.github.com/users/quazgar/events{/privacy}",
"followers_url": "https://api.github.com/users/quazgar/followers",
"following_url": "https://api.github.com/users/quazgar/following{/other_user}",
"gists_url": "https://api.github.com/users/quazgar/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/quazgar",
"id": 302587,
"login": "quazgar",
"node_id": "MDQ6VXNlcjMwMjU4Nw==",
"organizations_url": "https://api.github.com/users/quazgar/orgs",
"received_events_url": "https://api.github.com/users/quazgar/received_events",
"repos_url": "https://api.github.com/users/quazgar/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/quazgar/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/quazgar/subscriptions",
"type": "User",
"url": "https://api.github.com/users/quazgar"
}
|
[
{
"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_csv, to_csv",
"id": 47229171,
"name": "IO CSV",
"node_id": "MDU6TGFiZWw0NzIyOTE3MQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20CSV"
}
] |
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
| 2020-04-21T13:20:34Z
| 2020-12-12T23:03:53Z
| 2020-12-12T23:03:53Z
|
NONE
| null |
This is probably similar to #14792, but still happens with 0.23.3 (a friend even tested it with 1.0.3).
## Testcase ##
```python
import io
s = """A,B,\n1,2"""
pd.read_csv(io.StringIO(s), parse_dates=["B"], names=["B"])
```
raises:
```
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-146-082b3d7afa0a> in <module>()
1 import io
2 s = """A,B,\n1,2"""
----> 3 pd.read_csv(io.StringIO(s), parse_dates=["B"], names=["B"])
/usr/lib/python3/dist-packages/pandas/io/parsers.py in parser_f(filepath_or_buffer, sep, delimiter, header, names, index_col, usecols, squeeze, prefix, mangle_dupe_cols, dtype, engine, converters, true_values, false_values, skipinitialspace, skiprows, nrows, na_values, keep_default_na, na_filter, verbose, skip_blank_lines, parse_dates, infer_datetime_format, keep_date_col, date_parser, dayfirst, iterator, chunksize, compression, thousands, decimal, lineterminator, quotechar, quoting, escapechar, comment, encoding, dialect, tupleize_cols, error_bad_lines, warn_bad_lines, skipfooter, doublequote, delim_whitespace, low_memory, memory_map, float_precision)
676 skip_blank_lines=skip_blank_lines)
677
--> 678 return _read(filepath_or_buffer, kwds)
679
680 parser_f.__name__ = name
/usr/lib/python3/dist-packages/pandas/io/parsers.py in _read(filepath_or_buffer, kwds)
444
445 try:
--> 446 data = parser.read(nrows)
447 finally:
448 parser.close()
/usr/lib/python3/dist-packages/pandas/io/parsers.py in read(self, nrows)
1034 raise ValueError('skipfooter not supported for iteration')
1035
-> 1036 ret = self._engine.read(nrows)
1037
1038 # May alter columns / col_dict
/usr/lib/python3/dist-packages/pandas/io/parsers.py in read(self, nrows)
1887
1888 values = self._maybe_parse_dates(values, i,
-> 1889 try_parse_dates=True)
1890 arrays.append(values)
1891
/usr/lib/python3/dist-packages/pandas/io/parsers.py in _maybe_parse_dates(self, values, index, try_parse_dates)
1946
1947 def _maybe_parse_dates(self, values, index, try_parse_dates=True):
-> 1948 if try_parse_dates and self._should_parse_dates(index):
1949 values = self._date_conv(values)
1950 return values
/usr/lib/python3/dist-packages/pandas/io/parsers.py in _should_parse_dates(self, i)
1319 else:
1320 name = None
-> 1321 j = self.index_col[i]
1322
1323 if is_scalar(self.parse_dates):
TypeError: 'NoneType' object is not subscriptable
```
## Notes ##
This does not happen with `engine="python"` (you only get a ParseError there).
|
{
"+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/33699/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33699/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/33700
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33700/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33700/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33700/events
|
https://github.com/pandas-dev/pandas/issues/33700
| 603,997,850
|
MDU6SXNzdWU2MDM5OTc4NTA=
| 33,700
|
ENH: Integrate pdpipe into pandas
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/22045779?v=4",
"events_url": "https://api.github.com/users/marctorsoc/events{/privacy}",
"followers_url": "https://api.github.com/users/marctorsoc/followers",
"following_url": "https://api.github.com/users/marctorsoc/following{/other_user}",
"gists_url": "https://api.github.com/users/marctorsoc/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/marctorsoc",
"id": 22045779,
"login": "marctorsoc",
"node_id": "MDQ6VXNlcjIyMDQ1Nzc5",
"organizations_url": "https://api.github.com/users/marctorsoc/orgs",
"received_events_url": "https://api.github.com/users/marctorsoc/received_events",
"repos_url": "https://api.github.com/users/marctorsoc/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/marctorsoc/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/marctorsoc/subscriptions",
"type": "User",
"url": "https://api.github.com/users/marctorsoc"
}
|
[
{
"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"
}
| 3
| 2020-04-21T13:27:33Z
| 2020-04-22T01:57:48Z
| 2020-04-22T01:57:42Z
|
NONE
| null |
### Is your feature request related to a problem?
I wish I could create pipelines in pandas, the way I do for sklearn. This seems to be feasible using pdpipe https://pdpipe.github.io/pdpipe/, so I wonder why that is not directly available in pandas
### Describe the solution you'd like
I'd like being able to write stuff like:
```
>>> pipeline = pdp.PdPipeline([drop_name, binar_label, map_job])
>>> print(pipeline)
A pdpipe pipeline:
[ 0] Drop column Name
[ 1] OneHotEncode Label
[ 2] Map values of column Job with {'Part': True, 'Full': True, 'No': False}.
```
and
```
pipeline += pdp.PdPipeline([pdp.ColRename({"Job": "Employed"})])
```
but directly with pandas stuff
### API breaking implications
I'm not sure about this, tbh
### Describe alternatives you've considered
Just use the library xD
|
{
"+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/33700/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33700/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/33701
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33701/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33701/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33701/events
|
https://github.com/pandas-dev/pandas/issues/33701
| 604,025,094
|
MDU6SXNzdWU2MDQwMjUwOTQ=
| 33,701
|
BUG: Multiplying large Series by <NA> gives "unknown type object"
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/15216687?v=4",
"events_url": "https://api.github.com/users/maresb/events{/privacy}",
"followers_url": "https://api.github.com/users/maresb/followers",
"following_url": "https://api.github.com/users/maresb/following{/other_user}",
"gists_url": "https://api.github.com/users/maresb/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/maresb",
"id": 15216687,
"login": "maresb",
"node_id": "MDQ6VXNlcjE1MjE2Njg3",
"organizations_url": "https://api.github.com/users/maresb/orgs",
"received_events_url": "https://api.github.com/users/maresb/received_events",
"repos_url": "https://api.github.com/users/maresb/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/maresb/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/maresb/subscriptions",
"type": "User",
"url": "https://api.github.com/users/maresb"
}
|
[
{
"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"
},
{
"color": "cdea3c",
"default": false,
"description": "Unit test(s) needed to prevent regressions",
"id": 986278782,
"name": "Needs Tests",
"node_id": "MDU6TGFiZWw5ODYyNzg3ODI=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Needs%20Tests"
},
{
"color": "8cc645",
"default": false,
"description": "Related to pd.NA and nullable extension arrays",
"id": 1817503692,
"name": "NA - MaskedArrays",
"node_id": "MDU6TGFiZWwxODE3NTAzNjky",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/NA%20-%20MaskedArrays"
}
] |
open
| false
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/221446?v=4",
"events_url": "https://api.github.com/users/igordsm/events{/privacy}",
"followers_url": "https://api.github.com/users/igordsm/followers",
"following_url": "https://api.github.com/users/igordsm/following{/other_user}",
"gists_url": "https://api.github.com/users/igordsm/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/igordsm",
"id": 221446,
"login": "igordsm",
"node_id": "MDQ6VXNlcjIyMTQ0Ng==",
"organizations_url": "https://api.github.com/users/igordsm/orgs",
"received_events_url": "https://api.github.com/users/igordsm/received_events",
"repos_url": "https://api.github.com/users/igordsm/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/igordsm/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/igordsm/subscriptions",
"type": "User",
"url": "https://api.github.com/users/igordsm"
}
|
[
{
"avatar_url": "https://avatars.githubusercontent.com/u/221446?v=4",
"events_url": "https://api.github.com/users/igordsm/events{/privacy}",
"followers_url": "https://api.github.com/users/igordsm/followers",
"following_url": "https://api.github.com/users/igordsm/following{/other_user}",
"gists_url": "https://api.github.com/users/igordsm/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/igordsm",
"id": 221446,
"login": "igordsm",
"node_id": "MDQ6VXNlcjIyMTQ0Ng==",
"organizations_url": "https://api.github.com/users/igordsm/orgs",
"received_events_url": "https://api.github.com/users/igordsm/received_events",
"repos_url": "https://api.github.com/users/igordsm/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/igordsm/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/igordsm/subscriptions",
"type": "User",
"url": "https://api.github.com/users/igordsm"
}
] | null | 3
| 2020-04-21T14:04:05Z
| 2021-10-21T00:09: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.
- [ ] (optional) I have confirmed this bug exists on the master branch of pandas.
---
In short, with Pandas 1.0.3 on Python 3.7.6, when I multiply `<NA>` (the Int64 null type) by a Series with length over 10,000, I get `ValueError: unknown type object`. Things work as expected when the length is less than or equal to 10,000.
#### Code Sample, a copy-pastable example
```python
import numpy as np
import pandas as pd
%xmode Verbose
print(pd.__version__)
Int64NA = pd.Series([np.nan], dtype=pd.Int64Dtype()).iloc[0]
Int64NA * pd.Series(np.zeros(10001))
```
#### Actual output
```python
$ ipython
Python 3.7.6 | packaged by conda-forge | (default, Mar 5 2020, 15:27:18)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.13.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: import numpy as np
...: import pandas as pd
...: %xmode Verbose
...: print(pd.__version__)
...: Int64NA = pd.Series([np.nan], dtype=pd.Int64Dtype()).iloc[0]
...: Int64NA * pd.Series(np.zeros(10001))
Exception reporting mode: Verbose
1.0.3
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-1-e9964dfd52e1> in <module>
4 print(pd.__version__)
5 Int64NA = pd.Series([np.nan], dtype=pd.Int64Dtype()).iloc[0]
----> 6 Int64NA * pd.Series(np.zeros(10001))
global Int64NA = <NA>
global pd.Series = <class 'pandas.core.series.Series'>
global np.zeros = <built-in function zeros>
/opt/conda/lib/python3.7/site-packages/pandas/core/ops/common.py in new_method(self=0 0.0
1 0.0
2 0.0
3 ... 0.0
10000 0.0
Length: 10001, dtype: float64, other=<NA>)
62 other = item_from_zerodim(other)
63
---> 64 return method(self, other)
global method = undefined
self = 0 0.0
1 0.0
2 0.0
3 0.0
4 0.0
...
9996 0.0
9997 0.0
9998 0.0
9999 0.0
10000 0.0
Length: 10001, dtype: float64
other = <NA>
65
66 return new_method
/opt/conda/lib/python3.7/site-packages/pandas/core/ops/__init__.py in wrapper(left=0 0.0
1 0.0
2 0.0
3 ... 0.0
10000 0.0
Length: 10001, dtype: float64, right=<NA>)
501 lvalues = extract_array(left, extract_numpy=True)
502 rvalues = extract_array(right, extract_numpy=True)
--> 503 result = arithmetic_op(lvalues, rvalues, op, str_rep)
result = undefined
global arithmetic_op = <function arithmetic_op at 0x7f9e94b2e9e0>
lvalues = array([0., 0., 0., ..., 0., 0., 0.])
rvalues = <NA>
global op = undefined
global str_rep = undefined
504
505 return _construct_result(left, result, index=left.index, name=res_name)
/opt/conda/lib/python3.7/site-packages/pandas/core/ops/array_ops.py in arithmetic_op(left=array([0., 0., 0., ..., 0., 0., 0.]), right=<NA>, op=<function rmul>, str_rep='*')
195 else:
196 with np.errstate(all="ignore"):
--> 197 res_values = na_arithmetic_op(lvalues, rvalues, op, str_rep)
res_values = undefined
global na_arithmetic_op = <function na_arithmetic_op at 0x7f9e94b2e950>
lvalues = array([0., 0., 0., ..., 0., 0., 0.])
rvalues = <NA>
op = <function rmul at 0x7f9e94b29b00>
str_rep = '*'
198
199 return res_values
/opt/conda/lib/python3.7/site-packages/pandas/core/ops/array_ops.py in na_arithmetic_op(left=array([0., 0., 0., ..., 0., 0., 0.]), right=<NA>, op=<function rmul>, str_rep='*')
147
148 try:
--> 149 result = expressions.evaluate(op, str_rep, left, right)
result = undefined
expressions.evaluate = <function evaluate at 0x7f9e938b8320>
op = <function rmul at 0x7f9e94b29b00>
str_rep = '*'
left = array([0., 0., 0., ..., 0., 0., 0.])
right = <NA>
150 except TypeError:
151 result = masked_arith_op(left, right, op)
/opt/conda/lib/python3.7/site-packages/pandas/core/computation/expressions.py in evaluate(op=<function rmul>, op_str='*', a=array([0., 0., 0., ..., 0., 0., 0.]), b=<NA>, use_numexpr=True)
206 use_numexpr = use_numexpr and _bool_arith_check(op_str, a, b)
207 if use_numexpr:
--> 208 return _evaluate(op, op_str, a, b)
global _evaluate = <function _evaluate_numexpr at 0x7f9e938a1710>
op = <function rmul at 0x7f9e94b29b00>
op_str = '*'
a = array([0., 0., 0., ..., 0., 0., 0.])
b = <NA>
209 return _evaluate_standard(op, op_str, a, b)
210
/opt/conda/lib/python3.7/site-packages/pandas/core/computation/expressions.py in _evaluate_numexpr(op=<function rmul>, op_str='*', a=<NA>, b=array([0., 0., 0., ..., 0., 0., 0.]))
112 f"a_value {op_str} b_value",
113 local_dict={"a_value": a_value, "b_value": b_value},
--> 114 casting="safe",
global casting = undefined
115 )
116
/opt/conda/lib/python3.7/site-packages/numexpr/necompiler.py in evaluate(ex='a_value * b_value', local_dict={'a_value': <NA>, 'b_value': array([0., 0., 0., ..., 0., 0., 0.])}, global_dict=None, out=None, order='K', casting='safe', **kwargs={})
820 # Create a signature
821 signature = [(name, getType(arg)) for (name, arg) in
--> 822 zip(names, arguments)]
global zip = undefined
names = ['a_value', 'b_value']
arguments = [array(<NA>, dtype=object), array([0., 0., 0., ..., 0., 0., 0.])]
823
824 # Look up numexpr if possible.
/opt/conda/lib/python3.7/site-packages/numexpr/necompiler.py in <listcomp>(.0=<zip object>)
819
820 # Create a signature
--> 821 signature = [(name, getType(arg)) for (name, arg) in
global signature = undefined
name = 'a_value'
global getType = <function getType at 0x7f9e938b2ef0>
arg = array(<NA>, dtype=object)
global zip = undefined
global names = undefined
global arguments = undefined
822 zip(names, arguments)]
823
/opt/conda/lib/python3.7/site-packages/numexpr/necompiler.py in getType(a=array(<NA>, dtype=object))
701 if kind == 'S':
702 return bytes
--> 703 raise ValueError("unknown type %s" % a.dtype.name)
global ValueError = undefined
a.dtype.name = 'object'
704
705
ValueError: unknown type object
```
#### Problem description
I do not expect to see different behavior depending on whether or not the length of the data is greater than 10000.
#### Expected Output
```
0 <NA>
1 <NA>
2 <NA>
3 <NA>
4 <NA>
...
9995 <NA>
9996 <NA>
9997 <NA>
9998 <NA>
9999 <NA>
10000 <NA>
Length: 10001, dtype: object
```
#### Output of ``pd.show_versions()``
<details>
In [2]: pd.show_versions()
INSTALLED VERSIONS
------------------
commit : None
python : 3.7.6.final.0
python-bits : 64
OS : Linux
OS-release : 4.15.0-1065-aws
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : de_DE.UTF-8
LANG : de_DE.UTF-8
LOCALE : de_DE.UTF-8
pandas : 1.0.3
numpy : 1.18.1
pytz : 2019.3
dateutil : 2.8.1
pip : 20.0.2
setuptools : 46.0.0.post20200311
Cython : 0.29.15
pytest : 5.4.1
hypothesis : None
sphinx : 3.0.1
blosc : None
feather : None
xlsxwriter : None
lxml.etree : 4.5.0
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 2.11.1
IPython : 7.13.0
pandas_datareader: None
bs4 : 4.8.2
bottleneck : None
fastparquet : None
gcsfs : None
lxml.etree : 4.5.0
matplotlib : 3.1.3
numexpr : 2.7.1
odfpy : None
openpyxl : 3.0.3
pandas_gbq : None
pyarrow : None
pytables : None
pytest : 5.4.1
pyxlsb : None
s3fs : None
scipy : 1.4.1
sqlalchemy : 1.3.15
tables : None
tabulate : None
xarray : 0.15.1
xlrd : 1.2.0
xlwt : None
xlsxwriter : None
numba : 0.48.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/33701/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33701/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/33702
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33702/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33702/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33702/events
|
https://github.com/pandas-dev/pandas/issues/33702
| 604,082,640
|
MDU6SXNzdWU2MDQwODI2NDA=
| 33,702
|
ENH: Allow selection of reference values in get_dummies
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/16674375?v=4",
"events_url": "https://api.github.com/users/telferm57/events{/privacy}",
"followers_url": "https://api.github.com/users/telferm57/followers",
"following_url": "https://api.github.com/users/telferm57/following{/other_user}",
"gists_url": "https://api.github.com/users/telferm57/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/telferm57",
"id": 16674375,
"login": "telferm57",
"node_id": "MDQ6VXNlcjE2Njc0Mzc1",
"organizations_url": "https://api.github.com/users/telferm57/orgs",
"received_events_url": "https://api.github.com/users/telferm57/received_events",
"repos_url": "https://api.github.com/users/telferm57/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/telferm57/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/telferm57/subscriptions",
"type": "User",
"url": "https://api.github.com/users/telferm57"
}
|
[
{
"color": "4E9A06",
"default": false,
"description": null,
"id": 76812,
"name": "Enhancement",
"node_id": "MDU6TGFiZWw3NjgxMg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Enhancement"
}
] |
open
| false
| null |
[] | null | 5
| 2020-04-21T15:19:46Z
| 2020-09-03T01:47:07Z
| null |
CONTRIBUTOR
| null |
When one-hot encoding a pandas categorical column, with drop_first = True, there is no control over which value is dropped. So if I need to specify the reference value to drop, I can't use drop_first. I have to manually drop the columns that have been unnecessarily created.
I would like to enhance the get_dummies method to be able to specify for each column in 'columns' a reference value to be used as the dropped column. For example:
```python
df = pd.DataFrame(data={'ageband': np.random.choice(range(20,80,10),100),
'country':np.random.choice(['uk', 'nl', 'be', 'fr'],100)}).astype('category')
ref_values = {'ageband': '40', 'country':'be'}
df_encoded = pd.get_dummies(df, columns=['ageband', 'country'], ref_values= ref_values)
```
for each categorical column specified in the new ref_values parameter:
if value does exists, use that as the reference value
if value does not exist, proceed with normal behaviour - i.e. drop the (lexical) first (or ignore with warning?)
I don't think there are any API breaking implications?
The achieve this now, without the enhancement, I have to do something like :
```python
df = pd.DataFrame(data={'ageband': np.random.choice(range(20,80,10),100),
'country':np.random.choice(['uk', 'nl', 'be', 'fr'],100)}).astype('category')
prefix_sep = ':' # say
df = pd.get_dummies(df, columns=['ageband', 'country'], prefix_sep=prefix_sep)
ref_values = {'ageband': 40, 'country': 'be'}
columns_to_drop = [ col + prefix_sep + str(val) for col, val in ref_values.items()]
df.drop(columns=columns_to_drop, inplace=True, errors='ignore')
# additional code would be required to handle errors such as reference value not present
```
I am willing to have a go at this if it is accepted as an enhancement
|
{
"+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/33702/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33702/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/33703
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33703/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33703/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33703/events
|
https://github.com/pandas-dev/pandas/pull/33703
| 604,089,202
|
MDExOlB1bGxSZXF1ZXN0NDA2NzQ4Nzkw
| 33,703
|
BUG: DTI/TDI.insert doing invalid casting
|
{
"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": "2020-07-28T18:13:47Z",
"closed_issues": 2378,
"created_at": "2019-12-02T12:52:48Z",
"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": "2020-08-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/68",
"id": 4894670,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68/labels",
"node_id": "MDk6TWlsZXN0b25lNDg5NDY3MA==",
"number": 68,
"open_issues": 0,
"state": "closed",
"title": "1.1",
"updated_at": "2021-07-17T17:25:28Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68"
}
| 3
| 2020-04-21T15:28:51Z
| 2020-04-26T00:32:44Z
| 2020-04-25T23:54:30Z
|
MEMBER
| null |
- [ ] closes #xxxx
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] 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/33703/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33703/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/33703.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/33703",
"merged_at": "2020-04-25T23:54:30Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/33703.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/33703"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33704
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33704/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33704/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33704/events
|
https://github.com/pandas-dev/pandas/issues/33704
| 604,137,951
|
MDU6SXNzdWU2MDQxMzc5NTE=
| 33,704
|
BUG: min/max of empty datetime dataframe raises
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/7279321?v=4",
"events_url": "https://api.github.com/users/adbull/events{/privacy}",
"followers_url": "https://api.github.com/users/adbull/followers",
"following_url": "https://api.github.com/users/adbull/following{/other_user}",
"gists_url": "https://api.github.com/users/adbull/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/adbull",
"id": 7279321,
"login": "adbull",
"node_id": "MDQ6VXNlcjcyNzkzMjE=",
"organizations_url": "https://api.github.com/users/adbull/orgs",
"received_events_url": "https://api.github.com/users/adbull/received_events",
"repos_url": "https://api.github.com/users/adbull/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/adbull/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/adbull/subscriptions",
"type": "User",
"url": "https://api.github.com/users/adbull"
}
|
[
{
"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": "2020-07-28T18:13:47Z",
"closed_issues": 2378,
"created_at": "2019-12-02T12:52:48Z",
"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": "2020-08-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/68",
"id": 4894670,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68/labels",
"node_id": "MDk6TWlsZXN0b25lNDg5NDY3MA==",
"number": 68,
"open_issues": 0,
"state": "closed",
"title": "1.1",
"updated_at": "2021-07-17T17:25:28Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68"
}
| 1
| 2020-04-21T17:02:58Z
| 2020-08-21T17:06:03Z
| 2020-05-09T20:01:02Z
|
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
```python
import pandas as pd
df = pd.DataFrame(dict(x=pd.to_datetime([])))
df.max()
```
```python-traceback
Traceback (most recent call last):
File "<ipython-input-17-be9940feb663>", line 1, in <module>
df.max()
File "pandas/core/generic.py", line 11215, in stat_func
f, name, axis=axis, skipna=skipna, numeric_only=numeric_only
File "pandas/core/frame.py", line 7907, in _reduce
result = f(values)
File "pandas/core/frame.py", line 7865, in f
return op(x, axis=axis, skipna=skipna, **kwds)
File "pandas/core/nanops.py", line 109, in f
return _na_for_min_count(values, axis)
File "pandas/core/nanops.py", line 392, in _na_for_min_count
result.fill(fill_value)
ValueError: cannot convert float NaN to integer
```
#### Problem description
When taking the min/max of an empty datetime dataframe, a ValueError is raised. This is surprising, and inconsistent with the case of an empty datetime series, where min/max return NaT.
#### Expected Output
```python
x NaT
dtype: datetime64[ns]
```
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit : None
python : 3.7.7.final.0
python-bits : 64
OS : Linux
OS-release : 4.20.11-100.fc28.x86_64
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_GB.UTF-8
LOCALE : en_GB.UTF-8
pandas : 1.0.3
numpy : 1.18.1
pytz : 2019.3
dateutil : 2.8.1
pip : 20.0.2
setuptools : 46.1.3.post20200330
Cython : 0.29.15
pytest : 5.4.1
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : 4.5.0
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 2.11.1
IPython : 7.13.0
pandas_datareader: None
bs4 : 4.9.0
bottleneck : 1.3.2
fastparquet : None
gcsfs : None
lxml.etree : 4.5.0
matplotlib : 3.1.3
numexpr : 2.7.1
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : 0.15.1
pytables : None
pytest : 5.4.1
pyxlsb : None
s3fs : None
scipy : 1.2.1
sqlalchemy : 1.3.16
tables : 3.6.1
tabulate : None
xarray : None
xlrd : None
xlwt : None
xlsxwriter : 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/33704/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33704/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/33705
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33705/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33705/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33705/events
|
https://github.com/pandas-dev/pandas/pull/33705
| 604,216,859
|
MDExOlB1bGxSZXF1ZXN0NDA2ODUyMTEz
| 33,705
|
TYP: remove #type:ignore from core.arrays.datetimelike
|
{
"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": "2020-07-28T18:13:47Z",
"closed_issues": 2378,
"created_at": "2019-12-02T12:52:48Z",
"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": "2020-08-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/68",
"id": 4894670,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68/labels",
"node_id": "MDk6TWlsZXN0b25lNDg5NDY3MA==",
"number": 68,
"open_issues": 0,
"state": "closed",
"title": "1.1",
"updated_at": "2021-07-17T17:25:28Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68"
}
| 2
| 2020-04-21T19:08:34Z
| 2020-04-22T11:27:32Z
| 2020-04-22T03:31:11Z
|
MEMBER
| null |
pandas\core\arrays\datetimelike.py:1535: error: Signatures of "__iadd__" and "__add__" are incompatible
pandas\core\arrays\datetimelike.py:1544: error: Signatures of "__isub__" and "__sub__" are incompatible
|
{
"+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/33705/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33705/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/33705.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/33705",
"merged_at": "2020-04-22T03:31:11Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/33705.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/33705"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33706
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33706/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33706/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33706/events
|
https://github.com/pandas-dev/pandas/pull/33706
| 604,219,835
|
MDExOlB1bGxSZXF1ZXN0NDA2ODU0NTU3
| 33,706
|
TYP: remove #type: ignore for pd.array constructor
|
{
"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": "2020-07-28T18:13:47Z",
"closed_issues": 2378,
"created_at": "2019-12-02T12:52:48Z",
"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": "2020-08-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/68",
"id": 4894670,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68/labels",
"node_id": "MDk6TWlsZXN0b25lNDg5NDY3MA==",
"number": 68,
"open_issues": 0,
"state": "closed",
"title": "1.1",
"updated_at": "2021-07-17T17:25:28Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68"
}
| 2
| 2020-04-21T19:13:24Z
| 2020-04-27T07:29:24Z
| 2020-04-26T21:25:51Z
|
MEMBER
| null |
pandas\core\arrays\categorical.py:481: error: Argument 1 to "array" has incompatible type "Categorical"; expected "Sequence[object]"
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/33706/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33706/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/33706.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/33706",
"merged_at": "2020-04-26T21:25:51Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/33706.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/33706"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33707
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33707/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33707/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33707/events
|
https://github.com/pandas-dev/pandas/issues/33707
| 604,231,614
|
MDU6SXNzdWU2MDQyMzE2MTQ=
| 33,707
|
plot.pie() autopct shows 0.00 for 0/None data
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/4060824?v=4",
"events_url": "https://api.github.com/users/Filip98/events{/privacy}",
"followers_url": "https://api.github.com/users/Filip98/followers",
"following_url": "https://api.github.com/users/Filip98/following{/other_user}",
"gists_url": "https://api.github.com/users/Filip98/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Filip98",
"id": 4060824,
"login": "Filip98",
"node_id": "MDQ6VXNlcjQwNjA4MjQ=",
"organizations_url": "https://api.github.com/users/Filip98/orgs",
"received_events_url": "https://api.github.com/users/Filip98/received_events",
"repos_url": "https://api.github.com/users/Filip98/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Filip98/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Filip98/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Filip98"
}
|
[
{
"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": "8AE234",
"default": false,
"description": null,
"id": 2413328,
"name": "Visualization",
"node_id": "MDU6TGFiZWwyNDEzMzI4",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Visualization"
},
{
"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 | 2
| 2020-04-21T19:32:24Z
| 2021-07-31T04:32:48Z
| null |
NONE
| null |
Not sure should I report this upstream to matplotlib to be honest but
The label correctly does not appear but the percent does,
```
percents = pd.Series(
data = [
0, # the same for None
10
],
index = [
'nothing',
'label'
],
name = 'plot'
)
percents.plot.pie(autopct = '%.2f')
```
Output:

|
{
"+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/33707/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33707/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/33708
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33708/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33708/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33708/events
|
https://github.com/pandas-dev/pandas/issues/33708
| 604,247,725
|
MDU6SXNzdWU2MDQyNDc3MjU=
| 33,708
|
ENH: to_datetime missing year/other data arg
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/4060824?v=4",
"events_url": "https://api.github.com/users/Filip98/events{/privacy}",
"followers_url": "https://api.github.com/users/Filip98/followers",
"following_url": "https://api.github.com/users/Filip98/following{/other_user}",
"gists_url": "https://api.github.com/users/Filip98/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Filip98",
"id": 4060824,
"login": "Filip98",
"node_id": "MDQ6VXNlcjQwNjA4MjQ=",
"organizations_url": "https://api.github.com/users/Filip98/orgs",
"received_events_url": "https://api.github.com/users/Filip98/received_events",
"repos_url": "https://api.github.com/users/Filip98/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Filip98/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Filip98/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Filip98"
}
|
[
{
"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": "Clarification about behavior needed to assess issue",
"id": 307649777,
"name": "Needs Info",
"node_id": "MDU6TGFiZWwzMDc2NDk3Nzc=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Needs%20Info"
}
] |
closed
| false
| null |
[] | null | 4
| 2020-04-21T19:59:29Z
| 2020-04-23T04:49:48Z
| 2020-04-23T04:49:47Z
|
NONE
| null |
It seems that to_datetime assumes the year is 1970 if I do
`df['date'] = pd.to_datetime(df['date'])`
To a series in a day/month (no year) format but this bothered me so I did this:
`df['date'] = df['date'].apply(lambda row: pd.to_datetime(row + '/2017', format = '%d/%m/%Y'))`
But an arg would make this neater, I suppose
|
{
"+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/33708/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33708/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/33709
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33709/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33709/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33709/events
|
https://github.com/pandas-dev/pandas/pull/33709
| 604,250,165
|
MDExOlB1bGxSZXF1ZXN0NDA2ODc5NDIy
| 33,709
|
DOC: Improve to_parquet documentation
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/928489?v=4",
"events_url": "https://api.github.com/users/larroy/events{/privacy}",
"followers_url": "https://api.github.com/users/larroy/followers",
"following_url": "https://api.github.com/users/larroy/following{/other_user}",
"gists_url": "https://api.github.com/users/larroy/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/larroy",
"id": 928489,
"login": "larroy",
"node_id": "MDQ6VXNlcjkyODQ4OQ==",
"organizations_url": "https://api.github.com/users/larroy/orgs",
"received_events_url": "https://api.github.com/users/larroy/received_events",
"repos_url": "https://api.github.com/users/larroy/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/larroy/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/larroy/subscriptions",
"type": "User",
"url": "https://api.github.com/users/larroy"
}
|
[
{
"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": "2020-07-28T18:13:47Z",
"closed_issues": 2378,
"created_at": "2019-12-02T12:52:48Z",
"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": "2020-08-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/68",
"id": 4894670,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68/labels",
"node_id": "MDk6TWlsZXN0b25lNDg5NDY3MA==",
"number": 68,
"open_issues": 0,
"state": "closed",
"title": "1.1",
"updated_at": "2021-07-17T17:25:28Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68"
}
| 7
| 2020-04-21T20:03:37Z
| 2020-06-01T20:05:15Z
| 2020-05-30T16:32:53Z
|
CONTRIBUTOR
| null |
fixes #29476
- [x] closes #xxxx
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry / NA
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/33709/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33709/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/33709.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/33709",
"merged_at": "2020-05-30T16:32:52Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/33709.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/33709"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33710
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33710/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33710/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33710/events
|
https://github.com/pandas-dev/pandas/issues/33710
| 604,254,146
|
MDU6SXNzdWU2MDQyNTQxNDY=
| 33,710
|
BUG: Inconsistent behavior of `DataFrame.clip` when using with `loc`
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/8741632?v=4",
"events_url": "https://api.github.com/users/narendramukherjee/events{/privacy}",
"followers_url": "https://api.github.com/users/narendramukherjee/followers",
"following_url": "https://api.github.com/users/narendramukherjee/following{/other_user}",
"gists_url": "https://api.github.com/users/narendramukherjee/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/narendramukherjee",
"id": 8741632,
"login": "narendramukherjee",
"node_id": "MDQ6VXNlcjg3NDE2MzI=",
"organizations_url": "https://api.github.com/users/narendramukherjee/orgs",
"received_events_url": "https://api.github.com/users/narendramukherjee/received_events",
"repos_url": "https://api.github.com/users/narendramukherjee/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/narendramukherjee/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/narendramukherjee/subscriptions",
"type": "User",
"url": "https://api.github.com/users/narendramukherjee"
}
|
[
{
"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": 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
| 2020-04-21T20:10:43Z
| 2020-04-21T21:14:47Z
| 2020-04-21T21:14:34Z
|
NONE
| null |
- [CHECKED] I have checked that this issue has not already been reported.
- [ EXISTS on v1.0.3] 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.
---
Pandas version:
```
In [9]: pd.__version__
Out[9]: '1.0.3'
```
`DataFrame` used through the example:
```
df = pd.DataFrame({"A":[-5, 8, 12, -9, 5, 3],
"B":[-1, -4, 6, 4, 11, 3],
"C":[11, 4, -8, 7, 3, -2]})
```
`DataFrame.clip` with `inplace=True` works fine when I run it on a single column pulled out with `loc`:
```
In [10]: df.loc[:, "C"].clip(lower=0, inplace=True)
In [11]: df
Out[11]:
A B C
0 -5 -1 11
1 8 -4 4
2 12 6 0
3 -9 4 7
4 5 11 3
5 3 3 0
```
But if I pull out more than 1 column, this fails:
```
In [12]: df.loc[:, ["A", "B"]].clip(lower=0, inplace=True)
In [13]: df
Out[13]:
A B C
0 -5 -1 11
1 8 -4 4
2 12 6 0
3 -9 4 7
4 5 11 3
5 3 3 0
```
So, `clip` doesn't work `inplace` when used on a dataframe subset with several columns (here pulled out with `loc`).
**Note:** `clip` does work `inplace` when used on the entire dataframe. Just when used on a subset with `loc`, it doesn't work.
```
In [15]: df.clip(lower=0, inplace=True)
In [16]: df
Out[16]:
A B C
0 0 0 11
1 8 0 4
2 12 6 0
3 0 4 7
4 5 11 3
5 3 3 0
```
#### Output of ``pd.show_versions()``
<details>
In [14]: pd.show_versions()
INSTALLED VERSIONS
------------------
commit : None
python : 3.8.2.final.0
python-bits : 64
OS : Linux
OS-release : 5.3.0-46-generic
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.0.3
numpy : 1.18.1
pytz : 2019.3
dateutil : 2.8.1
pip : 20.0.2
setuptools : 46.1.3.post20200330
Cython : 0.29.15
pytest : 5.4.1
hypothesis : 5.8.3
sphinx : 2.4.4
blosc : None
feather : None
xlsxwriter : 1.2.8
lxml.etree : 4.5.0
html5lib : 1.0.1
pymysql : None
psycopg2 : None
jinja2 : 2.11.1
IPython : 7.13.0
pandas_datareader: None
bs4 : 4.9.0
bottleneck : 1.3.2
fastparquet : None
gcsfs : None
lxml.etree : 4.5.0
matplotlib : 3.1.3
numexpr : 2.7.1
odfpy : None
openpyxl : 3.0.3
pandas_gbq : None
pyarrow : None
pytables : None
pytest : 5.4.1
pyxlsb : None
s3fs : None
scipy : 1.4.1
sqlalchemy : 1.3.16
tables : 3.6.1
tabulate : None
xarray : None
xlrd : 1.2.0
xlwt : 1.3.0
xlsxwriter : 1.2.8
numba : 0.49.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/33710/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33710/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/33711
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33711/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33711/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33711/events
|
https://github.com/pandas-dev/pandas/pull/33711
| 604,291,977
|
MDExOlB1bGxSZXF1ZXN0NDA2OTEzOTM3
| 33,711
|
TST: prepare for freq-checking in tests.io
|
{
"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": "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": "2020-07-28T18:13:47Z",
"closed_issues": 2378,
"created_at": "2019-12-02T12:52:48Z",
"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": "2020-08-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/68",
"id": 4894670,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68/labels",
"node_id": "MDk6TWlsZXN0b25lNDg5NDY3MA==",
"number": 68,
"open_issues": 0,
"state": "closed",
"title": "1.1",
"updated_at": "2021-07-17T17:25:28Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68"
}
| 1
| 2020-04-21T21:17:35Z
| 2020-04-24T23:24:31Z
| 2020-04-24T23:22:24Z
|
MEMBER
| null |
Working on making assert_index_equal check that `freq` attrs match. This ports the necessary test changes from tests.io.
|
{
"+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/33711/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33711/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/33711.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/33711",
"merged_at": "2020-04-24T23:22:24Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/33711.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/33711"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33712
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33712/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33712/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33712/events
|
https://github.com/pandas-dev/pandas/pull/33712
| 604,297,984
|
MDExOlB1bGxSZXF1ZXN0NDA2OTE4NzMw
| 33,712
|
TST: more accurate expecteds for DTI/TDI
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
}
|
[] |
closed
| false
| null |
[] | null | 0
| 2020-04-21T21:27:56Z
| 2020-04-23T23:11:01Z
| 2020-04-23T23:10:24Z
|
MEMBER
| null |
xref #33711
|
{
"+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/33712/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33712/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/33712.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/33712",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/33712.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/33712"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33713
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33713/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33713/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33713/events
|
https://github.com/pandas-dev/pandas/pull/33713
| 604,332,059
|
MDExOlB1bGxSZXF1ZXN0NDA2OTQ2Njk0
| 33,713
|
CLN: .values -> ._values
|
{
"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": "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": "2020-07-28T18:13:47Z",
"closed_issues": 2378,
"created_at": "2019-12-02T12:52:48Z",
"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": "2020-08-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/68",
"id": 4894670,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68/labels",
"node_id": "MDk6TWlsZXN0b25lNDg5NDY3MA==",
"number": 68,
"open_issues": 0,
"state": "closed",
"title": "1.1",
"updated_at": "2021-07-17T17:25:28Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68"
}
| 0
| 2020-04-21T22:46:48Z
| 2020-04-22T02:49:53Z
| 2020-04-22T02:24:07Z
|
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/33713/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33713/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/33713.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/33713",
"merged_at": "2020-04-22T02:24:07Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/33713.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/33713"
}
|
|
https://api.github.com/repos/pandas-dev/pandas/issues/33714
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33714/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33714/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33714/events
|
https://github.com/pandas-dev/pandas/pull/33714
| 604,332,710
|
MDExOlB1bGxSZXF1ZXN0NDA2OTQ3MjM0
| 33,714
|
CLN: simplify DTA.__getitem__
|
{
"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": "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": "2020-07-28T18:13:47Z",
"closed_issues": 2378,
"created_at": "2019-12-02T12:52:48Z",
"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": "2020-08-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/68",
"id": 4894670,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68/labels",
"node_id": "MDk6TWlsZXN0b25lNDg5NDY3MA==",
"number": 68,
"open_issues": 0,
"state": "closed",
"title": "1.1",
"updated_at": "2021-07-17T17:25:28Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68"
}
| 0
| 2020-04-21T22:48:35Z
| 2020-04-24T22:20:20Z
| 2020-04-24T21:41:43Z
|
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/33714/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33714/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/33714.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/33714",
"merged_at": "2020-04-24T21:41:43Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/33714.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/33714"
}
|
|
https://api.github.com/repos/pandas-dev/pandas/issues/33715
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33715/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33715/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33715/events
|
https://github.com/pandas-dev/pandas/pull/33715
| 604,339,812
|
MDExOlB1bGxSZXF1ZXN0NDA2OTUzMDk0
| 33,715
|
BUG: DTI/TDI/PI.where accepting incorrectly-typed NaTs
|
{
"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": "2020-07-28T18:13:47Z",
"closed_issues": 2378,
"created_at": "2019-12-02T12:52:48Z",
"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": "2020-08-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/68",
"id": 4894670,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68/labels",
"node_id": "MDk6TWlsZXN0b25lNDg5NDY3MA==",
"number": 68,
"open_issues": 0,
"state": "closed",
"title": "1.1",
"updated_at": "2021-07-17T17:25:28Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68"
}
| 3
| 2020-04-21T23:08:10Z
| 2020-04-25T22:26:43Z
| 2020-04-25T22:22:42Z
|
MEMBER
| null |
- [ ] closes #xxxx
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
In addition to the bug in the title, this makes DTI accept datetime/dt64, TDI accept timedelta/td64, and PI accept Period. This brings these into closer alignment with the other methods, which we ultimately want to make as consistent as possible.
|
{
"+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/33715/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33715/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/33715.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/33715",
"merged_at": "2020-04-25T22:22:42Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/33715.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/33715"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33716
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/33716/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33716/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/33716/events
|
https://github.com/pandas-dev/pandas/pull/33716
| 604,342,758
|
MDExOlB1bGxSZXF1ZXN0NDA2OTU1NTQw
| 33,716
|
REF: implement _validate_comparison_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"
}
] |
closed
| false
| null |
[] |
{
"closed_at": "2020-07-28T18:13:47Z",
"closed_issues": 2378,
"created_at": "2019-12-02T12:52:48Z",
"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": "2020-08-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/68",
"id": 4894670,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68/labels",
"node_id": "MDk6TWlsZXN0b25lNDg5NDY3MA==",
"number": 68,
"open_issues": 0,
"state": "closed",
"title": "1.1",
"updated_at": "2021-07-17T17:25:28Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68"
}
| 0
| 2020-04-21T23:15:51Z
| 2020-04-23T18:03:37Z
| 2020-04-23T17:58:38Z
|
MEMBER
| null |
Trying to match the patterns we use for all the other DTA/TDA/PA methods that have an `other`-like arg.
No logic should be changed here, just moved around.
|
{
"+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/33716/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/33716/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/33716.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/33716",
"merged_at": "2020-04-23T17:58:38Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/33716.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/33716"
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.