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/34917
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34917/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34917/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34917/events
|
https://github.com/pandas-dev/pandas/pull/34917
| 642,489,656
|
MDExOlB1bGxSZXF1ZXN0NDM3NDkxOTY0
| 34,917
|
BUG: indexing regression with datetime index
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/6256964?v=4",
"events_url": "https://api.github.com/users/ketanarlulkar/events{/privacy}",
"followers_url": "https://api.github.com/users/ketanarlulkar/followers",
"following_url": "https://api.github.com/users/ketanarlulkar/following{/other_user}",
"gists_url": "https://api.github.com/users/ketanarlulkar/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ketanarlulkar",
"id": 6256964,
"login": "ketanarlulkar",
"node_id": "MDQ6VXNlcjYyNTY5NjQ=",
"organizations_url": "https://api.github.com/users/ketanarlulkar/orgs",
"received_events_url": "https://api.github.com/users/ketanarlulkar/received_events",
"repos_url": "https://api.github.com/users/ketanarlulkar/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ketanarlulkar/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ketanarlulkar/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ketanarlulkar"
}
|
[
{
"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": "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-06-21T03:58:14Z
| 2020-06-24T16:00:55Z
| 2020-06-24T16:00:50Z
|
CONTRIBUTOR
| null |
The bug is already fixed on master. I have just added a unit test.
- [x] closes #34860
- [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/34917/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34917/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/34917.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/34917",
"merged_at": "2020-06-24T16:00:50Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/34917.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/34917"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34918
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34918/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34918/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34918/events
|
https://github.com/pandas-dev/pandas/pull/34918
| 642,493,426
|
MDExOlB1bGxSZXF1ZXN0NDM3NDk0NzA3
| 34,918
|
BUG: DataFrame.(any|all) inconsistency
|
{
"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": "fbca04",
"default": false,
"description": "Related to non-user accessible pandas implementation",
"id": 49094459,
"name": "Internals",
"node_id": "MDU6TGFiZWw0OTA5NDQ1OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Internals"
},
{
"color": "207de5",
"default": false,
"description": null,
"id": 211029535,
"name": "Clean",
"node_id": "MDU6TGFiZWwyMTEwMjk1MzU=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Clean"
},
{
"color": "7fcce8",
"default": false,
"description": "",
"id": 2347992045,
"name": "Stale",
"node_id": "MDU6TGFiZWwyMzQ3OTkyMDQ1",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Stale"
}
] |
closed
| false
| null |
[] | null | 6
| 2020-06-21T04:37:54Z
| 2020-11-14T02:59:30Z
| 2020-11-14T02:59:26Z
|
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/34918/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34918/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/34918.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/34918",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/34918.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/34918"
}
|
|
https://api.github.com/repos/pandas-dev/pandas/issues/34919
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34919/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34919/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34919/events
|
https://github.com/pandas-dev/pandas/pull/34919
| 642,529,061
|
MDExOlB1bGxSZXF1ZXN0NDM3NTIwNDk0
| 34,919
|
TST: Verify whether non writable numpy array is shiftable (21049)
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/44933366?v=4",
"events_url": "https://api.github.com/users/avinashpancham/events{/privacy}",
"followers_url": "https://api.github.com/users/avinashpancham/followers",
"following_url": "https://api.github.com/users/avinashpancham/following{/other_user}",
"gists_url": "https://api.github.com/users/avinashpancham/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/avinashpancham",
"id": 44933366,
"login": "avinashpancham",
"node_id": "MDQ6VXNlcjQ0OTMzMzY2",
"organizations_url": "https://api.github.com/users/avinashpancham/orgs",
"received_events_url": "https://api.github.com/users/avinashpancham/received_events",
"repos_url": "https://api.github.com/users/avinashpancham/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/avinashpancham/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/avinashpancham/subscriptions",
"type": "User",
"url": "https://api.github.com/users/avinashpancham"
}
|
[
{
"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-06-21T09:31:55Z
| 2020-06-23T17:36:04Z
| 2020-06-23T17:35:57Z
|
CONTRIBUTOR
| null |
- [x ] closes #21049
- [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/34919/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34919/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/34919.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/34919",
"merged_at": "2020-06-23T17:35:57Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/34919.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/34919"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34920
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34920/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34920/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34920/events
|
https://github.com/pandas-dev/pandas/pull/34920
| 642,542,652
|
MDExOlB1bGxSZXF1ZXN0NDM3NTMwMjg5
| 34,920
|
TST : Added test for creating empty dataframe with column of type str…
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/16578178?v=4",
"events_url": "https://api.github.com/users/prakhar987/events{/privacy}",
"followers_url": "https://api.github.com/users/prakhar987/followers",
"following_url": "https://api.github.com/users/prakhar987/following{/other_user}",
"gists_url": "https://api.github.com/users/prakhar987/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/prakhar987",
"id": 16578178,
"login": "prakhar987",
"node_id": "MDQ6VXNlcjE2NTc4MTc4",
"organizations_url": "https://api.github.com/users/prakhar987/orgs",
"received_events_url": "https://api.github.com/users/prakhar987/received_events",
"repos_url": "https://api.github.com/users/prakhar987/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/prakhar987/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/prakhar987/subscriptions",
"type": "User",
"url": "https://api.github.com/users/prakhar987"
}
|
[
{
"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": "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": "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-06-21T11:12:13Z
| 2020-06-23T17:45:33Z
| 2020-06-23T17:45:33Z
|
CONTRIBUTOR
| null |
- [x] closes #34915
- [x] 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/34920/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34920/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/34920.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/34920",
"merged_at": "2020-06-23T17:45:33Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/34920.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/34920"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34921
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34921/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34921/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34921/events
|
https://github.com/pandas-dev/pandas/issues/34921
| 642,578,152
|
MDU6SXNzdWU2NDI1NzgxNTI=
| 34,921
|
BUG: `read_excel` function auto-fills `NaN` values in index-columns with recent not-NaN values in the column
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/850012?v=4",
"events_url": "https://api.github.com/users/subhrm/events{/privacy}",
"followers_url": "https://api.github.com/users/subhrm/followers",
"following_url": "https://api.github.com/users/subhrm/following{/other_user}",
"gists_url": "https://api.github.com/users/subhrm/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/subhrm",
"id": 850012,
"login": "subhrm",
"node_id": "MDQ6VXNlcjg1MDAxMg==",
"organizations_url": "https://api.github.com/users/subhrm/orgs",
"received_events_url": "https://api.github.com/users/subhrm/received_events",
"repos_url": "https://api.github.com/users/subhrm/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/subhrm/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/subhrm/subscriptions",
"type": "User",
"url": "https://api.github.com/users/subhrm"
}
|
[
{
"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": "bfe5bf",
"default": false,
"description": "read_excel, to_excel",
"id": 49254273,
"name": "IO Excel",
"node_id": "MDU6TGFiZWw0OTI1NDI3Mw==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20Excel"
}
] |
open
| false
| null |
[] | null | 4
| 2020-06-21T14:53:33Z
| 2021-01-28T03:21:24Z
| 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
>>> # Notice for col2 cells are populated for rows 2,3 & 5, where as they are emply in the excel file and csv file
>>> pd.read_excel("test.xlsx", index_col=[0,1])
data
col1 col2
1 2 5
2 2 10
3 2 15
4 8 20
5 8 25
6 12 30
>>> # Notice how read_csv works correctly and has NaN in col2 for rows 2,3 & 5
>>> pd.read_csv("test.csv", index_col=[0,1])
data
col1 col2
1 2.0 5
2 NaN 10
3 NaN 15
4 8.0 20
5 NaN 25
6 12.0 30
>>> pd.read_excel("test.xlsx", index_col=[0,1], engine="xlrd") # same issue with 'xlrd' engine
data
col1 col2
1 2 5
2 2 10
3 2 15
4 8 20
5 8 25
6 12 30
>>> pd.read_excel("test.xlsx", index_col=[0,1], engine="openpyxl") # same issue with 'openpyxl' engine
data
col1 col2
1 2 5
2 2 10
3 2 15
4 8 20
5 8 25
6 12 30
```
#### Problem description
The `read_excel` function auto-fills `NaN` values in index columns with prev not `NaN` values. where as `read_csv` funtion works correctly.
Here is a screenshot of the excel file

Here are the two test files in one zip archive. [test.zip](https://github.com/pandas-dev/pandas/files/4809648/test.zip)
#### Expected Output
The `NaN` cells should be left untouched as correctly read by `read_csv`.
#### Output of ``pd.show_versions()``
<details>
```
INSTALLED VERSIONS
------------------
commit : None
python : 3.8.3.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 : None
LOCALE : English_India.1252
pandas : 1.0.4
numpy : 1.18.1
pytz : 2020.1
dateutil : 2.8.1
pip : 20.1.1
setuptools : 47.3.0.post20200616
Cython : 0.29.20
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : 1.2.9
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 2.11.2
IPython : 7.15.0
pandas_datareader: None
bs4 : None
bottleneck : None
fastparquet : None
gcsfs : None
lxml.etree : None
matplotlib : 3.1.3
numexpr : 2.7.1
odfpy : None
openpyxl : 3.0.3
pandas_gbq : None
pyarrow : 0.15.1
pytables : None
pytest : None
pyxlsb : None
s3fs : None
scipy : 1.4.1
sqlalchemy : None
tables : 3.6.1
tabulate : None
xarray : 0.15.1
xlrd : 1.2.0
xlwt : 1.3.0
xlsxwriter : 1.2.9
numba : 0.49.1
```
</details>
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/34921/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34921/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/34922
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34922/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34922/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34922/events
|
https://github.com/pandas-dev/pandas/pull/34922
| 642,587,580
|
MDExOlB1bGxSZXF1ZXN0NDM3NTYyNzU3
| 34,922
|
Completely rework the capitalization check algo in 'validate_rst_title_capitalization.py'
|
{
"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"
},
{
"color": "eb6420",
"default": false,
"description": "Code style, linting, code_checks",
"id": 106935113,
"name": "Code Style",
"node_id": "MDU6TGFiZWwxMDY5MzUxMTM=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Code%20Style"
},
{
"color": "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 | 7
| 2020-06-21T15:45:37Z
| 2020-11-07T16:12:44Z
| 2020-11-07T16:12:44Z
|
CONTRIBUTOR
| null |
- [ ] Modify file scripts/validate_rst_title_capitalization
- [ ] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
PR on rework of the script 'validate_rst_title_capitalization.py' to better handle the capitalization, the capitalization exceptions, with the use of exceptions in the form of tuples to allow different writings for a particular word. The idea is to be able to use two different types inside 'CAPITALIZATION_EXCEPTIONS': one-word string, or tuple containing a number of word elements, with different capitalization.
You can experiment it by replacing some exceptions inside 'CAPITALIZATION_EXCEPTIONS' by tuples containing several times the same exception with different capitalisations. I already did it for 'categorical' with ('categorical', 'Categorical')
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/34922/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34922/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/34922.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/34922",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/34922.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/34922"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34923
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34923/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34923/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34923/events
|
https://github.com/pandas-dev/pandas/issues/34923
| 642,617,704
|
MDU6SXNzdWU2NDI2MTc3MDQ=
| 34,923
|
Infer dtype when using `df.explode()`ENH:
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/10302415?v=4",
"events_url": "https://api.github.com/users/hamzahiqb/events{/privacy}",
"followers_url": "https://api.github.com/users/hamzahiqb/followers",
"following_url": "https://api.github.com/users/hamzahiqb/following{/other_user}",
"gists_url": "https://api.github.com/users/hamzahiqb/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/hamzahiqb",
"id": 10302415,
"login": "hamzahiqb",
"node_id": "MDQ6VXNlcjEwMzAyNDE1",
"organizations_url": "https://api.github.com/users/hamzahiqb/orgs",
"received_events_url": "https://api.github.com/users/hamzahiqb/received_events",
"repos_url": "https://api.github.com/users/hamzahiqb/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/hamzahiqb/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/hamzahiqb/subscriptions",
"type": "User",
"url": "https://api.github.com/users/hamzahiqb"
}
|
[
{
"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": "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": "b60205",
"default": false,
"description": "Internal Consistency of API/Behavior",
"id": 1741841389,
"name": "API - Consistency",
"node_id": "MDU6TGFiZWwxNzQxODQxMzg5",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/API%20-%20Consistency"
}
] |
open
| false
| null |
[] |
{
"closed_at": null,
"closed_issues": 786,
"created_at": "2015-01-13T10:53:19Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "Changes that would be nice to have in the next release. These issues are not blocking. They will be pushed to the next release if no one has time to fix them.",
"due_on": null,
"html_url": "https://github.com/pandas-dev/pandas/milestone/32",
"id": 933188,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/32/labels",
"node_id": "MDk6TWlsZXN0b25lOTMzMTg4",
"number": 32,
"open_issues": 1053,
"state": "open",
"title": "Contributions Welcome",
"updated_at": "2021-11-21T00:50:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/32"
}
| 4
| 2020-06-21T18:40:01Z
| 2020-11-26T18:58:03Z
| null |
NONE
| null |
#### Is your feature request related to a problem?
Yes. Currently, the `df.explode` method always returns an object for the column being exploded. This leads to loss of information about the `dtype` of the exploded column.
E.g.
```
s = pd.Series([1,2,3]) # <- dtype('int64')
df = pd.DataFrame({'A': [s, s, s, s], 'B': 1})
df.explode("A").dtypes
```
| | 0 |
|:---|:-------|
| A | object |
| B | int64 |
It would be great if pandas could return the underlying dtype if it was consistent across all rows. (Or return the best dtype (int -> float -> object).)
#### Describe the solution you'd like
1. *solution 1*: The best case scenario would be where pandas would directly infer the dtype if it was consistent (ignoring NaNs) across the across the row.
```
s = pd.Series([1,None,3]) # <- dtype('float64')
df = pd.DataFrame({'A': [s, s, s, s], 'B': 1}) # <- empty list is converted to NaN
df.explode("A").dtypes
```
| | 0 |
|:---|:-------|
| A | float64 |
| B | int64 |
2. *solution 2*: Providing a argument to force inferring the dtype:
```
s = pd.Series([1,None,3]) # <- dtype('float64')
df = pd.DataFrame({'A': [s, s, s, s], 'B': 1}) # <- empty list is converted to NaN
df.explode("A", infer_type=True).dtypes
```
| | 0 |
|:---|:-------|
| A | float64 |
| B | int64 |
#### Describe alternatives you've considered
Currently, I use the following workaround:
```
s = pd.Series([1,None,3]) # <- dtype('float64')
df = pd.DataFrame({'A': [s, s, s, s], 'B': 1}) # <- empty list is converted to NaN
d = df.A[0].dtype
df2 = df.explode("A")
df2.A = df2.A.astype(d)
```
#### API breaking implications
Not sure.
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/34923/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34923/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/34924
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34924/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34924/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34924/events
|
https://github.com/pandas-dev/pandas/pull/34924
| 642,643,098
|
MDExOlB1bGxSZXF1ZXN0NDM3NjAyMzk1
| 34,924
|
DOC: Fix language style
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/16733618?v=4",
"events_url": "https://api.github.com/users/alimcmaster1/events{/privacy}",
"followers_url": "https://api.github.com/users/alimcmaster1/followers",
"following_url": "https://api.github.com/users/alimcmaster1/following{/other_user}",
"gists_url": "https://api.github.com/users/alimcmaster1/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/alimcmaster1",
"id": 16733618,
"login": "alimcmaster1",
"node_id": "MDQ6VXNlcjE2NzMzNjE4",
"organizations_url": "https://api.github.com/users/alimcmaster1/orgs",
"received_events_url": "https://api.github.com/users/alimcmaster1/received_events",
"repos_url": "https://api.github.com/users/alimcmaster1/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/alimcmaster1/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/alimcmaster1/subscriptions",
"type": "User",
"url": "https://api.github.com/users/alimcmaster1"
}
|
[
{
"color": "3465A4",
"default": false,
"description": null,
"id": 134699,
"name": "Docs",
"node_id": "MDU6TGFiZWwxMzQ2OTk=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Docs"
},
{
"color": "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"
}
| 6
| 2020-06-21T21:19:04Z
| 2020-06-23T20:50:06Z
| 2020-06-23T20:16:39Z
|
CONTRIBUTOR
| null |
- Ref: https://9to5google.com/2020/06/12/google-android-chrome-blacklist-blocklist-more-inclusive/
- Ref: https://android-review.googlesource.com/c/platform/frameworks/ml/+/970739
cc @pandas-dev/pandas-core
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/34924/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34924/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/34924.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/34924",
"merged_at": "2020-06-23T20:16:39Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/34924.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/34924"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34925
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34925/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34925/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34925/events
|
https://github.com/pandas-dev/pandas/issues/34925
| 642,663,582
|
MDU6SXNzdWU2NDI2NjM1ODI=
| 34,925
|
ENH: Use binary right shift as pipe operator
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/31596773?v=4",
"events_url": "https://api.github.com/users/JulianWgs/events{/privacy}",
"followers_url": "https://api.github.com/users/JulianWgs/followers",
"following_url": "https://api.github.com/users/JulianWgs/following{/other_user}",
"gists_url": "https://api.github.com/users/JulianWgs/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/JulianWgs",
"id": 31596773,
"login": "JulianWgs",
"node_id": "MDQ6VXNlcjMxNTk2Nzcz",
"organizations_url": "https://api.github.com/users/JulianWgs/orgs",
"received_events_url": "https://api.github.com/users/JulianWgs/received_events",
"repos_url": "https://api.github.com/users/JulianWgs/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/JulianWgs/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/JulianWgs/subscriptions",
"type": "User",
"url": "https://api.github.com/users/JulianWgs"
}
|
[
{
"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 | 3
| 2020-06-21T23:44:18Z
| 2020-08-21T17:05:18Z
| 2020-06-22T00:52:28Z
|
NONE
| null |
#### Is your feature request related to a problem?
In R there is the pipe operator "%>%" which applies the function after the operator on the data before the operator. Pandas also follows this philosophy of method chaining. There is also a [pipe function](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.pipe.html). Here is a good comparison of R vs pandas: https://stmorse.github.io/journal/tidyverse-style-pandas.html
Pandas is missing a stylish pipe operator.
#### Describe the solution you'd like
```python
In [1]: import pandas as pd
...: import numpy as np
...:
...: def pipe(self, func):
...: return func(self)
...:
...: pd.DataFrame.__rshift__ = pipe
...: pd.Series.__rshift__ = pipe
In [2]: df = pd.DataFrame({"A": [0, 1], "B": [2, 3]})
...: df
Out[2]:
A B
0 0 2
1 1 3
```
The old style. Execution from right to left or with pipe function.
```python
In [3]: np.mean(np.sum(df))
Out[3]: 3.0
In [4]: df.pipe(np.sum).pipe(np.mean)
Out[4]: 3.0
```
With the pipe operator. Execution from left to right with pipe operator.
```python
In [5]: df >> np.sum >> np.mean
Out[5]: 3.0
In [6]: df >> print
A B
0 0 2
1 1 3
```
I think the pipe operator makes it much more minimal.
#### API breaking implications
See above.
#### Describe alternatives you've considered
I picked the binary shift operator, because it is not currently used within pandas. I think it resembles a pipe the best.
#### Additional context
This does not work out of the box if the function takes additional argumements. One could use a lambda function, but that does not look clean. I think this is also the bigget downfall of this proposal.
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/34925/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34925/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/34926
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34926/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34926/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34926/events
|
https://github.com/pandas-dev/pandas/pull/34926
| 642,684,195
|
MDExOlB1bGxSZXF1ZXN0NDM3NjMyNzk5
| 34,926
|
Add HTML repr for groupby dataframe and series
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/31596773?v=4",
"events_url": "https://api.github.com/users/JulianWgs/events{/privacy}",
"followers_url": "https://api.github.com/users/JulianWgs/followers",
"following_url": "https://api.github.com/users/JulianWgs/following{/other_user}",
"gists_url": "https://api.github.com/users/JulianWgs/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/JulianWgs",
"id": 31596773,
"login": "JulianWgs",
"node_id": "MDQ6VXNlcjMxNTk2Nzcz",
"organizations_url": "https://api.github.com/users/JulianWgs/orgs",
"received_events_url": "https://api.github.com/users/JulianWgs/received_events",
"repos_url": "https://api.github.com/users/JulianWgs/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/JulianWgs/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/JulianWgs/subscriptions",
"type": "User",
"url": "https://api.github.com/users/JulianWgs"
}
|
[
{
"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": "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": "006b75",
"default": false,
"description": "read_html, to_html, Styler.apply, Styler.applymap",
"id": 57395487,
"name": "IO HTML",
"node_id": "MDU6TGFiZWw1NzM5NTQ4Nw==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20HTML"
},
{
"color": "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"
}
] |
open
| false
| null |
[] | null | 17
| 2020-06-22T01:24:35Z
| 2021-07-04T09:20:33Z
| null |
NONE
| null |
After I saw the representation of a group by in Airtable, I wanted something similar in pandas. It always bothered me that there was no representation for a group by.
Update: 25.07.2020:
These are old screenshots, but still resemble the look. A new addition is the limitation of groups displayed. I don't know how to make the displaying width across all groups the same. If anyone has an idea, I'd appreciate it.
Update: 26.07.2020:
I've added three tests:
1. All rows in groups and all groups are shown
2. All groups are shown, but not all rows in groups.
3. All rows in groups are shown, but no all groups.
I unsure if it wise to put all cases into one test with an if statement which checks which of the above cases it is. Feedback welcome.
**DataFrame**:

**Series**:

This is a WIP implementation. Open issues are:
- [x] improve variable names
- [x] produce more clean HTML code
- [x] limit number of maximum group by DataFrames displayed (similar to the row limit)
- [x] improve look (Did not improve it, but I'm with it)
- [ ] Same width across all groups
- [ ] closes #xxxx
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
Truncated groups with a maximum of 3 groups:

|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/34926/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34926/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/34926.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/34926",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/34926.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/34926"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34927
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34927/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34927/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34927/events
|
https://github.com/pandas-dev/pandas/pull/34927
| 642,692,972
|
MDExOlB1bGxSZXF1ZXN0NDM3NjM4NjQ4
| 34,927
|
Fix DataFrame/Series stack/unstack docs
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/12197385?v=4",
"events_url": "https://api.github.com/users/pdnm/events{/privacy}",
"followers_url": "https://api.github.com/users/pdnm/followers",
"following_url": "https://api.github.com/users/pdnm/following{/other_user}",
"gists_url": "https://api.github.com/users/pdnm/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/pdnm",
"id": 12197385,
"login": "pdnm",
"node_id": "MDQ6VXNlcjEyMTk3Mzg1",
"organizations_url": "https://api.github.com/users/pdnm/orgs",
"received_events_url": "https://api.github.com/users/pdnm/received_events",
"repos_url": "https://api.github.com/users/pdnm/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/pdnm/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/pdnm/subscriptions",
"type": "User",
"url": "https://api.github.com/users/pdnm"
}
|
[
{
"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-06-22T01:57:55Z
| 2020-06-24T15:00:52Z
| 2020-06-23T20:13:52Z
|
CONTRIBUTOR
| null |
- [x] closes #21675
- [ ] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
As discussed in the issue, the sorted level is an implementation detail that does not always happen. Thus I think we should remove the misleading documentation.
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/34927/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34927/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/34927.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/34927",
"merged_at": "2020-06-23T20:13:52Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/34927.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/34927"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34928
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34928/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34928/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34928/events
|
https://github.com/pandas-dev/pandas/issues/34928
| 642,803,742
|
MDU6SXNzdWU2NDI4MDM3NDI=
| 34,928
|
BUG: dtype not working with datetime64
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/13206058?v=4",
"events_url": "https://api.github.com/users/yohplala/events{/privacy}",
"followers_url": "https://api.github.com/users/yohplala/followers",
"following_url": "https://api.github.com/users/yohplala/following{/other_user}",
"gists_url": "https://api.github.com/users/yohplala/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/yohplala",
"id": 13206058,
"login": "yohplala",
"node_id": "MDQ6VXNlcjEzMjA2MDU4",
"organizations_url": "https://api.github.com/users/yohplala/orgs",
"received_events_url": "https://api.github.com/users/yohplala/received_events",
"repos_url": "https://api.github.com/users/yohplala/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/yohplala/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/yohplala/subscriptions",
"type": "User",
"url": "https://api.github.com/users/yohplala"
}
|
[
{
"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": "ffa0ff",
"default": false,
"description": "Incorrect or improved errors from pandas",
"id": 42670965,
"name": "Error Reporting",
"node_id": "MDU6TGFiZWw0MjY3MDk2NQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Error%20Reporting"
}
] |
open
| false
| null |
[] | null | 5
| 2020-06-22T06:44:22Z
| 2021-08-08T16:35:38Z
| null |
NONE
| null |
- [x] I have checked that this issue has not already been reported.
Root cause of issue #32802 might be the trouble I report here.
- [x] I have confirmed this bug exists on the latest version of pandas.
- [ ] (optional) I have confirmed this bug exists on the master branch of pandas.
---
#### Code Sample, a copy-pastable example
```python
import pandas as pd
import numpy as np
# Trouble 1 with Serie (same with DataFrame)
# Working with dtype int64
df = pd.DataFrame(columns=['First'],dtype=np.int64)
df['First']
```
```python
Series([], Name: First, dtype: int64)
```
```python
# Not working with dtype datetime64
df = pd.DataFrame(columns=['First'],dtype=np.datetime64)
df['First']
```
```python
Series([], Name: First, dtype: object)
```
```python
# Trouble 2 with Serie (works with DataFrame)
# Try to use 'astype' as a workaround
df = df.astype({'First':np.datetime64})
df['First']
```
```python
ValueError: The 'datetime64' dtype has no unit.
Please pass in 'datetime64[ns]' instead.
```
But then:
```python
df = df.astype({'First':np.datetime64[ns]})
```
```python
NameError: name 'ns' is not defined
```
And if you are lucky enough to have a DataFrame (hence with several columns), here the workaround works.
```python
df = pd.DataFrame(columns=['First','Last'])
df = df.astype({'First':np.datetime64,'Last':np.datetime64})
df.loc[:,'First']
```
```python
Series([], Name: First, dtype: datetime64[ns])
```
Yeah baby! :)
#### Expected Output
```python
Series([], Name: First, dtype: datetime64[ns])
```
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit : None
python : 3.7.6.final.0
python-bits : 64
OS : Linux
OS-release : 5.3.0-59-generic
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : fr_FR.UTF-8
LOCALE : fr_FR.UTF-8
pandas : 1.0.5
numpy : 1.16.3
pytz : 2020.1
dateutil : 2.8.1
pip : 20.0.2
setuptools : 46.2.0.post20200511
Cython : None
pytest : None
hypothesis : None
sphinx : 3.0.3
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 : 0.3.3
gcsfs : None
lxml.etree : None
matplotlib : 3.0.3
numexpr : 2.7.1
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : 0.16.0
pytables : None
pytest : None
pyxlsb : None
s3fs : None
scipy : 1.4.1
sqlalchemy : None
tables : 3.6.1
tabulate : None
xarray : None
xlrd : None
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/34928/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34928/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/34929
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34929/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34929/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34929/events
|
https://github.com/pandas-dev/pandas/pull/34929
| 642,805,427
|
MDExOlB1bGxSZXF1ZXN0NDM3NzIzMTg5
| 34,929
|
BUILD: make tests discoverable in .devcontainer.json
|
{
"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": "75507B",
"default": false,
"description": "Library building on various platforms",
"id": 129350,
"name": "Build",
"node_id": "MDU6TGFiZWwxMjkzNTA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Build"
}
] |
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-06-22T06:47:33Z
| 2020-06-23T17:50:12Z
| 2020-06-23T17:33:09Z
|
MEMBER
| null |
I wasn't able to discover tests using the current setup, I had to use "python.testing.pytestArgs" instead of "python.testing.cwd"
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/34929/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34929/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/34929.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/34929",
"merged_at": "2020-06-23T17:33:09Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/34929.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/34929"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34930
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34930/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34930/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34930/events
|
https://github.com/pandas-dev/pandas/pull/34930
| 642,832,032
|
MDExOlB1bGxSZXF1ZXN0NDM3NzQ0NzM4
| 34,930
|
CLN: Update Cython data pointers for rolling apply
|
{
"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": "207de5",
"default": false,
"description": null,
"id": 211029535,
"name": "Clean",
"node_id": "MDU6TGFiZWwyMTEwMjk1MzU=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Clean"
},
{
"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"
}
| 5
| 2020-06-22T07:35:46Z
| 2020-06-23T16:37:22Z
| 2020-06-23T16:31:30Z
|
MEMBER
| null |
- [x] xref #34014
- [x] tests passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
Performance looks pretty comparable between master and this PR
```
N = 10 ** 3
arr = 100 * np.random.random(N)
roll = pd.DataFrame(arr).rolling(10)
%timeit roll.apply(lambda x: np.sum(x) + 5, raw=True)
4.48 ms ± 14.8 µs per loop (mean ± std. dev. of 7 runs, 100 loops each) <--PR
4.34 ms ± 29.6 µs per loop (mean ± std. dev. of 7 runs, 100 loops each) <--master
```
|
{
"+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/34930/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34930/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/34930.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/34930",
"merged_at": "2020-06-23T16:31:30Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/34930.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/34930"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34931
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34931/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34931/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34931/events
|
https://github.com/pandas-dev/pandas/pull/34931
| 642,939,470
|
MDExOlB1bGxSZXF1ZXN0NDM3ODMzNTEz
| 34,931
|
BUG: fix IntegerArray astype with copy=True/False
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1020496?v=4",
"events_url": "https://api.github.com/users/jorisvandenbossche/events{/privacy}",
"followers_url": "https://api.github.com/users/jorisvandenbossche/followers",
"following_url": "https://api.github.com/users/jorisvandenbossche/following{/other_user}",
"gists_url": "https://api.github.com/users/jorisvandenbossche/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jorisvandenbossche",
"id": 1020496,
"login": "jorisvandenbossche",
"node_id": "MDQ6VXNlcjEwMjA0OTY=",
"organizations_url": "https://api.github.com/users/jorisvandenbossche/orgs",
"received_events_url": "https://api.github.com/users/jorisvandenbossche/received_events",
"repos_url": "https://api.github.com/users/jorisvandenbossche/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jorisvandenbossche/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jorisvandenbossche/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jorisvandenbossche"
}
|
[
{
"color": "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"
}
| 9
| 2020-06-22T10:11:47Z
| 2020-07-11T17:12:43Z
| 2020-07-10T12:14:11Z
|
MEMBER
| null |
xref https://github.com/pandas-dev/pandas/pull/34307#discussion_r443370993
Right now, we were not copying the mask correctly with `copy=True`, and also not when the data was actually copied (then the mask also needs to be copied, even with `copy=False`)
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/34931/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34931/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/34931.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/34931",
"merged_at": "2020-07-10T12:14:11Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/34931.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/34931"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34932
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34932/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34932/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34932/events
|
https://github.com/pandas-dev/pandas/issues/34932
| 642,951,445
|
MDU6SXNzdWU2NDI5NTE0NDU=
| 34,932
|
ENH: add ignore_index argument to DataFrame.explode / Series.explode
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/34067903?v=4",
"events_url": "https://api.github.com/users/erfannariman/events{/privacy}",
"followers_url": "https://api.github.com/users/erfannariman/followers",
"following_url": "https://api.github.com/users/erfannariman/following{/other_user}",
"gists_url": "https://api.github.com/users/erfannariman/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/erfannariman",
"id": 34067903,
"login": "erfannariman",
"node_id": "MDQ6VXNlcjM0MDY3OTAz",
"organizations_url": "https://api.github.com/users/erfannariman/orgs",
"received_events_url": "https://api.github.com/users/erfannariman/received_events",
"repos_url": "https://api.github.com/users/erfannariman/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/erfannariman/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/erfannariman/subscriptions",
"type": "User",
"url": "https://api.github.com/users/erfannariman"
}
|
[
{
"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": "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
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/34067903?v=4",
"events_url": "https://api.github.com/users/erfannariman/events{/privacy}",
"followers_url": "https://api.github.com/users/erfannariman/followers",
"following_url": "https://api.github.com/users/erfannariman/following{/other_user}",
"gists_url": "https://api.github.com/users/erfannariman/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/erfannariman",
"id": 34067903,
"login": "erfannariman",
"node_id": "MDQ6VXNlcjM0MDY3OTAz",
"organizations_url": "https://api.github.com/users/erfannariman/orgs",
"received_events_url": "https://api.github.com/users/erfannariman/received_events",
"repos_url": "https://api.github.com/users/erfannariman/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/erfannariman/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/erfannariman/subscriptions",
"type": "User",
"url": "https://api.github.com/users/erfannariman"
}
|
[
{
"avatar_url": "https://avatars.githubusercontent.com/u/34067903?v=4",
"events_url": "https://api.github.com/users/erfannariman/events{/privacy}",
"followers_url": "https://api.github.com/users/erfannariman/followers",
"following_url": "https://api.github.com/users/erfannariman/following{/other_user}",
"gists_url": "https://api.github.com/users/erfannariman/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/erfannariman",
"id": 34067903,
"login": "erfannariman",
"node_id": "MDQ6VXNlcjM0MDY3OTAz",
"organizations_url": "https://api.github.com/users/erfannariman/orgs",
"received_events_url": "https://api.github.com/users/erfannariman/received_events",
"repos_url": "https://api.github.com/users/erfannariman/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/erfannariman/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/erfannariman/subscriptions",
"type": "User",
"url": "https://api.github.com/users/erfannariman"
}
] |
{
"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"
}
| 10
| 2020-06-22T10:29:00Z
| 2020-06-26T20:22:24Z
| 2020-06-26T20:22:24Z
|
CONTRIBUTOR
| null |
When we use `DataFrame.explode` right now, it will repeat the index for each element in the iterator. To keep it consistent with the methods like `DataFrame.sort_values`, `DataFrame.append` and `pd.concat`, we can add an argument `ignore_index`, which will reset the index.
```python
df = pd.DataFrame({'id':range(0,30,10),
'values':[list('abc'), list('def'), list('ghi')]})
print(df)
id values
0 0 [a, b, c]
1 10 [d, e, f]
2 20 [g, h, i]
print(df.explode('values'))
id values
0 0 a
0 0 b
0 0 c
1 10 d
1 10 e
1 10 f
2 20 g
2 20 h
2 20 i
```
Expected behaviour with addition of the argument:
```python
df.explode('values', ignore_index=True)
id values
0 0 a
1 0 b
2 0 c
3 10 d
4 10 e
5 10 f
6 20 g
7 20 h
8 20 i
```
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/34932/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34932/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/34933
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34933/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34933/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34933/events
|
https://github.com/pandas-dev/pandas/pull/34933
| 642,989,738
|
MDExOlB1bGxSZXF1ZXN0NDM3ODc2Mjcy
| 34,933
|
ENH: add ignore_index option in DataFrame.explode
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/34067903?v=4",
"events_url": "https://api.github.com/users/erfannariman/events{/privacy}",
"followers_url": "https://api.github.com/users/erfannariman/followers",
"following_url": "https://api.github.com/users/erfannariman/following{/other_user}",
"gists_url": "https://api.github.com/users/erfannariman/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/erfannariman",
"id": 34067903,
"login": "erfannariman",
"node_id": "MDQ6VXNlcjM0MDY3OTAz",
"organizations_url": "https://api.github.com/users/erfannariman/orgs",
"received_events_url": "https://api.github.com/users/erfannariman/received_events",
"repos_url": "https://api.github.com/users/erfannariman/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/erfannariman/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/erfannariman/subscriptions",
"type": "User",
"url": "https://api.github.com/users/erfannariman"
}
|
[
{
"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"
}
] |
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"
}
| 17
| 2020-06-22T11:28:39Z
| 2020-07-19T21:20:05Z
| 2020-06-26T20:22:25Z
|
CONTRIBUTOR
| null |
- [x] closes #34932
- [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/34933/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34933/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/34933.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/34933",
"merged_at": "2020-06-26T20:22:24Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/34933.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/34933"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34934
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34934/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34934/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34934/events
|
https://github.com/pandas-dev/pandas/issues/34934
| 643,306,188
|
MDU6SXNzdWU2NDMzMDYxODg=
| 34,934
|
BUG: unnecessary repetition of variable in explode test
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/34067903?v=4",
"events_url": "https://api.github.com/users/erfannariman/events{/privacy}",
"followers_url": "https://api.github.com/users/erfannariman/followers",
"following_url": "https://api.github.com/users/erfannariman/following{/other_user}",
"gists_url": "https://api.github.com/users/erfannariman/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/erfannariman",
"id": 34067903,
"login": "erfannariman",
"node_id": "MDQ6VXNlcjM0MDY3OTAz",
"organizations_url": "https://api.github.com/users/erfannariman/orgs",
"received_events_url": "https://api.github.com/users/erfannariman/received_events",
"repos_url": "https://api.github.com/users/erfannariman/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/erfannariman/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/erfannariman/subscriptions",
"type": "User",
"url": "https://api.github.com/users/erfannariman"
}
|
[
{
"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
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/34067903?v=4",
"events_url": "https://api.github.com/users/erfannariman/events{/privacy}",
"followers_url": "https://api.github.com/users/erfannariman/followers",
"following_url": "https://api.github.com/users/erfannariman/following{/other_user}",
"gists_url": "https://api.github.com/users/erfannariman/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/erfannariman",
"id": 34067903,
"login": "erfannariman",
"node_id": "MDQ6VXNlcjM0MDY3OTAz",
"organizations_url": "https://api.github.com/users/erfannariman/orgs",
"received_events_url": "https://api.github.com/users/erfannariman/received_events",
"repos_url": "https://api.github.com/users/erfannariman/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/erfannariman/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/erfannariman/subscriptions",
"type": "User",
"url": "https://api.github.com/users/erfannariman"
}
|
[
{
"avatar_url": "https://avatars.githubusercontent.com/u/34067903?v=4",
"events_url": "https://api.github.com/users/erfannariman/events{/privacy}",
"followers_url": "https://api.github.com/users/erfannariman/followers",
"following_url": "https://api.github.com/users/erfannariman/following{/other_user}",
"gists_url": "https://api.github.com/users/erfannariman/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/erfannariman",
"id": 34067903,
"login": "erfannariman",
"node_id": "MDQ6VXNlcjM0MDY3OTAz",
"organizations_url": "https://api.github.com/users/erfannariman/orgs",
"received_events_url": "https://api.github.com/users/erfannariman/received_events",
"repos_url": "https://api.github.com/users/erfannariman/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/erfannariman/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/erfannariman/subscriptions",
"type": "User",
"url": "https://api.github.com/users/erfannariman"
}
] |
{
"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-06-22T19:22:25Z
| 2020-06-23T18:02:35Z
| 2020-06-23T14:00:07Z
|
CONTRIBUTOR
| null |
- [x] I have checked that this issue has not already been reported.
- [x] I have confirmed this bug exists on the latest version of pandas.
- [x] (optional) I have confirmed this bug exists on the master branch of pandas.
---
In the test `test_typical_usecase` in `series/methods/test_explode.py` there's
```python
def test_typical_usecase():
df = pd.DataFrame(
[{"var1": "a,b,c", "var2": 1}, {"var1": "d,e,f", "var2": 2}],
columns=["var1", "var2"],
)
exploded = df.var1.str.split(",").explode()
exploded
result = df[["var2"]].join(exploded)
expected = pd.DataFrame(
{"var2": [1, 1, 1, 2, 2, 2], "var1": list("abcdef")},
columns=["var2", "var1"],
index=[0, 0, 0, 1, 1, 1],
)
tm.assert_frame_equal(result, expected)
```
#### Problem description
The variable `exploded` is called 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/34934/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34934/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/34935
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34935/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34935/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34935/events
|
https://github.com/pandas-dev/pandas/pull/34935
| 643,321,721
|
MDExOlB1bGxSZXF1ZXN0NDM4MTQ0ODA4
| 34,935
|
REF: simplify _is_single_block/is_mixed_type
|
{
"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": "fbca04",
"default": false,
"description": "Related to non-user accessible pandas implementation",
"id": 49094459,
"name": "Internals",
"node_id": "MDU6TGFiZWw0OTA5NDQ1OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Internals"
},
{
"color": "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-06-22T19:52:47Z
| 2021-11-20T23:22:35Z
| 2020-06-23T20:20:29Z
|
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/34935/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34935/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/34935.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/34935",
"merged_at": "2020-06-23T20:20:29Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/34935.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/34935"
}
|
|
https://api.github.com/repos/pandas-dev/pandas/issues/34936
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34936/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34936/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34936/events
|
https://github.com/pandas-dev/pandas/issues/34936
| 643,325,838
|
MDU6SXNzdWU2NDMzMjU4Mzg=
| 34,936
|
BUG: pandas.DataFrame.interpolate fails with high value of `limit` argument
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/28580105?v=4",
"events_url": "https://api.github.com/users/monstrorivas/events{/privacy}",
"followers_url": "https://api.github.com/users/monstrorivas/followers",
"following_url": "https://api.github.com/users/monstrorivas/following{/other_user}",
"gists_url": "https://api.github.com/users/monstrorivas/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/monstrorivas",
"id": 28580105,
"login": "monstrorivas",
"node_id": "MDQ6VXNlcjI4NTgwMTA1",
"organizations_url": "https://api.github.com/users/monstrorivas/orgs",
"received_events_url": "https://api.github.com/users/monstrorivas/received_events",
"repos_url": "https://api.github.com/users/monstrorivas/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/monstrorivas/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/monstrorivas/subscriptions",
"type": "User",
"url": "https://api.github.com/users/monstrorivas"
}
|
[
{
"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": "0e8a16",
"default": false,
"description": "32-bit systems",
"id": 563047854,
"name": "32bit",
"node_id": "MDU6TGFiZWw1NjMwNDc4NTQ=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/32bit"
}
] |
open
| false
| null |
[] | null | 8
| 2020-06-22T20:00:53Z
| 2020-06-24T08:59:02Z
| null |
NONE
| null |
- [X] I have checked that this issue has not already been reported.
- [X] I have confirmed this bug exists on the latest version of pandas.
- [ ] (optional) I have confirmed this bug exists on the master branch of pandas.
---
#### Code Sample, a copy-pastable example
```python
import pandas as pd
import numpy as np
df = pd.DataFrame([1]*500000)
df.iloc[1000:50000] =np.nan
df.interpolate(method='linear', limit_direction='both', limit=None) # This runs fine eventhough the limit is effectively > 5000 datapoints
df.interpolate(method='linear', limit_direction='both', limit=5000) # This produces an error
```
#### Problem description
An error is produced when specifying a large limit in pandas.DataFrame.Interpolate
~~The error is NOT present in pandas 1.0.1 but it is present at least in 1.0.4 and 1.0.5~~
If the limit is set to None, there is no error... even when the interpolated consecutive nans is larger than the limit that fails
Error:
```
ValueError: array is too big; `arr.size * arr.dtype.itemsize` is larger than the maximum possible size.
```
The error is with Python 3.7 but not with Python 3.6
#### Expected Output
~~The expected output is what pandas v1.0.1 produces.~~
In python 3.6, specifying a large value of limit doesn't result in a ValueError
This runs in v1.0.1
```python
import pandas as pd
import numpy as np
df = pd.DataFrame([1]*500000)
df.iloc[1000:50000] =np.nan
dff = df.interpolate(method='linear', limit_direction='both', limit=5000)
assert dff.isna().sum().values == 39000
```
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit : None
python : 3.7.4.final.0
python-bits : 32
OS : Windows
OS-release : 10
machine : AMD64
processor : Intel64 Family 6 Model 158 Stepping 10, GenuineIntel
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : None.None
pandas : 1.0.5
numpy : 1.18.5
pytz : 2020.1
dateutil : 2.8.1
pip : 20.1.1
setuptools : 47.1.1
Cython : 0.29.20
pytest : 5.4.3
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.15.0
pandas_datareader: None
bs4 : 4.9.1
bottleneck : None
fastparquet : None
gcsfs : None
lxml.etree : None
matplotlib : 3.2.1
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pytables : None
pytest : 5.4.3
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/34936/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34936/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/34937
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34937/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34937/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34937/events
|
https://github.com/pandas-dev/pandas/pull/34937
| 643,327,516
|
MDExOlB1bGxSZXF1ZXN0NDM4MTQ5Njg3
| 34,937
|
BUG: clear cache on DataFrame._is_homogeneous_dtype
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
}
|
[
{
"color": "fbca04",
"default": false,
"description": "Related to non-user accessible pandas implementation",
"id": 49094459,
"name": "Internals",
"node_id": "MDU6TGFiZWw0OTA5NDQ1OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Internals"
},
{
"color": "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-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-06-22T20:04:18Z
| 2020-06-24T23:52:23Z
| 2020-06-24T23:35:18Z
|
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/34937/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34937/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/34937.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/34937",
"merged_at": "2020-06-24T23:35:18Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/34937.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/34937"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34938
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34938/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34938/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34938/events
|
https://github.com/pandas-dev/pandas/pull/34938
| 643,338,796
|
MDExOlB1bGxSZXF1ZXN0NDM4MTU5MTI2
| 34,938
|
Remove exploded variable
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/34067903?v=4",
"events_url": "https://api.github.com/users/erfannariman/events{/privacy}",
"followers_url": "https://api.github.com/users/erfannariman/followers",
"following_url": "https://api.github.com/users/erfannariman/following{/other_user}",
"gists_url": "https://api.github.com/users/erfannariman/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/erfannariman",
"id": 34067903,
"login": "erfannariman",
"node_id": "MDQ6VXNlcjM0MDY3OTAz",
"organizations_url": "https://api.github.com/users/erfannariman/orgs",
"received_events_url": "https://api.github.com/users/erfannariman/received_events",
"repos_url": "https://api.github.com/users/erfannariman/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/erfannariman/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/erfannariman/subscriptions",
"type": "User",
"url": "https://api.github.com/users/erfannariman"
}
|
[] |
closed
| false
| null |
[] | null | 3
| 2020-06-22T20:25:37Z
| 2020-06-23T12:21:23Z
| 2020-06-23T11:39:05Z
|
CONTRIBUTOR
| null |
- [x] closes #34934
- [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/34938/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34938/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/34938.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/34938",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/34938.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/34938"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34939
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34939/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34939/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34939/events
|
https://github.com/pandas-dev/pandas/pull/34939
| 643,357,703
|
MDExOlB1bGxSZXF1ZXN0NDM4MTc0ODA5
| 34,939
|
HDFStore append_to_multiple with min_itemsize
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/7614606?v=4",
"events_url": "https://api.github.com/users/fangchenli/events{/privacy}",
"followers_url": "https://api.github.com/users/fangchenli/followers",
"following_url": "https://api.github.com/users/fangchenli/following{/other_user}",
"gists_url": "https://api.github.com/users/fangchenli/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/fangchenli",
"id": 7614606,
"login": "fangchenli",
"node_id": "MDQ6VXNlcjc2MTQ2MDY=",
"organizations_url": "https://api.github.com/users/fangchenli/orgs",
"received_events_url": "https://api.github.com/users/fangchenli/received_events",
"repos_url": "https://api.github.com/users/fangchenli/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/fangchenli/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/fangchenli/subscriptions",
"type": "User",
"url": "https://api.github.com/users/fangchenli"
}
|
[
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "d7e102",
"default": false,
"description": "np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate",
"id": 2822342,
"name": "Missing-data",
"node_id": "MDU6TGFiZWwyODIyMzQy",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Missing-data"
},
{
"color": "5319e7",
"default": false,
"description": "read_hdf, HDFStore",
"id": 47229190,
"name": "IO HDF5",
"node_id": "MDU6TGFiZWw0NzIyOTE5MA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20HDF5"
}
] |
closed
| false
| null |
[] |
{
"closed_at": "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-06-22T21:00:12Z
| 2020-06-25T23:07:14Z
| 2020-06-25T22:56:46Z
|
MEMBER
| null |
- [x] closes #11238
- [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/34939/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34939/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/34939.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/34939",
"merged_at": "2020-06-25T22:56:45Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/34939.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/34939"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34940
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34940/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34940/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34940/events
|
https://github.com/pandas-dev/pandas/pull/34940
| 643,377,979
|
MDExOlB1bGxSZXF1ZXN0NDM4MTkxNzA3
| 34,940
|
TST: disallow bare pytest raises
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/6381995?v=4",
"events_url": "https://api.github.com/users/boweyism/events{/privacy}",
"followers_url": "https://api.github.com/users/boweyism/followers",
"following_url": "https://api.github.com/users/boweyism/following{/other_user}",
"gists_url": "https://api.github.com/users/boweyism/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/boweyism",
"id": 6381995,
"login": "boweyism",
"node_id": "MDQ6VXNlcjYzODE5OTU=",
"organizations_url": "https://api.github.com/users/boweyism/orgs",
"received_events_url": "https://api.github.com/users/boweyism/received_events",
"repos_url": "https://api.github.com/users/boweyism/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/boweyism/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/boweyism/subscriptions",
"type": "User",
"url": "https://api.github.com/users/boweyism"
}
|
[
{
"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"
}
| 1
| 2020-06-22T21:40:18Z
| 2020-06-23T22:08:43Z
| 2020-06-23T22:08:40Z
|
CONTRIBUTOR
| null |
xref #30999
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
Changes for:
- pandas/tests/frame/methods/test_assign.py
- pandas/tests/frame/methods/test_at_time.py
- pandas/tests/frame/methods/test_between_time.py
- pandas/tests/frame/methods/test_first_and_last.py
- pandas/tests/frame/methods/test_interpolate.py
- pandas/tests/frame/methods/test_replace.py
- pandas/tests/frame/test_query_eval.py
Belongs to https://github.com/pandas-dev/pandas/issues/30999
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/34940/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34940/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/34940.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/34940",
"merged_at": "2020-06-23T22:08:39Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/34940.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/34940"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34941
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34941/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34941/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34941/events
|
https://github.com/pandas-dev/pandas/pull/34941
| 643,391,204
|
MDExOlB1bGxSZXF1ZXN0NDM4MjAyNTE3
| 34,941
|
ENH: Add NDFrame.format for easier conversion to string dtype
|
{
"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": "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"
}
] |
closed
| false
| null |
[] | null | 5
| 2020-06-22T22:09:45Z
| 2020-09-10T18:54:58Z
| 2020-09-10T18:54:58Z
|
CONTRIBUTOR
| null |
- [x] closes #17211
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry
This adds a ``format`` method to DataFrame and Series. This is useful for data transformation.
This method allows/makes it easier to do more complex conversion from arbitrary dtypes to ``string`` series, including combining several columns in a DataFrame to make the string series. For example we can now do this conversion quite easily:
```python
>>> df = pd.DataFrame({
... 'state_name': ['California', 'Texas', 'Florida'],
... 'state_abbreviation': ['CA', 'TX', 'FL'],
... 'population': [39_512_223, 28_995_881, 21_477_737],
... }, index=[1, 2, 3])
>>> df
state_name state_abbreviation population
1 California CA 39512223
2 Texas TX 28995881
3 Florida FL 21477737
>>> df.format("{state_name:<10} ({state_abbreviation}): {population:,}")
1 California (CA): 39,512,223
2 Texas (TX): 28,995,881
3 Florida (FL): 21,477,737
dtype: string
```
I still need to update text.rst, but would like feedback on this first, as this is a bit different than discussed in #17211. In that issue we e.g. only discussed a ``format`` method for ``Series``, while this also adds it for ``DataFrame``. In #17211 I also aired the idea of allowing series methods in the format string. I think that is technically quite difficult, so is not part of this PR.
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/34941/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34941/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/34941.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/34941",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/34941.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/34941"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34942
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34942/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34942/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34942/events
|
https://github.com/pandas-dev/pandas/pull/34942
| 643,430,145
|
MDExOlB1bGxSZXF1ZXN0NDM4MjM1MTEy
| 34,942
|
BUG: reset_index doesn't preserve dtype on empty frame with MultiIndex
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/45562402?v=4",
"events_url": "https://api.github.com/users/rhshadrach/events{/privacy}",
"followers_url": "https://api.github.com/users/rhshadrach/followers",
"following_url": "https://api.github.com/users/rhshadrach/following{/other_user}",
"gists_url": "https://api.github.com/users/rhshadrach/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/rhshadrach",
"id": 45562402,
"login": "rhshadrach",
"node_id": "MDQ6VXNlcjQ1NTYyNDAy",
"organizations_url": "https://api.github.com/users/rhshadrach/orgs",
"received_events_url": "https://api.github.com/users/rhshadrach/received_events",
"repos_url": "https://api.github.com/users/rhshadrach/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/rhshadrach/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rhshadrach/subscriptions",
"type": "User",
"url": "https://api.github.com/users/rhshadrach"
}
|
[
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "207de5",
"default": false,
"description": null,
"id": 71268330,
"name": "MultiIndex",
"node_id": "MDU6TGFiZWw3MTI2ODMzMA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/MultiIndex"
}
] |
closed
| false
| null |
[] |
{
"closed_at": "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-06-22T23:53:56Z
| 2020-07-11T16:01:50Z
| 2020-06-23T22:07:01Z
|
MEMBER
| null |
- [x] closes #19602
- [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": 1,
"laugh": 0,
"rocket": 0,
"total_count": 1,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/34942/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34942/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/34942.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/34942",
"merged_at": "2020-06-23T22:07:01Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/34942.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/34942"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34943
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34943/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34943/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34943/events
|
https://github.com/pandas-dev/pandas/pull/34943
| 643,434,863
|
MDExOlB1bGxSZXF1ZXN0NDM4MjM4OTc0
| 34,943
|
BUG: exponential moving window covariance fails for multiIndexed DataFrame
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/48889395?v=4",
"events_url": "https://api.github.com/users/arw2019/events{/privacy}",
"followers_url": "https://api.github.com/users/arw2019/followers",
"following_url": "https://api.github.com/users/arw2019/following{/other_user}",
"gists_url": "https://api.github.com/users/arw2019/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/arw2019",
"id": 48889395,
"login": "arw2019",
"node_id": "MDQ6VXNlcjQ4ODg5Mzk1",
"organizations_url": "https://api.github.com/users/arw2019/orgs",
"received_events_url": "https://api.github.com/users/arw2019/received_events",
"repos_url": "https://api.github.com/users/arw2019/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/arw2019/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/arw2019/subscriptions",
"type": "User",
"url": "https://api.github.com/users/arw2019"
}
|
[
{
"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": "207de5",
"default": false,
"description": null,
"id": 71268330,
"name": "MultiIndex",
"node_id": "MDU6TGFiZWw3MTI2ODMzMA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/MultiIndex"
},
{
"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"
}
| 1
| 2020-06-23T00:08:38Z
| 2020-06-26T17:52:56Z
| 2020-06-25T23:24:27Z
|
MEMBER
| null |
- [x] closes #34440
- [x] tests added\tests 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/34943/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34943/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/34943.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/34943",
"merged_at": "2020-06-25T23:24:26Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/34943.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/34943"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34944
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34944/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34944/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34944/events
|
https://github.com/pandas-dev/pandas/pull/34944
| 643,503,008
|
MDExOlB1bGxSZXF1ZXN0NDM4Mjk0MjI5
| 34,944
|
DOC: improve explanation of con argument DataFrame.to_sql
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/48889395?v=4",
"events_url": "https://api.github.com/users/arw2019/events{/privacy}",
"followers_url": "https://api.github.com/users/arw2019/followers",
"following_url": "https://api.github.com/users/arw2019/following{/other_user}",
"gists_url": "https://api.github.com/users/arw2019/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/arw2019",
"id": 48889395,
"login": "arw2019",
"node_id": "MDQ6VXNlcjQ4ODg5Mzk1",
"organizations_url": "https://api.github.com/users/arw2019/orgs",
"received_events_url": "https://api.github.com/users/arw2019/received_events",
"repos_url": "https://api.github.com/users/arw2019/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/arw2019/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/arw2019/subscriptions",
"type": "User",
"url": "https://api.github.com/users/arw2019"
}
|
[
{
"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-06-23T03:32:56Z
| 2020-06-26T17:52:11Z
| 2020-06-25T05:10:27Z
|
MEMBER
| null |
- [x] closes #34824
- [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/34944/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34944/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/34944.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/34944",
"merged_at": "2020-06-25T05:10:27Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/34944.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/34944"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34945
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34945/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34945/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34945/events
|
https://github.com/pandas-dev/pandas/pull/34945
| 643,508,337
|
MDExOlB1bGxSZXF1ZXN0NDM4Mjk4NDAw
| 34,945
|
CLN: no need to pass tz to tzlocal conversion funcs
|
{
"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"
}
| 3
| 2020-06-23T03:49:38Z
| 2021-11-20T23:22:34Z
| 2020-06-23T17:53:04Z
|
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/34945/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34945/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/34945.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/34945",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/34945.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/34945"
}
|
|
https://api.github.com/repos/pandas-dev/pandas/issues/34946
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34946/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34946/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34946/events
|
https://github.com/pandas-dev/pandas/issues/34946
| 643,515,105
|
MDU6SXNzdWU2NDM1MTUxMDU=
| 34,946
|
BUG: Inconsistent behavior: Occasional crash on same code and data
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/67253440?v=4",
"events_url": "https://api.github.com/users/arshadparvez/events{/privacy}",
"followers_url": "https://api.github.com/users/arshadparvez/followers",
"following_url": "https://api.github.com/users/arshadparvez/following{/other_user}",
"gists_url": "https://api.github.com/users/arshadparvez/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/arshadparvez",
"id": 67253440,
"login": "arshadparvez",
"node_id": "MDQ6VXNlcjY3MjUzNDQw",
"organizations_url": "https://api.github.com/users/arshadparvez/orgs",
"received_events_url": "https://api.github.com/users/arshadparvez/received_events",
"repos_url": "https://api.github.com/users/arshadparvez/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/arshadparvez/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/arshadparvez/subscriptions",
"type": "User",
"url": "https://api.github.com/users/arshadparvez"
}
|
[
{
"color": "ffa0ff",
"default": false,
"description": "Incorrect or improved errors from pandas",
"id": 42670965,
"name": "Error Reporting",
"node_id": "MDU6TGFiZWw0MjY3MDk2NQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Error%20Reporting"
},
{
"color": "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": "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-06-23T04:11:52Z
| 2020-06-24T13:25:58Z
| 2020-06-24T13:25:58Z
|
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.
**Description**
When reading csv with pd.read_csv, giving both names= and dtypes= arguments, the program occasionally crashes. Surprisingly, sometimes the application completes its execution cycle normally - without any change in code or data.
I had initially used only the _dtype_ argument, but the first row of my data would be considered as column headers (the csv, otherwise has no headers). Instead of using headers=None, I added _names_ argument, which on one hand made all my rows read as data while on the other set the desired column headers in DataFrame.
But after this change, the program's behavior has become inconsistent; occasional crashing while normal execution at other times.
### Reproducing Code Example
**Example Code and Data**
Minimal code along with a small data file, that demonstrate the reported behavior, is:
```python
import pandas as pd
df = pd.read_csv('data\\test3.csv', names={'pVal1', 'pClass'}, dtype={'pVal1':int, 'pClass':bool})
print (df)
```
The data file test3.csv contains:
```
1,TRUE
2,FALSE
3,TRUE
```
The problem goes away if we remove either of the two arguments (names, dtype). With any of the following statements, the program executes normally:
```
df = pd.read_csv('data\\test3.csv', names={'pVal1', 'pClass'})
```
or
```
df = pd.read_csv('data\\test3.csv', dtype={'pVal1':int, 'pClass':bool})
```
### Error message:
**Demonstration of Inconsistent Behaviour**
I am posting the result of two consecutive executions; first successful, the second failing with error:
**Successful Execution**
(ml) C:\Users\pyuser\projs\ml>py err.py
pVal1 pClass
0 1 True
1 2 False
2 3 True
**Crash with Error**
(ml) C:\Users\pyuser\projs\ml>py err.py
Traceback (most recent call last):
File "pandas\_libs\parsers.pyx", line 1152, in pandas._libs.parsers.TextReader
._convert_tokens
TypeError: Cannot cast array from dtype('int64') to dtype('bool') according to t
he rule 'safe'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "err.py", line 3, in <module>
df = pd.read_csv('data\\test3.csv', names={'pVal1', 'pClass'}, dtype={'pVal1
':int, 'pClass':bool})
File "C:\Users\pyuser\projs\ml\lib\site-packages\pandas\io\parsers.py", line 676
, in parser_f
return _read(filepath_or_buffer, kwds)
File "C:\Users\pyuser\projs\ml\lib\site-packages\pandas\io\parsers.py", line 454
, in _read
data = parser.read(nrows)
File "C:\Users\pyuser\projs\ml\lib\site-packages\pandas\io\parsers.py", line 113
3, in read
ret = self._engine.read(nrows)
File "C:\Users\pyuser\projs\ml\lib\site-packages\pandas\io\parsers.py", line 203
7, in read
data = self._reader.read(nrows)
File "pandas\_libs\parsers.pyx", line 860, in pandas._libs.parsers.TextReader.
read
File "pandas\_libs\parsers.pyx", line 875, in pandas._libs.parsers.TextReader.
_read_low_memory
File "pandas\_libs\parsers.pyx", line 952, in pandas._libs.parsers.TextReader.
_read_rows
File "pandas\_libs\parsers.pyx", line 1084, in pandas._libs.parsers.TextReader
._convert_column_data
File "pandas\_libs\parsers.pyx", line 1160, in pandas._libs.parsers.TextReader
._convert_tokens
ValueError: cannot safely convert passed user dtype of bool for int64 dtyped dat
a in column 0
**Software and Library Versions**
### Numpy/Python version information:
(ml) C:\Users\pyuser\projs\ml>python --version
Python 3.8.2
(ml) C:\Users\pyuser\projs\ml>python -c "import numpy; print(numpy.version.version
)"
1.18.4
(ml) C:\Users\pyuser\projs\ml>python -c "import pandas; print(pandas.__version__)"
1.0.5
<!-- Output from 'import sys, numpy; print(numpy.__version__, sys.version)' -->
1.18.4 3.8.2 (tags/v3.8.2:7b3ab59, Feb 25 2020, 23:03:10) [MSC v.1916 64 bit (AM
D64)]
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/34946/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34946/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/34947
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34947/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34947/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34947/events
|
https://github.com/pandas-dev/pandas/pull/34947
| 643,559,711
|
MDExOlB1bGxSZXF1ZXN0NDM4MzQxNTk1
| 34,947
|
DOC: Demonstrate custom rolling indexer with Businessday
|
{
"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": "3465A4",
"default": false,
"description": null,
"id": 134699,
"name": "Docs",
"node_id": "MDU6TGFiZWwxMzQ2OTk=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Docs"
},
{
"color": "d4c5f9",
"default": false,
"description": "rolling, ewma, expanding",
"id": 1045950827,
"name": "Window",
"node_id": "MDU6TGFiZWwxMDQ1OTUwODI3",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Window"
}
] |
closed
| false
| null |
[] |
{
"closed_at": "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-06-23T06:07:23Z
| 2020-06-25T16:48:29Z
| 2020-06-25T15:50:49Z
|
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/34947/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34947/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/34947.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/34947",
"merged_at": "2020-06-25T15:50:48Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/34947.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/34947"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34948
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34948/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34948/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34948/events
|
https://github.com/pandas-dev/pandas/pull/34948
| 643,709,577
|
MDExOlB1bGxSZXF1ZXN0NDM4NDY0NjIy
| 34,948
|
Pd.series.map performance
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/57575037?v=4",
"events_url": "https://api.github.com/users/Rohith295/events{/privacy}",
"followers_url": "https://api.github.com/users/Rohith295/followers",
"following_url": "https://api.github.com/users/Rohith295/following{/other_user}",
"gists_url": "https://api.github.com/users/Rohith295/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Rohith295",
"id": 57575037,
"login": "Rohith295",
"node_id": "MDQ6VXNlcjU3NTc1MDM3",
"organizations_url": "https://api.github.com/users/Rohith295/orgs",
"received_events_url": "https://api.github.com/users/Rohith295/received_events",
"repos_url": "https://api.github.com/users/Rohith295/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Rohith295/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Rohith295/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Rohith295"
}
|
[
{
"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": "8dd5fc",
"default": false,
"description": "Series data structure",
"id": 1357732944,
"name": "Series",
"node_id": "MDU6TGFiZWwxMzU3NzMyOTQ0",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Series"
},
{
"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-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"
}
| 28
| 2020-06-23T10:06:25Z
| 2020-09-13T20:31:59Z
| 2020-09-13T20:28:44Z
|
CONTRIBUTOR
| null |
There are other places also to refactor to improve the performance, but this current change has greater impact aswell.
- [ ] closes #34717
- [ ] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry `improved the performance of pd.series.map`
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/34948/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34948/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/34948.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/34948",
"merged_at": "2020-09-13T20:28:44Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/34948.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/34948"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34949
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34949/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34949/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34949/events
|
https://github.com/pandas-dev/pandas/pull/34949
| 643,767,051
|
MDExOlB1bGxSZXF1ZXN0NDM4NTExOTYz
| 34,949
|
CLN: Removed unnecessary variable call
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/34067903?v=4",
"events_url": "https://api.github.com/users/erfannariman/events{/privacy}",
"followers_url": "https://api.github.com/users/erfannariman/followers",
"following_url": "https://api.github.com/users/erfannariman/following{/other_user}",
"gists_url": "https://api.github.com/users/erfannariman/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/erfannariman",
"id": 34067903,
"login": "erfannariman",
"node_id": "MDQ6VXNlcjM0MDY3OTAz",
"organizations_url": "https://api.github.com/users/erfannariman/orgs",
"received_events_url": "https://api.github.com/users/erfannariman/received_events",
"repos_url": "https://api.github.com/users/erfannariman/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/erfannariman/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/erfannariman/subscriptions",
"type": "User",
"url": "https://api.github.com/users/erfannariman"
}
|
[
{
"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-06-23T11:37:24Z
| 2020-06-23T18:03:35Z
| 2020-06-23T14:00:07Z
|
CONTRIBUTOR
| null |
- [x] closes #34934
- [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/34949/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34949/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/34949.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/34949",
"merged_at": "2020-06-23T14:00:07Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/34949.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/34949"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34950
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34950/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34950/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34950/events
|
https://github.com/pandas-dev/pandas/pull/34950
| 643,883,041
|
MDExOlB1bGxSZXF1ZXN0NDM4NjA0MzYw
| 34,950
|
Correct the misprint at advanced.rst
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/40598665?v=4",
"events_url": "https://api.github.com/users/glechic/events{/privacy}",
"followers_url": "https://api.github.com/users/glechic/followers",
"following_url": "https://api.github.com/users/glechic/following{/other_user}",
"gists_url": "https://api.github.com/users/glechic/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/glechic",
"id": 40598665,
"login": "glechic",
"node_id": "MDQ6VXNlcjQwNTk4NjY1",
"organizations_url": "https://api.github.com/users/glechic/orgs",
"received_events_url": "https://api.github.com/users/glechic/received_events",
"repos_url": "https://api.github.com/users/glechic/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/glechic/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/glechic/subscriptions",
"type": "User",
"url": "https://api.github.com/users/glechic"
}
|
[
{
"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-06-23T14:19:32Z
| 2020-06-23T16:02:30Z
| 2020-06-23T16:02:26Z
|
CONTRIBUTOR
| null |
- [ ] closes #xxxx
- [ ] 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/34950/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34950/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/34950.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/34950",
"merged_at": "2020-06-23T16:02:26Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/34950.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/34950"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34951
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34951/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34951/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34951/events
|
https://github.com/pandas-dev/pandas/issues/34951
| 643,884,681
|
MDU6SXNzdWU2NDM4ODQ2ODE=
| 34,951
|
BUG: ValueError on groupby with categoricals
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/34147627?v=4",
"events_url": "https://api.github.com/users/LukasGelbmann/events{/privacy}",
"followers_url": "https://api.github.com/users/LukasGelbmann/followers",
"following_url": "https://api.github.com/users/LukasGelbmann/following{/other_user}",
"gists_url": "https://api.github.com/users/LukasGelbmann/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/LukasGelbmann",
"id": 34147627,
"login": "LukasGelbmann",
"node_id": "MDQ6VXNlcjM0MTQ3NjI3",
"organizations_url": "https://api.github.com/users/LukasGelbmann/orgs",
"received_events_url": "https://api.github.com/users/LukasGelbmann/received_events",
"repos_url": "https://api.github.com/users/LukasGelbmann/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/LukasGelbmann/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/LukasGelbmann/subscriptions",
"type": "User",
"url": "https://api.github.com/users/LukasGelbmann"
}
|
[
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "729FCF",
"default": false,
"description": null,
"id": 233160,
"name": "Groupby",
"node_id": "MDU6TGFiZWwyMzMxNjA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Groupby"
},
{
"color": "e11d21",
"default": false,
"description": "Categorical Data Type",
"id": 78527356,
"name": "Categorical",
"node_id": "MDU6TGFiZWw3ODUyNzM1Ng==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Categorical"
}
] |
closed
| false
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/44552904?v=4",
"events_url": "https://api.github.com/users/LucasG0/events{/privacy}",
"followers_url": "https://api.github.com/users/LucasG0/followers",
"following_url": "https://api.github.com/users/LucasG0/following{/other_user}",
"gists_url": "https://api.github.com/users/LucasG0/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/LucasG0",
"id": 44552904,
"login": "LucasG0",
"node_id": "MDQ6VXNlcjQ0NTUyOTA0",
"organizations_url": "https://api.github.com/users/LucasG0/orgs",
"received_events_url": "https://api.github.com/users/LucasG0/received_events",
"repos_url": "https://api.github.com/users/LucasG0/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/LucasG0/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/LucasG0/subscriptions",
"type": "User",
"url": "https://api.github.com/users/LucasG0"
}
|
[
{
"avatar_url": "https://avatars.githubusercontent.com/u/44552904?v=4",
"events_url": "https://api.github.com/users/LucasG0/events{/privacy}",
"followers_url": "https://api.github.com/users/LucasG0/followers",
"following_url": "https://api.github.com/users/LucasG0/following{/other_user}",
"gists_url": "https://api.github.com/users/LucasG0/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/LucasG0",
"id": 44552904,
"login": "LucasG0",
"node_id": "MDQ6VXNlcjQ0NTUyOTA0",
"organizations_url": "https://api.github.com/users/LucasG0/orgs",
"received_events_url": "https://api.github.com/users/LucasG0/received_events",
"repos_url": "https://api.github.com/users/LucasG0/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/LucasG0/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/LucasG0/subscriptions",
"type": "User",
"url": "https://api.github.com/users/LucasG0"
}
] |
{
"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-06-23T14:21:39Z
| 2020-07-13T22:22:45Z
| 2020-07-13T22:22:45Z
|
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 specific situations involving categorical columns, a groupby() on two or more columns runs into an error:
#### Code Sample
```python
import pandas as pd
col = pd.Categorical([0, 1])
df = pd.DataFrame({'A': col, 'B': col, 'C': col})
grouped = df.groupby(['A', 'B']).first()
# ValueError: Shape of passed values is (4, 1), indices imply (2, 1)
```
#### Expected Output
Expected output would be something like:
```
>>> grouped
C
A B
0 0 0
1 NaN
1 0 NaN
1 1
```
Instead an exception is thrown, with the error message shown above.
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/34951/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34951/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/34952
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34952/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34952/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34952/events
|
https://github.com/pandas-dev/pandas/pull/34952
| 643,902,685
|
MDExOlB1bGxSZXF1ZXN0NDM4NjIwMDk5
| 34,952
|
PERF: Fixed cut regression, improve Categorical
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1312546?v=4",
"events_url": "https://api.github.com/users/TomAugspurger/events{/privacy}",
"followers_url": "https://api.github.com/users/TomAugspurger/followers",
"following_url": "https://api.github.com/users/TomAugspurger/following{/other_user}",
"gists_url": "https://api.github.com/users/TomAugspurger/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/TomAugspurger",
"id": 1312546,
"login": "TomAugspurger",
"node_id": "MDQ6VXNlcjEzMTI1NDY=",
"organizations_url": "https://api.github.com/users/TomAugspurger/orgs",
"received_events_url": "https://api.github.com/users/TomAugspurger/received_events",
"repos_url": "https://api.github.com/users/TomAugspurger/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/TomAugspurger/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/TomAugspurger/subscriptions",
"type": "User",
"url": "https://api.github.com/users/TomAugspurger"
}
|
[
{
"color": "a10c02",
"default": false,
"description": "Memory or execution speed performance",
"id": 8935311,
"name": "Performance",
"node_id": "MDU6TGFiZWw4OTM1MzEx",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Performance"
},
{
"color": "e11d21",
"default": false,
"description": "Functionality that used to work in a prior pandas version",
"id": 32815646,
"name": "Regression",
"node_id": "MDU6TGFiZWwzMjgxNTY0Ng==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Regression"
},
{
"color": "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": "9aace2",
"default": false,
"description": "cut, qcut",
"id": 1639305834,
"name": "cut",
"node_id": "MDU6TGFiZWwxNjM5MzA1ODM0",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/cut"
}
] |
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-06-23T14:43:50Z
| 2020-06-25T11:26:09Z
| 2020-06-24T22:37:00Z
|
CONTRIBUTOR
| null |
This has two changes to address a performance regression in
cut / qcut.
~1. Avoid an unnecessary `set` conversion in cut.~ (reverted for now)
2. Aviod a costly conversion to object in the Categoriacl constructor
for dtypes we don't have a hashtable for.
```python
In [2]: idx = pd.interval_range(0, 1, periods=10000)
In [3]: %timeit pd.Categorical(idx, idx)
```
```
# 1.0.4
10.4 ms ± 351 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)
# master
256 ms ± 5.85 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
# HEAD
53.2 µs ± 1.26 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each)
```
And for the qcut ASV
```
# 1.0.4
58.5 ms ± 3.13 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)
# master
134 ms ± 9.5 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)
# HEAD
53.6 ms ± 1.06 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)
```
Closes https://github.com/pandas-dev/pandas/issues/33921
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/34952/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34952/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/34952.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/34952",
"merged_at": "2020-06-24T22:37:00Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/34952.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/34952"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34953
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34953/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34953/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34953/events
|
https://github.com/pandas-dev/pandas/issues/34953
| 643,912,832
|
MDU6SXNzdWU2NDM5MTI4MzI=
| 34,953
|
ENH: more distinguish name for widths arugment in read_fwf
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/34067903?v=4",
"events_url": "https://api.github.com/users/erfannariman/events{/privacy}",
"followers_url": "https://api.github.com/users/erfannariman/followers",
"following_url": "https://api.github.com/users/erfannariman/following{/other_user}",
"gists_url": "https://api.github.com/users/erfannariman/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/erfannariman",
"id": 34067903,
"login": "erfannariman",
"node_id": "MDQ6VXNlcjM0MDY3OTAz",
"organizations_url": "https://api.github.com/users/erfannariman/orgs",
"received_events_url": "https://api.github.com/users/erfannariman/received_events",
"repos_url": "https://api.github.com/users/erfannariman/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/erfannariman/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/erfannariman/subscriptions",
"type": "User",
"url": "https://api.github.com/users/erfannariman"
}
|
[
{
"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": "e99695",
"default": false,
"description": "read_fwf",
"id": 1728902385,
"name": "IO Fixed Width",
"node_id": "MDU6TGFiZWwxNzI4OTAyMzg1",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20Fixed%20Width"
}
] |
open
| false
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/34067903?v=4",
"events_url": "https://api.github.com/users/erfannariman/events{/privacy}",
"followers_url": "https://api.github.com/users/erfannariman/followers",
"following_url": "https://api.github.com/users/erfannariman/following{/other_user}",
"gists_url": "https://api.github.com/users/erfannariman/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/erfannariman",
"id": 34067903,
"login": "erfannariman",
"node_id": "MDQ6VXNlcjM0MDY3OTAz",
"organizations_url": "https://api.github.com/users/erfannariman/orgs",
"received_events_url": "https://api.github.com/users/erfannariman/received_events",
"repos_url": "https://api.github.com/users/erfannariman/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/erfannariman/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/erfannariman/subscriptions",
"type": "User",
"url": "https://api.github.com/users/erfannariman"
}
|
[
{
"avatar_url": "https://avatars.githubusercontent.com/u/34067903?v=4",
"events_url": "https://api.github.com/users/erfannariman/events{/privacy}",
"followers_url": "https://api.github.com/users/erfannariman/followers",
"following_url": "https://api.github.com/users/erfannariman/following{/other_user}",
"gists_url": "https://api.github.com/users/erfannariman/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/erfannariman",
"id": 34067903,
"login": "erfannariman",
"node_id": "MDQ6VXNlcjM0MDY3OTAz",
"organizations_url": "https://api.github.com/users/erfannariman/orgs",
"received_events_url": "https://api.github.com/users/erfannariman/received_events",
"repos_url": "https://api.github.com/users/erfannariman/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/erfannariman/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/erfannariman/subscriptions",
"type": "User",
"url": "https://api.github.com/users/erfannariman"
}
] | null | 1
| 2020-06-23T14:56:38Z
| 2021-08-08T16:37:13Z
| null |
CONTRIBUTOR
| null |
#### Is your feature request related to a problem?
We ran into the problem that `read_fwf` uses `widths` as an argument to define contigious intervals. But because of `**kwargs`, it will also accept `width` and not throw a warning or error. In this case it will produce the wrong output, but without seeing the typo, it;s hard to find out what went wrong.
#### Describe the solution you'd like
Instead of the argument `widths`, use a more distinguish / informative name like `fixed_widths`. Or if changing the name is not preferable, we can throw a warning when a `width` is used in `read_fwf` instead of `widths`
#### API breaking implications
Not sure
Example with using the correct argument `widths`
```python
d = StringIO("""
AA1234 aaaa bbb
BB5678 cccc ddd
CC9999 eeee fff
""")
fixed_widths = [2, 4, 9, 8]
df = pd.read_fwf(d, widths=fixed_widths)
Unnamed: 0 Unnamed: 1 Unnamed: 2 Unnamed: 3
0 AA 1234 aaaa bbb
1 BB 5678 cccc ddd
2 CC 9999 eeee fff
```
Example using the wrong argument `width`:
```python
d = StringIO("""
AA1234 aaaa bbb
BB5678 cccc ddd
CC9999 eeee fff
""")
fixed_widths = [2, 4, 9, 8]
df = pd.read_fwf(d, width=fixed_widths)
Unnamed: 0 Unnamed: 1 Unnamed: 2
0 AA1234 aaaa bbb
1 BB5678 cccc ddd
2 CC9999 eeee fff
```
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/34953/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34953/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/34954
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34954/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34954/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34954/events
|
https://github.com/pandas-dev/pandas/pull/34954
| 643,964,027
|
MDExOlB1bGxSZXF1ZXN0NDM4NjcwMzA5
| 34,954
|
Fix Issue 34748 - read in datetime as MultiIndex for column headers
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/15113894?v=4",
"events_url": "https://api.github.com/users/Dr-Irv/events{/privacy}",
"followers_url": "https://api.github.com/users/Dr-Irv/followers",
"following_url": "https://api.github.com/users/Dr-Irv/following{/other_user}",
"gists_url": "https://api.github.com/users/Dr-Irv/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Dr-Irv",
"id": 15113894,
"login": "Dr-Irv",
"node_id": "MDQ6VXNlcjE1MTEzODk0",
"organizations_url": "https://api.github.com/users/Dr-Irv/orgs",
"received_events_url": "https://api.github.com/users/Dr-Irv/received_events",
"repos_url": "https://api.github.com/users/Dr-Irv/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Dr-Irv/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Dr-Irv/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Dr-Irv"
}
|
[
{
"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": "bfe5bf",
"default": false,
"description": "read_excel, to_excel",
"id": 49254273,
"name": "IO Excel",
"node_id": "MDU6TGFiZWw0OTI1NDI3Mw==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20Excel"
}
] |
closed
| false
| null |
[] |
{
"closed_at": "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"
}
| 15
| 2020-06-23T16:04:14Z
| 2020-07-08T22:04:07Z
| 2020-07-08T22:03:48Z
|
CONTRIBUTOR
| null |
- [x] closes #34748
- [x] tests added / passed
- `pandas/tests/io/excel/test_readers.py`, method `test_read_datetime_multiindex`
- [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/34954/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34954/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/34954.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/34954",
"merged_at": "2020-07-08T22:03:47Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/34954.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/34954"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34955
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34955/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34955/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34955/events
|
https://github.com/pandas-dev/pandas/pull/34955
| 643,966,900
|
MDExOlB1bGxSZXF1ZXN0NDM4NjcyNjAw
| 34,955
|
DOC: Clarify in pandas.DataFrame.drop that a copy is returned when inplace = False.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/44098774?v=4",
"events_url": "https://api.github.com/users/marinomaria/events{/privacy}",
"followers_url": "https://api.github.com/users/marinomaria/followers",
"following_url": "https://api.github.com/users/marinomaria/following{/other_user}",
"gists_url": "https://api.github.com/users/marinomaria/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/marinomaria",
"id": 44098774,
"login": "marinomaria",
"node_id": "MDQ6VXNlcjQ0MDk4Nzc0",
"organizations_url": "https://api.github.com/users/marinomaria/orgs",
"received_events_url": "https://api.github.com/users/marinomaria/received_events",
"repos_url": "https://api.github.com/users/marinomaria/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/marinomaria/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/marinomaria/subscriptions",
"type": "User",
"url": "https://api.github.com/users/marinomaria"
}
|
[
{
"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-06-23T16:06:59Z
| 2020-06-24T08:10:19Z
| 2020-06-23T19:44:20Z
|
CONTRIBUTOR
| null |
Clarify in `pandas.DataFrame.drop` that a copy is returned when `inplace = False`.
- [x] closes #33451
- [ ] 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/34955/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34955/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/34955.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/34955",
"merged_at": "2020-06-23T19:44:19Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/34955.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/34955"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34956
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34956/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34956/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34956/events
|
https://github.com/pandas-dev/pandas/pull/34956
| 643,986,329
|
MDExOlB1bGxSZXF1ZXN0NDM4Njg4NzI2
| 34,956
|
ENH: GH34946 Check type of names argument to `read_csv`, `read_table`…
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/3872947?v=4",
"events_url": "https://api.github.com/users/MJafarMashhadi/events{/privacy}",
"followers_url": "https://api.github.com/users/MJafarMashhadi/followers",
"following_url": "https://api.github.com/users/MJafarMashhadi/following{/other_user}",
"gists_url": "https://api.github.com/users/MJafarMashhadi/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/MJafarMashhadi",
"id": 3872947,
"login": "MJafarMashhadi",
"node_id": "MDQ6VXNlcjM4NzI5NDc=",
"organizations_url": "https://api.github.com/users/MJafarMashhadi/orgs",
"received_events_url": "https://api.github.com/users/MJafarMashhadi/received_events",
"repos_url": "https://api.github.com/users/MJafarMashhadi/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/MJafarMashhadi/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/MJafarMashhadi/subscriptions",
"type": "User",
"url": "https://api.github.com/users/MJafarMashhadi"
}
|
[
{
"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": "ffa0ff",
"default": false,
"description": "Incorrect or improved errors from pandas",
"id": 42670965,
"name": "Error Reporting",
"node_id": "MDU6TGFiZWw0MjY3MDk2NQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Error%20Reporting"
},
{
"color": "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": "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-06-23T16:37:24Z
| 2020-06-24T16:13:43Z
| 2020-06-24T13:25:58Z
|
CONTRIBUTOR
| null |
- [x] closes #34946
- [x] tests passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry
- ~~One test failed (TestTSPlot.test_ts_plot_with_tz) but it's not related to what I changed.~~
- ~~Does it need a whatsnew entry?~~
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/34956/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34956/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/34956.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/34956",
"merged_at": "2020-06-24T13:25:57Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/34956.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/34956"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34957
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34957/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34957/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34957/events
|
https://github.com/pandas-dev/pandas/issues/34957
| 644,050,355
|
MDU6SXNzdWU2NDQwNTAzNTU=
| 34,957
|
QST: Behaviour of `mean()` for a Series of strings.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/3190405?v=4",
"events_url": "https://api.github.com/users/shwina/events{/privacy}",
"followers_url": "https://api.github.com/users/shwina/followers",
"following_url": "https://api.github.com/users/shwina/following{/other_user}",
"gists_url": "https://api.github.com/users/shwina/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/shwina",
"id": 3190405,
"login": "shwina",
"node_id": "MDQ6VXNlcjMxOTA0MDU=",
"organizations_url": "https://api.github.com/users/shwina/orgs",
"received_events_url": "https://api.github.com/users/shwina/received_events",
"repos_url": "https://api.github.com/users/shwina/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/shwina/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/shwina/subscriptions",
"type": "User",
"url": "https://api.github.com/users/shwina"
}
|
[
{
"color": "0052cc",
"default": false,
"description": null,
"id": 34444536,
"name": "Usage Question",
"node_id": "MDU6TGFiZWwzNDQ0NDUzNg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Usage%20Question"
},
{
"color": "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-06-23T18:21:05Z
| 2020-06-23T21:41:07Z
| 2020-06-23T21:40:56Z
|
CONTRIBUTOR
| null |
Greetings, Pandas devs! My question is about the behaviour of `mean()` for a Series of strings:
```
In [1]: import pandas as pd
In [2]: pd.Series(['1', '2']).mean()
Out[2]: 6.0
```
From https://github.com/pandas-dev/pandas/issues/34671#issuecomment-641927667, the result is `6` because:
> "1" + "2" is "12", and then we convert to numeric 12, and divide by the count
This feels like somewhat implicit behaviour that makes assumptions about how the mean is computed.
Would it be more desirable to throw here? Or perhaps return `1.5` instead?
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/34957/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34957/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/34958
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34958/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34958/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34958/events
|
https://github.com/pandas-dev/pandas/issues/34958
| 644,054,452
|
MDU6SXNzdWU2NDQwNTQ0NTI=
| 34,958
|
ENH: DataFrame.query() should prioritize column names over types defined in local scope.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1383080?v=4",
"events_url": "https://api.github.com/users/chrisjcameron/events{/privacy}",
"followers_url": "https://api.github.com/users/chrisjcameron/followers",
"following_url": "https://api.github.com/users/chrisjcameron/following{/other_user}",
"gists_url": "https://api.github.com/users/chrisjcameron/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/chrisjcameron",
"id": 1383080,
"login": "chrisjcameron",
"node_id": "MDQ6VXNlcjEzODMwODA=",
"organizations_url": "https://api.github.com/users/chrisjcameron/orgs",
"received_events_url": "https://api.github.com/users/chrisjcameron/received_events",
"repos_url": "https://api.github.com/users/chrisjcameron/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/chrisjcameron/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/chrisjcameron/subscriptions",
"type": "User",
"url": "https://api.github.com/users/chrisjcameron"
}
|
[
{
"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": "f3afff",
"default": false,
"description": "pd.eval, query",
"id": 1631985267,
"name": "expressions",
"node_id": "MDU6TGFiZWwxNjMxOTg1MjY3",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/expressions"
}
] |
open
| false
| null |
[] | null | 0
| 2020-06-23T18:28:26Z
| 2020-09-03T01:09:49Z
| null |
NONE
| null |
#### Is your feature request related to a problem?
If a column name matches a defined type it does not seem to be possible to include the column in a .query() string. For instance, `df.query("Timestamp < 10")` throws a `TypeError: '<' not supported between instances of 'type' and 'int'` for a dataframe where `df[df.Timestamp < 10]` yields the expected result.
#### Describe the solution you'd like
Ideally, a query string should prioritize the the column or row index values for the dataframe whose .query method is called. This the natural scope of a query on a dataframe and we already have special operators (e.g. `@`) to indicate that objects that exist outside the dataframe "namespace". The current behavior to automatically search outside the dataframe is almost a bug.
#### Describe alternatives you've considered
Alternative 1: Perhaps the backtick escaping for column names with spaces could be extended to prefer matching dataframe column names over classes in the local scope. It does not make as much sense namespace-wise but it is less breaking than the proposed solution.
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/34958/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34958/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/34959
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34959/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34959/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34959/events
|
https://github.com/pandas-dev/pandas/issues/34959
| 644,055,066
|
MDU6SXNzdWU2NDQwNTUwNjY=
| 34,959
|
BUG: DataFrame.__setitem__ creates object-dtype array for 3rd Party extension type scalars
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/24326925?v=4",
"events_url": "https://api.github.com/users/justinessert/events{/privacy}",
"followers_url": "https://api.github.com/users/justinessert/followers",
"following_url": "https://api.github.com/users/justinessert/following{/other_user}",
"gists_url": "https://api.github.com/users/justinessert/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/justinessert",
"id": 24326925,
"login": "justinessert",
"node_id": "MDQ6VXNlcjI0MzI2OTI1",
"organizations_url": "https://api.github.com/users/justinessert/orgs",
"received_events_url": "https://api.github.com/users/justinessert/received_events",
"repos_url": "https://api.github.com/users/justinessert/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/justinessert/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/justinessert/subscriptions",
"type": "User",
"url": "https://api.github.com/users/justinessert"
}
|
[
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "0b02e1",
"default": false,
"description": "Related to indexing on series/frames, not to indexes themselves",
"id": 2822098,
"name": "Indexing",
"node_id": "MDU6TGFiZWwyODIyMDk4",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Indexing"
},
{
"color": "e102d8",
"default": false,
"description": "Unexpected or buggy dtype conversions",
"id": 31404521,
"name": "Dtype Conversions",
"node_id": "MDU6TGFiZWwzMTQwNDUyMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Dtype%20Conversions"
},
{
"color": "6138b5",
"default": false,
"description": "Extending pandas with custom dtypes or arrays.",
"id": 849023693,
"name": "ExtensionArray",
"node_id": "MDU6TGFiZWw4NDkwMjM2OTM=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/ExtensionArray"
}
] |
open
| false
| null |
[] | null | 0
| 2020-06-23T18:29:28Z
| 2021-08-08T16:38:01Z
| null |
CONTRIBUTOR
| null |
- [x] I have checked that this issue has not already been reported.
- [x] I have confirmed this bug exists on the latest version of pandas.
- [x] (optional) I have confirmed this bug exists on the master branch of pandas.
---
#### Code Sample, a copy-pastable example
```python
import decimal
from pandas.tests.extension.decimal.array import DecimalArray, DecimalDtype
import pandas as pd
df = pd.DataFrame(index=[0,1,2], columns=['a'], data=decimal.Decimal('1'))
df['b'] = decimal.Decimal('1')
df.dtypes
```
#### Problem description
Both columns 'a' and 'b' are created as object columns in the above DataFrame, instead of the expected Decimal type (and this happens for all 3rd party extension types). This is unexpected because these 3rd party extended are supported as a data type in pandas, but are not being applied.
This issue was originally reported for 1st party extension types in [Issue 34832](https://github.com/pandas-dev/pandas/issues/34832) and should be fixed (for 1st party extensions) in [PR 34875](https://github.com/pandas-dev/pandas/pull/34875). But work still remains to extend this bug fix to 3rd party extension types.
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit : 291eb2d117f15eb17cca817ab0a6fb86f6b985a3
python : 3.7.6.final.0
python-bits : 64
OS : Darwin
OS-release : 18.7.0
Version : Darwin Kernel Version 18.7.0: Sun Dec 1 18:59:03 PST 2019; root:xnu-4903.278.19~1/RELEASE_X86_64
machine : x86_64
processor : i386
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.1.0.dev0+1915.g291eb2d11
numpy : 1.18.5
pytz : 2020.1
dateutil : 2.8.1
pip : 20.1.1
setuptools : 47.3.1.post20200616
Cython : 0.29.20
pytest : 5.4.3
hypothesis : 5.16.2
sphinx : 3.1.1
blosc : 1.9.1
feather : None
xlsxwriter : 1.2.9
lxml.etree : 4.5.1
html5lib : 1.0.1
pymysql : None
psycopg2 : None
jinja2 : 2.11.2
IPython : 7.15.0
pandas_datareader: None
bs4 : 4.9.1
bottleneck : 1.3.2
fastparquet : 0.4.0
gcsfs : None
matplotlib : 3.2.2
numexpr : 2.7.1
odfpy : None
openpyxl : 3.0.3
pandas_gbq : None
pyarrow : 0.17.1
pytables : None
pyxlsb : None
s3fs : 0.4.2
scipy : 1.4.1
sqlalchemy : 1.3.17
tables : 3.6.1
tabulate : 0.8.7
xarray : 0.15.1
xlrd : 1.2.0
xlwt : 1.3.0
numba : 0.50.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/34959/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34959/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/34960
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34960/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34960/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34960/events
|
https://github.com/pandas-dev/pandas/pull/34960
| 644,060,376
|
MDExOlB1bGxSZXF1ZXN0NDM4NzQ5NzM1
| 34,960
|
DOC: misc sphinx directive fixes
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/13159005?v=4",
"events_url": "https://api.github.com/users/simonjayhawkins/events{/privacy}",
"followers_url": "https://api.github.com/users/simonjayhawkins/followers",
"following_url": "https://api.github.com/users/simonjayhawkins/following{/other_user}",
"gists_url": "https://api.github.com/users/simonjayhawkins/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/simonjayhawkins",
"id": 13159005,
"login": "simonjayhawkins",
"node_id": "MDQ6VXNlcjEzMTU5MDA1",
"organizations_url": "https://api.github.com/users/simonjayhawkins/orgs",
"received_events_url": "https://api.github.com/users/simonjayhawkins/received_events",
"repos_url": "https://api.github.com/users/simonjayhawkins/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/simonjayhawkins/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/simonjayhawkins/subscriptions",
"type": "User",
"url": "https://api.github.com/users/simonjayhawkins"
}
|
[
{
"color": "3465A4",
"default": false,
"description": null,
"id": 134699,
"name": "Docs",
"node_id": "MDU6TGFiZWwxMzQ2OTk=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Docs"
}
] |
closed
| false
| null |
[] |
{
"closed_at": "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-06-23T18:38:57Z
| 2020-06-24T13:05:24Z
| 2020-06-23T20:08: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/34960/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34960/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/34960.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/34960",
"merged_at": "2020-06-23T20:08:43Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/34960.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/34960"
}
|
|
https://api.github.com/repos/pandas-dev/pandas/issues/34961
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34961/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34961/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34961/events
|
https://github.com/pandas-dev/pandas/issues/34961
| 644,160,069
|
MDU6SXNzdWU2NDQxNjAwNjk=
| 34,961
|
REF/INT: never set `df._mgr` after `__init__`, never hold a Block in more than 1 BlockManager
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
}
|
[
{
"color": "FCE94F",
"default": false,
"description": "Internal refactoring of code",
"id": 127681,
"name": "Refactor",
"node_id": "MDU6TGFiZWwxMjc2ODE=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Refactor"
},
{
"color": "fbca04",
"default": false,
"description": "Related to non-user accessible pandas implementation",
"id": 49094459,
"name": "Internals",
"node_id": "MDU6TGFiZWw0OTA5NDQ1OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Internals"
}
] |
closed
| false
| null |
[] | null | 5
| 2020-06-23T21:31:28Z
| 2020-07-06T15:39:25Z
| 2020-07-06T15:32:41Z
|
MEMBER
| null |
ATM there are a few places where we will do `self._mgr = mgr.reindex_or_whatever(...)`. I think the code would be easier to reason about if we avoided this pattern. To do that, we will need the relevant `mgr.reindex_or_whatever` methods to be in-place at the `BlockManager` level.
Similarly I don't think we have strictly-enforced policies describing the relationship between Block objects and BlockManagers.
Potential tightening of rules we could implement:
1) A DataFrame will only ever have a single BlockManager attached to it.
2) A BlockManager will only ever be attached to a single DataFrame.
3) A Block will only ever be attached to a single BlockManager
Thoughts? Others I'm missing?
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/34961/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34961/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/34962
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34962/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34962/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34962/events
|
https://github.com/pandas-dev/pandas/pull/34962
| 644,259,319
|
MDExOlB1bGxSZXF1ZXN0NDM4OTEzNjU4
| 34,962
|
REF: dont consolidate in BlockManager.equals
|
{
"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": "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": "fbca04",
"default": false,
"description": "Related to non-user accessible pandas implementation",
"id": 49094459,
"name": "Internals",
"node_id": "MDU6TGFiZWw0OTA5NDQ1OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Internals"
}
] |
closed
| false
| null |
[] |
{
"closed_at": "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-06-24T01:57:30Z
| 2020-07-08T16:43:31Z
| 2020-07-06T00:12:47Z
|
MEMBER
| null |
Avoid side-effects.
Side-note: with EA.equals recently added to the interface, should we update array_equivalent to use it? ATM array_equivalent starts by casting both inputs to ndarray.
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/34962/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34962/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/34962.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/34962",
"merged_at": "2020-07-06T00:12:47Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/34962.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/34962"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34963
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34963/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34963/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34963/events
|
https://github.com/pandas-dev/pandas/pull/34963
| 644,264,418
|
MDExOlB1bGxSZXF1ZXN0NDM4OTE3Nzcy
| 34,963
|
REF: add Tick and BaseOffset to tslibs namespace
|
{
"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"
},
{
"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-06-24T02:13:38Z
| 2020-06-24T22:25:21Z
| 2020-06-24T22:18:59Z
|
MEMBER
| null |
Update imports appropriately.
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/34963/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34963/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/34963.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/34963",
"merged_at": "2020-06-24T22:18:59Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/34963.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/34963"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34964
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34964/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34964/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34964/events
|
https://github.com/pandas-dev/pandas/issues/34964
| 644,351,054
|
MDU6SXNzdWU2NDQzNTEwNTQ=
| 34,964
|
I had this error please tell me the solution
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/56901696?v=4",
"events_url": "https://api.github.com/users/hamzajamil12/events{/privacy}",
"followers_url": "https://api.github.com/users/hamzajamil12/followers",
"following_url": "https://api.github.com/users/hamzajamil12/following{/other_user}",
"gists_url": "https://api.github.com/users/hamzajamil12/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/hamzajamil12",
"id": 56901696,
"login": "hamzajamil12",
"node_id": "MDQ6VXNlcjU2OTAxNjk2",
"organizations_url": "https://api.github.com/users/hamzajamil12/orgs",
"received_events_url": "https://api.github.com/users/hamzajamil12/received_events",
"repos_url": "https://api.github.com/users/hamzajamil12/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/hamzajamil12/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/hamzajamil12/subscriptions",
"type": "User",
"url": "https://api.github.com/users/hamzajamil12"
}
|
[] |
closed
| false
| null |
[] | null | 1
| 2020-06-24T06:19:22Z
| 2020-06-24T07:19:28Z
| 2020-06-24T07:19:28Z
|
NONE
| null |
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-14-71bf30a97169> in <module>
----> 1 df=pd.read("datasets_33180_43520_heart_csv.py")
~\miniconda3\lib\site-packages\pandas\__init__.py in __getattr__(name)
261 return _SparseArray
262
--> 263 raise AttributeError(f"module 'pandas' has no attribute '{name}'")
264
265
AttributeError: module 'pandas' has no attribute 'read'
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/34964/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34964/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/34965
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34965/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34965/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34965/events
|
https://github.com/pandas-dev/pandas/issues/34965
| 644,415,605
|
MDU6SXNzdWU2NDQ0MTU2MDU=
| 34,965
|
BUG: Unexpected behaviour of rolling with apply on DataFrame
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/60423936?v=4",
"events_url": "https://api.github.com/users/oXwvdrbbj8S4wo9k8lSN/events{/privacy}",
"followers_url": "https://api.github.com/users/oXwvdrbbj8S4wo9k8lSN/followers",
"following_url": "https://api.github.com/users/oXwvdrbbj8S4wo9k8lSN/following{/other_user}",
"gists_url": "https://api.github.com/users/oXwvdrbbj8S4wo9k8lSN/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/oXwvdrbbj8S4wo9k8lSN",
"id": 60423936,
"login": "oXwvdrbbj8S4wo9k8lSN",
"node_id": "MDQ6VXNlcjYwNDIzOTM2",
"organizations_url": "https://api.github.com/users/oXwvdrbbj8S4wo9k8lSN/orgs",
"received_events_url": "https://api.github.com/users/oXwvdrbbj8S4wo9k8lSN/received_events",
"repos_url": "https://api.github.com/users/oXwvdrbbj8S4wo9k8lSN/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/oXwvdrbbj8S4wo9k8lSN/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/oXwvdrbbj8S4wo9k8lSN/subscriptions",
"type": "User",
"url": "https://api.github.com/users/oXwvdrbbj8S4wo9k8lSN"
}
|
[
{
"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"
},
{
"color": "0052cc",
"default": false,
"description": "Issue that has not been reviewed by a pandas team member",
"id": 1954720290,
"name": "Needs Triage",
"node_id": "MDU6TGFiZWwxOTU0NzIwMjkw",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Needs%20Triage"
}
] |
closed
| false
| null |
[] | null | 1
| 2020-06-24T08:16:19Z
| 2020-09-04T14:26:11Z
| 2020-09-04T14:26:07Z
|
NONE
| null |
- [x] I have checked that this issue has not already been reported.
- [x] I have confirmed this bug exists on the latest version of pandas.
- [ ] (optional) I have confirmed this bug exists on the master branch of pandas.
---
When executed on a DataFrame, _rolling_ seems to select only certain columns for processing. For demonstration, I created a DataFrame that has three columns (A, B, and C), of which the first contains TimeDeltas and the other contain Floats. When using rolling, e.g. with _sum_, only the Floats are passed on.
Even stranger, when used in combination with apply, only the first column containing Floats is passed to the function, whereas I would have expected the corresponding part of the DataFrame.
#### Code Sample, a copy-pastable example
```python
import pandas as pd
columns = ["A", "B", "C"]
index = list(range(10))
data = [[10**10,2,3]]*len(index)
df = pd.DataFrame(columns = columns, index = index, data=data)
df["A"] = df["A"].apply(pd.to_timedelta)
```
The resulting _df_ will look like this:
```python
A B C
0 00:00:10 2 3
1 00:00:10 2 3
2 00:00:10 2 3
3 00:00:10 2 3
4 00:00:10 2 3
5 00:00:10 2 3
6 00:00:10 2 3
7 00:00:10 2 3
8 00:00:10 2 3
9 00:00:10 2 3
```
Applying _rolling_ with _sum_ like this:
```python
df.rolling(window=2).sum()
```
will result in the following output, in which the first column is missing:
```python
B C
0 NaN NaN
1 4.0 6.0
2 4.0 6.0
3 4.0 6.0
4 4.0 6.0
5 4.0 6.0
6 4.0 6.0
7 4.0 6.0
8 4.0 6.0
9 4.0 6.0
```
To demonstrate the problem with _apply_, I created a custom function that simply outputs the number of columns (since I expected a DataFrame to be passed to the function:
```python
def get_num_columns(sub_df):
print(sub_df)
return len(sub_df.columns)
df.rolling(window=2).apply(get_num_columns, raw=False)
```
This produces the exception "AttributeError: 'Series' object has no attribute 'columns'" and the following printout:
```python
0 2.0
1 2.0
dtype: float64
```
#### Problem description
I would expect in both cases that the windowed DataFrame with all columns is used within the function (either _sum_ or _get\_num\_columns_).
#### Expected Output
In the case of _sum_, I would either expect an Exception that tells the user that only Floats are acceptable or - preferably - the following output:
```python
A B C
0 NaT NaN NaN
1 00:00:20 4.0 6.0
2 00:00:20 4.0 6.0
3 00:00:20 4.0 6.0
4 00:00:20 4.0 6.0
5 00:00:20 4.0 6.0
6 00:00:20 4.0 6.0
7 00:00:20 4.0 6.0
8 00:00:20 4.0 6.0
9 00:00:20 4.0 6.0
```
In the case of _apply_, I would have expected a DataFrame as input to the function. Therefore, the output of the function (without the prints) should be:
```python
0 3
1 3
2 3
3 3
4 3
5 3
6 3
7 3
8 3
9 3
```
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit : None
python : 3.7.6.final.0
python-bits : 64
OS : Linux
OS-release : 4.19.76-linuxkit
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : en_US.UTF-8
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.0.5
numpy : 1.18.5
pytz : 2020.1
dateutil : 2.8.1
pip : 20.1.1
setuptools : 47.3.1.post20200616
Cython : 0.29.20
pytest : 5.4.3
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : 4.5.1
html5lib : None
pymysql : 0.9.3
psycopg2 : 2.8.5 (dt dec pq3 ext lo64)
jinja2 : 2.11.2
IPython : 7.15.0
pandas_datareader: None
bs4 : 4.9.1
bottleneck : 1.3.2
fastparquet : None
gcsfs : None
lxml.etree : 4.5.1
matplotlib : 3.2.1
numexpr : 2.7.1
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : 0.17.1
pytables : None
pytest : 5.4.3
pyxlsb : None
s3fs : None
scipy : 1.4.1
sqlalchemy : 1.3.17
tables : 3.6.1
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/34965/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34965/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/34966
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34966/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34966/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34966/events
|
https://github.com/pandas-dev/pandas/issues/34966
| 644,431,832
|
MDU6SXNzdWU2NDQ0MzE4MzI=
| 34,966
|
DOC: Confusing 'resolvers' kwarg documentation for DataFrame.query()
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/67364157?v=4",
"events_url": "https://api.github.com/users/eric-brunner/events{/privacy}",
"followers_url": "https://api.github.com/users/eric-brunner/followers",
"following_url": "https://api.github.com/users/eric-brunner/following{/other_user}",
"gists_url": "https://api.github.com/users/eric-brunner/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/eric-brunner",
"id": 67364157,
"login": "eric-brunner",
"node_id": "MDQ6VXNlcjY3MzY0MTU3",
"organizations_url": "https://api.github.com/users/eric-brunner/orgs",
"received_events_url": "https://api.github.com/users/eric-brunner/received_events",
"repos_url": "https://api.github.com/users/eric-brunner/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/eric-brunner/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/eric-brunner/subscriptions",
"type": "User",
"url": "https://api.github.com/users/eric-brunner"
}
|
[
{
"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": "f3afff",
"default": false,
"description": "pd.eval, query",
"id": 1631985267,
"name": "expressions",
"node_id": "MDU6TGFiZWwxNjMxOTg1MjY3",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/expressions"
}
] |
open
| false
| null |
[] | null | 0
| 2020-06-24T08:41:59Z
| 2020-09-03T03:12:24Z
| null |
NONE
| null |
#### Location of the documentation
According to DataFrame.query() documentation
([https://pandas.pydata.org/docs/dev/reference/api/pandas.DataFrame.query.html#pandas.DataFrame.query](https://pandas.pydata.org/docs/dev/reference/api/pandas.DataFrame.query.html#pandas.DataFrame.query))
the 'resolvers' keyword is allowed and its function documented by DataFrame.eval() ([https://pandas.pydata.org/docs/dev/reference/api/pandas.eval.html#pandas.eval](https://pandas.pydata.org/docs/dev/reference/api/pandas.eval.html#pandas.eval)).
#### Documentation problem
The keyword's description states:
"A list of objects implementing the __getitem__ special method that you can use to *inject an additional* collection of namespaces to use for variable lookup. [...]"
But default namespaces used by DataFrame.eval() are actually overwritten by namespace collections. See basic example:
```
from pandas import DataFrame, Series
import numpy as np
df = DataFrame(np.random.random((5, 3)),)
print(df.query('index==1'))
print(df.query('map==1', resolvers=({'map': Series([4,3,2,1,0], [0,1,2,3,4])},)))
print(df.query('index==1', resolvers=({'map': Series([4,3,2,1,0], [0,1,2,3,4])},)))
```
The last line raises an UndefinedVariableError, because 'index' is no longer part of the namespace collection.
This is caused by the condition `if resolvers is None:` in DataFrame.eval() source code (v1.0.4, frame.py, line 3335):
```
...
inplace = validate_bool_kwarg(inplace, "inplace")
resolvers = kwargs.pop("resolvers", None)
kwargs["level"] = kwargs.pop("level", 0) + 1
if resolvers is None:
index_resolvers = self._get_index_resolvers()
column_resolvers = self._get_cleaned_column_resolvers()
resolvers = column_resolvers, index_resolvers
if "target" not in kwargs:
kwargs["target"] = self
kwargs["resolvers"] = kwargs.get("resolvers", ()) + tuple(resolvers)
...
```
#### Suggested fix for documentation
Therefore, according to the actual behaviour, the documentation for the 'resolvers' kwarg of DataFrame.eval() should read:
"A list of objects implementing the __getitem__ special method that you can use to *replace the default* collection of namespaces to use for variable lookup. [...]"
**OR**
Is this a bug? Should it be addressed?
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/34966/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34966/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/34967
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34967/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34967/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34967/events
|
https://github.com/pandas-dev/pandas/issues/34967
| 644,450,620
|
MDU6SXNzdWU2NDQ0NTA2MjA=
| 34,967
|
QST: pandas get_loc with 'ffill' gives unexpected results within group
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/37252546?v=4",
"events_url": "https://api.github.com/users/RobertRol/events{/privacy}",
"followers_url": "https://api.github.com/users/RobertRol/followers",
"following_url": "https://api.github.com/users/RobertRol/following{/other_user}",
"gists_url": "https://api.github.com/users/RobertRol/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/RobertRol",
"id": 37252546,
"login": "RobertRol",
"node_id": "MDQ6VXNlcjM3MjUyNTQ2",
"organizations_url": "https://api.github.com/users/RobertRol/orgs",
"received_events_url": "https://api.github.com/users/RobertRol/received_events",
"repos_url": "https://api.github.com/users/RobertRol/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/RobertRol/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/RobertRol/subscriptions",
"type": "User",
"url": "https://api.github.com/users/RobertRol"
}
|
[
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "729FCF",
"default": false,
"description": null,
"id": 233160,
"name": "Groupby",
"node_id": "MDU6TGFiZWwyMzMxNjA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Groupby"
}
] |
open
| false
| null |
[] | null | 2
| 2020-06-24T09:09:16Z
| 2020-09-04T14:30:41Z
| 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).
---
I have asked this question on SO but did not get any answers there. Below I give a simplified version of my SO question.
I am not sure whether this is a bug or whether I misunderstand how indexing within groups works.
https://stackoverflow.com/questions/62149056/pandas-get-loc-with-ffill-gives-unexpected-results-within-group
Assume you have the following dataframe
```python
import pandas as pd
# pandas==1.0.4
df = pd.DataFrame({'idxDigits': [1, 1, 2, 2]},
index=pd.Index([0, 1 , 10, 11], name='myIdx'))
print(df)
# idxDigits
# myIdx
# 0 1
# 1 1
# 10 2
# 11 2
```
and you want to find for each `idxDigits` number the dataframe entry that is at or before a user-specified index value `idxSearchValue`.
My approach was to define the following function
```python
def mySelect(x, idxSearchValue):
print('idxSearchValue: {}'.format(idxSearchValue))
idx = x.index.get_loc(idxSearchValue, 'ffill')
return x.iloc[[idx]].reset_index()
```
and apply it via `groupby`
```python
res = df.groupby(['idxDigits'], as_index=False).apply(mySelect, idxSearchValue=10)
# idxSearchValue: 10
# idxSearchValue: 10
```
Although there is a perfect match for `idxSearchValue = 10`, we get the result
```python
print(res.reset_index(drop=True))
# myIdx idxDigits
# 0 1 1
# 1 11 2
```
So, my question is:
Why does `get_loc` for group `idxDigits==2` return `myIdx = 11` although there is a perfect match within the group for `idxSearchValue = 10`?
BTW: Splitting the dataframe manually and applying `get_loc` gives the expected result
```python
df1 = df[df.idxDigits == 1]
print(df1.iloc[[df1.index.get_loc(10, 'ffill')]].reset_index())
# myIdx idxDigits
# 0 1 1
df2 = df[df.idxDigits == 2]
print(df2.iloc[[df2.index.get_loc(10, 'ffill')]].reset_index())
# myIdx idxDigits
# 0 10 2
```
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/34967/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34967/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/34968
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34968/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34968/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34968/events
|
https://github.com/pandas-dev/pandas/issues/34968
| 644,492,104
|
MDU6SXNzdWU2NDQ0OTIxMDQ=
| 34,968
|
BUG: the pd.to_timedelta() incorrectly parses the 'M' as minutes.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/39115400?v=4",
"events_url": "https://api.github.com/users/IcToxi/events{/privacy}",
"followers_url": "https://api.github.com/users/IcToxi/followers",
"following_url": "https://api.github.com/users/IcToxi/following{/other_user}",
"gists_url": "https://api.github.com/users/IcToxi/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/IcToxi",
"id": 39115400,
"login": "IcToxi",
"node_id": "MDQ6VXNlcjM5MTE1NDAw",
"organizations_url": "https://api.github.com/users/IcToxi/orgs",
"received_events_url": "https://api.github.com/users/IcToxi/received_events",
"repos_url": "https://api.github.com/users/IcToxi/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/IcToxi/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/IcToxi/subscriptions",
"type": "User",
"url": "https://api.github.com/users/IcToxi"
}
|
[
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "3465A4",
"default": false,
"description": null,
"id": 134699,
"name": "Docs",
"node_id": "MDU6TGFiZWwxMzQ2OTk=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Docs"
},
{
"color": "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": "0052cc",
"default": false,
"description": "DateOffsets",
"id": 53181044,
"name": "Frequency",
"node_id": "MDU6TGFiZWw1MzE4MTA0NA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Frequency"
}
] |
closed
| false
| null |
[] |
{
"closed_at": null,
"closed_issues": 786,
"created_at": "2015-01-13T10:53:19Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "Changes that would be nice to have in the next release. These issues are not blocking. They will be pushed to the next release if no one has time to fix them.",
"due_on": null,
"html_url": "https://github.com/pandas-dev/pandas/milestone/32",
"id": 933188,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/32/labels",
"node_id": "MDk6TWlsZXN0b25lOTMzMTg4",
"number": 32,
"open_issues": 1053,
"state": "open",
"title": "Contributions Welcome",
"updated_at": "2021-11-21T00:50:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/32"
}
| 9
| 2020-06-24T10:09:56Z
| 2020-09-26T11:33:01Z
| 2020-09-26T11:33:00Z
|
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
>> pd.Timestamp.today() + pd.to_timedelta('1 M')
```
#### Problem description
The documentation in version 1.0.5 is described as follows:
> Possible values: (‘Y’, ‘M’, ‘W’, ‘D’, ‘days’, ‘day’, ‘hours’, hour’, ‘hr’, ‘h’,...
Since in such a particular order, it should be understood as year, month, and week.
But running my code gives the result of a minute for 'M'. However, 'Y' produces the correct parsing result.
I've seen some discussion there about parameters optimization, and whatever the outcome of the discussion, you shouldn't continue to place this bug here, please either change the function or change the documentation.
And perhaps you might consider separating _to_datedelta_ api to reduce complexity.
Thanks.
#### Expected Output
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit : None
python : 3.7.6.final.0
python-bits : 64
OS : Linux
OS-release : 3.10.0-1127.10.1.el7.x86_64
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.0.5
numpy : 1.18.1
</details>
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/34968/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34968/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/34969
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34969/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34969/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34969/events
|
https://github.com/pandas-dev/pandas/issues/34969
| 644,566,263
|
MDU6SXNzdWU2NDQ1NjYyNjM=
| 34,969
|
BUG: NUMPY_IMPORT_ARRAY_RETVAL undeclared when installing pandas 0.18.1
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/51424?v=4",
"events_url": "https://api.github.com/users/pkaleta/events{/privacy}",
"followers_url": "https://api.github.com/users/pkaleta/followers",
"following_url": "https://api.github.com/users/pkaleta/following{/other_user}",
"gists_url": "https://api.github.com/users/pkaleta/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/pkaleta",
"id": 51424,
"login": "pkaleta",
"node_id": "MDQ6VXNlcjUxNDI0",
"organizations_url": "https://api.github.com/users/pkaleta/orgs",
"received_events_url": "https://api.github.com/users/pkaleta/received_events",
"repos_url": "https://api.github.com/users/pkaleta/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/pkaleta/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/pkaleta/subscriptions",
"type": "User",
"url": "https://api.github.com/users/pkaleta"
}
|
[
{
"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 | 2
| 2020-06-24T12:12:49Z
| 2020-08-21T17:05:19Z
| 2020-06-24T13:15:04Z
|
NONE
| null |
I've suddenly started getting the following error when installing pandas 0.18.1 via pip on Python3.6:
```
building 'pandas.json' extension
creating build/temp.linux-x86_64-3.6/pandas/src/ujson
creating build/temp.linux-x86_64-3.6/pandas/src/ujson/python
creating build/temp.linux-x86_64-3.6/pandas/src/ujson/lib
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -Ipandas/src/ujson/python -Ipandas/src/ujson/lib -Ipandas/src/datetime -Ipandas/src/klib -Ipandas/src -I/tmp/pip-install-8vres3tf/pandas/.eggs/numpy-1.19.0-py3.6-linux-x86_64.egg/numpy/core/include -I/usr/include/python3.6m -I/var/lib/go-agent/pipelines/make-ci-01/code/.venv/include/python3.6m -c pandas/src/ujson/python/ujson.c -o build/temp.linux-x86_64-3.6/pandas/src/ujson/python/ujson.o -D_GNU_SOURCE -Wno-unused-function
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -Ipandas/src/ujson/python -Ipandas/src/ujson/lib -Ipandas/src/datetime -Ipandas/src/klib -Ipandas/src -I/tmp/pip-install-8vres3tf/pandas/.eggs/numpy-1.19.0-py3.6-linux-x86_64.egg/numpy/core/include -I/usr/include/python3.6m -I/var/lib/go-agent/pipelines/make-ci-01/code/.venv/include/python3.6m -c pandas/src/ujson/python/objToJSON.c -o build/temp.linux-x86_64-3.6/pandas/src/ujson/python/objToJSON.o -D_GNU_SOURCE -Wno-unused-function
In file included from /tmp/pip-install-8vres3tf/pandas/.eggs/numpy-1.19.0-py3.6-linux-x86_64.egg/numpy/core/include/numpy/ndarraytypes.h:1822:0,
from /tmp/pip-install-8vres3tf/pandas/.eggs/numpy-1.19.0-py3.6-linux-x86_64.egg/numpy/core/include/numpy/ndarrayobject.h:12,
from /tmp/pip-install-8vres3tf/pandas/.eggs/numpy-1.19.0-py3.6-linux-x86_64.egg/numpy/core/include/numpy/arrayobject.h:4,
from pandas/src/ujson/python/objToJSON.c:40:
/tmp/pip-install-8vres3tf/pandas/.eggs/numpy-1.19.0-py3.6-linux-x86_64.egg/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
#warning "Using deprecated NumPy API, disable it with " \
^
pandas/src/ujson/python/objToJSON.c: In function ‘initObjToJSON’:
pandas/src/ujson/python/objToJSON.c:201:10: error: ‘NUMPY_IMPORT_ARRAY_RETVAL’ undeclared (first use in this function)
return NUMPY_IMPORT_ARRAY_RETVAL;
^
pandas/src/ujson/python/objToJSON.c:201:10: note: each undeclared identifier is reported only once for each function it appears in
pandas/src/ujson/python/objToJSON.c:202:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for pandas
```
This has been working fine for quite some time already and I suspect this is related to the recent release of numpy-1.19.0.
I've seen there was a similar issue here: https://github.com/pandas-dev/pandas/issues/5326, but there was no mention of undeclared variable`NUMPY_IMPORT_ARRAY_RETVAL` in there.
What's strange to me is the fact that pandas is attempting to build numpy-1.19.0, whereas I have numpy-1.17.4 in requirements. Is it using most recent numpy to build the ujson extension and doesn't look at requirements for that purpose at all?
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/34969/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34969/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/34970
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34970/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34970/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34970/events
|
https://github.com/pandas-dev/pandas/issues/34970
| 644,585,466
|
MDU6SXNzdWU2NDQ1ODU0NjY=
| 34,970
|
BUG: fixtures are not to be called directly
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/2662541?v=4",
"events_url": "https://api.github.com/users/pizzathief/events{/privacy}",
"followers_url": "https://api.github.com/users/pizzathief/followers",
"following_url": "https://api.github.com/users/pizzathief/following{/other_user}",
"gists_url": "https://api.github.com/users/pizzathief/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/pizzathief",
"id": 2662541,
"login": "pizzathief",
"node_id": "MDQ6VXNlcjI2NjI1NDE=",
"organizations_url": "https://api.github.com/users/pizzathief/orgs",
"received_events_url": "https://api.github.com/users/pizzathief/received_events",
"repos_url": "https://api.github.com/users/pizzathief/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/pizzathief/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/pizzathief/subscriptions",
"type": "User",
"url": "https://api.github.com/users/pizzathief"
}
|
[
{
"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 |
[] | null | 3
| 2020-06-24T12:44:04Z
| 2020-06-24T14:00:50Z
| 2020-06-24T14:00:50Z
|
CONTRIBUTOR
| null |
- [ X] I have checked that this issue has not already been reported.
- [X ] I have confirmed this bug exists on the latest version of pandas.
- [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
```bash
pytest-3 pandas
========================================================================== test session starts ==========================================================================
platform linux -- Python 3.8.2, pytest-4.6.9, py-1.8.1, pluggy-0.13.0
rootdir: ~/code/pandas, inifile: setup.cfg, testpaths: pandas
collected 27211 items / 3 errors / 4 skipped / 27204 selected
================================================================================ ERRORS =================================================================================
________________________________________________________ ERROR collecting pandas/tests/groupby/test_whitelist.py ________________________________________________________
Fixture "df_letters" called directly. Fixtures are not meant to be called directly,
but are created automatically when test functions request them as parameters.
See https://docs.pytest.org/en/latest/fixture.html for more information about fixtures, and
https://docs.pytest.org/en/latest/deprecations.html#calling-fixtures-directly about how to update your code.
_____________________________________________________ ERROR collecting pandas/tests/indexes/datetimes/test_tools.py _____________________________________________________
Fixture "epoch_1960" called directly. Fixtures are not meant to be called directly,
but are created automatically when test functions request them as parameters.
See https://docs.pytest.org/en/latest/fixture.html for more information about fixtures, and
https://docs.pytest.org/en/latest/deprecations.html#calling-fixtures-directly about how to update your code.
________________________________________________________ ERROR collecting pandas/tests/series/test_analytics.py _________________________________________________________
Fixture "s_main_dtypes" called directly. Fixtures are not meant to be called directly,
but are created automatically when test functions request them as parameters.
See https://docs.pytest.org/en/latest/fixture.html for more information about fixtures, and
https://docs.pytest.org/en/latest/deprecations.html#calling-fixtures-directly about how to update your code.
=========================================================================== warnings summary ============================================================================
pandas/tests/extension/json/array.py:27
/home/jason/code/pandas/pandas/tests/extension/json/array.py:27: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.9 it will stop working
type = collections.Mapping
-- Docs: https://docs.pytest.org/en/latest/warnings.html
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 3 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
============================================================ 4 skipped, 1 warnings, 3 error in 9.47 seconds =============================================================
```
#### Output of ``pd.show_versions()``
<details>
[paste the output of ``pd.show_versions()`` here leaving a blank line after the details tag]
>>> pandas.show_versions()
INSTALLED VERSIONS
------------------
commit: 5a84593d9d02f4c26be18c98bf6637bf0a6f876c
python: 3.8.2.final.0
python-bits: 64
OS: Linux
OS-release: 5.4.0-37-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_AU.UTF-8
LOCALE: en_AU.UTF-8
pandas: 0.24.0.dev0+193.g5a84593d9
pytest: None
pip: 20.0.2
setuptools: 44.0.0
Cython: None
numpy: 1.18.5
scipy: 1.4.1
pyarrow: None
xarray: None
IPython: 7.15.0
sphinx: None
patsy: None
dateutil: 2.8.1
pytz: 2020.1
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: 3.2.1
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: None
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
gcsfs: 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/34970/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34970/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/34971
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34971/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34971/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34971/events
|
https://github.com/pandas-dev/pandas/pull/34971
| 644,587,414
|
MDExOlB1bGxSZXF1ZXN0NDM5MTg0NzI5
| 34,971
|
TST: update incorrectly defined fixtures
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/2662541?v=4",
"events_url": "https://api.github.com/users/pizzathief/events{/privacy}",
"followers_url": "https://api.github.com/users/pizzathief/followers",
"following_url": "https://api.github.com/users/pizzathief/following{/other_user}",
"gists_url": "https://api.github.com/users/pizzathief/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/pizzathief",
"id": 2662541,
"login": "pizzathief",
"node_id": "MDQ6VXNlcjI2NjI1NDE=",
"organizations_url": "https://api.github.com/users/pizzathief/orgs",
"received_events_url": "https://api.github.com/users/pizzathief/received_events",
"repos_url": "https://api.github.com/users/pizzathief/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/pizzathief/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/pizzathief/subscriptions",
"type": "User",
"url": "https://api.github.com/users/pizzathief"
}
|
[
{
"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 |
[] | null | 1
| 2020-06-24T12:47:21Z
| 2020-06-24T14:03:17Z
| 2020-06-24T14:03:17Z
|
CONTRIBUTOR
| null |
handles the deprecationwarning messages and allows "pytest pandas" to proceed. (see issue #34970)
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/34971/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34971/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/34971.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/34971",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/34971.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/34971"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34972
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34972/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34972/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34972/events
|
https://github.com/pandas-dev/pandas/issues/34972
| 644,587,698
|
MDU6SXNzdWU2NDQ1ODc2OTg=
| 34,972
|
CI: test_constructor_list_frames failures on MacPython
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1312546?v=4",
"events_url": "https://api.github.com/users/TomAugspurger/events{/privacy}",
"followers_url": "https://api.github.com/users/TomAugspurger/followers",
"following_url": "https://api.github.com/users/TomAugspurger/following{/other_user}",
"gists_url": "https://api.github.com/users/TomAugspurger/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/TomAugspurger",
"id": 1312546,
"login": "TomAugspurger",
"node_id": "MDQ6VXNlcjEzMTI1NDY=",
"organizations_url": "https://api.github.com/users/TomAugspurger/orgs",
"received_events_url": "https://api.github.com/users/TomAugspurger/received_events",
"repos_url": "https://api.github.com/users/TomAugspurger/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/TomAugspurger/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/TomAugspurger/subscriptions",
"type": "User",
"url": "https://api.github.com/users/TomAugspurger"
}
|
[
{
"color": "a2bca7",
"default": false,
"description": "Continuous Integration",
"id": 48070600,
"name": "CI",
"node_id": "MDU6TGFiZWw0ODA3MDYwMA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/CI"
}
] |
closed
| false
| null |
[] | null | 1
| 2020-06-24T12:47:50Z
| 2020-06-24T15:18:40Z
| 2020-06-24T15:18:40Z
|
CONTRIBUTOR
| null |
https://dev.azure.com/pandas-dev/pandas-wheels/_build/results?buildId=38048&view=logs&j=79f3a53a-4a6d-509c-98b5-ff6e9111f67c&t=25a63239-9c30-5cf0-cb4c-3d01da7b47c5&l=1049
```
___________ TestDataFrameConstructors.test_constructor_list_frames ____________
[gw0] win32 -- Python 3.6.8 D:\a\1\s\test_venv\Scripts\python.exe
self = <pandas.tests.frame.test_constructors.TestDataFrameConstructors object at 0x2882F090>
@pytest.mark.xfail(_is_numpy_dev, reason="Interprets list of frame as 3D")
def test_constructor_list_frames(self):
# see gh-3243
> result = DataFrame([DataFrame()])
test_venv\lib\site-packages\pandas\tests\frame\test_constructors.py:151:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_venv\lib\site-packages\pandas\core\frame.py:488: in __init__
mgr = init_ndarray(data, index, columns, dtype=dtype, copy=copy)
test_venv\lib\site-packages\pandas\core\internals\construction.py:169: in init_ndarray
values = prep_ndarray(values, copy=copy)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
values = array([], shape=(1, 0, 0), dtype=float64), copy = False
def prep_ndarray(values, copy=True) -> np.ndarray:
if not isinstance(values, (np.ndarray, ABCSeries, Index)):
if len(values) == 0:
return np.empty((0, 0), dtype=object)
elif isinstance(values, range):
arr = np.arange(values.start, values.stop, values.step, dtype="int64")
return arr[..., np.newaxis]
def convert(v):
return maybe_convert_platform(v)
# we could have a 1-dim or 2-dim list here
# this is equiv of np.asarray, but does object conversion
# and platform dtype preservation
try:
if is_list_like(values[0]) or hasattr(values[0], "len"):
values = np.array([convert(v) for v in values])
elif isinstance(values[0], np.ndarray) and values[0].ndim == 0:
# GH#21861
values = np.array([convert(v) for v in values])
else:
values = convert(values)
except (ValueError, TypeError):
values = convert(values)
else:
# drop subclass info, do not copy data
values = np.asarray(values)
if copy:
values = values.copy()
> raise ValueError("Must pass 2-d input")
E ValueError: Must pass 2-d input
test_venv\lib\site-packages\pandas\core\internals\construction.py:295: ValueError
```
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/34972/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34972/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/34973
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34973/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34973/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34973/events
|
https://github.com/pandas-dev/pandas/pull/34973
| 644,743,181
|
MDExOlB1bGxSZXF1ZXN0NDM5MzEyMjA1
| 34,973
|
Fix - BUG: AssertionError when slicing MultiIndex and setting value o…
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/41421345?v=4",
"events_url": "https://api.github.com/users/LuckyDenis/events{/privacy}",
"followers_url": "https://api.github.com/users/LuckyDenis/followers",
"following_url": "https://api.github.com/users/LuckyDenis/following{/other_user}",
"gists_url": "https://api.github.com/users/LuckyDenis/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/LuckyDenis",
"id": 41421345,
"login": "LuckyDenis",
"node_id": "MDQ6VXNlcjQxNDIxMzQ1",
"organizations_url": "https://api.github.com/users/LuckyDenis/orgs",
"received_events_url": "https://api.github.com/users/LuckyDenis/received_events",
"repos_url": "https://api.github.com/users/LuckyDenis/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/LuckyDenis/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/LuckyDenis/subscriptions",
"type": "User",
"url": "https://api.github.com/users/LuckyDenis"
}
|
[] |
closed
| false
| null |
[] | null | 0
| 2020-06-24T16:18:41Z
| 2020-06-26T10:13:56Z
| 2020-06-26T10:13:56Z
|
CONTRIBUTOR
| null |
- [x] closes #34870
- [x] tests added / passed (1 / 1)
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/34973/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34973/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/34973.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/34973",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/34973.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/34973"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34974
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34974/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34974/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34974/events
|
https://github.com/pandas-dev/pandas/issues/34974
| 644,785,626
|
MDU6SXNzdWU2NDQ3ODU2MjY=
| 34,974
|
BUG: InvalidIndexError raised in Categorical.isin for categorical backed by interval with overlapping intervals
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1312546?v=4",
"events_url": "https://api.github.com/users/TomAugspurger/events{/privacy}",
"followers_url": "https://api.github.com/users/TomAugspurger/followers",
"following_url": "https://api.github.com/users/TomAugspurger/following{/other_user}",
"gists_url": "https://api.github.com/users/TomAugspurger/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/TomAugspurger",
"id": 1312546,
"login": "TomAugspurger",
"node_id": "MDQ6VXNlcjEzMTI1NDY=",
"organizations_url": "https://api.github.com/users/TomAugspurger/orgs",
"received_events_url": "https://api.github.com/users/TomAugspurger/received_events",
"repos_url": "https://api.github.com/users/TomAugspurger/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/TomAugspurger/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/TomAugspurger/subscriptions",
"type": "User",
"url": "https://api.github.com/users/TomAugspurger"
}
|
[
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "e11d21",
"default": false,
"description": "Categorical Data Type",
"id": 78527356,
"name": "Categorical",
"node_id": "MDU6TGFiZWw3ODUyNzM1Ng==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Categorical"
},
{
"color": "009800",
"default": false,
"description": "Interval data type",
"id": 150096370,
"name": "Interval",
"node_id": "MDU6TGFiZWwxNTAwOTYzNzA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Interval"
},
{
"color": "fef2c0",
"default": false,
"description": "isin method",
"id": 2468482981,
"name": "isin",
"node_id": "MDU6TGFiZWwyNDY4NDgyOTgx",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/isin"
}
] |
open
| false
| null |
[] | null | 0
| 2020-06-24T17:29:19Z
| 2020-10-30T22:48:30Z
| null |
CONTRIBUTOR
| null |
#### Code Sample, a copy-pastable example
```python
In [1]: import pandas as pd
In [2]: idx = pd.IntervalIndex([pd.Interval(0, 2), pd.Interval(0, 1)])
In [3]: pd.Categorical(idx).isin(idx)
---------------------------------------------------------------------------
InvalidIndexError Traceback (most recent call last)
<ipython-input-3-801ab88eb4d0> in <module>
----> 1 pd.Categorical(idx).isin(idx)
~/sandbox/pandas/pandas/core/arrays/categorical.py in isin(self, values)
2359 values = sanitize_array(values, None, None)
2360 null_mask = np.asarray(isna(values))
-> 2361 code_values = self.categories.get_indexer(values)
2362 code_values = code_values[null_mask | (code_values >= 0)]
2363 return algorithms.isin(self.codes, code_values)
~/sandbox/pandas/pandas/core/indexes/interval.py in get_indexer(self, target, method, limit, tolerance)
764 if self.is_overlapping:
765 raise InvalidIndexError(
--> 766 "cannot handle overlapping indices; "
767 "use IntervalIndex.get_indexer_non_unique"
768 )
InvalidIndexError: cannot handle overlapping indices; use IntervalIndex.get_indexer_non_unique
```
#### Problem description
The result is unambigous
#### Expected Output
```python
array([ True, True])
```
I think that the call to `self.categories.get_indexer` might be `self.categories.get_indexer_for` instead.
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/34974/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34974/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/34975
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34975/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34975/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34975/events
|
https://github.com/pandas-dev/pandas/issues/34975
| 644,797,952
|
MDU6SXNzdWU2NDQ3OTc5NTI=
| 34,975
|
BUG: Unexpected behaviour comparison dataframes with None values
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/22791368?v=4",
"events_url": "https://api.github.com/users/rosekoopman/events{/privacy}",
"followers_url": "https://api.github.com/users/rosekoopman/followers",
"following_url": "https://api.github.com/users/rosekoopman/following{/other_user}",
"gists_url": "https://api.github.com/users/rosekoopman/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/rosekoopman",
"id": 22791368,
"login": "rosekoopman",
"node_id": "MDQ6VXNlcjIyNzkxMzY4",
"organizations_url": "https://api.github.com/users/rosekoopman/orgs",
"received_events_url": "https://api.github.com/users/rosekoopman/received_events",
"repos_url": "https://api.github.com/users/rosekoopman/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/rosekoopman/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rosekoopman/subscriptions",
"type": "User",
"url": "https://api.github.com/users/rosekoopman"
}
|
[
{
"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 | 6
| 2020-06-24T17:47:40Z
| 2020-08-21T17:05:19Z
| 2020-06-24T18:33:03Z
|
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
np.nan == np.nan
# False
pd.Series(index=[0], data=[np.nan]) == pd.Series(index=[0], data=[np.nan])
# False
None == None
# True
pd.Series(index=[0], data=[None]) == pd.Series(index=[0], data=[None])
# False
```
#### Problem description
If None==None equals True, I had expected that pd.Series(index=[0], data=[None]) == pd.Series(index=[0], data=[None]) would also equal True.
I have pandas version 1.0.5
#### Expected Output
pd.Series(index=[0], data=[None]) == pd.Series(index=[0], data=[None])
# True
#### Output of ``pd.show_versions()``
</details>
INSTALLED VERSIONS
------------------
commit : None
python : 3.6.10.final.0
python-bits : 64
OS : Linux
OS-release : 4.14.171-105.231.amzn1.x86_64
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.0.5
numpy : 1.16.2
pytz : 2019.3
dateutil : 2.8.0
pip : 20.0.2
setuptools : 46.1.3.post20200330
Cython : None
pytest : 5.3.5
hypothesis : None
sphinx : 2.4.3
blosc : None
feather : None
xlsxwriter : None
lxml.etree : 4.5.0
html5lib : None
pymysql : None
psycopg2 : 2.8.4 (dt dec pq3 ext lo64)
jinja2 : 2.11.1
IPython : 7.12.0
pandas_datareader: None
bs4 : None
bottleneck : None
fastparquet : None
gcsfs : None
lxml.etree : 4.5.0
matplotlib : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : 0.15.1
pytables : None
pytest : 5.3.5
pyxlsb : None
s3fs : 0.4.0
scipy : 1.4.1
sqlalchemy : 1.3.13
tables : None
tabulate : 0.8.6
xarray : None
xlrd : None
xlwt : None
xlsxwriter : None
numba : None
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/34975/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34975/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/34976
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34976/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34976/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34976/events
|
https://github.com/pandas-dev/pandas/pull/34976
| 644,834,530
|
MDExOlB1bGxSZXF1ZXN0NDM5Mzg4NjI0
| 34,976
|
TYP: make the type annotations of read_csv & read_table discoverable
|
{
"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"
},
{
"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": "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-06-24T18:42:37Z
| 2020-06-25T17:43:19Z
| 2020-06-25T17:38:09Z
|
CONTRIBUTOR
| null |
- [x] closes #25648
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry
In master the type of ``read_csv`` and ``read_table`` is 'Any'. This PR makes the functions signatures discoverable by mypy. Also fixes the error message when wrong kwarg is passed.
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/34976/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34976/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/34976.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/34976",
"merged_at": "2020-06-25T17:38:09Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/34976.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/34976"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34977
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34977/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34977/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34977/events
|
https://github.com/pandas-dev/pandas/issues/34977
| 644,930,654
|
MDU6SXNzdWU2NDQ5MzA2NTQ=
| 34,977
|
ERR: Can't initialise DataFrame using empty Series and empty columns
|
{
"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": "4E9A06",
"default": false,
"description": null,
"id": 76812,
"name": "Enhancement",
"node_id": "MDU6TGFiZWw3NjgxMg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Enhancement"
},
{
"color": "ffa0ff",
"default": false,
"description": "Incorrect or improved errors from pandas",
"id": 42670965,
"name": "Error Reporting",
"node_id": "MDU6TGFiZWw0MjY3MDk2NQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Error%20Reporting"
},
{
"color": "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"
}
] |
open
| false
| null |
[] | null | 1
| 2020-06-24T20:29:29Z
| 2021-08-08T16:40:45Z
| null |
MEMBER
| null |
- [x] I have checked that this issue has not already been reported.
- [x] I have confirmed this bug exists on the latest version of pandas.
- [x] (optional) I have confirmed this bug exists on the master branch of pandas.
---
noticed while working on #30858
**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
This returns an error:
```python-traceback
>>> import pandas as pd
>>> pd.DataFrame(pd.Series([]), columns=[])
<stdin>:1: DeprecationWarning: The default dtype for empty Series will be 'object' instead of 'float64' in a future version. Specify a dtype explicitly to silence this warning.
Traceback (most recent call last):
File "/home/marco/pandas-dev/pandas/core/internals/managers.py", line 1613, in create_block_manager_from_blocks
make_block(values=blocks[0], placement=slice(0, len(axes[0])))
File "/home/marco/pandas-dev/pandas/core/internals/blocks.py", line 2728, in make_block
return klass(values, ndim=ndim, placement=placement)
File "/home/marco/pandas-dev/pandas/core/internals/blocks.py", line 121, in __init__
raise ValueError(
ValueError: Wrong number of items passed 1, placement implies 0
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/marco/pandas-dev/pandas/core/frame.py", line 488, in __init__
mgr = init_ndarray(data, index, columns, dtype=dtype, copy=copy)
File "/home/marco/pandas-dev/pandas/core/internals/construction.py", line 234, in init_ndarray
return create_block_manager_from_blocks(block_values, [columns, index])
File "/home/marco/pandas-dev/pandas/core/internals/managers.py", line 1623, in create_block_manager_from_blocks
raise construction_error(tot_items, blocks[0].shape[1:], axes, e)
ValueError: Empty data passed with indices specified.
```
But this doesn't:
```python
>>> pd.DataFrame([], columns=[])
Empty DataFrame
Columns: []
Index: []
```
```
#### Problem description
[this should explain **why** the current behaviour is a problem and why the expected output is a better solution]
#### Expected Output
```
Empty DataFrame
Columns: []
Index: []
```
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit : 6a6faf596bc1e3bf4078d4837f654d0f2f754820
python : 3.8.3.final.0
python-bits : 64
OS : Linux
OS-release : 5.4.0-37-generic
Version : #41-Ubuntu SMP Wed Jun 3 18:57:02 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+1944.g6a6faf596
numpy : 1.18.5
pytz : 2020.1
dateutil : 2.8.1
pip : 20.1.1
setuptools : 47.3.1.post20200616
Cython : 0.29.20
pytest : 5.4.3
hypothesis : 5.16.1
sphinx : 3.1.1
blosc : None
feather : None
xlsxwriter : 1.2.9
lxml.etree : 4.5.1
html5lib : 1.0.1
pymysql : None
psycopg2 : None
jinja2 : 2.11.2
IPython : 7.15.0
pandas_datareader: None
bs4 : 4.9.1
bottleneck : 1.3.2
fsspec : 0.7.4
fastparquet : 0.4.0
gcsfs : None
matplotlib : 3.2.1
numexpr : 2.7.1
odfpy : None
openpyxl : 3.0.3
pandas_gbq : None
pyarrow : 0.17.1
pytables : None
pyxlsb : None
s3fs : 0.4.2
scipy : 1.4.1
sqlalchemy : 1.3.17
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/34977/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34977/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/34978
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34978/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34978/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34978/events
|
https://github.com/pandas-dev/pandas/pull/34978
| 645,014,729
|
MDExOlB1bGxSZXF1ZXN0NDM5NTQ5MzIw
| 34,978
|
PERF: optimize Block.getitem_block
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
}
|
[
{
"color": "a10c02",
"default": false,
"description": "Memory or execution speed performance",
"id": 8935311,
"name": "Performance",
"node_id": "MDU6TGFiZWw4OTM1MzEx",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Performance"
},
{
"color": "fbca04",
"default": false,
"description": "Related to non-user accessible pandas implementation",
"id": 49094459,
"name": "Internals",
"node_id": "MDU6TGFiZWw0OTA5NDQ1OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Internals"
}
] |
closed
| false
| null |
[] |
{
"closed_at": "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-06-24T22:20:54Z
| 2020-06-25T15:25:21Z
| 2020-06-25T14:42:14Z
|
MEMBER
| null |
Performance comparison is based on the the asv `groupby.Apply.time_scalar_function_single_col`, which is the one in which disabling the libreduction path has the biggest impact.
```
import pandas as pd
import numpy as np
N = 10 ** 4
labels = np.random.randint(0, 2000, size=N)
labels2 = np.random.randint(0, 3, size=N)
df = pd.DataFrame(
{
"key": labels,
"key2": labels2,
"value1": np.random.randn(N),
"value2": ["foo", "bar", "baz", "qux"] * (N // 4),
}
)
In [4]: %prun -s cumtime df.groupby("key").apply(lambda x: 1)
```
master-but-with-fast_apply-disabled:
```
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.000 0.000 0.081 0.081 groupby.py:822(apply)
1 0.000 0.000 0.081 0.081 groupby.py:871(_python_apply_general)
1 0.006 0.006 0.080 0.080 ops.py:157(apply)
1989 0.002 0.000 0.069 0.000 ops.py:933(__iter__)
1988 0.003 0.000 0.066 0.000 ops.py:966(_chop)
1988 0.004 0.000 0.059 0.000 managers.py:724(get_slice)
1988 0.002 0.000 0.035 0.000 managers.py:730(<listcomp>)
5964 0.009 0.000 0.033 0.000 blocks.py:283(getitem_block)
5971 0.005 0.000 0.021 0.000 blocks.py:247(make_block_same_class)
5974 0.007 0.000 0.013 0.000 blocks.py:115(__init__)
1988 0.003 0.000 0.011 0.000 base.py:4064(__getitem__)
1990 0.003 0.000 0.008 0.000 managers.py:120(__init__)
1988 0.002 0.000 0.007 0.000 numeric.py:105(_shallow_copy)
1992 0.002 0.000 0.007 0.000 blocks.py:2379(__init__)
1988 0.002 0.000 0.005 0.000 base.py:485(_shallow_copy)
1990 0.002 0.000 0.004 0.000 frame.py:432(__init__)
1992 0.002 0.000 0.003 0.000 base.py:450(_simple_new)
```
PR-but-with-fast_apply-disabled
```
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.000 0.000 0.061 0.061 groupby.py:822(apply)
1 0.000 0.000 0.061 0.061 groupby.py:871(_python_apply_general)
1 0.005 0.005 0.058 0.058 ops.py:157(apply)
1991 0.002 0.000 0.048 0.000 ops.py:933(__iter__)
1990 0.003 0.000 0.046 0.000 ops.py:966(_chop)
1990 0.004 0.000 0.039 0.000 managers.py:724(get_slice)
1990 0.002 0.000 0.017 0.000 managers.py:730(<listcomp>)
5970 0.009 0.000 0.015 0.000 blocks.py:297(getitem_block)
1990 0.002 0.000 0.011 0.000 base.py:4064(__getitem__)
1992 0.003 0.000 0.007 0.000 managers.py:120(__init__)
1990 0.002 0.000 0.007 0.000 numeric.py:105(_shallow_copy)
1990 0.002 0.000 0.005 0.000 base.py:485(_shallow_copy)
1992 0.002 0.000 0.004 0.000 frame.py:432(__init__)
5970 0.002 0.000 0.003 0.000 blocks.py:116(_simple_new)
1994 0.002 0.000 0.003 0.000 base.py:450(_simple_new)
1992 0.001 0.000 0.002 0.000 managers.py:126(<listcomp>)
22438 0.002 0.000 0.002 0.000 {built-in method builtins.isinstance}
```
master
```
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.000 0.000 0.009 0.009 groupby.py:822(apply)
1 0.000 0.000 0.009 0.009 groupby.py:871(_python_apply_general)
1 0.000 0.000 0.008 0.008 ops.py:157(apply)
1 0.000 0.000 0.005 0.005 ops.py:961(fast_apply)
1 0.003 0.003 0.005 0.005 {pandas._libs.reduction.apply_frame_axis0}
1994 0.001 0.000 0.002 0.000 base.py:4064(__getitem__)
1 0.000 0.000 0.001 0.001 ops.py:135(_get_splitter)
1 0.000 0.000 0.001 0.001 ops.py:268(group_info)
1 0.000 0.000 0.001 0.001 generic.py:1206(_wrap_applied_output)
1 0.000 0.000 0.001 0.001 ops.py:285(_get_compressed_codes)
```
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/34978/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34978/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/34978.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/34978",
"merged_at": "2020-06-25T14:42:14Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/34978.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/34978"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34979
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34979/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34979/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34979/events
|
https://github.com/pandas-dev/pandas/pull/34979
| 645,019,199
|
MDExOlB1bGxSZXF1ZXN0NDM5NTUzMDI0
| 34,979
|
DOC: Add notes about M and Y to to_timedelata documentation. (#34968)
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/831833?v=4",
"events_url": "https://api.github.com/users/selasley/events{/privacy}",
"followers_url": "https://api.github.com/users/selasley/followers",
"following_url": "https://api.github.com/users/selasley/following{/other_user}",
"gists_url": "https://api.github.com/users/selasley/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/selasley",
"id": 831833,
"login": "selasley",
"node_id": "MDQ6VXNlcjgzMTgzMw==",
"organizations_url": "https://api.github.com/users/selasley/orgs",
"received_events_url": "https://api.github.com/users/selasley/received_events",
"repos_url": "https://api.github.com/users/selasley/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/selasley/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/selasley/subscriptions",
"type": "User",
"url": "https://api.github.com/users/selasley"
}
|
[
{
"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-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"
}
| 15
| 2020-06-24T22:31:56Z
| 2020-09-26T13:20:32Z
| 2020-09-26T11:31:16Z
|
CONTRIBUTOR
| null |
- [ ] closes #xxxx
- [ ] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
Not sure it closes these issues, but using "M" in the arg argument of to_timedelta caused confusion in #34968 and #27285. #33094 is somewhat related. I came across another issue I can't find now where there was confusion about "Y" returning a days with times delta
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/34979/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34979/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/34979.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/34979",
"merged_at": "2020-09-26T11:31:16Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/34979.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/34979"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34980
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34980/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34980/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34980/events
|
https://github.com/pandas-dev/pandas/issues/34980
| 645,025,637
|
MDU6SXNzdWU2NDUwMjU2Mzc=
| 34,980
|
ENH: add re.fullmatch
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/14302923?v=4",
"events_url": "https://api.github.com/users/rchurt/events{/privacy}",
"followers_url": "https://api.github.com/users/rchurt/followers",
"following_url": "https://api.github.com/users/rchurt/following{/other_user}",
"gists_url": "https://api.github.com/users/rchurt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/rchurt",
"id": 14302923,
"login": "rchurt",
"node_id": "MDQ6VXNlcjE0MzAyOTIz",
"organizations_url": "https://api.github.com/users/rchurt/orgs",
"received_events_url": "https://api.github.com/users/rchurt/received_events",
"repos_url": "https://api.github.com/users/rchurt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/rchurt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rchurt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/rchurt"
}
|
[
{
"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": "009800",
"default": false,
"description": "Duplicate issue or pull request",
"id": 40153326,
"name": "Duplicate Report",
"node_id": "MDU6TGFiZWw0MDE1MzMyNg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Duplicate%20Report"
},
{
"color": "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"
}
] |
closed
| false
| null |
[] | null | 3
| 2020-06-24T22:48:46Z
| 2020-06-26T15:39:57Z
| 2020-06-26T15:39:51Z
|
NONE
| null |
#### Is your feature request related to a problem?
I want to find only strings that match my full regex expression, not just the first part of it.
For example, if I am searching for the string `'panda'`, and my series contains the strings `'panda'` and `'pandas'`, I only want it to return `'panda'`. Currently, using `str.match('panda')` returns both.
#### Describe the solution you'd like
Add support for `re.fullmatch` (https://docs.python.org/3.4/library/re.html#re.fullmatch) so that it can be called with `str.fullmatch`.
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/34980/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34980/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/34981
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34981/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34981/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34981/events
|
https://github.com/pandas-dev/pandas/pull/34981
| 645,033,193
|
MDExOlB1bGxSZXF1ZXN0NDM5NTY0NjE5
| 34,981
|
ERR: Fix to_timedelta error message
|
{
"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": "ffa0ff",
"default": false,
"description": "Incorrect or improved errors from pandas",
"id": 42670965,
"name": "Error Reporting",
"node_id": "MDU6TGFiZWw0MjY3MDk2NQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Error%20Reporting"
},
{
"color": "5319e7",
"default": false,
"description": "Timedelta data type",
"id": 49597148,
"name": "Timedelta",
"node_id": "MDU6TGFiZWw0OTU5NzE0OA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Timedelta"
}
] |
closed
| false
| null |
[] |
{
"closed_at": "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-06-24T23:08:03Z
| 2020-06-26T22:12:09Z
| 2020-06-26T20:23:05Z
|
MEMBER
| null |
Error messages were missing a case (unit of "y")
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/34981/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34981/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/34981.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/34981",
"merged_at": "2020-06-26T20:23:05Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/34981.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/34981"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34982
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34982/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34982/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34982/events
|
https://github.com/pandas-dev/pandas/pull/34982
| 645,049,802
|
MDExOlB1bGxSZXF1ZXN0NDM5NTc4MTgz
| 34,982
|
REF: simplify advance/move/set_length in libreduction
|
{
"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": "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": "fbca04",
"default": false,
"description": "Related to non-user accessible pandas implementation",
"id": 49094459,
"name": "Internals",
"node_id": "MDU6TGFiZWw0OTA5NDQ1OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Internals"
}
] |
closed
| false
| null |
[] |
{
"closed_at": "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-06-24T23:55:37Z
| 2020-06-25T15:26:51Z
| 2020-06-25T14:40:55Z
|
MEMBER
| null |
Make it so that we set `buf.data` in fewer places. I think from here its pretty straightforward to avoid setting buf.data at all.
cc @WillAyd.
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/34982/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34982/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/34982.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/34982",
"merged_at": "2020-06-25T14:40:55Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/34982.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/34982"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34983
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34983/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34983/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34983/events
|
https://github.com/pandas-dev/pandas/pull/34983
| 645,121,426
|
MDExOlB1bGxSZXF1ZXN0NDM5NjM3MDAz
| 34,983
|
BUG: HDFStore unable to create colindex w/o error thrown
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/48889395?v=4",
"events_url": "https://api.github.com/users/arw2019/events{/privacy}",
"followers_url": "https://api.github.com/users/arw2019/followers",
"following_url": "https://api.github.com/users/arw2019/following{/other_user}",
"gists_url": "https://api.github.com/users/arw2019/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/arw2019",
"id": 48889395,
"login": "arw2019",
"node_id": "MDQ6VXNlcjQ4ODg5Mzk1",
"organizations_url": "https://api.github.com/users/arw2019/orgs",
"received_events_url": "https://api.github.com/users/arw2019/received_events",
"repos_url": "https://api.github.com/users/arw2019/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/arw2019/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/arw2019/subscriptions",
"type": "User",
"url": "https://api.github.com/users/arw2019"
}
|
[
{
"color": "ffa0ff",
"default": false,
"description": "Incorrect or improved errors from pandas",
"id": 42670965,
"name": "Error Reporting",
"node_id": "MDU6TGFiZWw0MjY3MDk2NQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Error%20Reporting"
},
{
"color": "5319e7",
"default": false,
"description": "read_hdf, HDFStore",
"id": 47229190,
"name": "IO HDF5",
"node_id": "MDU6TGFiZWw0NzIyOTE5MA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20HDF5"
}
] |
closed
| false
| null |
[] |
{
"closed_at": "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-06-25T03:36:26Z
| 2020-06-30T17:46:22Z
| 2020-06-30T13:01:24Z
|
MEMBER
| null |
- [x] closes #28156
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry
I found this discussion of the `data_columns` argument to `pd.HDFStore.create_table_index` really useful:
https://pandas.pydata.org/pandas-docs/stable/user_guide/io.html#query-via-data-columns
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/34983/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34983/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/34983.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/34983",
"merged_at": "2020-06-30T13:01:24Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/34983.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/34983"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34984
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34984/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34984/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34984/events
|
https://github.com/pandas-dev/pandas/pull/34984
| 645,275,617
|
MDExOlB1bGxSZXF1ZXN0NDM5NzczOTgz
| 34,984
|
BUG: json.decode fails for nums larger than sys.maxsize
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/48889395?v=4",
"events_url": "https://api.github.com/users/arw2019/events{/privacy}",
"followers_url": "https://api.github.com/users/arw2019/followers",
"following_url": "https://api.github.com/users/arw2019/following{/other_user}",
"gists_url": "https://api.github.com/users/arw2019/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/arw2019",
"id": 48889395,
"login": "arw2019",
"node_id": "MDQ6VXNlcjQ4ODg5Mzk1",
"organizations_url": "https://api.github.com/users/arw2019/orgs",
"received_events_url": "https://api.github.com/users/arw2019/received_events",
"repos_url": "https://api.github.com/users/arw2019/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/arw2019/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/arw2019/subscriptions",
"type": "User",
"url": "https://api.github.com/users/arw2019"
}
|
[
{
"color": "207de5",
"default": false,
"description": "read_json, to_json, json_normalize",
"id": 49379259,
"name": "IO JSON",
"node_id": "MDU6TGFiZWw0OTM3OTI1OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20JSON"
}
] |
closed
| false
| null |
[] | null | 4
| 2020-06-25T07:44:52Z
| 2020-11-29T22:31:19Z
| 2020-07-12T07:23:10Z
|
MEMBER
| null |
- [x] closes #20599
- [x] tests added
- [ ] tests passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
Follow-up to #34473
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/34984/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34984/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/34984.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/34984",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/34984.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/34984"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34985
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34985/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34985/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34985/events
|
https://github.com/pandas-dev/pandas/pull/34985
| 645,278,335
|
MDExOlB1bGxSZXF1ZXN0NDM5Nzc2NDcx
| 34,985
|
ENH: concat of nullable int + bool preserves int dtype
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1020496?v=4",
"events_url": "https://api.github.com/users/jorisvandenbossche/events{/privacy}",
"followers_url": "https://api.github.com/users/jorisvandenbossche/followers",
"following_url": "https://api.github.com/users/jorisvandenbossche/following{/other_user}",
"gists_url": "https://api.github.com/users/jorisvandenbossche/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jorisvandenbossche",
"id": 1020496,
"login": "jorisvandenbossche",
"node_id": "MDQ6VXNlcjEwMjA0OTY=",
"organizations_url": "https://api.github.com/users/jorisvandenbossche/orgs",
"received_events_url": "https://api.github.com/users/jorisvandenbossche/received_events",
"repos_url": "https://api.github.com/users/jorisvandenbossche/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jorisvandenbossche/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jorisvandenbossche/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jorisvandenbossche"
}
|
[
{
"color": "02d7e1",
"default": false,
"description": "Concat, Merge/Join, Stack/Unstack, Explode",
"id": 13098779,
"name": "Reshaping",
"node_id": "MDU6TGFiZWwxMzA5ODc3OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Reshaping"
},
{
"color": "6138b5",
"default": false,
"description": "Extending pandas with custom dtypes or arrays.",
"id": 849023693,
"name": "ExtensionArray",
"node_id": "MDU6TGFiZWw4NDkwMjM2OTM=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/ExtensionArray"
},
{
"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"
}
| 4
| 2020-06-25T07:47:18Z
| 2020-07-08T16:20:00Z
| 2020-07-08T16:15:56Z
|
MEMBER
| null |
Closes #34095
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/34985/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34985/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/34985.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/34985",
"merged_at": "2020-07-08T16:15:55Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/34985.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/34985"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34986
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34986/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34986/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34986/events
|
https://github.com/pandas-dev/pandas/issues/34986
| 645,471,254
|
MDU6SXNzdWU2NDU0NzEyNTQ=
| 34,986
|
BUG: Cannot create third-party ExtensionArrays for datetime types
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/70274?v=4",
"events_url": "https://api.github.com/users/xhochy/events{/privacy}",
"followers_url": "https://api.github.com/users/xhochy/followers",
"following_url": "https://api.github.com/users/xhochy/following{/other_user}",
"gists_url": "https://api.github.com/users/xhochy/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/xhochy",
"id": 70274,
"login": "xhochy",
"node_id": "MDQ6VXNlcjcwMjc0",
"organizations_url": "https://api.github.com/users/xhochy/orgs",
"received_events_url": "https://api.github.com/users/xhochy/received_events",
"repos_url": "https://api.github.com/users/xhochy/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/xhochy/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/xhochy/subscriptions",
"type": "User",
"url": "https://api.github.com/users/xhochy"
}
|
[
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "e11d21",
"default": false,
"description": "Functionality that used to work in a prior pandas version",
"id": 32815646,
"name": "Regression",
"node_id": "MDU6TGFiZWwzMjgxNTY0Ng==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Regression"
},
{
"color": "6138b5",
"default": false,
"description": "Extending pandas with custom dtypes or arrays.",
"id": 849023693,
"name": "ExtensionArray",
"node_id": "MDU6TGFiZWw4NDkwMjM2OTM=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/ExtensionArray"
}
] |
closed
| false
| null |
[] |
{
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
}
| 0
| 2020-06-25T11:03:23Z
| 2021-01-14T15:41:32Z
| 2021-01-14T15:41:32Z
|
CONTRIBUTOR
| null |
- [x] I have checked that this issue has not already been reported.
- [ ] I have confirmed this bug exists on the latest version of pandas.
- [x] (optional) I have confirmed this bug exists on the master branch of pandas.
---
Code Sample: https://github.com/pandas-dev/pandas/pull/34987
#### Problem description
With https://github.com/pandas-dev/pandas/pull/33400 type checks now fasttrack on the kind of the `dtype`. Thus for every `ExtensionDtype` that is of kind `M`, `is_datetime64tz_dtype` returns `True`. This is then used in `get_block_type` which leads to the usage of `DatetimeTZBlock` for all of these arrays although this block only supports `DatetimeArray`.
https://github.com/pandas-dev/pandas/blob/4f7d8bba44aa45a81333cdefd7ec627370e7117b/pandas/core/internals/blocks.py#L2685-L2690
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/34986/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34986/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/34987
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34987/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34987/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34987/events
|
https://github.com/pandas-dev/pandas/pull/34987
| 645,472,762
|
MDExOlB1bGxSZXF1ZXN0NDM5OTQ3NzI1
| 34,987
|
BUG: Cannot create third-party ExtensionArrays for datetime types (xfail)
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/70274?v=4",
"events_url": "https://api.github.com/users/xhochy/events{/privacy}",
"followers_url": "https://api.github.com/users/xhochy/followers",
"following_url": "https://api.github.com/users/xhochy/following{/other_user}",
"gists_url": "https://api.github.com/users/xhochy/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/xhochy",
"id": 70274,
"login": "xhochy",
"node_id": "MDQ6VXNlcjcwMjc0",
"organizations_url": "https://api.github.com/users/xhochy/orgs",
"received_events_url": "https://api.github.com/users/xhochy/received_events",
"repos_url": "https://api.github.com/users/xhochy/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/xhochy/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/xhochy/subscriptions",
"type": "User",
"url": "https://api.github.com/users/xhochy"
}
|
[
{
"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": "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 |
[] |
{
"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"
}
| 13
| 2020-06-25T11:05:58Z
| 2021-01-14T18:59:14Z
| 2021-01-14T15:41:33Z
|
CONTRIBUTOR
| null |
- [x] closes #34986
- [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/34987/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34987/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/34987.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/34987",
"merged_at": "2021-01-14T15:41:32Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/34987.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/34987"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34988
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34988/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34988/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34988/events
|
https://github.com/pandas-dev/pandas/issues/34988
| 645,503,828
|
MDU6SXNzdWU2NDU1MDM4Mjg=
| 34,988
|
BUG: Lost precision of NUMBER in read_sql_table().
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/9268382?v=4",
"events_url": "https://api.github.com/users/andrewkisel/events{/privacy}",
"followers_url": "https://api.github.com/users/andrewkisel/followers",
"following_url": "https://api.github.com/users/andrewkisel/following{/other_user}",
"gists_url": "https://api.github.com/users/andrewkisel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/andrewkisel",
"id": 9268382,
"login": "andrewkisel",
"node_id": "MDQ6VXNlcjkyNjgzODI=",
"organizations_url": "https://api.github.com/users/andrewkisel/orgs",
"received_events_url": "https://api.github.com/users/andrewkisel/received_events",
"repos_url": "https://api.github.com/users/andrewkisel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/andrewkisel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/andrewkisel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/andrewkisel"
}
|
[
{
"color": "4E9A06",
"default": false,
"description": null,
"id": 76812,
"name": "Enhancement",
"node_id": "MDU6TGFiZWw3NjgxMg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Enhancement"
},
{
"color": "5319e7",
"default": false,
"description": "to_sql, read_sql, read_sql_query",
"id": 47232590,
"name": "IO SQL",
"node_id": "MDU6TGFiZWw0NzIzMjU5MA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20SQL"
}
] |
open
| false
| null |
[] | null | 1
| 2020-06-25T12:00:42Z
| 2020-09-03T03:05:03Z
| 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.
- [x] (optional) I have confirmed this bug exists on the master branch of pandas.
---
#### Problem description
When using `pd.read_sql_table()` with Oracle DB precision of data type `sqlalchemy.dialects.oracle.NUMBER` is lost.
#### Expected Output
Precision should not be lost as this datatype can be either integer or float.
#### The problem
Looks like the root cause for this is in `_harmonize_columns()`, particularly in `_get_dtype()` that is used there. The SQLAlchemy type `sqlalchemy.dialects.oracle.NUMBER` is based on both `sqlalchemy.types.Numeric` and `sqlalchemy.types.Integer`. As there is no support for SQLAlchemy Numeric type in `_get_dtype()` this Oracle type is being treated as integer and precision is dropped when using `astype()` in `_harmonize_columns()` itself.
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/34988/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34988/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/34989
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34989/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34989/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34989/events
|
https://github.com/pandas-dev/pandas/pull/34989
| 645,550,440
|
MDExOlB1bGxSZXF1ZXN0NDQwMDEwMzA4
| 34,989
|
DOC: typo in release notes
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/13159005?v=4",
"events_url": "https://api.github.com/users/simonjayhawkins/events{/privacy}",
"followers_url": "https://api.github.com/users/simonjayhawkins/followers",
"following_url": "https://api.github.com/users/simonjayhawkins/following{/other_user}",
"gists_url": "https://api.github.com/users/simonjayhawkins/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/simonjayhawkins",
"id": 13159005,
"login": "simonjayhawkins",
"node_id": "MDQ6VXNlcjEzMTU5MDA1",
"organizations_url": "https://api.github.com/users/simonjayhawkins/orgs",
"received_events_url": "https://api.github.com/users/simonjayhawkins/received_events",
"repos_url": "https://api.github.com/users/simonjayhawkins/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/simonjayhawkins/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/simonjayhawkins/subscriptions",
"type": "User",
"url": "https://api.github.com/users/simonjayhawkins"
}
|
[
{
"color": "3465A4",
"default": false,
"description": null,
"id": 134699,
"name": "Docs",
"node_id": "MDU6TGFiZWwxMzQ2OTk=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Docs"
}
] |
closed
| false
| null |
[] |
{
"closed_at": "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-06-25T13:10:34Z
| 2020-06-25T14:41:35Z
| 2020-06-25T14:39: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/34989/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34989/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/34989.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/34989",
"merged_at": "2020-06-25T14:39:07Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/34989.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/34989"
}
|
|
https://api.github.com/repos/pandas-dev/pandas/issues/34990
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34990/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34990/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34990/events
|
https://github.com/pandas-dev/pandas/pull/34990
| 645,602,106
|
MDExOlB1bGxSZXF1ZXN0NDQwMDUyMDYy
| 34,990
|
TYP: remove inappropriate use of cast
|
{
"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"
}
| 1
| 2020-06-25T14:18:12Z
| 2020-06-25T18:40:03Z
| 2020-06-25T17:38:44Z
|
MEMBER
| null |
the cast was silencing `error: Argument 2 to "zip" has incompatible type "Union[Sequence[Union[str, int]], Mapping[Optional[Hashable], Union[str, int]]]"; expected
"Iterable[Union[str, int]]"`
This error is because col_space is defined as `Union[str, int, Sequence[Union[str, int]], Mapping[Label, Union[str, int]]]` and the `elif isinstance(col_space, dict):` would not catch non-dict mappings, which would go though the else.
so the else is non-dict mappings and sequences and the cast to sequence is not safe.
```
>>> df = pd.DataFrame(np.random.random(size=(3, 3)), columns=["a", "b", "c"])
>>>
>>> print(df.to_string(col_space={"b": 20}))
a b c
0 0.382920 0.057121 0.862742
1 0.579339 0.391014 0.907678
2 0.340584 0.889387 0.922690
>>>
>>> from collections import UserDict
>>>
>>> print(df.to_string(col_space=UserDict(b=20)))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\simon\pandas\pandas\core\frame.py", line 838, in to_string
formatter = fmt.DataFrameFormatter(
File "C:\Users\simon\pandas\pandas\io\formats\format.py", line 601, in __init__
raise ValueError(
ValueError: Col_space length(1) should match DataFrame number of columns(3)
>>>
```
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/34990/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34990/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/34990.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/34990",
"merged_at": "2020-06-25T17:38:44Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/34990.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/34990"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34991
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34991/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34991/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34991/events
|
https://github.com/pandas-dev/pandas/pull/34991
| 645,605,505
|
MDExOlB1bGxSZXF1ZXN0NDQwMDU0ODIz
| 34,991
|
DOC/TST: DataFrame constructor with a list of DataFrames
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1312546?v=4",
"events_url": "https://api.github.com/users/TomAugspurger/events{/privacy}",
"followers_url": "https://api.github.com/users/TomAugspurger/followers",
"following_url": "https://api.github.com/users/TomAugspurger/following{/other_user}",
"gists_url": "https://api.github.com/users/TomAugspurger/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/TomAugspurger",
"id": 1312546,
"login": "TomAugspurger",
"node_id": "MDQ6VXNlcjEzMTI1NDY=",
"organizations_url": "https://api.github.com/users/TomAugspurger/orgs",
"received_events_url": "https://api.github.com/users/TomAugspurger/received_events",
"repos_url": "https://api.github.com/users/TomAugspurger/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/TomAugspurger/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/TomAugspurger/subscriptions",
"type": "User",
"url": "https://api.github.com/users/TomAugspurger"
}
|
[] |
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-06-25T14:22:35Z
| 2020-06-30T11:55:02Z
| 2020-06-30T11:54:58Z
|
CONTRIBUTOR
| null |
Closes #32289 by removing the failing tests and asserting that we raise For NumPy>=1.19. See https://github.com/pandas-dev/pandas/issues/32289#issuecomment-649492024 for details, but the tldr is that DataFrames are now treated identically to 2D ndarrays.
One thing I wasn't sure of: where to document this. IMO this is too minor of an edge case to warrant anything in the docstring / user guide.
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/34991/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34991/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/34991.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/34991",
"merged_at": "2020-06-30T11:54:57Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/34991.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/34991"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34992
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34992/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34992/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34992/events
|
https://github.com/pandas-dev/pandas/issues/34992
| 645,620,141
|
MDU6SXNzdWU2NDU2MjAxNDE=
| 34,992
|
ENH: pd.DataFrame.merge() customizable indicator names
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/33916505?v=4",
"events_url": "https://api.github.com/users/ianzur/events{/privacy}",
"followers_url": "https://api.github.com/users/ianzur/followers",
"following_url": "https://api.github.com/users/ianzur/following{/other_user}",
"gists_url": "https://api.github.com/users/ianzur/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ianzur",
"id": 33916505,
"login": "ianzur",
"node_id": "MDQ6VXNlcjMzOTE2NTA1",
"organizations_url": "https://api.github.com/users/ianzur/orgs",
"received_events_url": "https://api.github.com/users/ianzur/received_events",
"repos_url": "https://api.github.com/users/ianzur/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ianzur/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ianzur/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ianzur"
}
|
[
{
"color": "4E9A06",
"default": false,
"description": null,
"id": 76812,
"name": "Enhancement",
"node_id": "MDU6TGFiZWw3NjgxMg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Enhancement"
},
{
"color": "0052cc",
"default": false,
"description": "Issue that has not been reviewed by a pandas team member",
"id": 1954720290,
"name": "Needs Triage",
"node_id": "MDU6TGFiZWwxOTU0NzIwMjkw",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Needs%20Triage"
}
] |
closed
| false
| null |
[] | null | 2
| 2020-06-25T14:41:19Z
| 2020-09-04T14:35:42Z
| 2020-09-04T14:35:33Z
|
CONTRIBUTOR
| null |
#### Is your feature request related to a problem?
When performing multiple merge operations I would love to specify a more informative name than ['left_only', 'right_only', 'both'] for column '_merge'.
#### Describe the solution you'd like
pd.DataFrame.merge() indicator param could accept a categorical index with a custom naming scheme.
something like:
```
pandas.CategoricalIndex(
categories=['my_custom_left_name', 'my_custom_right_name', 'custom_both'],
name='custom_column_name',
)
```
#### API breaking implications
This should not break anything.
#### Describe alternatives you've considered
Use Series.cat.rename_categories() after merge to change indicator names.
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/34992/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34992/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/34993
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34993/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34993/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34993/events
|
https://github.com/pandas-dev/pandas/issues/34993
| 645,686,558
|
MDU6SXNzdWU2NDU2ODY1NTg=
| 34,993
|
BUG: replace method with regex=True does not work for byte string
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/4373187?v=4",
"events_url": "https://api.github.com/users/wenjuno/events{/privacy}",
"followers_url": "https://api.github.com/users/wenjuno/followers",
"following_url": "https://api.github.com/users/wenjuno/following{/other_user}",
"gists_url": "https://api.github.com/users/wenjuno/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/wenjuno",
"id": 4373187,
"login": "wenjuno",
"node_id": "MDQ6VXNlcjQzNzMxODc=",
"organizations_url": "https://api.github.com/users/wenjuno/orgs",
"received_events_url": "https://api.github.com/users/wenjuno/received_events",
"repos_url": "https://api.github.com/users/wenjuno/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/wenjuno/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/wenjuno/subscriptions",
"type": "User",
"url": "https://api.github.com/users/wenjuno"
}
|
[
{
"color": "0052cc",
"default": false,
"description": null,
"id": 34444536,
"name": "Usage Question",
"node_id": "MDU6TGFiZWwzNDQ0NDUzNg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Usage%20Question"
},
{
"color": "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"
}
] |
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-06-25T16:10:41Z
| 2020-06-25T16:27:38Z
| 2020-06-25T16:27:37Z
|
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
s = pd.Series([b'abc'])
# This will replace "abc" with "123", output:
#
# 0 b'123'
# dtype: object
#
print(s.replace(b'abc', b'123'))
# But with regex=True, it doesn't work, output:
#
# 0 b'abc'
# dtype: object
#
print(s.replace(b'abc', b'123', regex=True))
```
#### Problem description
It worked in pandas 0.25. It also works when the data is unicode string instead of byte string.
I see a discussion about `regex` parameter in #33302 and one suggestion is to use `str.replace` instead. But that doesn't work for byte string:
```ipython
In [2]: s = pd.Series([b'abc'])
In [3]: s.str.replace(b'abc', b'123')
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-3-da8a12a3193b> in <module>
----> 1 s.str.replace(b'abc', b'123')
/data/wenjun/miniconda3/envs/test_pd/lib/python3.7/site-packages/pandas/core/strings.py in wrapper(self, *args, **kwargs)
1951 f"inferred dtype '{self._inferred_dtype}'."
1952 )
-> 1953 raise TypeError(msg)
1954 return func(self, *args, **kwargs)
1955
TypeError: Cannot use .str.replace with values of inferred dtype 'bytes'.
```
So it seems my only workaround is to decode the byte string into unicode string before calling the replace. If there are better ways to do it I'm happy to learn. Thanks.
#### Expected Output
```bash
0 b'123'
dtype: object
```
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit : None
python : 3.7.7.final.0
python-bits : 64
OS : Linux
OS-release : 4.15.0-108-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.5
numpy : 1.18.5
pytz : 2020.1
dateutil : 2.8.1
pip : 20.1.1
setuptools : 47.3.1.post20200622
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 : 7.15.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 : 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/34993/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34993/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/34994
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34994/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34994/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34994/events
|
https://github.com/pandas-dev/pandas/pull/34994
| 645,728,897
|
MDExOlB1bGxSZXF1ZXN0NDQwMTU2NTQw
| 34,994
|
DOC: Add example of NonFixedVariableWindowIndexer usage
|
{
"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": "3465A4",
"default": false,
"description": null,
"id": 134699,
"name": "Docs",
"node_id": "MDU6TGFiZWwxMzQ2OTk=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Docs"
},
{
"color": "d4c5f9",
"default": false,
"description": "rolling, ewma, expanding",
"id": 1045950827,
"name": "Window",
"node_id": "MDU6TGFiZWwxMDQ1OTUwODI3",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Window"
}
] |
closed
| false
| null |
[] |
{
"closed_at": "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-06-25T17:20:35Z
| 2020-06-30T05:12:50Z
| 2020-06-29T23:15:46Z
|
MEMBER
| null |
xref https://github.com/pandas-dev/pandas/pull/34947#issuecomment-649638742
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/34994/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34994/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/34994.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/34994",
"merged_at": "2020-06-29T23:15:46Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/34994.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/34994"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34995
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34995/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34995/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34995/events
|
https://github.com/pandas-dev/pandas/pull/34995
| 645,740,697
|
MDExOlB1bGxSZXF1ZXN0NDQwMTY2MzE3
| 34,995
|
TST: df.loc[:, 'col'] returning a view, but df.loc[df.index, 'col'] returning a copy
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/48889395?v=4",
"events_url": "https://api.github.com/users/arw2019/events{/privacy}",
"followers_url": "https://api.github.com/users/arw2019/followers",
"following_url": "https://api.github.com/users/arw2019/following{/other_user}",
"gists_url": "https://api.github.com/users/arw2019/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/arw2019",
"id": 48889395,
"login": "arw2019",
"node_id": "MDQ6VXNlcjQ4ODg5Mzk1",
"organizations_url": "https://api.github.com/users/arw2019/orgs",
"received_events_url": "https://api.github.com/users/arw2019/received_events",
"repos_url": "https://api.github.com/users/arw2019/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/arw2019/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/arw2019/subscriptions",
"type": "User",
"url": "https://api.github.com/users/arw2019"
}
|
[] |
closed
| false
| null |
[] | null | 0
| 2020-06-25T17:42:16Z
| 2020-06-25T17:46:03Z
| 2020-06-25T17:42:31Z
|
MEMBER
| null |
- [x] closes #15631
- [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/34995/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34995/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/34995.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/34995",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/34995.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/34995"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34996
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34996/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34996/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34996/events
|
https://github.com/pandas-dev/pandas/pull/34996
| 645,745,540
|
MDExOlB1bGxSZXF1ZXN0NDQwMTcwMjYy
| 34,996
|
TST: df.loc[:, 'col'] returning a view, but df.loc[df.index, 'col'] returning a copy
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/48889395?v=4",
"events_url": "https://api.github.com/users/arw2019/events{/privacy}",
"followers_url": "https://api.github.com/users/arw2019/followers",
"following_url": "https://api.github.com/users/arw2019/following{/other_user}",
"gists_url": "https://api.github.com/users/arw2019/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/arw2019",
"id": 48889395,
"login": "arw2019",
"node_id": "MDQ6VXNlcjQ4ODg5Mzk1",
"organizations_url": "https://api.github.com/users/arw2019/orgs",
"received_events_url": "https://api.github.com/users/arw2019/received_events",
"repos_url": "https://api.github.com/users/arw2019/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/arw2019/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/arw2019/subscriptions",
"type": "User",
"url": "https://api.github.com/users/arw2019"
}
|
[
{
"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": "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"
}
| 5
| 2020-06-25T17:51:05Z
| 2020-07-09T23:42:01Z
| 2020-07-09T23:41:56Z
|
MEMBER
| null |
- [x] closes #15631
- [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/34996/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34996/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/34996.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/34996",
"merged_at": "2020-07-09T23:41:56Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/34996.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/34996"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34997
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34997/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34997/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34997/events
|
https://github.com/pandas-dev/pandas/pull/34997
| 645,809,040
|
MDExOlB1bGxSZXF1ZXN0NDQwMjIyNzUw
| 34,997
|
REF: dont set ndarray.data in libreduction
|
{
"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": "fbca04",
"default": false,
"description": "Related to non-user accessible pandas implementation",
"id": 49094459,
"name": "Internals",
"node_id": "MDU6TGFiZWw0OTA5NDQ1OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Internals"
}
] |
closed
| false
| null |
[] | null | 21
| 2020-06-25T19:46:55Z
| 2021-03-02T17:22:42Z
| 2020-09-18T23:15:58Z
|
MEMBER
| null |
cc @WillAyd I'm still seeing 88 test failures locally and could use a fresh pair of eyes on this. Any thoughts?
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/34997/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34997/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/34997.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/34997",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/34997.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/34997"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34998
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34998/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34998/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34998/events
|
https://github.com/pandas-dev/pandas/pull/34998
| 645,853,211
|
MDExOlB1bGxSZXF1ZXN0NDQwMjU5NDIz
| 34,998
|
API: User-control of result keys in GroupBy.apply
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1312546?v=4",
"events_url": "https://api.github.com/users/TomAugspurger/events{/privacy}",
"followers_url": "https://api.github.com/users/TomAugspurger/followers",
"following_url": "https://api.github.com/users/TomAugspurger/following{/other_user}",
"gists_url": "https://api.github.com/users/TomAugspurger/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/TomAugspurger",
"id": 1312546,
"login": "TomAugspurger",
"node_id": "MDQ6VXNlcjEzMTI1NDY=",
"organizations_url": "https://api.github.com/users/TomAugspurger/orgs",
"received_events_url": "https://api.github.com/users/TomAugspurger/received_events",
"repos_url": "https://api.github.com/users/TomAugspurger/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/TomAugspurger/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/TomAugspurger/subscriptions",
"type": "User",
"url": "https://api.github.com/users/TomAugspurger"
}
|
[
{
"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": "5319e7",
"default": false,
"description": "Functionality to remove in pandas",
"id": 87485152,
"name": "Deprecate",
"node_id": "MDU6TGFiZWw4NzQ4NTE1Mg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Deprecate"
},
{
"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"
}
] |
open
| false
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/45562402?v=4",
"events_url": "https://api.github.com/users/rhshadrach/events{/privacy}",
"followers_url": "https://api.github.com/users/rhshadrach/followers",
"following_url": "https://api.github.com/users/rhshadrach/following{/other_user}",
"gists_url": "https://api.github.com/users/rhshadrach/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/rhshadrach",
"id": 45562402,
"login": "rhshadrach",
"node_id": "MDQ6VXNlcjQ1NTYyNDAy",
"organizations_url": "https://api.github.com/users/rhshadrach/orgs",
"received_events_url": "https://api.github.com/users/rhshadrach/received_events",
"repos_url": "https://api.github.com/users/rhshadrach/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/rhshadrach/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rhshadrach/subscriptions",
"type": "User",
"url": "https://api.github.com/users/rhshadrach"
}
|
[
{
"avatar_url": "https://avatars.githubusercontent.com/u/45562402?v=4",
"events_url": "https://api.github.com/users/rhshadrach/events{/privacy}",
"followers_url": "https://api.github.com/users/rhshadrach/followers",
"following_url": "https://api.github.com/users/rhshadrach/following{/other_user}",
"gists_url": "https://api.github.com/users/rhshadrach/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/rhshadrach",
"id": 45562402,
"login": "rhshadrach",
"node_id": "MDQ6VXNlcjQ1NTYyNDAy",
"organizations_url": "https://api.github.com/users/rhshadrach/orgs",
"received_events_url": "https://api.github.com/users/rhshadrach/received_events",
"repos_url": "https://api.github.com/users/rhshadrach/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/rhshadrach/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rhshadrach/subscriptions",
"type": "User",
"url": "https://api.github.com/users/rhshadrach"
}
] | null | 75
| 2020-06-25T21:10:36Z
| 2021-11-17T00:50:33Z
| null |
CONTRIBUTOR
| null |
Currently we determine whether to include the group keys as a level of the result's MultiIndex by looking at whether the result's index matches the original DataFrame. This provides a keyword to control that behavior so that users can consistently get the group keys or not, regardless of whether the udf happens to be a transform or not. The default behavior remains the same.
I called the keyword `result_group_keys`, but would welcome alternatives.
Closes #34809
Closes #31612
Closes #14927
Closes #13056
Closes #27212
Closes #9704
cc @WillAyd and @jorisvandenbossche from the issue.
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/34998/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34998/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/34998.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/34998",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/34998.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/34998"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34999
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/34999/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34999/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/34999/events
|
https://github.com/pandas-dev/pandas/pull/34999
| 645,891,404
|
MDExOlB1bGxSZXF1ZXN0NDQwMjkxMTIz
| 34,999
|
BUG: item_cache not cleared on DataFrame.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": "a10c02",
"default": false,
"description": "Memory or execution speed performance",
"id": 8935311,
"name": "Performance",
"node_id": "MDU6TGFiZWw4OTM1MzEx",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Performance"
},
{
"color": "207de5",
"default": false,
"description": null,
"id": 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"
}
| 12
| 2020-06-25T22:37:02Z
| 2020-09-07T06:58:36Z
| 2020-06-26T23:53:24Z
|
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/34999/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/34999/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/34999.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/34999",
"merged_at": "2020-06-26T23:53:24Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/34999.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/34999"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/35000
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/35000/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/35000/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/35000/events
|
https://github.com/pandas-dev/pandas/issues/35000
| 645,927,894
|
MDU6SXNzdWU2NDU5Mjc4OTQ=
| 35,000
|
ENH: Add command line support like pandashells
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/10137?v=4",
"events_url": "https://api.github.com/users/ghost/events{/privacy}",
"followers_url": "https://api.github.com/users/ghost/followers",
"following_url": "https://api.github.com/users/ghost/following{/other_user}",
"gists_url": "https://api.github.com/users/ghost/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ghost",
"id": 10137,
"login": "ghost",
"node_id": "MDQ6VXNlcjEwMTM3",
"organizations_url": "https://api.github.com/users/ghost/orgs",
"received_events_url": "https://api.github.com/users/ghost/received_events",
"repos_url": "https://api.github.com/users/ghost/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ghost/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ghost/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ghost"
}
|
[
{
"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-06-26T00:28:19Z
| 2020-06-26T01:15:57Z
| 2020-06-26T01:15:57Z
|
NONE
| null |
#### Is your feature request related to a problem?
I wish I could use pandas to directly process the data in the command line.
#### Describe the solution you'd like
[pandashells](https://github.com/robdmc/pandashells) does the job pretty well, but it is not under active development and doesn't use the full power of pandas.
#### Additional context
For example, pandashells can process the data in the terminal with:
```bash
$ p.df 'df["c"] = 2 * df.b' 'df.groupby(by="a").c.count()' 'df.reset_index()'
```
More examples can be found [here](https://github.com/robdmc/pandashells#dataframe-manipulations).
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/35000/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/35000/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/35001
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/35001/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/35001/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/35001/events
|
https://github.com/pandas-dev/pandas/pull/35001
| 645,934,137
|
MDExOlB1bGxSZXF1ZXN0NDQwMzI1NjA1
| 35,001
|
CLN: remove libreduction.Reducer
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
}
|
[
{
"color": "a10c02",
"default": false,
"description": "Memory or execution speed performance",
"id": 8935311,
"name": "Performance",
"node_id": "MDU6TGFiZWw4OTM1MzEx",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Performance"
},
{
"color": "207de5",
"default": false,
"description": null,
"id": 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-06-26T00:50:21Z
| 2020-06-26T20:31:18Z
| 2020-06-26T20:18:30Z
|
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/35001/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/35001/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/35001.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/35001",
"merged_at": "2020-06-26T20:18:30Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/35001.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/35001"
}
|
|
https://api.github.com/repos/pandas-dev/pandas/issues/35002
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/35002/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/35002/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/35002/events
|
https://github.com/pandas-dev/pandas/issues/35002
| 645,937,909
|
MDU6SXNzdWU2NDU5Mzc5MDk=
| 35,002
|
Add axis argument to DataFrame.corr
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/2761597?v=4",
"events_url": "https://api.github.com/users/alexlenail/events{/privacy}",
"followers_url": "https://api.github.com/users/alexlenail/followers",
"following_url": "https://api.github.com/users/alexlenail/following{/other_user}",
"gists_url": "https://api.github.com/users/alexlenail/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/alexlenail",
"id": 2761597,
"login": "alexlenail",
"node_id": "MDQ6VXNlcjI3NjE1OTc=",
"organizations_url": "https://api.github.com/users/alexlenail/orgs",
"received_events_url": "https://api.github.com/users/alexlenail/received_events",
"repos_url": "https://api.github.com/users/alexlenail/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/alexlenail/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/alexlenail/subscriptions",
"type": "User",
"url": "https://api.github.com/users/alexlenail"
}
|
[
{
"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": "547c03",
"default": false,
"description": "sum, mean, min, max, etc.",
"id": 2365504383,
"name": "Reduction Operations",
"node_id": "MDU6TGFiZWwyMzY1NTA0Mzgz",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Reduction%20Operations"
}
] |
open
| false
| null |
[] | null | 5
| 2020-06-26T01:03:41Z
| 2021-08-08T16:41:27Z
| null |
CONTRIBUTOR
| null |
#### Location of the documentation
https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.corr.html
#### Documentation problem
How should I get the correlation among the rows? I can obviously do `df.T.corr()` but this strikes me as a workaround rather than a nice way to do things. I wrote a `df.corr(axis=1)` assuming that would work. Curious what people feel is idiomatic, and would recommend some mention in the 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/35002/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/35002/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/35003
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/35003/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/35003/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/35003/events
|
https://github.com/pandas-dev/pandas/pull/35003
| 645,981,368
|
MDExOlB1bGxSZXF1ZXN0NDQwMzYxNTIy
| 35,003
|
BUG: DataFrame.melt gives unexpected result when column "value" already exists
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/2662541?v=4",
"events_url": "https://api.github.com/users/pizzathief/events{/privacy}",
"followers_url": "https://api.github.com/users/pizzathief/followers",
"following_url": "https://api.github.com/users/pizzathief/following{/other_user}",
"gists_url": "https://api.github.com/users/pizzathief/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/pizzathief",
"id": 2662541,
"login": "pizzathief",
"node_id": "MDQ6VXNlcjI2NjI1NDE=",
"organizations_url": "https://api.github.com/users/pizzathief/orgs",
"received_events_url": "https://api.github.com/users/pizzathief/received_events",
"repos_url": "https://api.github.com/users/pizzathief/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/pizzathief/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/pizzathief/subscriptions",
"type": "User",
"url": "https://api.github.com/users/pizzathief"
}
|
[
{
"color": "02d7e1",
"default": false,
"description": "Concat, Merge/Join, Stack/Unstack, Explode",
"id": 13098779,
"name": "Reshaping",
"node_id": "MDU6TGFiZWwxMzA5ODc3OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Reshaping"
},
{
"color": "5319e7",
"default": false,
"description": "Functionality to remove in pandas",
"id": 87485152,
"name": "Deprecate",
"node_id": "MDU6TGFiZWw4NzQ4NTE1Mg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Deprecate"
}
] |
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-06-26T03:30:25Z
| 2020-07-02T15:26:49Z
| 2020-07-02T15:26:45Z
|
CONTRIBUTOR
| null |
- [ x] closes #34731
- [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/35003/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/35003/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/35003.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/35003",
"merged_at": "2020-07-02T15:26:44Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/35003.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/35003"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/35004
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/35004/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/35004/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/35004/events
|
https://github.com/pandas-dev/pandas/pull/35004
| 646,000,188
|
MDExOlB1bGxSZXF1ZXN0NDQwMzc1MjE4
| 35,004
|
BUG: Avoids b' prefix for bytes in to_csv() (#9712)
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5311283?v=4",
"events_url": "https://api.github.com/users/sidhant007/events{/privacy}",
"followers_url": "https://api.github.com/users/sidhant007/followers",
"following_url": "https://api.github.com/users/sidhant007/following{/other_user}",
"gists_url": "https://api.github.com/users/sidhant007/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sidhant007",
"id": 5311283,
"login": "sidhant007",
"node_id": "MDQ6VXNlcjUzMTEyODM=",
"organizations_url": "https://api.github.com/users/sidhant007/orgs",
"received_events_url": "https://api.github.com/users/sidhant007/received_events",
"repos_url": "https://api.github.com/users/sidhant007/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sidhant007/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sidhant007/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sidhant007"
}
|
[
{
"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 |
[] | null | 16
| 2020-06-26T04:33:51Z
| 2020-07-09T15:56:41Z
| 2020-07-08T01:00:02Z
|
NONE
| null |
Avoids b' prefix written for bytes in the `to_csv()` method (in accordance with this [proposal](https://github.com/pandas-dev/pandas/issues/9712#issuecomment-635803657))
The `encoding` parameter passing in `to_csv()` method is used as the encoding scheme to decode the bytes.
Example:
```python
import pandas as pd
import sys
df = pd.DataFrame({
b'hello': [b'abc', b'def'],
b'world': ['pqr', 'xyz']
})
df.to_csv(sys.stdout, encoding='utf-8')
```
After the bug fix will print:
```
,hello,world
0,abc,pqr
1,def,xyz
```
Currently the `to_csv()` method prints:
```
,b'hello',b'world'
0,b'abc',pqr
1,b'def',xyz
```
- [x] closes #9712
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry
|
{
"+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/35004/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/35004/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/35004.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/35004",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/35004.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/35004"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/35005
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/35005/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/35005/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/35005/events
|
https://github.com/pandas-dev/pandas/issues/35005
| 646,014,446
|
MDU6SXNzdWU2NDYwMTQ0NDY=
| 35,005
|
BUG: `fillna()` on multiple columns with a series
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/830088?v=4",
"events_url": "https://api.github.com/users/eggers/events{/privacy}",
"followers_url": "https://api.github.com/users/eggers/followers",
"following_url": "https://api.github.com/users/eggers/following{/other_user}",
"gists_url": "https://api.github.com/users/eggers/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/eggers",
"id": 830088,
"login": "eggers",
"node_id": "MDQ6VXNlcjgzMDA4OA==",
"organizations_url": "https://api.github.com/users/eggers/orgs",
"received_events_url": "https://api.github.com/users/eggers/received_events",
"repos_url": "https://api.github.com/users/eggers/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/eggers/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/eggers/subscriptions",
"type": "User",
"url": "https://api.github.com/users/eggers"
}
|
[
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "0052cc",
"default": false,
"description": "Issue that has not been reviewed by a pandas team member",
"id": 1954720290,
"name": "Needs Triage",
"node_id": "MDU6TGFiZWwxOTU0NzIwMjkw",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Needs%20Triage"
}
] |
closed
| false
| null |
[] | null | 9
| 2020-06-26T05:18:31Z
| 2020-09-04T14:36:39Z
| 2020-09-04T14:36:38Z
|
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([{'Cat1': None, 'Cat2': 'mouse', 'Cat3': 'dog'},{'Cat1': 'cat', 'Cat2': 'mouse', 'Cat3': 'dog'},])
print('One column')
print(df['Cat1'].fillna(df['Cat3']))
print()
print('Two columns with one column')
print(df[['Cat1', 'Cat2']].fillna(df['Cat3']))
print()
print('Two columns with two columns')
print(df[['Cat1', 'Cat2']].fillna(df[['Cat3', 'Cat3']]))
```
Output:
```
One column
0 dog
1 cat
Name: Cat1, dtype: object
Two columns with one column
Cat1 Cat2
0 None mouse
1 cat mouse
Two columns with two columns
Cat1 Cat2
0 NaN mouse
1 cat mouse
```
#### Problem description
`fillna()` on multiple columns with a series doesn't work in the same way that it does on a single column. I also tried to use a dataframe thinking that perhaps it needed a matching number of columns, but that only filled the column with `NaN` instead of the correct value.
#### Expected Output
```
One column
0 dog
1 cat
Name: Cat1, dtype: object
Two columns with one column
Cat1 Cat2
0 dog mouse
1 cat mouse
Two columns with two columns
Cat1 Cat2
0 dog mouse
1 cat mouse
```
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit : None
python : 3.7.6.final.0
python-bits : 64
OS : Linux
OS-release : 4.9.0-12-amd64
machine : x86_64
processor :
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.0.4
numpy : 1.18.1
pytz : 2020.1
dateutil : 2.8.1
pip : 20.1.1
setuptools : 47.1.1.post20200529
Cython : 0.29.19
pytest : 5.4.2
hypothesis : 5.16.0
sphinx : 3.0.4
blosc : None
feather : None
xlsxwriter : 1.2.9
lxml.etree : 4.5.1
html5lib : 1.0.1
pymysql : None
psycopg2 : None
jinja2 : 2.11.2
IPython : 7.15.0
pandas_datareader: None
bs4 : 4.9.1
bottleneck : 1.3.2
fastparquet : None
gcsfs : 0.6.2
lxml.etree : 4.5.1
matplotlib : 3.2.1
numexpr : 2.7.1
odfpy : None
openpyxl : 3.0.3
pandas_gbq : None
pyarrow : 0.17.1
pytables : None
pytest : 5.4.2
pyxlsb : None
s3fs : None
scipy : 1.4.1
sqlalchemy : 1.3.17
tables : 3.6.1
tabulate : None
xarray : None
xlrd : 1.2.0
xlwt : 1.3.0
xlsxwriter : 1.2.9
numba : 0.49.1
</details>
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/35005/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/35005/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/35006
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/35006/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/35006/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/35006/events
|
https://github.com/pandas-dev/pandas/issues/35006
| 646,056,771
|
MDU6SXNzdWU2NDYwNTY3NzE=
| 35,006
|
BUG: Different behavior when set a list(scalar) to entire column and to some (filtered) rows
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5841616?v=4",
"events_url": "https://api.github.com/users/Zoynels/events{/privacy}",
"followers_url": "https://api.github.com/users/Zoynels/followers",
"following_url": "https://api.github.com/users/Zoynels/following{/other_user}",
"gists_url": "https://api.github.com/users/Zoynels/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Zoynels",
"id": 5841616,
"login": "Zoynels",
"node_id": "MDQ6VXNlcjU4NDE2MTY=",
"organizations_url": "https://api.github.com/users/Zoynels/orgs",
"received_events_url": "https://api.github.com/users/Zoynels/received_events",
"repos_url": "https://api.github.com/users/Zoynels/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Zoynels/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Zoynels/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Zoynels"
}
|
[
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "0b02e1",
"default": false,
"description": "Related to indexing on series/frames, not to indexes themselves",
"id": 2822098,
"name": "Indexing",
"node_id": "MDU6TGFiZWwyODIyMDk4",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Indexing"
},
{
"color": "f2f989",
"default": false,
"description": "Data where the values are collections (lists, sets, dicts, objects, etc.).",
"id": 2189479765,
"name": "Nested Data",
"node_id": "MDU6TGFiZWwyMTg5NDc5NzY1",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Nested%20Data"
}
] |
open
| false
| null |
[] | null | 3
| 2020-06-26T07:05:20Z
| 2021-08-08T16:42:20Z
| null |
NONE
| null |
- [*] I have checked that this issue has not already been reported.
- [*] I have confirmed this bug exists on the latest version of pandas.
- [ ] (optional) I have confirmed this bug exists on the master branch of pandas.
---
#### Problem description
Different behavior when set a list(scalar) to entire column and to some (filtered) rows.
#### Code Sample, a copy-pastable example
```python
df1 = pd.DataFrame({"X1":[[1],[2],[3]], "X2":[1,2,3]})
# work fine
df1["Y1_1"] = df1["X1"].to_numpy()
df1.loc[:1,"Y1_2"] = df1.loc[:1, "X1"].to_numpy()
# try simple new asix, which not work
df1["Y2_1"] = df1["X2"].to_numpy()[..., np.newaxis]
# set entire column by set a python list of arrays as espected
df1["Y2_2 (works as expected: list)"] = list(df1["X2"].to_numpy()[..., np.newaxis])
df1["Y2_2 (works as expected: 1 nested list)"] = list(df1["X2"].to_numpy()[..., np.newaxis][..., np.newaxis])
# now try to set with same function to subset of rows
df1["Y2_3 (not works as expected: scalar value instead list)"] = ""
df1.loc[:1, "Y2_3 (not works as expected: scalar value instead list)"] = list(df1.loc[:1, "X2"].to_numpy()[..., np.newaxis])
df1["Y2_4 (works as expected: 1 nested list)"] = ""
df1.loc[:1, "Y2_4 (works as expected: 1 nested list)"] = list(df1.loc[:1, "X2"].to_numpy()[..., np.newaxis][..., np.newaxis])
df1["Y2_5 (works as expected: 2 nested lists)"] = ""
df1.loc[:1, "Y2_5 (works as expected: 2 nested lists)"] = list(df1.loc[:1, "X2"].to_numpy()[..., np.newaxis][..., np.newaxis][..., np.newaxis])
# so Y2_3 is wrong as we can't set simple list and
# now I can set through ugly way:
# create list of array and one of values set to normal and after that set it individualy:
df1["Y2_3_2 (as expected)"] = ""
tmp = list(df1.loc[:1, "X2"].to_numpy()[..., np.newaxis])
tmp[0] = tmp[0][0]
df1.loc[:1, "Y2_3_2 (as expected)"] = tmp
df1.loc[0, "Y2_3_2 (as expected)"] = [[df1.loc[0, "Y2_3_2 (as expected)"]]]
```
#### Expected Output
```python
df1[["Y2_3 (not works as expected: scalar value instead list)", "Y2_3_2 (as expected)"]]
```
| | Y2_3 (not works as expected: scalar value instead list) | Y2_3_2 (as expected) |
|--- |--------------------------------------------------------- |---------------------- |
| 0 | 1 | [1] |
| 1 | 2 | [2] |
| 2 | | |
#### 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 58 Stepping 9, GenuineIntel
byteorder : little
LC_ALL : None
LANG : None
LOCALE : Russian_Russia.1251
pandas : 1.0.5
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 : 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: 0.8.1
bs4 : 4.9.0
bottleneck : None
fastparquet : None
gcsfs : None
lxml.etree : 4.5.0
matplotlib : None
numexpr : None
odfpy : None
openpyxl : 2.6.2
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 : 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/35006/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/35006/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/35007
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/35007/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/35007/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/35007/events
|
https://github.com/pandas-dev/pandas/pull/35007
| 646,131,779
|
MDExOlB1bGxSZXF1ZXN0NDQwNDc4MTUy
| 35,007
|
CI: lint failure on master
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/13159005?v=4",
"events_url": "https://api.github.com/users/simonjayhawkins/events{/privacy}",
"followers_url": "https://api.github.com/users/simonjayhawkins/followers",
"following_url": "https://api.github.com/users/simonjayhawkins/following{/other_user}",
"gists_url": "https://api.github.com/users/simonjayhawkins/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/simonjayhawkins",
"id": 13159005,
"login": "simonjayhawkins",
"node_id": "MDQ6VXNlcjEzMTU5MDA1",
"organizations_url": "https://api.github.com/users/simonjayhawkins/orgs",
"received_events_url": "https://api.github.com/users/simonjayhawkins/received_events",
"repos_url": "https://api.github.com/users/simonjayhawkins/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/simonjayhawkins/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/simonjayhawkins/subscriptions",
"type": "User",
"url": "https://api.github.com/users/simonjayhawkins"
}
|
[
{
"color": "a2bca7",
"default": false,
"description": "Continuous Integration",
"id": 48070600,
"name": "CI",
"node_id": "MDU6TGFiZWw0ODA3MDYwMA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/CI"
}
] |
closed
| false
| null |
[] |
{
"closed_at": "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-06-26T09:23:04Z
| 2020-06-26T12:40:24Z
| 2020-06-26T12:26: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/35007/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/35007/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/35007.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/35007",
"merged_at": "2020-06-26T12:26:42Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/35007.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/35007"
}
|
|
https://api.github.com/repos/pandas-dev/pandas/issues/35008
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/35008/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/35008/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/35008/events
|
https://github.com/pandas-dev/pandas/pull/35008
| 646,152,300
|
MDExOlB1bGxSZXF1ZXN0NDQwNDk0OTE2
| 35,008
|
CLN: remove redundant code in IndexOpsMixin.item
|
{
"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": "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-06-26T10:00:30Z
| 2020-06-26T12:40:48Z
| 2020-06-26T12:34:10Z
|
MEMBER
| null |
the code removed in this PR was added (with tests) in #30175.
in a latter PR, #31506, IndexOpsMixin.\_\_iter__ was modified, making the special case in IndexOpsMixin.item redundant.
cc @jbrockmendel
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/35008/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/35008/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/35008.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/35008",
"merged_at": "2020-06-26T12:34:10Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/35008.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/35008"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/35009
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/35009/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/35009/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/35009/events
|
https://github.com/pandas-dev/pandas/issues/35009
| 646,178,525
|
MDU6SXNzdWU2NDYxNzg1MjU=
| 35,009
|
BUG:to_numeric with leading zeros is not working consistently
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/58886556?v=4",
"events_url": "https://api.github.com/users/abedhammoud/events{/privacy}",
"followers_url": "https://api.github.com/users/abedhammoud/followers",
"following_url": "https://api.github.com/users/abedhammoud/following{/other_user}",
"gists_url": "https://api.github.com/users/abedhammoud/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/abedhammoud",
"id": 58886556,
"login": "abedhammoud",
"node_id": "MDQ6VXNlcjU4ODg2NTU2",
"organizations_url": "https://api.github.com/users/abedhammoud/orgs",
"received_events_url": "https://api.github.com/users/abedhammoud/received_events",
"repos_url": "https://api.github.com/users/abedhammoud/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/abedhammoud/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/abedhammoud/subscriptions",
"type": "User",
"url": "https://api.github.com/users/abedhammoud"
}
|
[
{
"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 | 4
| 2020-06-26T10:50:23Z
| 2020-06-27T15:44:08Z
| 2020-06-27T15:44:08Z
|
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.
I using version: '1.0.5'
- [ ] (optional) I have confirmed this bug exists on the master branch of pandas.
---
**Note**: Please read [this guide](https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) detailing how to provide the necessary information for us to reproduce your bug.
#### Code Sample, a copy-pastable example
```python
s = pd.Series(['apple', '001', '002', -3])
pd.to_numeric(s, errors='ignore')
[out]:
0 apple
1 001
2 002
3 -3
dtype: object
but if I do the following:
s2 = pd.Series([1, 1.0, '1', '1.0', ' 1', ' 1.0', '01', '002'])
pd.to_numeric(s2, errors='ignore')
[out]:
0 1.0
1 1.0
2 1.0
3 1.0
4 1.0
5 1.0
6 1.0
7 2.0
dtype: float64
Then I try:
s2 = pd.Series([1, 1.0, 'hello', '1.0', ' 1', ' 1.0', '01', '002'])
pd.to_numeric(s2, errors='ignore')
[out]:
0 1
1 1
2 hello
3 1.0
4 1
5 1.0
6 01
7 002
dtype: object
notice the 002 is not converted to 2 as before.
```
#### Problem description
It seems that the behavior of to_numeric in handling int with leading zeros is not consistent.
#### Expected Output
handling 00n should be consistent (converted to n)
INSTALLED 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 142 Stepping 10, GenuineIntel
byteorder : little
LC_ALL : None
LANG : None
LOCALE : None.None
pandas : 1.0.5
numpy : 1.18.5
pytz : 2020.1
dateutil : 2.8.1
pip : 20.1.1
setuptools : 47.3.1.post20200616
Cython : 0.29.20
pytest : 5.4.3
hypothesis : 5.18.1
sphinx : 3.1.1
blosc : None
feather : None
xlsxwriter : 1.2.9
lxml.etree : 4.5.1
html5lib : 1.1
pymysql : None
psycopg2 : None
jinja2 : 2.11.2
IPython : 7.15.0
pandas_datareader: None
bs4 : 4.9.1
bottleneck : 1.3.2
fastparquet : None
gcsfs : None
lxml.etree : 4.5.1
matplotlib : 3.2.1
numexpr : 2.7.1
odfpy : None
openpyxl : 3.0.3
pandas_gbq : None
pyarrow : None
pytables : None
pytest : 5.4.3
pyxlsb : None
s3fs : None
scipy : 1.5.0
sqlalchemy : 1.3.18
tables : 3.6.1
tabulate : None
xarray : 0.15.1
xlrd : 1.2.0
xlwt : 1.3.0
xlsxwriter : 1.2.9
numba : 0.49.1
</details>
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/35009/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/35009/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/35010
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/35010/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/35010/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/35010/events
|
https://github.com/pandas-dev/pandas/issues/35010
| 646,193,967
|
MDU6SXNzdWU2NDYxOTM5Njc=
| 35,010
|
BUG: Double requirement given for fsspec in requirements-dev.txt
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/24211143?v=4",
"events_url": "https://api.github.com/users/SanthoshBala18/events{/privacy}",
"followers_url": "https://api.github.com/users/SanthoshBala18/followers",
"following_url": "https://api.github.com/users/SanthoshBala18/following{/other_user}",
"gists_url": "https://api.github.com/users/SanthoshBala18/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/SanthoshBala18",
"id": 24211143,
"login": "SanthoshBala18",
"node_id": "MDQ6VXNlcjI0MjExMTQz",
"organizations_url": "https://api.github.com/users/SanthoshBala18/orgs",
"received_events_url": "https://api.github.com/users/SanthoshBala18/received_events",
"repos_url": "https://api.github.com/users/SanthoshBala18/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/SanthoshBala18/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/SanthoshBala18/subscriptions",
"type": "User",
"url": "https://api.github.com/users/SanthoshBala18"
}
|
[
{
"color": "75507B",
"default": false,
"description": "Library building on various platforms",
"id": 129350,
"name": "Build",
"node_id": "MDU6TGFiZWwxMjkzNTA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Build"
},
{
"color": "06909A",
"default": false,
"description": "IO issues that don't fit into a more specific label",
"id": 2301354,
"name": "IO Data",
"node_id": "MDU6TGFiZWwyMzAxMzU0",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20Data"
}
] |
closed
| false
| null |
[] |
{
"closed_at": "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-06-26T11:20:10Z
| 2020-06-26T13:12:43Z
| 2020-06-26T13:12:43Z
|
CONTRIBUTOR
| null |
Following error is found, while trying to set up local development environment:
ERROR: Double requirement given: fsspec>=0.7.4 (from -r requirements-dev.txt (line 69)) (already in fsspec>=0.5.1 (from -r requirements-dev.txt (line 25)), name='fsspec')
In requirements-dev.txt, two different versions of fsspec modules are specified.
fsspec>=0.5.1
fsspec>=0.7.4
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/35010/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/35010/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/35011
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/35011/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/35011/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/35011/events
|
https://github.com/pandas-dev/pandas/pull/35011
| 646,209,964
|
MDExOlB1bGxSZXF1ZXN0NDQwNTQyMTg0
| 35,011
|
Fix Issue #34923: Inferred dtype at the end of df explode method
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/24211143?v=4",
"events_url": "https://api.github.com/users/SanthoshBala18/events{/privacy}",
"followers_url": "https://api.github.com/users/SanthoshBala18/followers",
"following_url": "https://api.github.com/users/SanthoshBala18/following{/other_user}",
"gists_url": "https://api.github.com/users/SanthoshBala18/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/SanthoshBala18",
"id": 24211143,
"login": "SanthoshBala18",
"node_id": "MDQ6VXNlcjI0MjExMTQz",
"organizations_url": "https://api.github.com/users/SanthoshBala18/orgs",
"received_events_url": "https://api.github.com/users/SanthoshBala18/received_events",
"repos_url": "https://api.github.com/users/SanthoshBala18/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/SanthoshBala18/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/SanthoshBala18/subscriptions",
"type": "User",
"url": "https://api.github.com/users/SanthoshBala18"
}
|
[
{
"color": "02d7e1",
"default": false,
"description": "Concat, Merge/Join, Stack/Unstack, Explode",
"id": 13098779,
"name": "Reshaping",
"node_id": "MDU6TGFiZWwxMzA5ODc3OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Reshaping"
},
{
"color": "e102d8",
"default": false,
"description": "Unexpected or buggy dtype conversions",
"id": 31404521,
"name": "Dtype Conversions",
"node_id": "MDU6TGFiZWwzMTQwNDUyMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Dtype%20Conversions"
},
{
"color": "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"
}
| 5
| 2020-06-26T11:51:58Z
| 2020-11-26T18:58:52Z
| 2020-11-26T18:58:42Z
|
CONTRIBUTOR
| null |
- [ ] closes #34923
- [ ] tests added / passed
pandas/tests/frame/methods/test_explode.py, method test_inferred_dtype
- [ ] 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/35011/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/35011/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/35011.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/35011",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/35011.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/35011"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/35012
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/35012/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/35012/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/35012/events
|
https://github.com/pandas-dev/pandas/pull/35012
| 646,216,248
|
MDExOlB1bGxSZXF1ZXN0NDQwNTQ3Mjk0
| 35,012
|
Fix issue #35010: Double requirement given for fsspec
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/24211143?v=4",
"events_url": "https://api.github.com/users/SanthoshBala18/events{/privacy}",
"followers_url": "https://api.github.com/users/SanthoshBala18/followers",
"following_url": "https://api.github.com/users/SanthoshBala18/following{/other_user}",
"gists_url": "https://api.github.com/users/SanthoshBala18/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/SanthoshBala18",
"id": 24211143,
"login": "SanthoshBala18",
"node_id": "MDQ6VXNlcjI0MjExMTQz",
"organizations_url": "https://api.github.com/users/SanthoshBala18/orgs",
"received_events_url": "https://api.github.com/users/SanthoshBala18/received_events",
"repos_url": "https://api.github.com/users/SanthoshBala18/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/SanthoshBala18/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/SanthoshBala18/subscriptions",
"type": "User",
"url": "https://api.github.com/users/SanthoshBala18"
}
|
[
{
"color": "75507B",
"default": false,
"description": "Library building on various platforms",
"id": 129350,
"name": "Build",
"node_id": "MDU6TGFiZWwxMjkzNTA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Build"
},
{
"color": "06909A",
"default": false,
"description": "IO issues that don't fit into a more specific label",
"id": 2301354,
"name": "IO Data",
"node_id": "MDU6TGFiZWwyMzAxMzU0",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20Data"
}
] |
closed
| false
| null |
[] |
{
"closed_at": "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-06-26T12:04:47Z
| 2020-06-26T13:12:43Z
| 2020-06-26T13:12:43Z
|
CONTRIBUTOR
| null |
- [ ] closes #35010
- [ ] 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/35012/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/35012/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/35012.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/35012",
"merged_at": "2020-06-26T13:12:43Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/35012.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/35012"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/35013
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/35013/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/35013/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/35013/events
|
https://github.com/pandas-dev/pandas/pull/35013
| 646,255,400
|
MDExOlB1bGxSZXF1ZXN0NDQwNTc5NTg0
| 35,013
|
CLN: GH29547 format with f-strings
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/46203939?v=4",
"events_url": "https://api.github.com/users/DanBasson/events{/privacy}",
"followers_url": "https://api.github.com/users/DanBasson/followers",
"following_url": "https://api.github.com/users/DanBasson/following{/other_user}",
"gists_url": "https://api.github.com/users/DanBasson/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/DanBasson",
"id": 46203939,
"login": "DanBasson",
"node_id": "MDQ6VXNlcjQ2MjAzOTM5",
"organizations_url": "https://api.github.com/users/DanBasson/orgs",
"received_events_url": "https://api.github.com/users/DanBasson/received_events",
"repos_url": "https://api.github.com/users/DanBasson/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/DanBasson/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/DanBasson/subscriptions",
"type": "User",
"url": "https://api.github.com/users/DanBasson"
}
|
[] |
closed
| false
| null |
[] | null | 3
| 2020-06-26T13:14:52Z
| 2020-06-26T15:57:22Z
| 2020-06-26T15:26:52Z
|
CONTRIBUTOR
| null |
xref #29547,#34914
replace .format() for f-strings in the following:
pandas/tests/series/indexing/test_numeric.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/35013/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/35013/timeline
| null | 0
|
{
"diff_url": "https://github.com/pandas-dev/pandas/pull/35013.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/35013",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/35013.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/35013"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/35014
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/35014/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/35014/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/35014/events
|
https://github.com/pandas-dev/pandas/issues/35014
| 646,285,073
|
MDU6SXNzdWU2NDYyODUwNzM=
| 35,014
|
BUG: DataFrameGroupBy.__getitem__ fails to propagate dropna
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1312546?v=4",
"events_url": "https://api.github.com/users/TomAugspurger/events{/privacy}",
"followers_url": "https://api.github.com/users/TomAugspurger/followers",
"following_url": "https://api.github.com/users/TomAugspurger/following{/other_user}",
"gists_url": "https://api.github.com/users/TomAugspurger/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/TomAugspurger",
"id": 1312546,
"login": "TomAugspurger",
"node_id": "MDQ6VXNlcjEzMTI1NDY=",
"organizations_url": "https://api.github.com/users/TomAugspurger/orgs",
"received_events_url": "https://api.github.com/users/TomAugspurger/received_events",
"repos_url": "https://api.github.com/users/TomAugspurger/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/TomAugspurger/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/TomAugspurger/subscriptions",
"type": "User",
"url": "https://api.github.com/users/TomAugspurger"
}
|
[
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "729FCF",
"default": false,
"description": null,
"id": 233160,
"name": "Groupby",
"node_id": "MDU6TGFiZWwyMzMxNjA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Groupby"
},
{
"color": "d7e102",
"default": false,
"description": "np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate",
"id": 2822342,
"name": "Missing-data",
"node_id": "MDU6TGFiZWwyODIyMzQy",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Missing-data"
}
] |
closed
| false
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/48889395?v=4",
"events_url": "https://api.github.com/users/arw2019/events{/privacy}",
"followers_url": "https://api.github.com/users/arw2019/followers",
"following_url": "https://api.github.com/users/arw2019/following{/other_user}",
"gists_url": "https://api.github.com/users/arw2019/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/arw2019",
"id": 48889395,
"login": "arw2019",
"node_id": "MDQ6VXNlcjQ4ODg5Mzk1",
"organizations_url": "https://api.github.com/users/arw2019/orgs",
"received_events_url": "https://api.github.com/users/arw2019/received_events",
"repos_url": "https://api.github.com/users/arw2019/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/arw2019/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/arw2019/subscriptions",
"type": "User",
"url": "https://api.github.com/users/arw2019"
}
|
[
{
"avatar_url": "https://avatars.githubusercontent.com/u/48889395?v=4",
"events_url": "https://api.github.com/users/arw2019/events{/privacy}",
"followers_url": "https://api.github.com/users/arw2019/followers",
"following_url": "https://api.github.com/users/arw2019/following{/other_user}",
"gists_url": "https://api.github.com/users/arw2019/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/arw2019",
"id": 48889395,
"login": "arw2019",
"node_id": "MDQ6VXNlcjQ4ODg5Mzk1",
"organizations_url": "https://api.github.com/users/arw2019/orgs",
"received_events_url": "https://api.github.com/users/arw2019/received_events",
"repos_url": "https://api.github.com/users/arw2019/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/arw2019/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/arw2019/subscriptions",
"type": "User",
"url": "https://api.github.com/users/arw2019"
}
] |
{
"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"
}
| 2
| 2020-06-26T14:02:11Z
| 2020-08-07T21:33:06Z
| 2020-08-07T21:33:06Z
|
CONTRIBUTOR
| null |
#### Code Sample, a copy-pastable example
```pytb
In [1]: import pandas as pd
In [2]: df = pd.DataFrame({"A": [0, 0, 1, None], "B": [1, 2, 3, None]})
In [3]: gb = df.groupby("A", dropna=False)
In [6]: gb['B'].transform(len)
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-6-3bae7d67a46f> in <module>
----> 1 gb['B'].transform(len)
~/sandbox/pandas/pandas/core/groupby/generic.py in transform(self, func, engine, engine_kwargs, *args, **kwargs)
471 if not isinstance(func, str):
472 return self._transform_general(
--> 473 func, *args, engine=engine, engine_kwargs=engine_kwargs, **kwargs
474 )
475
~/sandbox/pandas/pandas/core/groupby/generic.py in _transform_general(self, func, engine, engine_kwargs, *args, **kwargs)
537
538 result.name = self._selected_obj.name
--> 539 result.index = self._selected_obj.index
540 return result
541
~/sandbox/pandas/pandas/core/generic.py in __setattr__(self, name, value)
5141 try:
5142 object.__getattribute__(self, name)
-> 5143 return object.__setattr__(self, name, value)
5144 except AttributeError:
5145 pass
~/sandbox/pandas/pandas/_libs/properties.pyx in pandas._libs.properties.AxisProperty.__set__()
64
65 def __set__(self, obj, value):
---> 66 obj._set_axis(self.axis, value)
~/sandbox/pandas/pandas/core/series.py in _set_axis(self, axis, labels, fastpath)
422 if not fastpath:
423 # The ensure_index call above ensures we have an Index object
--> 424 self._mgr.set_axis(axis, labels)
425
426 # ndarray compatibility
~/sandbox/pandas/pandas/core/internals/managers.py in set_axis(self, axis, new_labels)
213 if new_len != old_len:
214 raise ValueError(
--> 215 f"Length mismatch: Expected axis has {old_len} elements, new "
216 f"values have {new_len} elements"
217 )
ValueError: Length mismatch: Expected axis has 3 elements, new values have 4 elements
```
#### Problem description
Compare that with the following
```python
In [4]: gb.transform(len)
Out[4]:
B
0 2
1 2
2 1
3 1
In [5]: gb[['B']].transform(len)
Out[5]:
B
0 2
1 2
2 1
3 1
```
So it's just when slicing down to a SeriesGroupBy object.
#### Expected Output
A series:
```python
Out[5]:
0 2
1 2
2 1
3 1
```
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/35014/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/35014/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/35015
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/35015/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/35015/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/35015/events
|
https://github.com/pandas-dev/pandas/issues/35015
| 646,287,614
|
MDU6SXNzdWU2NDYyODc2MTQ=
| 35,015
|
BUG: MultiIndex columns containing datetime cannot be used (regression from 1.0.5 to master)
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/15113894?v=4",
"events_url": "https://api.github.com/users/Dr-Irv/events{/privacy}",
"followers_url": "https://api.github.com/users/Dr-Irv/followers",
"following_url": "https://api.github.com/users/Dr-Irv/following{/other_user}",
"gists_url": "https://api.github.com/users/Dr-Irv/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Dr-Irv",
"id": 15113894,
"login": "Dr-Irv",
"node_id": "MDQ6VXNlcjE1MTEzODk0",
"organizations_url": "https://api.github.com/users/Dr-Irv/orgs",
"received_events_url": "https://api.github.com/users/Dr-Irv/received_events",
"repos_url": "https://api.github.com/users/Dr-Irv/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Dr-Irv/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Dr-Irv/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Dr-Irv"
}
|
[
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "0b02e1",
"default": false,
"description": "Related to indexing on series/frames, not to indexes themselves",
"id": 2822098,
"name": "Indexing",
"node_id": "MDU6TGFiZWwyODIyMDk4",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Indexing"
},
{
"color": "e11d21",
"default": false,
"description": "Functionality that used to work in a prior pandas version",
"id": 32815646,
"name": "Regression",
"node_id": "MDU6TGFiZWwzMjgxNTY0Ng==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Regression"
},
{
"color": "207de5",
"default": false,
"description": null,
"id": 71268330,
"name": "MultiIndex",
"node_id": "MDU6TGFiZWw3MTI2ODMzMA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/MultiIndex"
}
] |
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-06-26T14:06:11Z
| 2020-07-08T12:43:19Z
| 2020-07-08T12:43:18Z
|
CONTRIBUTOR
| null |
- [x] I have checked that this issue has not already been reported.
- [ ] I have confirmed this bug exists on the latest version of pandas.
- [x] (optional) I have confirmed this bug exists on the master branch of pandas.
---
#### Code Sample, a copy-pastable example
```python
In [1]: import pandas as pd
In [2]: pd.__version__
Out[2]: '1.1.0.dev0+1967.gf5b2e5a9a'
In [3]: expected_column_index = pd.MultiIndex.from_tuples(
...: [(pd.to_datetime("02/29/2020"), pd.to_datetime("03/01/2020"))],
...: names=[
...: 'a', 'b'])
In [4]: pd.DataFrame([], columns=expected_column_index)
---------------------------------------------------------------------------
InvalidIndexError
```
#### Problem description
This works in 1.0.5, but not in master.
See discussion in #34748 . This new issue should be resolved before that PR moves forward.
#### Expected Output
```python
In [1]: import pandas as pd
In [2]: pd.__version__
Out[2]: '1.0.5'
In [3]: expected_column_index = pd.MultiIndex.from_tuples(
...: [(pd.to_datetime("02/29/2020"), pd.to_datetime("03/01/2020"))],
...: names=[
...: 'a', 'b'])
In [4]: pd.DataFrame([], columns=expected_column_index)
Out[4]:
Empty DataFrame
Columns: [(2020-02-29 00:00:00, 2020-03-01 00:00:00)]
Index: []
```
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit : f5b2e5a9a2431165b1e8002219c5d3962d7bc920
python : 3.7.6.final.0
python-bits : 64
OS : Windows
OS-release : 10
Version : 10.0.18362
machine : AMD64
processor : Intel64 Family 6 Model 158 Stepping 13, GenuineIntel
byteorder : little
LC_ALL : None
LANG : None
LOCALE : None.None
pandas : 1.1.0.dev0+1967.gf5b2e5a9a
numpy : 1.18.5
pytz : 2020.1
dateutil : 2.8.1
pip : 20.1.1
setuptools : 42.0.2.post20191201
Cython : 0.29.20
pytest : 5.4.3
hypothesis : 5.18.0
sphinx : 3.1.1
blosc : None
feather : None
xlsxwriter : 1.2.9
lxml.etree : 4.5.1
html5lib : 1.0.1
pymysql : None
psycopg2 : None
jinja2 : 2.11.2
IPython : 7.15.0
pandas_datareader: None
bs4 : 4.9.1
bottleneck : 1.3.2
fsspec : 0.7.4
fastparquet : 0.4.0
gcsfs : None
matplotlib : 3.1.2
numexpr : 2.7.1
odfpy : None
openpyxl : 3.0.3
pandas_gbq : None
pyarrow : 0.15.1
pytables : None
pyxlsb : 1.0.6
s3fs : 0.4.2
scipy : 1.3.1
sqlalchemy : 1.3.17
tables : 3.6.1
tabulate : 0.8.7
xarray : 0.15.1
xlrd : 1.2.0
xlwt : 1.3.0
numba : 0.46.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/35015/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/35015/timeline
| null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/35016
|
https://api.github.com/repos/pandas-dev/pandas
|
https://api.github.com/repos/pandas-dev/pandas/issues/35016/labels{/name}
|
https://api.github.com/repos/pandas-dev/pandas/issues/35016/comments
|
https://api.github.com/repos/pandas-dev/pandas/issues/35016/events
|
https://github.com/pandas-dev/pandas/issues/35016
| 646,362,435
|
MDU6SXNzdWU2NDYzNjI0MzU=
| 35,016
|
BUG: pd.Series.plot() with specific datetime values shows wrong dates when specifying a matplotlib DateFormatter
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/23005347?v=4",
"events_url": "https://api.github.com/users/gshpychka/events{/privacy}",
"followers_url": "https://api.github.com/users/gshpychka/followers",
"following_url": "https://api.github.com/users/gshpychka/following{/other_user}",
"gists_url": "https://api.github.com/users/gshpychka/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/gshpychka",
"id": 23005347,
"login": "gshpychka",
"node_id": "MDQ6VXNlcjIzMDA1MzQ3",
"organizations_url": "https://api.github.com/users/gshpychka/orgs",
"received_events_url": "https://api.github.com/users/gshpychka/received_events",
"repos_url": "https://api.github.com/users/gshpychka/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/gshpychka/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gshpychka/subscriptions",
"type": "User",
"url": "https://api.github.com/users/gshpychka"
}
|
[
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "0052cc",
"default": false,
"description": "Issue that has not been reviewed by a pandas team member",
"id": 1954720290,
"name": "Needs Triage",
"node_id": "MDU6TGFiZWwxOTU0NzIwMjkw",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Needs%20Triage"
}
] |
closed
| false
| null |
[] | null | 2
| 2020-06-26T16:04:52Z
| 2020-09-04T14:41:06Z
| 2020-09-04T14:41:06Z
|
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.
Hello. I've run into a very weird and specific issue.
When plotting a Series with some specific datetime values produced by pd.to_datetime() in the index, using pd.Series.plot() and supplying a custom matplotlib DateFormatter to the x axis, the x axis is all wrong.
I know this sounds confusing.
Here's a minimal example:
```python
import pandas as pd
import matplotlib.pyplot as plt
from matplotlib.dates import DateFormatter
%matplotlib inline
x_formatter = DateFormatter("%Y")
dates = [dt.date(2020,1,4), dt.date(2020,1,5), dt.date(2020,1,6)]
pd.Series([5,8,7], index=pd.to_datetime(dates)).plot()
ax = plt.gca()
ax.xaxis.set_major_formatter(x_formatter)
```
#### Problem description
[Here's what the output looks like](
https://i.imgur.com/DjqqeWa.png)
The formatted outputs "0051" as the year for this particular example. This only happens for some specific dates (I wasn't able to figure out a rule), and only when supplying a matplotlib formatter.
This does not happen when using matplotlib directly.
This also does not happen when NOT using pd.to_datetime()
#### Expected Output
'2020' labels at major tick locations.
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit : None
python : 3.6.5.final.0
python-bits : 32
OS : Linux
OS-release : 3.10.0-862.2.3.el7.x86_64
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.16.1
pytz : 2018.5
dateutil : 2.6.1
pip : 20.1.1
setuptools : 39.2.0
Cython : 0.29.17
pytest : 3.5.1
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : 1.1.1
lxml.etree : 4.2.1
html5lib : 1.0.1
pymysql : None
psycopg2 : 2.7.4 (dt dec pq3 ext)
jinja2 : 2.10
IPython : 6.4.0
pandas_datareader: None
bs4 : 4.8.1
bottleneck : None
fastparquet : None
gcsfs : None
lxml.etree : 4.2.1
matplotlib : 2.2.2
numexpr : None
odfpy : None
openpyxl : 2.5.3
pandas_gbq : None
pyarrow : None
pytables : None
pytest : 3.5.1
pyxlsb : None
s3fs : None
scipy : 1.1.0
sqlalchemy : 1.1.15
tables : None
tabulate : None
xarray : None
xlrd : 1.1.0
xlwt : None
xlsxwriter : 1.1.1
numba : 0.40.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/35016/reactions"
}
|
https://api.github.com/repos/pandas-dev/pandas/issues/35016/timeline
| null | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.