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/26413 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26413/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26413/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26413/events | https://github.com/pandas-dev/pandas/pull/26413 | 444,495,358 | MDExOlB1bGxSZXF1ZXN0Mjc5MTQzNTQz | 26,413 | Added conda update step and re-added gcsfs | {
"avatar_url": "https://avatars.githubusercontent.com/u/609873?v=4",
"events_url": "https://api.github.com/users/WillAyd/events{/privacy}",
"followers_url": "https://api.github.com/users/WillAyd/followers",
"following_url": "https://api.github.com/users/WillAyd/following{/other_user}",
"gists_url": "https://api.github.com/users/WillAyd/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/WillAyd",
"id": 609873,
"login": "WillAyd",
"node_id": "MDQ6VXNlcjYwOTg3Mw==",
"organizations_url": "https://api.github.com/users/WillAyd/orgs",
"received_events_url": "https://api.github.com/users/WillAyd/received_events",
"repos_url": "https://api.github.com/users/WillAyd/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/WillAyd/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/WillAyd/subscriptions",
"type": "User",
"url": "https://api.github.com/users/WillAyd"
} | [
{
"color": "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 | 11 | 2019-05-15T15:11:16Z | 2020-01-16T00:33:59Z | 2019-05-15T20:11:14Z | MEMBER | null | - [X] closes #26345
- [ ] tests added / passed
- [ ] 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/26413/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26413/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26413.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26413",
"merged_at": "2019-05-15T20:11:14Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26413.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26413"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26414 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26414/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26414/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26414/events | https://github.com/pandas-dev/pandas/pull/26414 | 444,533,133 | MDExOlB1bGxSZXF1ZXN0Mjc5MTc0MDgz | 26,414 | PLOT: Split matplotlib specific code from pandas plotting | {
"avatar_url": "https://avatars.githubusercontent.com/u/10058240?v=4",
"events_url": "https://api.github.com/users/datapythonista/events{/privacy}",
"followers_url": "https://api.github.com/users/datapythonista/followers",
"following_url": "https://api.github.com/users/datapythonista/following{/other_user}",
"gists_url": "https://api.github.com/users/datapythonista/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/datapythonista",
"id": 10058240,
"login": "datapythonista",
"node_id": "MDQ6VXNlcjEwMDU4MjQw",
"organizations_url": "https://api.github.com/users/datapythonista/orgs",
"received_events_url": "https://api.github.com/users/datapythonista/received_events",
"repos_url": "https://api.github.com/users/datapythonista/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/datapythonista/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/datapythonista/subscriptions",
"type": "User",
"url": "https://api.github.com/users/datapythonista"
} | [
{
"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": "8AE234",
"default": false,
"de... | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"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": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 37 | 2019-05-15T16:27:40Z | 2019-06-08T23:23:07Z | 2019-06-08T23:23:01Z | MEMBER | null | - [X] xref #14130
- [ ] tests added / passed
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
In order to be able to change pandas plotting backend, I think we need 3 main things:
1. Decouple the current matplotlib backend from the pandas plotting system, and just call it using a defined public API
2. Implement an option to select the backend (e.g. `pandas.set_option('plotting.backend', 'pandas.matplotlib')`)
3. Have other alternative backends which define the same API as the current matplotlib one
This PR is splitting most of the matplotlib backend code into a new `_matplotlib.py` file. Some matplotlib code still lives in `plotting/_core.py`, but would be nice to have early feedback on whether everybody is happy with this approach before moving forward. CC: @jreback @TomAugspurger | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 1,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 1,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26414/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26414/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26414.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26414",
"merged_at": "2019-06-08T23:23:01Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26414.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26414"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26415 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26415/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26415/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26415/events | https://github.com/pandas-dev/pandas/pull/26415 | 444,571,640 | MDExOlB1bGxSZXF1ZXN0Mjc5MjA0NjE1 | 26,415 | CLN: remove __unicode__ from pandas.core.dtypes | {
"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"
} | [] | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"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": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 3 | 2019-05-15T18:02:33Z | 2019-05-16T00:15:15Z | 2019-05-15T23:31:22Z | CONTRIBUTOR | null | - [x] xref #25725
Removes use of ``__unicode__`` from the pandas.core.dtypes namespace. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26415/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26415/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26415.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26415",
"merged_at": "2019-05-15T23:31:22Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26415.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26415"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26416 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26416/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26416/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26416/events | https://github.com/pandas-dev/pandas/pull/26416 | 444,575,292 | MDExOlB1bGxSZXF1ZXN0Mjc5MjA3NDc0 | 26,416 | CLN: remove __unicode__ from pyx, etc. files | {
"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"
} | [] | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"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": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 6 | 2019-05-15T18:11:38Z | 2019-05-16T00:15:53Z | 2019-05-15T23:32:25Z | CONTRIBUTOR | null | - [x] xref #25725
Removes use of ``__unicode__`` from the all pyx, pxi pxi.in etc type files.
This pattern was almost not used in the non-.py type files. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26416/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26416/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26416.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26416",
"merged_at": "2019-05-15T23:32:25Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26416.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26416"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26417 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26417/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26417/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26417/events | https://github.com/pandas-dev/pandas/pull/26417 | 444,586,649 | MDExOlB1bGxSZXF1ZXN0Mjc5MjE2NDg4 | 26,417 | BUG: bugfix 26390 assigning PandasArray to DataFrame error | {
"avatar_url": "https://avatars.githubusercontent.com/u/4872525?v=4",
"events_url": "https://api.github.com/users/shantanu-gontia/events{/privacy}",
"followers_url": "https://api.github.com/users/shantanu-gontia/followers",
"following_url": "https://api.github.com/users/shantanu-gontia/following{/other_user}",
"gists_url": "https://api.github.com/users/shantanu-gontia/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/shantanu-gontia",
"id": 4872525,
"login": "shantanu-gontia",
"node_id": "MDQ6VXNlcjQ4NzI1MjU=",
"organizations_url": "https://api.github.com/users/shantanu-gontia/orgs",
"received_events_url": "https://api.github.com/users/shantanu-gontia/received_events",
"repos_url": "https://api.github.com/users/shantanu-gontia/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/shantanu-gontia/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/shantanu-gontia/subscriptions",
"type": "User",
"url": "https://api.github.com/users/shantanu-gontia"
} | [
{
"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": "fb... | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"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": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 4 | 2019-05-15T18:39:03Z | 2019-05-19T19:10:51Z | 2019-05-19T18:11:28Z | CONTRIBUTOR | null | - [x] closes #26390
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
----
Which section should i add the whatsnew entry in for this particular case? | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26417/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26417/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26417.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26417",
"merged_at": "2019-05-19T18:11:27Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26417.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26417"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26418 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26418/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26418/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26418/events | https://github.com/pandas-dev/pandas/issues/26418 | 444,697,471 | MDU6SXNzdWU0NDQ2OTc0NzE= | 26,418 | Inconsistent Constructor Behavior | {
"avatar_url": "https://avatars.githubusercontent.com/u/13526494?v=4",
"events_url": "https://api.github.com/users/nhartwic/events{/privacy}",
"followers_url": "https://api.github.com/users/nhartwic/followers",
"following_url": "https://api.github.com/users/nhartwic/following{/other_user}",
"gists_url": "https://api.github.com/users/nhartwic/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nhartwic",
"id": 13526494,
"login": "nhartwic",
"node_id": "MDQ6VXNlcjEzNTI2NDk0",
"organizations_url": "https://api.github.com/users/nhartwic/orgs",
"received_events_url": "https://api.github.com/users/nhartwic/received_events",
"repos_url": "https://api.github.com/users/nhartwic/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nhartwic/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nhartwic/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nhartwic"
} | [
{
"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": "Requires discussion from... | open | false | null | [] | null | 4 | 2019-05-16T00:09:24Z | 2021-07-02T06:02:26Z | null | NONE | null | #### Code Sample, a copy-pastable example if possible
```python
DF = pandas.DataFrame
S = pandas.Series
ll = [list(range(5)) for i in range(10)]
print(DF(ll).shape)
ld = [{j: j for j in range(5)} for i in range(10)]
print(DF(ld).shape)
dd = {i: {j: j for j in range(5)} for i in range(10)}
print(DF(dd).shape)
dl = {i: list(range(5)) for i in range(10)}
print(DF(dl).shape)
ls = [S(list(range(5))) for i in range(10)]
print(DF(ls).shape)
ds = {i: S(list(range(5))) for i in range(10)}
print(DF(ds).shape)
ss = S([S(list(range(5))) for i in range(10)])
print(DF(ss).shape)
sl = S([list(range(5)) for i in range(10)])
print(DF(sl).shape)
sd = S([{j: j for j in range(5)} for i in range(10)])
print(DF(sd).shape)
```
#### Problem description
There are kind of two separate issues here...
1. It seems strange to me that when a two dimensional object is passed to the DataFrame constructor, whether or not the object is interpreted as row by col or col by row is determined by whether or not the outer object is a dict or a list. If the outer object is a Dict, an MxN object will create an NxM dataframe. If the outer object is a list, an MxN object will create an MxN dataframe
2. It seems strange to me that the DataFrame constructor works well with lists of series and dicts of series but doesn't work with series of dicts, series of lists, or series of series.
#### Expected Output
Naively, I would expect the resultant DataFrame to be structured in the same way regardless of whether the object passed to the DataFrame constructor is a dict of lists, a dict of dicts, a list of lists, etc... All of the above calls to pandas.DataFrame should return equivalent dataframes IMO.
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit: None
python: 3.6.8.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: 0.24.2
pytest: None
pip: 19.0.3
setuptools: 41.0.0
Cython: None
numpy: 1.16.3
scipy: 1.2.1
pyarrow: None
xarray: None
IPython: 7.4.0
sphinx: None
patsy: 0.5.1
dateutil: 2.8.0
pytz: 2019.1
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: 2.2.2
openpyxl: 2.6.2
xlrd: 1.2.0
xlwt: None
xlsxwriter: 1.1.7
lxml.etree: 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/26418/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26418/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26419 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26419/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26419/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26419/events | https://github.com/pandas-dev/pandas/pull/26419 | 444,705,727 | MDExOlB1bGxSZXF1ZXN0Mjc5MzExMTYy | 26,419 | Fix GroupBy nth Handling with Observed=False | {
"avatar_url": "https://avatars.githubusercontent.com/u/609873?v=4",
"events_url": "https://api.github.com/users/WillAyd/events{/privacy}",
"followers_url": "https://api.github.com/users/WillAyd/followers",
"following_url": "https://api.github.com/users/WillAyd/following{/other_user}",
"gists_url": "https://api.github.com/users/WillAyd/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/WillAyd",
"id": 609873,
"login": "WillAyd",
"node_id": "MDQ6VXNlcjYwOTg3Mw==",
"organizations_url": "https://api.github.com/users/WillAyd/orgs",
"received_events_url": "https://api.github.com/users/WillAyd/received_events",
"repos_url": "https://api.github.com/users/WillAyd/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/WillAyd/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/WillAyd/subscriptions",
"type": "User",
"url": "https://api.github.com/users/WillAyd"
} | [
{
"color": "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,... | closed | false | null | [] | {
"closed_at": "2019-08-22T19:23:14Z",
"closed_issues": 145,
"created_at": "2019-06-30T19:32:22Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/1020496?v=4",
"events_url": "https://api.github.com/users/jorisvandenbossche/events{/privacy}",
"followers_url": "https://api.github.com/users/jorisvandenbossche/followers",
"following_url": "https://api.github.com/users/jorisvandenbossche/following{/other_user}",
"gists_url": "https://api.github.com/users/jorisvandenbossche/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jorisvandenbossche",
"id": 1020496,
"login": "jorisvandenbossche",
"node_id": "MDQ6VXNlcjEwMjA0OTY=",
"organizations_url": "https://api.github.com/users/jorisvandenbossche/orgs",
"received_events_url": "https://api.github.com/users/jorisvandenbossche/received_events",
"repos_url": "https://api.github.com/users/jorisvandenbossche/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jorisvandenbossche/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jorisvandenbossche/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jorisvandenbossche"
},
"description": "on-merge: backport to 0.25.x",
"due_on": "2019-08-21T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/65",
"id": 4452219,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/65/labels",
"node_id": "MDk6TWlsZXN0b25lNDQ1MjIxOQ==",
"number": 65,
"open_issues": 0,
"state": "closed",
"title": "0.25.1",
"updated_at": "2019-08-22T19:52:56Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/65"
} | 14 | 2019-05-16T00:51:52Z | 2019-08-23T12:15:10Z | 2019-08-20T19:02:10Z | MEMBER | null | - [X] closes #26385
- [X] tests added / passed
- [] 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/26419/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26419/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26419.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26419",
"merged_at": "2019-08-20T19:02:10Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26419.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26419"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26420 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26420/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26420/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26420/events | https://github.com/pandas-dev/pandas/pull/26420 | 444,745,127 | MDExOlB1bGxSZXF1ZXN0Mjc5MzM5Nzc1 | 26,420 | Add Annotations to GroupBy | {
"avatar_url": "https://avatars.githubusercontent.com/u/609873?v=4",
"events_url": "https://api.github.com/users/WillAyd/events{/privacy}",
"followers_url": "https://api.github.com/users/WillAyd/followers",
"following_url": "https://api.github.com/users/WillAyd/following{/other_user}",
"gists_url": "https://api.github.com/users/WillAyd/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/WillAyd",
"id": 609873,
"login": "WillAyd",
"node_id": "MDQ6VXNlcjYwOTg3Mw==",
"organizations_url": "https://api.github.com/users/WillAyd/orgs",
"received_events_url": "https://api.github.com/users/WillAyd/received_events",
"repos_url": "https://api.github.com/users/WillAyd/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/WillAyd/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/WillAyd/subscriptions",
"type": "User",
"url": "https://api.github.com/users/WillAyd"
} | [
{
"color": "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 | [] | null | 2 | 2019-05-16T04:09:09Z | 2020-01-16T00:33:58Z | 2019-05-27T00:10:59Z | MEMBER | null | Not fully complete but got started on these on a flight today. Should be able to review failures in a few more details.
@gwrome @vaibhavhrt would love any feedback from you | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26420/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26420/timeline | null | 1 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26420.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26420",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/26420.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26420"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26421 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26421/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26421/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26421/events | https://github.com/pandas-dev/pandas/pull/26421 | 444,813,201 | MDExOlB1bGxSZXF1ZXN0Mjc5MzkyNDk5 | 26,421 | DEPR: deprecate SparseArray.values | {
"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": "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": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"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": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 9 | 2019-05-16T08:10:28Z | 2019-05-26T15:05:09Z | 2019-05-21T06:23:52Z | MEMBER | null | Having a `.values` attribute on SparseArray is confusing, as `.values` is typically used on Series/DataFrame/Index and not on the array classes.
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26421/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26421/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26421.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26421",
"merged_at": "2019-05-21T06:23:52Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26421.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26421"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26422 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26422/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26422/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26422/events | https://github.com/pandas-dev/pandas/pull/26422 | 444,828,409 | MDExOlB1bGxSZXF1ZXN0Mjc5NDA0MzU4 | 26,422 | Correction (and clarification) to EWMA doc | {
"avatar_url": "https://avatars.githubusercontent.com/u/46758370?v=4",
"events_url": "https://api.github.com/users/jamesoliverh/events{/privacy}",
"followers_url": "https://api.github.com/users/jamesoliverh/followers",
"following_url": "https://api.github.com/users/jamesoliverh/following{/other_user}",
"gists_url": "https://api.github.com/users/jamesoliverh/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jamesoliverh",
"id": 46758370,
"login": "jamesoliverh",
"node_id": "MDQ6VXNlcjQ2NzU4Mzcw",
"organizations_url": "https://api.github.com/users/jamesoliverh/orgs",
"received_events_url": "https://api.github.com/users/jamesoliverh/received_events",
"repos_url": "https://api.github.com/users/jamesoliverh/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jamesoliverh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jamesoliverh/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jamesoliverh"
} | [
{
"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, expand... | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"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": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 3 | 2019-05-16T08:44:48Z | 2019-05-18T14:22:22Z | 2019-05-18T14:22:13Z | CONTRIBUTOR | null | Correct ``adjust=True`` to ``adjust=False`` in line 889 of the documentation (discussing EWMA).
Also propose minor clarifications in demonstration that two variants (adjust=False and adjust=True) are equivalent for infinite series (lines 868 and 887-893).
Closes https://github.com/pandas-dev/pandas/issues/24814 | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26422/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26422/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26422.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26422",
"merged_at": "2019-05-18T14:22:13Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26422.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26422"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26423 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26423/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26423/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26423/events | https://github.com/pandas-dev/pandas/pull/26423 | 444,832,120 | MDExOlB1bGxSZXF1ZXN0Mjc5NDA3MzE2 | 26,423 | DOC: remove usage of lrange in docs | {
"avatar_url": "https://avatars.githubusercontent.com/u/1020496?v=4",
"events_url": "https://api.github.com/users/jorisvandenbossche/events{/privacy}",
"followers_url": "https://api.github.com/users/jorisvandenbossche/followers",
"following_url": "https://api.github.com/users/jorisvandenbossche/following{/other_user}",
"gists_url": "https://api.github.com/users/jorisvandenbossche/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jorisvandenbossche",
"id": 1020496,
"login": "jorisvandenbossche",
"node_id": "MDQ6VXNlcjEwMjA0OTY=",
"organizations_url": "https://api.github.com/users/jorisvandenbossche/orgs",
"received_events_url": "https://api.github.com/users/jorisvandenbossche/received_events",
"repos_url": "https://api.github.com/users/jorisvandenbossche/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jorisvandenbossche/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jorisvandenbossche/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jorisvandenbossche"
} | [
{
"color": "3465A4",
"default": false,
"description": null,
"id": 134699,
"name": "Docs",
"node_id": "MDU6TGFiZWwxMzQ2OTk=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Docs"
}
] | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"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": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 4 | 2019-05-16T08:53:06Z | 2019-05-16T10:02:08Z | 2019-05-16T09:27:50Z | MEMBER | null | Due to the recent removals (eg https://github.com/pandas-dev/pandas/pull/26396 and others) | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26423/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26423/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26423.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26423",
"merged_at": "2019-05-16T09:27:50Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26423.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26423"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26424 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26424/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26424/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26424/events | https://github.com/pandas-dev/pandas/issues/26424 | 444,846,951 | MDU6SXNzdWU0NDQ4NDY5NTE= | 26,424 | Add Koalas project in pandas Ecosystem | {
"avatar_url": "https://avatars.githubusercontent.com/u/6477701?v=4",
"events_url": "https://api.github.com/users/HyukjinKwon/events{/privacy}",
"followers_url": "https://api.github.com/users/HyukjinKwon/followers",
"following_url": "https://api.github.com/users/HyukjinKwon/following{/other_user}",
"gists_url": "https://api.github.com/users/HyukjinKwon/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/HyukjinKwon",
"id": 6477701,
"login": "HyukjinKwon",
"node_id": "MDQ6VXNlcjY0Nzc3MDE=",
"organizations_url": "https://api.github.com/users/HyukjinKwon/orgs",
"received_events_url": "https://api.github.com/users/HyukjinKwon/received_events",
"repos_url": "https://api.github.com/users/HyukjinKwon/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/HyukjinKwon/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/HyukjinKwon/subscriptions",
"type": "User",
"url": "https://api.github.com/users/HyukjinKwon"
} | [] | closed | false | null | [] | null | 0 | 2019-05-16T09:24:10Z | 2019-05-17T13:43:47Z | 2019-05-17T13:43:47Z | CONTRIBUTOR | null | #### Code Sample, a copy-pastable example if possible
N/A
#### Problem description
There is a project called Koalas which targets the distributed Pandas DataFrame on the top of Apache Spark.
It might be good to document this as one of the eco systems too.
#### Expected Output
Koalas description at https://pandas.pydata.org/pandas-docs/stable/ecosystem.html
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit: None
python: 3.7.3.final.0
python-bits: 64
OS: Darwin
OS-release: 18.5.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8
pandas: 0.24.2
pytest: 4.4.1
pip: 19.0.3
setuptools: 40.8.0
Cython: None
numpy: 1.16.2
scipy: None
pyarrow: 0.13.0
xarray: None
IPython: None
sphinx: 2.0.1
patsy: None
dateutil: 2.8.0
pytz: 2019.1
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: None
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml.etree: None
bs4: None
html5lib: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.10.1
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/26424/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26424/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26425 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26425/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26425/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26425/events | https://github.com/pandas-dev/pandas/pull/26425 | 444,850,409 | MDExOlB1bGxSZXF1ZXN0Mjc5NDIxNzY1 | 26,425 | DOC: ecosystem.rst: Koalas | {
"avatar_url": "https://avatars.githubusercontent.com/u/6477701?v=4",
"events_url": "https://api.github.com/users/HyukjinKwon/events{/privacy}",
"followers_url": "https://api.github.com/users/HyukjinKwon/followers",
"following_url": "https://api.github.com/users/HyukjinKwon/following{/other_user}",
"gists_url": "https://api.github.com/users/HyukjinKwon/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/HyukjinKwon",
"id": 6477701,
"login": "HyukjinKwon",
"node_id": "MDQ6VXNlcjY0Nzc3MDE=",
"organizations_url": "https://api.github.com/users/HyukjinKwon/orgs",
"received_events_url": "https://api.github.com/users/HyukjinKwon/received_events",
"repos_url": "https://api.github.com/users/HyukjinKwon/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/HyukjinKwon/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/HyukjinKwon/subscriptions",
"type": "User",
"url": "https://api.github.com/users/HyukjinKwon"
} | [
{
"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": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"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": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 5 | 2019-05-16T09:31:28Z | 2019-05-17T13:55:48Z | 2019-05-17T13:43:47Z | CONTRIBUTOR | null | - [x] closes #26424
- [ ] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
I (almost) copied and pasted from its README.md. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26425/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26425/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26425.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26425",
"merged_at": "2019-05-17T13:43:47Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26425.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26425"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26426 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26426/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26426/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26426/events | https://github.com/pandas-dev/pandas/pull/26426 | 444,911,150 | MDExOlB1bGxSZXF1ZXN0Mjc5NDcwNjcy | 26,426 | BUG: fix calling local references with keyword arguments in query | {
"avatar_url": "https://avatars.githubusercontent.com/u/20952040?v=4",
"events_url": "https://api.github.com/users/danielhrisca/events{/privacy}",
"followers_url": "https://api.github.com/users/danielhrisca/followers",
"following_url": "https://api.github.com/users/danielhrisca/following{/other_user}",
"gists_url": "https://api.github.com/users/danielhrisca/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/danielhrisca",
"id": 20952040,
"login": "danielhrisca",
"node_id": "MDQ6VXNlcjIwOTUyMDQw",
"organizations_url": "https://api.github.com/users/danielhrisca/orgs",
"received_events_url": "https://api.github.com/users/danielhrisca/received_events",
"repos_url": "https://api.github.com/users/danielhrisca/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/danielhrisca/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/danielhrisca/subscriptions",
"type": "User",
"url": "https://api.github.com/users/danielhrisca"
} | [
{
"color": "eb6420",
"default": false,
"description": "Non-arithmetic algos: value_counts, factorize, sorting, isin, clip, shift, diff",
"id": 57296398,
"name": "Algos",
"node_id": "MDU6TGFiZWw1NzI5NjM5OA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Algos"
}
] | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"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": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 6 | 2019-05-16T11:50:44Z | 2019-05-19T20:27:10Z | 2019-05-19T20:27:05Z | CONTRIBUTOR | null | - [ ] closes #xxxx
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry
calling local references with keyword arguments in query fails with attribute error:
```python
import numpy as np
import pandas as pd
def f(a, b):
return b
df = pd.DataFrame()
df['val'] = np.arange(10)
print(df.query('val > @f(4, 5)'))
print(df.query('val > @f(4, b=5)'))
```
```
val
6 6
7 7
8 8
9 9
Traceback (most recent call last):
File "C:/Users/uidn3651/Desktop/untitled0.py", line 10, in <module>
print(df.query('val > @f(4, b=5)'))
File "d:\work\02__pythonworkspace\_venv\lib\site-packages\pandas\core\frame.py", line 3052, in query
res = self.eval(expr, **kwargs)
File "d:\work\02__pythonworkspace\_venv\lib\site-packages\pandas\core\frame.py", line 3169, in eval
return _eval(expr, inplace=inplace, **kwargs)
File "d:\work\02__pythonworkspace\_venv\lib\site-packages\pandas\core\computation\eval.py", line 293, in eval
truediv=truediv)
File "d:\work\02__pythonworkspace\_venv\lib\site-packages\pandas\core\computation\expr.py", line 749, in __init__
self.terms = self.parse()
File "d:\work\02__pythonworkspace\_venv\lib\site-packages\pandas\core\computation\expr.py", line 766, in parse
return self._visitor.visit(self.expr)
File "d:\work\02__pythonworkspace\_venv\lib\site-packages\pandas\core\computation\expr.py", line 370, in visit
return visitor(node, **kwargs)
File "d:\work\02__pythonworkspace\_venv\lib\site-packages\pandas\core\computation\expr.py", line 376, in visit_Module
return self.visit(expr, **kwargs)
File "d:\work\02__pythonworkspace\_venv\lib\site-packages\pandas\core\computation\expr.py", line 370, in visit
return visitor(node, **kwargs)
File "d:\work\02__pythonworkspace\_venv\lib\site-packages\pandas\core\computation\expr.py", line 379, in visit_Expr
return self.visit(node.value, **kwargs)
File "d:\work\02__pythonworkspace\_venv\lib\site-packages\pandas\core\computation\expr.py", line 370, in visit
return visitor(node, **kwargs)
File "d:\work\02__pythonworkspace\_venv\lib\site-packages\pandas\core\computation\expr.py", line 674, in visit_Compare
return self.visit(binop)
File "d:\work\02__pythonworkspace\_venv\lib\site-packages\pandas\core\computation\expr.py", line 370, in visit
return visitor(node, **kwargs)
File "d:\work\02__pythonworkspace\_venv\lib\site-packages\pandas\core\computation\expr.py", line 476, in visit_BinOp
op, op_class, left, right = self._maybe_transform_eq_ne(node)
File "d:\work\02__pythonworkspace\_venv\lib\site-packages\pandas\core\computation\expr.py", line 413, in _maybe_transform_eq_ne
right = self.visit(node.right, side='right')
File "d:\work\02__pythonworkspace\_venv\lib\site-packages\pandas\core\computation\expr.py", line 370, in visit
return visitor(node, **kwargs)
File "d:\work\02__pythonworkspace\_venv\lib\site-packages\pandas\core\computation\expr.py", line 657, in visit_Call
kwargs.append(ast.keyword(
AttributeError: 'dict' object has no attribute 'append'
```
With the fix this works correctly
```
val
6 6
7 7
8 8
9 9
val
6 6
7 7
8 8
9 9
```
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26426/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26426/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26426.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26426",
"merged_at": "2019-05-19T20:27:05Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26426.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26426"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26427 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26427/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26427/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26427/events | https://github.com/pandas-dev/pandas/issues/26427 | 444,937,489 | MDU6SXNzdWU0NDQ5Mzc0ODk= | 26,427 | BUG: field in Series produced by DataFrame.iterrows has type Timestamp instead of string | {
"avatar_url": "https://avatars.githubusercontent.com/u/26774675?v=4",
"events_url": "https://api.github.com/users/AntonPotapchuk/events{/privacy}",
"followers_url": "https://api.github.com/users/AntonPotapchuk/followers",
"following_url": "https://api.github.com/users/AntonPotapchuk/following{/other_user}",
"gists_url": "https://api.github.com/users/AntonPotapchuk/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/AntonPotapchuk",
"id": 26774675,
"login": "AntonPotapchuk",
"node_id": "MDQ6VXNlcjI2Nzc0Njc1",
"organizations_url": "https://api.github.com/users/AntonPotapchuk/orgs",
"received_events_url": "https://api.github.com/users/AntonPotapchuk/received_events",
"repos_url": "https://api.github.com/users/AntonPotapchuk/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/AntonPotapchuk/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/AntonPotapchuk/subscriptions",
"type": "User",
"url": "https://api.github.com/users/AntonPotapchuk"
} | [
{
"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,
... | open | false | null | [] | null | 3 | 2019-05-16T12:50:54Z | 2021-07-02T06:03:09Z | null | NONE | null | #### Code Sample, a copy-pastable example if possible
```python
import pandas as pd
from datetime import datetime
df = []
df.append({
'a': '1801',
'b': datetime.now(),
})
df.append({
'a': '11801',
'b': datetime.now(),
})
df = pd.DataFrame(df)
for i, row in df.iterrows():
print(row['a'], type(row['a']))
```
#### Problem description
Series, which were produced by DataFrame.iterrows has wrong data type. String field was converted to pandas.Timestamp.
For the first row, str was converted to Timestamp.
```pandas
1801-01-01 00:00:00 <class 'pandas._libs.tslibs.timestamps.Timestamp'>
11801 <class 'str'>
```
#### Expected Output
```pandas
1801 <class 'str'>
11801 <class 'str'>
```
#### Output of ``pd.show_versions()``
<details>
[paste the output of ``pd.show_versions()`` here below this line]
INSTALLED VERSIONS
------------------
commit: None
python: 3.7.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: None.None
pandas: 0.24.2
pytest: 4.5.0
pip: 19.1.1
setuptools: 41.0.1
Cython: None
numpy: 1.16.3
scipy: 1.2.1
pyarrow: None
xarray: None
IPython: 7.5.0
sphinx: None
patsy: 0.5.1
dateutil: 2.8.0
pytz: 2019.1
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: 3.0.3
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml.etree: None
bs4: None
html5lib: None
sqlalchemy: 1.3.3
pymysql: None
psycopg2: 2.7.6.1 (dt dec pq3 ext lo64)
jinja2: 2.10.1
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/26427/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26427/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26428 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26428/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26428/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26428/events | https://github.com/pandas-dev/pandas/issues/26428 | 444,950,455 | MDU6SXNzdWU0NDQ5NTA0NTU= | 26,428 | CI: how to ensure certain tests have been run | {
"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": "a2bca7",
"default": false,
"description": "Continuous Integration",
"id": 48070600,
"name": "CI",
"node_id": "MDU6TGFiZWw0ODA3MDYwMA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/CI"
}
] | open | false | null | [] | null | 1 | 2019-05-16T13:16:43Z | 2019-05-16T13:26:36Z | null | MEMBER | null | From a discussion in https://github.com/pandas-dev/pandas/pull/26103: for some time the clipboard tests have not been running, without that we actually noticed it (apart from that something in the doc build failed for a similar reason).
You can check the skipped tests (but they are only in there if the tests were ran in the first place, which depends on the selection marker).
@jreback suggested printing something (for the specific case of the clipboard tests), but although we have `-s` that didn't seem to work
In general, it might be nice to have some overview of the tests that have run. Using `pytest -v` however shows every test on a single line, and is probably too much. Something in between like showing each file (and the tests as dots next to each file) would be nice instead of only dots. Anybody know if that is possible? | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26428/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26428/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26429 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26429/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26429/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26429/events | https://github.com/pandas-dev/pandas/issues/26429 | 445,104,330 | MDU6SXNzdWU0NDUxMDQzMzA= | 26,429 | bad arguments to dataframe constructor causes segfault | {
"avatar_url": "https://avatars.githubusercontent.com/u/543934?v=4",
"events_url": "https://api.github.com/users/kurtbrose/events{/privacy}",
"followers_url": "https://api.github.com/users/kurtbrose/followers",
"following_url": "https://api.github.com/users/kurtbrose/following{/other_user}",
"gists_url": "https://api.github.com/users/kurtbrose/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kurtbrose",
"id": 543934,
"login": "kurtbrose",
"node_id": "MDQ6VXNlcjU0MzkzNA==",
"organizations_url": "https://api.github.com/users/kurtbrose/orgs",
"received_events_url": "https://api.github.com/users/kurtbrose/received_events",
"repos_url": "https://api.github.com/users/kurtbrose/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kurtbrose/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kurtbrose/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kurtbrose"
} | [
{
"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": "370f77",
"d... | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"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": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 5 | 2019-05-16T18:43:08Z | 2019-05-18T14:12:46Z | 2019-05-18T14:12:46Z | NONE | null | #### Code Sample, a copy-pastable example if possible
```python
pandas.DataFrame(data=(range(10), range(10, 20)), columns=('ones', 'twos'))
```
```
# python
Python 2.7.14 (default, Dec 12 2017, 16:55:09)
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pandas
>>> pandas.DataFrame(data=(range(10), range(10, 20)), columns=('ones', 'twos'))
Segmentation fault
```
#### Problem description
Segmentation fault on bad inputs to DataFrame constructor.
#### Expected Output
Raise an exception:
```AssertionError: 2 columns passed, passed data had 10 columns```
#### Output of ``pd.show_versions()``
<details>
[paste the output of ``pd.show_versions()`` here below this line]
INSTALLED VERSIONS
------------------
commit: None
python: 2.7.14.final.0
python-bits: 64
OS: Linux
OS-release: 4.9.125-linuxkit
machine: x86_64
processor:
byteorder: little
LC_ALL: None
LANG: C.UTF-8
LOCALE: None.None
pandas: 0.24.2
pytest: 3.8.1
pip: 9.0.1
setuptools: 38.2.4
Cython: None
numpy: 1.16.3
scipy: None
pyarrow: None
xarray: None
IPython: 5.8.0
sphinx: None
patsy: None
dateutil: 2.6.0
pytz: 2017.2
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: None
openpyxl: 2.2.6
xlrd: None
xlwt: 1.3.0
xlsxwriter: None
lxml.etree: None
bs4: None
html5lib: 1.0.1
sqlalchemy: 1.1.11
pymysql: None
psycopg2: 2.7.3.2 (dt dec pq3 ext lo64)
jinja2: 2.9.6
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/26429/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26429/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26430 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26430/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26430/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26430/events | https://github.com/pandas-dev/pandas/issues/26430 | 445,126,809 | MDU6SXNzdWU0NDUxMjY4MDk= | 26,430 | Accept multiple lambda in groupby list | {
"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": "AD7FA8",
"default": false,
"description": null,
"id": ... | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"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": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 1 | 2019-05-16T19:41:15Z | 2019-08-21T11:40:21Z | 2019-06-27T23:20:11Z | CONTRIBUTOR | null | We currently don't allow duplicate function names in the list passed too `.groupby().agg({'col': [aggfuncs]})`. This is painful with multiple lambdas, which all have the name `<lambda>`
```python
In [1]: import pandas as pd
df
In [2]: df = pd.DataFrame({"A": ['a', 'a'], 'B': [1, 2], 'C': [3, 4]})
In [3]: df.groupby("A").agg({'B': [lambda x: 0, lambda x: 1]})
```
```pytb
---------------------------------------------------------------------------
SpecificationError Traceback (most recent call last)
~/sandbox/pandas/pandas/core/base.py in _aggregate(self, arg, *args, **kwargs)
483 try:
--> 484 result = _agg(arg, _agg_1dim)
485 except SpecificationError:
~/sandbox/pandas/pandas/core/base.py in _agg(arg, func)
434 for fname, agg_how in arg.items():
--> 435 result[fname] = func(fname, agg_how)
436 return result
~/sandbox/pandas/pandas/core/base.py in _agg_1dim(name, how, subset)
417 "in aggregation")
--> 418 return colg.aggregate(how, _level=(_level or 0) + 1)
419
~/sandbox/pandas/pandas/core/groupby/generic.py in aggregate(self, func_or_funcs, *args, **kwargs)
771 ret = self._aggregate_multiple_funcs(func_or_funcs,
--> 772 (_level or 0) + 1)
773 else:
~/sandbox/pandas/pandas/core/groupby/generic.py in _aggregate_multiple_funcs(self, arg, _level)
834 'Function names must be unique, found multiple named '
--> 835 '{}'.format(name))
836
SpecificationError: Function names must be unique, found multiple named <lambda>
During handling of the above exception, another exception occurred:
SpecificationError Traceback (most recent call last)
<ipython-input-3-2aa02bdc2edd> in <module>
----> 1 df.groupby("A").agg({'B': [lambda x: 0, lambda x: 1]})
~/sandbox/pandas/pandas/core/groupby/generic.py in aggregate(self, arg, *args, **kwargs)
1344 @Appender(_shared_docs['aggregate'])
1345 def aggregate(self, arg=None, *args, **kwargs):
-> 1346 return super().aggregate(arg, *args, **kwargs)
1347
1348 agg = aggregate
~/sandbox/pandas/pandas/core/groupby/generic.py in aggregate(self, func, *args, **kwargs)
174 "'(column, aggfunc).")
175
--> 176 result, how = self._aggregate(func, _level=_level, *args, **kwargs)
177 if how is None:
178 return result
~/sandbox/pandas/pandas/core/base.py in _aggregate(self, arg, *args, **kwargs)
487 # we are aggregating expecting all 1d-returns
488 # but we have 2d
--> 489 result = _agg(arg, _agg_2dim)
490
491 # combine results
~/sandbox/pandas/pandas/core/base.py in _agg(arg, func)
433 result = OrderedDict()
434 for fname, agg_how in arg.items():
--> 435 result[fname] = func(fname, agg_how)
436 return result
437
~/sandbox/pandas/pandas/core/base.py in _agg_2dim(name, how)
424 colg = self._gotitem(self._selection, ndim=2,
425 subset=obj)
--> 426 return colg.aggregate(how, _level=None)
427
428 def _agg(arg, func):
~/sandbox/pandas/pandas/core/groupby/generic.py in aggregate(self, arg, *args, **kwargs)
1344 @Appender(_shared_docs['aggregate'])
1345 def aggregate(self, arg=None, *args, **kwargs):
-> 1346 return super().aggregate(arg, *args, **kwargs)
1347
1348 agg = aggregate
~/sandbox/pandas/pandas/core/groupby/generic.py in aggregate(self, func, *args, **kwargs)
174 "'(column, aggfunc).")
175
--> 176 result, how = self._aggregate(func, _level=_level, *args, **kwargs)
177 if how is None:
178 return result
~/sandbox/pandas/pandas/core/base.py in _aggregate(self, arg, *args, **kwargs)
542 return self._aggregate_multiple_funcs(arg,
543 _level=_level,
--> 544 _axis=_axis), None
545 else:
546 result = None
~/sandbox/pandas/pandas/core/base.py in _aggregate_multiple_funcs(self, arg, _level, _axis)
588 colg = self._gotitem(col, ndim=1,
589 subset=obj.iloc[:, index])
--> 590 results.append(colg.aggregate(arg))
591 keys.append(col)
592 except (TypeError, DataError):
~/sandbox/pandas/pandas/core/groupby/generic.py in aggregate(self, func_or_funcs, *args, **kwargs)
770 # but not the class list / tuple itself.
771 ret = self._aggregate_multiple_funcs(func_or_funcs,
--> 772 (_level or 0) + 1)
773 else:
774 cyfunc = self._is_cython_func(func_or_funcs)
~/sandbox/pandas/pandas/core/groupby/generic.py in _aggregate_multiple_funcs(self, arg, _level)
833 raise SpecificationError(
834 'Function names must be unique, found multiple named '
--> 835 '{}'.format(name))
836
837 # reset the cache so that we
SpecificationError: Function names must be unique, found multiple named <lambda>
```
I propose that we mangle the names somehow
```python
In [2]: df = pd.DataFrame({"A": ['a', 'a'], 'B': [1, 2], 'C': [3, 4]})
In [3]: df.groupby("A").agg({'B': [lambda x: 0, lambda x: 1]})
Out[3]:
B
<lambda> <lambda 1>
A
a 0 1
```
That adds a `1`, `2`, ... to all subsequent lambdas in the same MI level. It doesn't change the first. Do we want `<lambda 0>` for the first?
As a side-effect, this enables multiple lambdas per column with the new keyword aggregation
```python
In [4]: df.groupby("A").agg(b=('B', lambda x: 0), c=('B', lambda x: 1))
Out[4]:
b c
A
a 0 0
```
---
I have a WIP started. Will do for 0.25. | {
"+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/26430/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26430/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26431 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26431/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26431/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26431/events | https://github.com/pandas-dev/pandas/pull/26431 | 445,132,546 | MDExOlB1bGxSZXF1ZXN0Mjc5NjQ3ODQz | 26,431 | ERR: FutureWarning difficult to identify source | {
"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": "ffa0ff",
"default": false,
"description": "Incorrect or improved errors from pandas",
"id": 42670965,
"name": "Error Reporting",
"node_id": "MDU6TGFiZWw0MjY3MDk2NQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Error%20Reporting"
}
] | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"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": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 3 | 2019-05-16T19:56:03Z | 2019-05-18T21:18:01Z | 2019-05-18T15:09:40Z | MEMBER | null | - [x] closes #26329
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [n/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/26431/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26431/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26431.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26431",
"merged_at": "2019-05-18T15:09:40Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26431.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26431"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26432 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26432/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26432/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26432/events | https://github.com/pandas-dev/pandas/pull/26432 | 445,134,787 | MDExOlB1bGxSZXF1ZXN0Mjc5NjQ5NjU1 | 26,432 | CLN: remove __unicode__ from code base | {
"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"
} | [] | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"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": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 4 | 2019-05-16T20:01:47Z | 2019-05-17T14:00:40Z | 2019-05-17T12:56:40Z | CONTRIBUTOR | null | - [x] xref #25725
Removes use of ``__unicode__`` from the code base. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26432/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26432/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26432.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26432",
"merged_at": "2019-05-17T12:56:40Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26432.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26432"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26433 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26433/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26433/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26433/events | https://github.com/pandas-dev/pandas/pull/26433 | 445,162,074 | MDExOlB1bGxSZXF1ZXN0Mjc5NjcxNjEy | 26,433 | CLN: Remove unicode u string prefix in regexes | {
"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"
} | [] | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"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": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 2 | 2019-05-16T21:12:00Z | 2019-05-17T13:51:47Z | 2019-05-17T12:55:46Z | MEMBER | null | xref #25725 | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26433/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26433/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26433.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26433",
"merged_at": "2019-05-17T12:55:46Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26433.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26433"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26434 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26434/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26434/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26434/events | https://github.com/pandas-dev/pandas/pull/26434 | 445,176,573 | MDExOlB1bGxSZXF1ZXN0Mjc5NjgzMzI4 | 26,434 | CLN: Remove type from (class|type) in regexes | {
"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"
} | [] | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"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": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 3 | 2019-05-16T21:54:56Z | 2019-05-17T13:49:47Z | 2019-05-17T12:50:38Z | MEMBER | null | xref #25725 | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26434/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26434/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26434.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26434",
"merged_at": "2019-05-17T12:50:38Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26434.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26434"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26435 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26435/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26435/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26435/events | https://github.com/pandas-dev/pandas/pull/26435 | 445,192,162 | MDExOlB1bGxSZXF1ZXN0Mjc5Njk2MDg4 | 26,435 | CLN: remove unused code check for pytest.raises | {
"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": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"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": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 4 | 2019-05-16T22:52:42Z | 2019-05-17T13:50:50Z | 2019-05-17T12:51:08Z | MEMBER | null | xref #25866
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26435/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26435/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26435.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26435",
"merged_at": "2019-05-17T12:51:08Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26435.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26435"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26436 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26436/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26436/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26436/events | https://github.com/pandas-dev/pandas/issues/26436 | 445,229,799 | MDU6SXNzdWU0NDUyMjk3OTk= | 26,436 | Test doctests in pandas/core/reshape/concat.py | {
"avatar_url": "https://avatars.githubusercontent.com/u/6477701?v=4",
"events_url": "https://api.github.com/users/HyukjinKwon/events{/privacy}",
"followers_url": "https://api.github.com/users/HyukjinKwon/followers",
"following_url": "https://api.github.com/users/HyukjinKwon/following{/other_user}",
"gists_url": "https://api.github.com/users/HyukjinKwon/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/HyukjinKwon",
"id": 6477701,
"login": "HyukjinKwon",
"node_id": "MDQ6VXNlcjY0Nzc3MDE=",
"organizations_url": "https://api.github.com/users/HyukjinKwon/orgs",
"received_events_url": "https://api.github.com/users/HyukjinKwon/received_events",
"repos_url": "https://api.github.com/users/HyukjinKwon/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/HyukjinKwon/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/HyukjinKwon/subscriptions",
"type": "User",
"url": "https://api.github.com/users/HyukjinKwon"
} | [] | closed | false | null | [] | null | 0 | 2019-05-17T01:57:22Z | 2019-05-17T01:59:24Z | 2019-05-17T01:59:24Z | CONTRIBUTOR | null | #### Code Sample, a copy-pastable example if possible
#### Problem description
Doctests in `concat.py` are being failed as below:
```
Failed example:
pd.concat([df5, df6], verify_integrity=True)
Expected:
Traceback (most recent call last):
...
ValueError: Indexes have overlapping values: ['a']
Got:
Traceback (most recent call last):
File "/Applications/PyCharm.app/Contents/helpers/pycharm/docrunner.py", line 140, in __run
compileflags, 1), test.globs)
File "<doctest concat[21]>", line 1, in <module>
pd.concat([df5, df6], verify_integrity=True)
File "/usr/local/lib/python3.7/site-packages/pandas/core/reshape/concat.py", line 228, in concat
copy=copy, sort=sort)
File "/usr/local/lib/python3.7/site-packages/pandas/core/reshape/concat.py", line 381, in __init__
self.new_axes = self._get_new_axes()
File "/usr/local/lib/python3.7/site-packages/pandas/core/reshape/concat.py", line 461, in _get_new_axes
new_axes[self.axis] = self._get_concat_axis()
File "/usr/local/lib/python3.7/site-packages/pandas/core/reshape/concat.py", line 519, in _get_concat_axis
self._maybe_check_integrity(concat_axis)
File "/usr/local/lib/python3.7/site-packages/pandas/core/reshape/concat.py", line 528, in _maybe_check_integrity
'{overlap!s}'.format(overlap=overlap))
ValueError: Indexes have overlapping values: Index(['a'], dtype='object')
```
#### Expected Output
Doctests being passed.
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit: None
python: 3.7.3.final.0
python-bits: 64
OS: Darwin
OS-release: 18.5.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8
pandas: 0.24.2
pytest: 4.4.1
pip: 19.0.3
setuptools: 40.8.0
Cython: None
numpy: 1.16.2
scipy: None
pyarrow: 0.13.0
xarray: None
IPython: None
sphinx: 2.0.1
patsy: None
dateutil: 2.8.0
pytz: 2019.1
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: None
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml.etree: None
bs4: None
html5lib: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.10.1
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/26436/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26436/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26437 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26437/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26437/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26437/events | https://github.com/pandas-dev/pandas/pull/26437 | 445,229,977 | MDExOlB1bGxSZXF1ZXN0Mjc5NzI1MTcw | 26,437 | DOC: Test doctests in pandas/core/reshape/concat.py | {
"avatar_url": "https://avatars.githubusercontent.com/u/6477701?v=4",
"events_url": "https://api.github.com/users/HyukjinKwon/events{/privacy}",
"followers_url": "https://api.github.com/users/HyukjinKwon/followers",
"following_url": "https://api.github.com/users/HyukjinKwon/following{/other_user}",
"gists_url": "https://api.github.com/users/HyukjinKwon/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/HyukjinKwon",
"id": 6477701,
"login": "HyukjinKwon",
"node_id": "MDQ6VXNlcjY0Nzc3MDE=",
"organizations_url": "https://api.github.com/users/HyukjinKwon/orgs",
"received_events_url": "https://api.github.com/users/HyukjinKwon/received_events",
"repos_url": "https://api.github.com/users/HyukjinKwon/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/HyukjinKwon/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/HyukjinKwon/subscriptions",
"type": "User",
"url": "https://api.github.com/users/HyukjinKwon"
} | [] | closed | false | null | [] | null | 1 | 2019-05-17T01:58:25Z | 2019-05-17T02:04:37Z | 2019-05-17T01:59:15Z | CONTRIBUTOR | null | - [x] closes #26436
- [ ] tests added / passed
- [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/26437/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26437/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26437.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26437",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/26437.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26437"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26438 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26438/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26438/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26438/events | https://github.com/pandas-dev/pandas/pull/26438 | 445,284,253 | MDExOlB1bGxSZXF1ZXN0Mjc5NzY2MjE1 | 26,438 | DEPR: Change .ix DeprecationWarning -> FutureWarning | {
"avatar_url": "https://avatars.githubusercontent.com/u/1020496?v=4",
"events_url": "https://api.github.com/users/jorisvandenbossche/events{/privacy}",
"followers_url": "https://api.github.com/users/jorisvandenbossche/followers",
"following_url": "https://api.github.com/users/jorisvandenbossche/following{/other_user}",
"gists_url": "https://api.github.com/users/jorisvandenbossche/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jorisvandenbossche",
"id": 1020496,
"login": "jorisvandenbossche",
"node_id": "MDQ6VXNlcjEwMjA0OTY=",
"organizations_url": "https://api.github.com/users/jorisvandenbossche/orgs",
"received_events_url": "https://api.github.com/users/jorisvandenbossche/received_events",
"repos_url": "https://api.github.com/users/jorisvandenbossche/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jorisvandenbossche/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jorisvandenbossche/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jorisvandenbossche"
} | [
{
"color": "0b02e1",
"default": false,
"description": "Related to indexing on series/frames, not to indexes themselves",
"id": 2822098,
"name": "Indexing",
"node_id": "MDU6TGFiZWwyODIyMDk4",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Indexing"
},
{
"color": "53... | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"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": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 4 | 2019-05-17T06:27:15Z | 2019-05-19T17:15:10Z | 2019-05-19T17:15:07Z | MEMBER | null | closes https://github.com/pandas-dev/pandas/issues/15152 | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26438/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26438/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26438.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26438",
"merged_at": "2019-05-19T17:15:07Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26438.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26438"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26439 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26439/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26439/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26439/events | https://github.com/pandas-dev/pandas/issues/26439 | 445,301,777 | MDU6SXNzdWU0NDUzMDE3Nzc= | 26,439 | Fix type annotations in pandas.core.indexing | {
"avatar_url": "https://avatars.githubusercontent.com/u/22582828?v=4",
"events_url": "https://api.github.com/users/vaibhavhrt/events{/privacy}",
"followers_url": "https://api.github.com/users/vaibhavhrt/followers",
"following_url": "https://api.github.com/users/vaibhavhrt/following{/other_user}",
"gists_url": "https://api.github.com/users/vaibhavhrt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/vaibhavhrt",
"id": 22582828,
"login": "vaibhavhrt",
"node_id": "MDQ6VXNlcjIyNTgyODI4",
"organizations_url": "https://api.github.com/users/vaibhavhrt/orgs",
"received_events_url": "https://api.github.com/users/vaibhavhrt/received_events",
"repos_url": "https://api.github.com/users/vaibhavhrt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/vaibhavhrt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/vaibhavhrt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/vaibhavhrt"
} | [
{
"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": "ea... | closed | false | null | [] | null | 1 | 2019-05-17T07:24:39Z | 2019-05-20T08:43:31Z | 2019-05-20T08:43:31Z | CONTRIBUTOR | null | Part of #25882
Current errors are:
pandas\core\indexing.py:1487: error: Incompatible types in assignment (expression has type "Type[Exception]", base class "_NDFrameIndexer" defined the type as "Type[KeyError]")
pandas\core\indexing.py:1783: error: Incompatible types in assignment (expression has type "str", base class "_NDFrameIndexer" defined the type as "None")
pandas\core\indexing.py:2056: error: Incompatible types in assignment (expression has type "str", base class "_NDFrameIndexer" defined the type as "None")
pandas\core\indexing.py:2058: error: Incompatible types in assignment (expression has type "Type[IndexError]", base class "_NDFrameIndexer" defined the type as "Type[KeyError]") | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26439/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26439/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26440 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26440/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26440/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26440/events | https://github.com/pandas-dev/pandas/pull/26440 | 445,485,310 | MDExOlB1bGxSZXF1ZXN0Mjc5OTI3MDA2 | 26,440 | ERR: User-facing AssertionError in DataFrame Constructor | {
"avatar_url": "https://avatars.githubusercontent.com/u/13159005?v=4",
"events_url": "https://api.github.com/users/simonjayhawkins/events{/privacy}",
"followers_url": "https://api.github.com/users/simonjayhawkins/followers",
"following_url": "https://api.github.com/users/simonjayhawkins/following{/other_user}",
"gists_url": "https://api.github.com/users/simonjayhawkins/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/simonjayhawkins",
"id": 13159005,
"login": "simonjayhawkins",
"node_id": "MDQ6VXNlcjEzMTU5MDA1",
"organizations_url": "https://api.github.com/users/simonjayhawkins/orgs",
"received_events_url": "https://api.github.com/users/simonjayhawkins/received_events",
"repos_url": "https://api.github.com/users/simonjayhawkins/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/simonjayhawkins/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/simonjayhawkins/subscriptions",
"type": "User",
"url": "https://api.github.com/users/simonjayhawkins"
} | [
{
"color": "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": "370f77",
"d... | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"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": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 3 | 2019-05-17T15:00:15Z | 2019-05-18T21:19:29Z | 2019-05-18T14:12:47Z | MEMBER | null | - [x] closes #26429
- [x] tests added / passed
- [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/26440/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26440/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26440.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26440",
"merged_at": "2019-05-18T14:12:46Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26440.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26440"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26441 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26441/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26441/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26441/events | https://github.com/pandas-dev/pandas/pull/26441 | 445,588,999 | MDExOlB1bGxSZXF1ZXN0MjgwMDA5NDMy | 26,441 | TST: Iterrows making incorrect assumptions about datetime | {
"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": "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": "e102d8",
"d... | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"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": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 3 | 2019-05-17T19:39:00Z | 2019-05-18T21:18:38Z | 2019-05-18T14:16:55Z | MEMBER | null | - [x] closes #12222
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ n/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/26441/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26441/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26441.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26441",
"merged_at": "2019-05-18T14:16:55Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26441.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26441"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26442 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26442/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26442/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26442/events | https://github.com/pandas-dev/pandas/pull/26442 | 445,613,955 | MDExOlB1bGxSZXF1ZXN0MjgwMDI5NDk4 | 26,442 | TST/CLN: remove try/except from test_column_contains_typeerror | {
"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": "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": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"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": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 3 | 2019-05-17T20:53:35Z | 2019-05-18T01:50:16Z | 2019-05-18T00:42:23Z | MEMBER | null | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26442/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26442/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26442.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26442",
"merged_at": "2019-05-18T00:42:23Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26442.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26442"
} | |
https://api.github.com/repos/pandas-dev/pandas/issues/26443 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26443/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26443/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26443/events | https://github.com/pandas-dev/pandas/issues/26443 | 445,647,776 | MDU6SXNzdWU0NDU2NDc3NzY= | 26,443 | Py3 Failed to read HDF5 created in Py2 with datetime timezone | {
"avatar_url": "https://avatars.githubusercontent.com/u/5397127?v=4",
"events_url": "https://api.github.com/users/ChromeHearts/events{/privacy}",
"followers_url": "https://api.github.com/users/ChromeHearts/followers",
"following_url": "https://api.github.com/users/ChromeHearts/following{/other_user}",
"gists_url": "https://api.github.com/users/ChromeHearts/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ChromeHearts",
"id": 5397127,
"login": "ChromeHearts",
"node_id": "MDQ6VXNlcjUzOTcxMjc=",
"organizations_url": "https://api.github.com/users/ChromeHearts/orgs",
"received_events_url": "https://api.github.com/users/ChromeHearts/received_events",
"repos_url": "https://api.github.com/users/ChromeHearts/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ChromeHearts/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ChromeHearts/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ChromeHearts"
} | [
{
"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 | [] | null | 2 | 2019-05-17T23:10:41Z | 2019-08-30T17:08:33Z | 2019-08-30T17:08:33Z | NONE | null | #### Code Sample, a copy-pastable example if possible
```python
d = {"data": 123}
df = pd.DataFrame(d, index=[pd.Timestamp("2019-01-01T18:00").tz_localize('America/New_York')])
df.to_hdf('/tmp/test.h5', key="key") # write in Python 2
df = pd.read_hdf('/tmp/test.h5', key="key") # failed in py3
print(df)
```
#### Problem description
When a dataframe contains a column with datetime with timezone, and this dataframe is written as hd5 in Python 2. Python 3 is unable to read it. The error is
```
...
~/miniconda3/envs/SOMEENV/lib/python3.7/site-packages/pandas/core/indexes/datetimelike.py in _format_with_header(self, header, **kwargs)
431
432 def _format_with_header(self, header, **kwargs):
--> 433 return header + list(self._format_native_types(**kwargs))
434
435 @property
~/miniconda3/envs/SOMEENV/lib/python3.7/site-packages/pandas/core/indexes/datetimes.py in _format_native_types(self, na_rep, date_format, **kwargs)
450 tz=self.tz,
451 format=fmt,
--> 452 na_rep=na_rep)
453
454 @property
pandas/_libs/tslib.pyx in pandas._libs.tslib.format_array_from_datetime()
pandas/_libs/tslibs/timestamps.pyx in pandas._libs.tslibs.timestamps.Timestamp.__new__()
pandas/_libs/tslibs/conversion.pyx in pandas._libs.tslibs.conversion.convert_to_tsobject()
TypeError: Cannot convert numpy.bytes_ to datetime.tzinfo
```
#### Expected Output
Python 3 should be able to read the dataframe written by Python 2
#### Output of ``pd.show_versions()``
Python 3
```
INSTALLED VERSIONS
------------------
commit: None
python: 3.7.3.final.0
python-bits: 64
OS: Linux
OS-release: 3.10.0-957.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: 0.24.2
pytest: 4.4.2
pip: 19.1
setuptools: 41.0.1
Cython: 0.29.7
numpy: 1.16.3
scipy: 1.1.0
pyarrow: None
xarray: None
IPython: 7.5.0
sphinx: None
patsy: 0.5.1
dateutil: 2.8.0
pytz: 2019.1
blosc: 1.8.1
bottleneck: None
tables: 3.5.1
numexpr: 2.6.9
feather: None
matplotlib: 3.0.3
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml.etree: None
bs4: None
html5lib: None
sqlalchemy: None
pymysql: None
psycopg2: 2.8.2 (dt dec pq3 ext lo64)
jinja2: 2.10.1
s3fs: 0.2.1
fastparquet: None
pandas_gbq: None
pandas_datareader: None
gcsfs: None
```
Python 2
```
INSTALLED VERSIONS
------------------
commit: None
python: 2.7.11.final.0
python-bits: 64
OS: Linux
OS-release: 3.10.0-957.el7.x86_64
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: None.None
pandas: 0.24.2
pytest: 4.0.2
pip: 18.1
setuptools: 40.6.3
Cython: 0.29.2
numpy: 1.15.0
scipy: 1.1.0
pyarrow: None
xarray: None
IPython: 5.8.0
sphinx: None
patsy: 0.5.1
dateutil: 2.7.5
pytz: 2018.7
blosc: 1.5.1
bottleneck: None
tables: 3.4.4
numexpr: 2.6.8
feather: None
matplotlib: 1.5.3
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml.etree: None
bs4: None
html5lib: None
sqlalchemy: None
pymysql: None
psycopg2: 2.7.5 (dt dec pq3 ext lo64)
jinja2: 2.10
s3fs: 0.2.0
fastparquet: None
pandas_gbq: None
pandas_datareader: None
gcsfs: 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/26443/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26443/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26444 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26444/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26444/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26444/events | https://github.com/pandas-dev/pandas/pull/26444 | 445,656,259 | MDExOlB1bGxSZXF1ZXN0MjgwMDYyNTk5 | 26,444 | DEPR: deprecate __bytes__ methods | {
"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"
} | [] | closed | false | null | [] | null | 3 | 2019-05-18T00:05:24Z | 2019-05-18T00:49:35Z | 2019-05-18T00:24:36Z | CONTRIBUTOR | null | - [x] xref #25725
Deprecate the use of ``__bytes__`` method from ``StringMixin`` and ``PandasExtensionDtype``. These are the only uses of ``__bytes__`` in the code base.
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26444/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26444/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26444.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26444",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/26444.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26444"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26445 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26445/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26445/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26445/events | https://github.com/pandas-dev/pandas/pull/26445 | 445,726,904 | MDExOlB1bGxSZXF1ZXN0MjgwMTA4NDA0 | 26,445 | Clean Up src/parsers | {
"avatar_url": "https://avatars.githubusercontent.com/u/609873?v=4",
"events_url": "https://api.github.com/users/WillAyd/events{/privacy}",
"followers_url": "https://api.github.com/users/WillAyd/followers",
"following_url": "https://api.github.com/users/WillAyd/following{/other_user}",
"gists_url": "https://api.github.com/users/WillAyd/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/WillAyd",
"id": 609873,
"login": "WillAyd",
"node_id": "MDQ6VXNlcjYwOTg3Mw==",
"organizations_url": "https://api.github.com/users/WillAyd/orgs",
"received_events_url": "https://api.github.com/users/WillAyd/received_events",
"repos_url": "https://api.github.com/users/WillAyd/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/WillAyd/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/WillAyd/subscriptions",
"type": "User",
"url": "https://api.github.com/users/WillAyd"
} | [
{
"color": "06909A",
"default": false,
"description": "IO issues that don't fit into a more specific label",
"id": 2301354,
"name": "IO Data",
"node_id": "MDU6TGFiZWwyMzAxMzU0",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20Data"
},
{
"color": "207de5",
"... | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"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": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 5 | 2019-05-18T15:33:25Z | 2019-05-18T16:35:01Z | 2019-05-18T16:15:55Z | MEMBER | null | Looking at this in detail noticed quite a few unused functions and pre-processor directives. There was also a mismatch in types between the .pyx and C structs | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26445/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26445/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26445.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26445",
"merged_at": "2019-05-18T16:15:55Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26445.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26445"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26446 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26446/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26446/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26446/events | https://github.com/pandas-dev/pandas/issues/26446 | 445,729,164 | MDU6SXNzdWU0NDU3MjkxNjQ= | 26,446 | to_csv with UTF16 Incorrectly Treats BOM as column | {
"avatar_url": "https://avatars.githubusercontent.com/u/609873?v=4",
"events_url": "https://api.github.com/users/WillAyd/events{/privacy}",
"followers_url": "https://api.github.com/users/WillAyd/followers",
"following_url": "https://api.github.com/users/WillAyd/following{/other_user}",
"gists_url": "https://api.github.com/users/WillAyd/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/WillAyd",
"id": 609873,
"login": "WillAyd",
"node_id": "MDQ6VXNlcjYwOTg3Mw==",
"organizations_url": "https://api.github.com/users/WillAyd/orgs",
"received_events_url": "https://api.github.com/users/WillAyd/received_events",
"repos_url": "https://api.github.com/users/WillAyd/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/WillAyd/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/WillAyd/subscriptions",
"type": "User",
"url": "https://api.github.com/users/WillAyd"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "06909A",
"default": false,
"description": "IO issues that don't fit... | 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"
} | 8 | 2019-05-18T15:59:38Z | 2019-12-13T22:36:50Z | 2019-12-13T22:36:49Z | MEMBER | null | #### Code Sample, a copy-pastable example if possible
```python
In [2]: df = pd.DataFrame([['foo']])
In [4]: df.to_csv('afile.csv', encoding='utf16')
In [5]: with open('afile.csv', 'rb') as afile:
...: print(afile.read())
...:
b'\xff\xfe,\x000\x00\n\x000\x00,\x00f\x00o\x00o\x00\n\x00'
```
Note the comma after the BOM `'\xff\xfe` - this has the unintended side effect of creating a malformed structure especially when trying to read back in
<details>
INSTALLED VERSIONS
------------------
commit: 9d5f1105c7335b790dc58914bc04b009243dc975
python: 3.7.2.final.0
python-bits: 64
OS: Darwin
OS-release: 18.5.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8
pandas: 0.25.0.dev0+587.g9d5f1105c
pytest: 4.3.0
pip: 19.0.3
setuptools: 40.8.0
Cython: 0.29.7
numpy: 1.16.2
scipy: 1.2.1
pyarrow: None
xarray: None
IPython: 7.3.0
sphinx: 1.8.4
patsy: 0.5.1
dateutil: 2.8.0
pytz: 2018.9
blosc: None
bottleneck: 1.2.1
tables: 3.4.4
numexpr: 2.6.9
feather: None
matplotlib: 3.0.3
openpyxl: 2.6.0
xlrd: 1.2.0
xlwt: 1.3.0
xlsxwriter: 1.1.5
lxml.etree: 4.3.1
bs4: 4.7.1
html5lib: 1.0.1
sqlalchemy: 1.2.18
pymysql: None
psycopg2: None
jinja2: 2.10
s3fs: 0.2.0
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/26446/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26446/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26447 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26447/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26447/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26447/events | https://github.com/pandas-dev/pandas/pull/26447 | 445,731,426 | MDExOlB1bGxSZXF1ZXN0MjgwMTExMjkx | 26,447 | CLN: remove __bytes__ | {
"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": "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": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"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": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 4 | 2019-05-18T16:25:17Z | 2019-05-19T17:08:14Z | 2019-05-19T17:08:08Z | CONTRIBUTOR | null | - [x] xref #25725
Remove ``__bytes__`` method from ``StringMixin`` and ``PandasExtensionDtype``. These are the only uses of ``__bytes__`` in the code base.
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26447/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26447/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26447.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26447",
"merged_at": "2019-05-19T17:08:08Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26447.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26447"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26448 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26448/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26448/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26448/events | https://github.com/pandas-dev/pandas/issues/26448 | 445,734,593 | MDU6SXNzdWU0NDU3MzQ1OTM= | 26,448 | Exception has occurred: KeyError 'Diameter' | {
"avatar_url": "https://avatars.githubusercontent.com/u/29192658?v=4",
"events_url": "https://api.github.com/users/pengguanjun/events{/privacy}",
"followers_url": "https://api.github.com/users/pengguanjun/followers",
"following_url": "https://api.github.com/users/pengguanjun/following{/other_user}",
"gists_url": "https://api.github.com/users/pengguanjun/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/pengguanjun",
"id": 29192658,
"login": "pengguanjun",
"node_id": "MDQ6VXNlcjI5MTkyNjU4",
"organizations_url": "https://api.github.com/users/pengguanjun/orgs",
"received_events_url": "https://api.github.com/users/pengguanjun/received_events",
"repos_url": "https://api.github.com/users/pengguanjun/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/pengguanjun/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/pengguanjun/subscriptions",
"type": "User",
"url": "https://api.github.com/users/pengguanjun"
} | [
{
"color": "8AE234",
"default": false,
"description": null,
"id": 2413328,
"name": "Visualization",
"node_id": "MDU6TGFiZWwyNDEzMzI4",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Visualization"
}
] | closed | false | null | [] | null | 6 | 2019-05-18T17:02:38Z | 2019-05-18T23:14:37Z | 2019-05-18T23:14:37Z | NONE | null | #### Code Sample, a copy-pastable example if possible
```python
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from matplotlib.ticker import MultipleLocator, FormatStrFormatter
plt.rcParams['font.sans-serif'] = ['KaiTi']
plt.rcParams['font.serif'] = ['KaiTi']
# plt.rcParams['axes.unicode_minus'] = False # 解决保存图像是负号'-'显示为方块的问题,或者转换负号为字符串
import seaborn as sns
sns.set_style("darkgrid",{"font.sans-serif":['KaiTi', 'Arial']}) #这是方便seaborn绘图得时候得字体设置
sns.set( palette="muted", color_codes=True)
d = pd.read_csv('C:/Users/MaiBenBen/Desktop/nicetable/2-图片1.csv',encoding='gbk')
f, ax = plt.subplots( figsize=(7,7))
plt.title('Histgram of Rock Fragmentation', fontsize=22)
print(d)
print(type(d))
y = list(d.loc[:,'Diameter'])
print(type(y))
print(y)
sns.distplot(y,kde=False,color="r")
group_labels = ['0', '10', '20','30','40','50','60', '70','80','90','100']
ax.set_yticklabels(group_labels,#设置刻度对应的标签
rotation=0, fontsize='small')#rotation选项设定x刻度标签倾斜30度。
plt.xlabel('size (cm)')
plt.ylabel('quantity of fragmentations') #只有最后一个图有改变
fig = ax.get_figure()
#fig.savefig('a.png', dpi=100, bbox_inches='tight')
plt.show()
```
#### Problem description
[this should explain **why** the current behaviour is a problem and why the expected output is a better solution.]

**Note**: We receive a lot of issues on our GitHub tracker, so it is very possible that your issue has been posted before. Please check first before submitting so that we do not have to handle and close duplicates!
**Note**: Many problems can be resolved by simply upgrading `pandas` to the latest version. Before submitting, please check if that solution works for you. If possible, you may want to check if `master` addresses this issue, but that is not necessary.
For documentation-related issues, you can check the latest versions of the docs on `master` here:
https://pandas-docs.github.io/pandas-docs-travis/
If the issue has not been resolved there, go ahead and file it in the issue tracker.
#### Expected Output
x;Diameter;;
0 1.078;0.00197;;1.078
1 11.822;-0.00373;;
2 12.363;-0.00481;;
3 16.199;0.04331;;
4 16.815;0.09224;;
5 19.813;0.28407;;
6 20.43;0.333;;
7 21.046;0.38193;;
8 21.663;0.43087;;
9 22.279;0.4798;;
10 22.896;0.52873;;
11 24.692;0.68536;;
12 24.771;0.69119;;
13 26.384;0.69122;;
14 29.148;0.73823;;
15 33.525;0.78526;;
16 39.508;0.82841;;
17 47.636;0.86767;;
18 50.34;0.8775;;
19 54.138;0.89909;;
20 56.83;0.90109;;
21 68.699;0.92671;;
22 81.087;0.9406;;
23 94.019;0.95842;;
24 106.41;0.97427;;
25 111.799;0.98218;;
26 119.329;0.98426;;
27 132.242;0.99033;;
28 145.684;0.99054;;
29 158.594;0.99466;;
30 169.35;0.99678;;
31 172.038;0.99682;;
32 184.404;0.99702;;
33 197.848;0.99918;;
34 211.289;0.99939;;
35 220.976;1.00542;;
36 224.196;1.00155;;
37 237.096;0.9998;;
38 250.541;1.00197;;
39 263.982;1.00218;;
40 277.43;1.0063;;
41 277.964;0.96383;;
<class 'pandas.core.frame.DataFrame'>
Traceback (most recent call last):
File "C:\Users\MaiBenBen\Python36\lib\site-packages\pandas\core\indexes\base.py", line 2657, in get_loc
return self._engine.get_loc(key)
File "pandas\_libs\index.pyx", line 108, in pandas._libs.index.IndexEngine.get_loc
File "pandas\_libs\index.pyx", line 132, in pandas._libs.index.IndexEngine.get_loc
File "pandas\_libs\hashtable_class_helper.pxi", line 1601, in pandas._libs.hashtable.PyObjectHashTable.get_item
File "pandas\_libs\hashtable_class_helper.pxi", line 1608, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'Diameter'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\Users\MaiBenBen\.vscode\extensions\ms-python.python-2019.4.12954\pythonFiles\ptvsd_launcher.py", line 43, in <module>
main(ptvsdArgs)
File "c:\Users\MaiBenBen\.vscode\extensions\ms-python.python-2019.4.12954\pythonFiles\lib\python\ptvsd\__main__.py", line 410, in main
run()
File "c:\Users\MaiBenBen\.vscode\extensions\ms-python.python-2019.4.12954\pythonFiles\lib\python\ptvsd\__main__.py", line 291, in run_file
runpy.run_path(target, run_name='__main__')
File "C:\Users\MaiBenBen\Python36\lib\runpy.py", line 263, in run_path
pkg_name=pkg_name, script_name=fname)
File "C:\Users\MaiBenBen\Python36\lib\runpy.py", line 96, in _run_module_code
mod_name, mod_spec, pkg_name, script_name)
File "C:\Users\MaiBenBen\Python36\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "c:\Users\MaiBenBen\Desktop\nicetable\HIST.py", line 19, in <module>
y = list(d.loc[:,'Diameter'])
File "C:\Users\MaiBenBen\Python36\lib\site-packages\pandas\core\indexing.py", line 1494, in __getitem__
return self._getitem_tuple(key)
File "C:\Users\MaiBenBen\Python36\lib\site-packages\pandas\core\indexing.py", line 868, in _getitem_tuple
return self._getitem_lowerdim(tup)
File "C:\Users\MaiBenBen\Python36\lib\site-packages\pandas\core\indexing.py", line 988, in _getitem_lowerdim
section = self._getitem_axis(key, axis=i)
File "C:\Users\MaiBenBen\Python36\lib\site-packages\pandas\core\indexing.py", line 1913, in _getitem_axis
return self._get_label(key, axis=axis)
File "C:\Users\MaiBenBen\Python36\lib\site-packages\pandas\core\indexing.py", line 141, in _get_label
return self.obj._xs(label, axis=axis)
File "C:\Users\MaiBenBen\Python36\lib\site-packages\pandas\core\generic.py", line 3576, in xs
return self[key]
File "C:\Users\MaiBenBen\Python36\lib\site-packages\pandas\core\frame.py", line 2927, in __getitem__
indexer = self.columns.get_loc(key)
File "C:\Users\MaiBenBen\Python36\lib\site-packages\pandas\core\indexes\base.py", line 2659, in get_loc
return self._engine.get_loc(self._maybe_cast_indexer(key))
File "pandas\_libs\index.pyx", line 108, in pandas._libs.index.IndexEngine.get_loc
File "pandas\_libs\index.pyx", line 132, in pandas._libs.index.IndexEngine.get_loc
File "pandas\_libs\hashtable_class_helper.pxi", line 1601, in pandas._libs.hashtable.PyObjectHashTable.get_item
File "pandas\_libs\hashtable_class_helper.pxi", line 1608, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'Diameter'
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit: None
python: 3.6.4.final.0
python-bits: 64
OS: Windows
OS-release: 10
machine: AMD64
processor: Intel64 Family 6 Model 60 Stepping 3, GenuineIntel
byteorder: little
LC_ALL: None
LANG: None
LOCALE: None.None
pandas: 0.24.2
pytest: None
pip: 19.1.1
setuptools: 28.8.0
Cython: None
numpy: 1.16.3
scipy: 1.1.0
pyarrow: None
xarray: None
IPython: 6.5.0
sphinx: None
patsy: None
dateutil: 2.7.2
pytz: 2018.3
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: 2.2.2
openpyxl: 2.5.4
xlrd: 1.1.0
xlwt: 1.3.0
xlsxwriter: 1.1.2
lxml.etree: 4.2.1
bs4: None
html5lib: 1.0.1
sqlalchemy: 1.2.8
pymysql: 0.9.0
psycopg2: None
jinja2: 2.10
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: 0.7.0
gcsfs: None
>>> pd.__version__
'0.24.2'
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26448/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26448/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26449 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26449/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26449/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26449/events | https://github.com/pandas-dev/pandas/pull/26449 | 445,750,505 | MDExOlB1bGxSZXF1ZXN0MjgwMTI0MDMz | 26,449 | Annotate to_json | {
"avatar_url": "https://avatars.githubusercontent.com/u/609873?v=4",
"events_url": "https://api.github.com/users/WillAyd/events{/privacy}",
"followers_url": "https://api.github.com/users/WillAyd/followers",
"following_url": "https://api.github.com/users/WillAyd/following{/other_user}",
"gists_url": "https://api.github.com/users/WillAyd/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/WillAyd",
"id": 609873,
"login": "WillAyd",
"node_id": "MDQ6VXNlcjYwOTg3Mw==",
"organizations_url": "https://api.github.com/users/WillAyd/orgs",
"received_events_url": "https://api.github.com/users/WillAyd/received_events",
"repos_url": "https://api.github.com/users/WillAyd/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/WillAyd/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/WillAyd/subscriptions",
"type": "User",
"url": "https://api.github.com/users/WillAyd"
} | [
{
"color": "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 | [] | null | 4 | 2019-05-18T20:15:32Z | 2020-01-16T00:34:46Z | 2019-05-27T00:11:19Z | MEMBER | null | Simple annotations as I was looking at the code
@gwrome and @vaibhavhrt | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26449/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26449/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26449.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26449",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/26449.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26449"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26450 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26450/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26450/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26450/events | https://github.com/pandas-dev/pandas/issues/26450 | 445,759,017 | MDU6SXNzdWU0NDU3NTkwMTc= | 26,450 | Deprecate py.path support | {
"avatar_url": "https://avatars.githubusercontent.com/u/609873?v=4",
"events_url": "https://api.github.com/users/WillAyd/events{/privacy}",
"followers_url": "https://api.github.com/users/WillAyd/followers",
"following_url": "https://api.github.com/users/WillAyd/following{/other_user}",
"gists_url": "https://api.github.com/users/WillAyd/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/WillAyd",
"id": 609873,
"login": "WillAyd",
"node_id": "MDQ6VXNlcjYwOTg3Mw==",
"organizations_url": "https://api.github.com/users/WillAyd/orgs",
"received_events_url": "https://api.github.com/users/WillAyd/received_events",
"repos_url": "https://api.github.com/users/WillAyd/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/WillAyd/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/WillAyd/subscriptions",
"type": "User",
"url": "https://api.github.com/users/WillAyd"
} | [
{
"color": "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": "d93f0b",
"default": f... | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"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": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 9 | 2019-05-18T22:12:46Z | 2019-05-26T01:48:03Z | 2019-05-26T01:48:03Z | MEMBER | null | Since our min version is Py35 path lib is guaranteed to be installed. However we have a few functions that accept py.path.LocalPath objects for compatability
Not sure if we need an explicit deprecation cycle or if this is implied with moving minimum support to Py35 | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26450/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26450/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26451 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26451/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26451/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26451/events | https://github.com/pandas-dev/pandas/pull/26451 | 445,764,923 | MDExOlB1bGxSZXF1ZXN0MjgwMTMzNDk5 | 26,451 | TST/DEPR: remove .ix from tests\indexing\multiindex\test_loc.py | {
"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": "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": "e99695",
"default": f... | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"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": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 7 | 2019-05-18T23:52:46Z | 2019-05-19T20:45:40Z | 2019-05-19T20:28:39Z | MEMBER | null | follow on from #26438
i leave this as draft until #26438 is merged, to prevent this one being merged first.
not used `iloc` for the expected where dropping levels would be required, used df.values 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/26451/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26451/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26451.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26451",
"merged_at": "2019-05-19T20:28:39Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26451.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26451"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26452 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26452/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26452/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26452/events | https://github.com/pandas-dev/pandas/issues/26452 | 445,766,059 | MDU6SXNzdWU0NDU3NjYwNTk= | 26,452 | TypeError: can't multiply sequence by non-int of type 'float' | {
"avatar_url": "https://avatars.githubusercontent.com/u/29192658?v=4",
"events_url": "https://api.github.com/users/pengguanjun/events{/privacy}",
"followers_url": "https://api.github.com/users/pengguanjun/followers",
"following_url": "https://api.github.com/users/pengguanjun/following{/other_user}",
"gists_url": "https://api.github.com/users/pengguanjun/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/pengguanjun",
"id": 29192658,
"login": "pengguanjun",
"node_id": "MDQ6VXNlcjI5MTkyNjU4",
"organizations_url": "https://api.github.com/users/pengguanjun/orgs",
"received_events_url": "https://api.github.com/users/pengguanjun/received_events",
"repos_url": "https://api.github.com/users/pengguanjun/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/pengguanjun/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/pengguanjun/subscriptions",
"type": "User",
"url": "https://api.github.com/users/pengguanjun"
} | [
{
"color": "207de5",
"default": false,
"description": "Clarification about behavior needed to assess issue",
"id": 307649777,
"name": "Needs Info",
"node_id": "MDU6TGFiZWwzMDc2NDk3Nzc=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Needs%20Info"
}
] | closed | false | null | [] | null | 6 | 2019-05-19T00:12:57Z | 2019-05-19T00:57:13Z | 2019-05-19T00:52:40Z | NONE | null | #### Code Sample, a copy-pastable example if possible
```python
# Your code here
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from matplotlib.ticker import MultipleLocator, FormatStrFormatter
plt.rcParams['font.sans-serif'] = ['KaiTi']
plt.rcParams['font.serif'] = ['KaiTi']
# plt.rcParams['axes.unicode_minus'] = False # 解决保存图像是负号'-'显示为方块的问题,或者转换负号为字符串
import seaborn as sns
sns.set_style("darkgrid",{"font.sans-serif":['KaiTi', 'Arial']}) #这是方便seaborn绘图得时候得字体设置
sns.set( palette="muted", color_codes=True)
d = pd.read_csv('C:/Users/MaiBenBen/Desktop/nicetable/03170809.csv',sep=';', encoding='gbk')
f, ax = plt.subplots( figsize=(7,7))
plt.title('Histgram of Rock Fragmentation', fontsize=22)
print(d)
print(d.columns)
print(type(d))
y = d.loc[:,'Diameter']
#y = list(d.loc[:,'Diameter'])
print(type(y))
print(y)
#fig,axes=plt.subplots(1,2)
#sns.distplot(x,norm_hist=True,kde=False,ax=axes[0]) #左图
#sns.distplot(x,kde=False,ax=axes[1]) #右图
sns.distplot(y,kde=False,color="r")
#sns.distplot(d.loc[:,'Diameter'],kde=False,color="r")
print('---------------------------')
#group_labels = ['0', '10', '20','30','40','50','60', '70','80','90','100']
#ax.set_yticklabels(group_labels,#设置刻度对应的标签
# rotation=0, fontsize='small')#rotation选项设定x刻度标签倾斜30度。
plt.xlabel('size (cm)')
plt.ylabel('quantity of fragmentations') #只有最后一个图有改变
fig = ax.get_figure()
fig.savefig('c-1.png', dpi=100, bbox_inches='tight')
plt.show()
```
#### Problem description
[this should explain **why** the current behaviour is a problem and why the expected output is a better solution.]

**Note**: We receive a lot of issues on our GitHub tracker, so it is very possible that your issue has been posted before. Please check first before submitting so that we do not have to handle and close duplicates!
**Note**: Many problems can be resolved by simply upgrading `pandas` to the latest version. Before submitting, please check if that solution works for you. If possible, you may want to check if `master` addresses this issue, but that is not necessary.
For documentation-related issues, you can check the latest versions of the docs on `master` here:
https://pandas-docs.github.io/pandas-docs-travis/
If the issue has not been resolved there, go ahead and file it in the issue tracker.
#### Expected Output
Unnamed: 0 ID Center-X Center-Y Area Perimeter Min-Y Min-X Max-Y Max-X (pix)Diameter ConvexArea Holes FilledArea Solidity Major Minor Ori Diameter
0 0 0 6.8 17.0 359 95.5 2 2 40 17 21.4 417 0 359 0.86 41.7 12.7 1.4 1.681.916.933
1 1 1 106.2 73.5 25099 924.9 2 2 165 270 178.8 30361 0 25099 0.83 242.4 150.6 0.3 1.405.265.176
2 2 2 233.1 5.8 232 75.4 2 217 12 251 17.2 255 0 232 0.91 33.8 9.0 -0.1 1.351.821.086
3 3 3 269.6 2.6 5 3.0 2 269 5 272 2.5 6 0 5 0.83 4.0 2.1 0.8 196.485.623
4 4 4 296.0 2.0 3 1.0 2 295 3 298 2.0 3 0 3 1.00 3.3 0.0 0.0 1.571.884.984
5 5 5 341.2 52.1 10897 617.2 2 226 97 455 117.8 13789 0 10897 0.79 203.8 87.4 -0.1 9.258.402.556
6 6 6 595.9 31.1 11264 1027.4 2 421 100 725 119.8 19139 0 11264 0.59 268.8 90.7 0.0 9.415.591.054
7 7 7 743.6 26.6 1199 156.6 2 725 54 762 39.1 1384 0 1199 0.87 57.1 29.2 -1.3 3.073.035.144
8 8 8 843.6 42.0 7722 612.8 2 765 90 940 99.2 10442 0 7722 0.74 175.6 65.5 -0.3 7.796.549.521
9 9 9 892.5 3.0 6 6.0 2 892 5 894 2.8 6 0 6 1.00 3.3 2.0 -1.6 2.200.638.978
10 10 10 907.5 2.0 2 0.0 2 907 3 909 1.6 2 0 2 1.00 2.0 0.0 0.0 1.257.507.987
11 11 11 927.1 18.4 147 64.0 2 923 32 933 13.7 182 0 147 0.81 28.5 7.6 -1.3 1.076.741.214
12 12 12 1179.1 12.2 544 138.3 2 1162 25 1207 26.3 759 0 544 0.72 42.4 22.8 0.1 2.067.028.754
13 13 13 1273.9 38.7 9789 475.7 2 1193 88 1343 111.6 10616 0 9789 0.92 151.7 85.6 -0.1 8.771.118.211
14 14 14 1384.0 3.0 3 1.0 2 1384 5 1385 2.0 3 0 3 1.00 3.3 0.0 -1.6 1.571.884.984
15 15 15 257.0 7.0 1 0.0 7 257 8 258 1.1 1 0 1 1.00 0.0 0.0 0.8 0.864536741
16 16 16 171.0 13.0 3 1.0 13 170 14 173 2.0 3 0 3 1.00 3.3 0.0 0.0 1.571.884.984
17 17 17 281.0 13.5 18 18.0 13 277 15 286 4.8 18 0 18 1.00 10.3 2.0 0.0 3.772.523.962
18 18 18 1115.7 25.5 480 95.9 14 1101 39 1137 24.7 537 0 480 0.89 34.8 18.6 0.4 1.941.277.955
19 19 19 286.0 15.0 1 0.0 15 286 16 287 1.1 1 0 1 1.00 0.0 0.0 0.8 0.864536741
20 20 20 1010.9 38.3 910 179.5 15 980 64 1044 34.0 1092 0 910 0.83 77.0 16.9 -0.7 2.672.204.473
21 21 21 913.6 20.0 20 14.6 17 912 23 916 5.0 21 0 20 0.95 6.2 4.2 1.3 392.971.246
22 22 22 876.9 19.1 8 7.4 18 876 21 879 3.2 8 0 8 1.00 3.5 2.7 -0.8 2.515.015.974
23 23 23 1349.0 19.0 1 0.0 19 1349 20 1350 1.1 1 0 1 1.00 0.0 0.0 0.8 0.864536741
24 24 24 725.0 20.0 1 0.0 20 725 21 726 1.1 1 0 1 1.00 0.0 0.0 0.8 0.864536741
25 25 25 1360.3 29.5 295 89.5 20 1350 41 1382 19.4 387 0 295 0.76 28.3 16.8 0.3 1.524.728.435
26 26 26 879.0 21.0 1 0.0 21 879 22 880 1.1 1 0 1 1.00 0.0 0.0 0.8 0.864536741
27 27 27 219.2 25.1 31 24.1 23 214 30 224 6.3 44 0 31 0.70 10.2 5.7 -0.2 49.514.377
28 28 28 891.8 23.4 5 5.2 23 891 25 894 2.5 5 0 5 1.00 3.1 1.8 0.3 196.485.623
29 29 29 905.7 25.8 53 26.4 23 902 31 910 8.2 56 0 53 0.95 9.2 7.6 -0.3 6.444.728.435
.. ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
449 449 449 1295.5 876.0 2 0.0 876 1295 877 1297 1.6 2 0 2 1.00 2.0 0.0 0.0 1.257.507.987
450 450 450 685.4 905.9 1543 192.8 877 651 924 714 44.3 1845 0 1543 0.84 57.4 40.7 0.7 348.172.524
451 451 451 378.7 880.4 7 7.2 880 377 882 381 3.0 7 0 7 1.00 4.2 1.9 -0.1 2.357.827.476
452 452 452 312.5 883.0 2 0.0 883 312 884 314 1.6 2 0 2 1.00 2.0 0.0 0.0 1.257.507.987
453 453 453 1341.1 902.6 249 82.9 885 1334 919 1349 17.8 332 0 249 0.75 33.1 11.6 -1.4 1.398.977.636
454 454 454 666.0 888.0 1 0.0 888 666 889 667 1.1 1 0 1 1.00 0.0 0.0 0.8 0.864536741
455 455 455 750.0 888.5 2 0.0 888 750 890 751 1.6 2 0 2 1.00 2.0 0.0 -1.6 1.257.507.987
456 456 456 729.5 891.0 2 0.0 891 729 892 731 1.6 2 0 2 1.00 2.0 0.0 0.0 1.257.507.987
457 457 457 997.2 895.6 8 7.4 894 996 898 1000 3.2 10 0 8 0.80 5.5 2.1 -0.6 2.515.015.974
458 458 458 1300.5 895.5 11 9.2 894 1299 900 1303 3.7 15 0 11 0.73 6.8 3.4 -1.4 290.798.722
459 459 459 586.8 900.4 38 24.7 897 584 906 592 7.0 47 0 38 0.81 8.5 6.8 -1.5 5.501.597.444
460 460 460 406.3 904.6 24 17.1 901 402 909 412 5.5 40 0 24 0.60 9.8 4.8 -0.7 4.322.683.706
461 461 461 449.3 908.0 73 36.9 901 444 914 455 9.6 92 0 73 0.79 12.3 9.2 -1.1 7.545.047.923
462 462 462 1204.0 902.0 1 0.0 902 1204 903 1205 1.1 1 0 1 1.00 0.0 0.0 0.8 0.864536741
463 463 463 1206.5 903.0 2 0.0 903 1206 904 1208 1.6 2 0 2 1.00 2.0 0.0 0.0 1.257.507.987
464 464 464 10.3 915.4 307 75.8 904 2 924 26 19.8 333 0 307 0.92 27.0 16.4 -0.7 1.556.166.134
465 465 465 1383.0 904.0 1 0.0 904 1383 905 1384 1.1 1 0 1 1.00 0.0 0.0 0.8 0.864536741
466 466 466 1212.0 905.5 4 4.4 905 1211 907 1214 2.3 4 0 4 1.00 3.2 1.2 -0.6 1.807.667.732
467 467 467 1384.0 905.0 1 0.0 905 1384 906 1385 1.1 1 0 1 1.00 0.0 0.0 0.8 0.864536741
468 468 468 580.1 917.9 580 145.6 907 551 924 614 27.2 755 0 580 0.77 61.9 15.1 -0.1 2.137.763.578
469 469 469 1381.0 916.6 63 42.0 909 1375 924 1385 9.0 107 0 63 0.59 18.0 8.4 -1.1 7.073.482.428
470 470 470 403.0 913.0 5 3.0 913 401 914 406 2.5 5 0 5 1.00 5.7 0.0 0.0 196.485.623
471 471 471 421.6 919.1 71 50.3 913 412 924 430 9.5 138 0 71 0.51 23.1 8.7 -0.3 7.466.453.674
472 472 472 714.0 920.1 35 23.9 915 710 924 718 6.7 37 0 35 0.95 11.1 4.7 0.9 5.265.814.696
473 473 473 1373.0 917.0 1 0.0 917 1373 918 1374 1.1 1 0 1 1.00 0.0 0.0 0.8 0.864536741
474 474 474 439.2 919.8 26 17.4 918 437 923 443 5.8 27 0 26 0.96 6.8 5.0 0.5 4.558.466.454
475 475 475 483.0 918.0 1 0.0 918 483 919 484 1.1 1 0 1 1.00 0.0 0.0 0.8 0.864536741
476 476 476 481.5 919.0 2 0.0 919 481 920 483 1.6 2 0 2 1.00 2.0 0.0 0.0 1.257.507.987
477 477 477 1298.5 923.0 16 14.0 923 1291 924 1307 4.5 16 0 16 1.00 18.4 0.0 0.0 3.536.741.214
478 478 478 1321.0 923.0 3 1.0 923 1320 924 1323 2.0 3 0 3 1.00 3.3 0.0 0.0 1.571.884.984
[479 rows x 19 columns]
Index(['Unnamed: 0', 'ID', 'Center-X', 'Center-Y', 'Area', 'Perimeter',
'Min-Y', 'Min-X', 'Max-Y', 'Max-X', '(pix)Diameter', 'ConvexArea',
'Holes', 'FilledArea', 'Solidity', 'Major', 'Minor', 'Ori', 'Diameter'],
dtype='object')
<class 'pandas.core.frame.DataFrame'>
<class 'pandas.core.series.Series'>
0 1.681.916.933
1 1.405.265.176
2 1.351.821.086
3 196.485.623
4 1.571.884.984
5 9.258.402.556
6 9.415.591.054
7 3.073.035.144
8 7.796.549.521
9 2.200.638.978
10 1.257.507.987
11 1.076.741.214
12 2.067.028.754
13 8.771.118.211
14 1.571.884.984
15 0.864536741
16 1.571.884.984
17 3.772.523.962
18 1.941.277.955
19 0.864536741
20 2.672.204.473
21 392.971.246
22 2.515.015.974
23 0.864536741
24 0.864536741
25 1.524.728.435
26 0.864536741
27 49.514.377
28 196.485.623
29 6.444.728.435
...
449 1.257.507.987
450 348.172.524
451 2.357.827.476
452 1.257.507.987
453 1.398.977.636
454 0.864536741
455 1.257.507.987
456 1.257.507.987
457 2.515.015.974
458 290.798.722
459 5.501.597.444
460 4.322.683.706
461 7.545.047.923
462 0.864536741
463 1.257.507.987
464 1.556.166.134
465 0.864536741
466 1.807.667.732
467 0.864536741
468 2.137.763.578
469 7.073.482.428
470 196.485.623
471 7.466.453.674
472 5.265.814.696
473 0.864536741
474 4.558.466.454
475 0.864536741
476 1.257.507.987
477 3.536.741.214
478 1.571.884.984
Name: Diameter, Length: 479, dtype: object
C:\Users\MaiBenBen\Python36\lib\site-packages\scipy\stats\stats.py:1713: FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use `arr[tuple(seq)]` instead of `arr[seq]`. In the future this will be interpreted as an array index, `arr[np.array(seq)]`, which will result either in an error or a different result.
return np.add.reduce(sorted[indexer] * weights, axis=axis) / sumval
Traceback (most recent call last):
File "c:\Users\MaiBenBen\.vscode\extensions\ms-python.python-2019.4.12954\pythonFiles\ptvsd_launcher.py", line 43, in <module>
main(ptvsdArgs)
File "c:\Users\MaiBenBen\.vscode\extensions\ms-python.python-2019.4.12954\pythonFiles\lib\python\ptvsd\__main__.py", line 410, in main
run()
File "c:\Users\MaiBenBen\.vscode\extensions\ms-python.python-2019.4.12954\pythonFiles\lib\python\ptvsd\__main__.py", line 291, in run_file
runpy.run_path(target, run_name='__main__')
File "C:\Users\MaiBenBen\Python36\lib\runpy.py", line 263, in run_path
pkg_name=pkg_name, script_name=fname)
File "C:\Users\MaiBenBen\Python36\lib\runpy.py", line 96, in _run_module_code
mod_name, mod_spec, pkg_name, script_name)
File "C:\Users\MaiBenBen\Python36\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "c:\Users\MaiBenBen\Desktop\nicetable\HIST.py", line 28, in <module>
**sns.distplot(y,kde=False,color="r")**
File "C:\Users\MaiBenBen\Python36\lib\site-packages\seaborn\distributions.py", line 215, in distplot
bins = min(_freedman_diaconis_bins(a), 50)
File "C:\Users\MaiBenBen\Python36\lib\site-packages\seaborn\distributions.py", line 34, in _freedman_diaconis_bins
h = 2 * iqr(a) / (len(a) ** (1 / 3))
File "C:\Users\MaiBenBen\Python36\lib\site-packages\seaborn\utils.py", line 366, in iqr
q1 = stats.scoreatpercentile(a, 25)
File "C:\Users\MaiBenBen\Python36\lib\site-packages\scipy\stats\stats.py", line 1670, in scoreatpercentile
return _compute_qth_percentile(sorted, per, interpolation_method, axis)
File "C:\Users\MaiBenBen\Python36\lib\site-packages\scipy\stats\stats.py", line 1713, in _compute_qth_percentile
return np.add.reduce(sorted[indexer] * weights, axis=axis) / sumval
TypeError: can't multiply sequence by non-int of type 'float'
#### Output of ``pd.show_versions()``
<details>
[paste the output of ``pd.show_versions()`` here below this line]
commit: None
python: 3.6.4.final.0
python-bits: 64
OS: Windows
OS-release: 10
machine: AMD64
processor: Intel64 Family 6 Model 60 Stepping 3, GenuineIntel
byteorder: little
LC_ALL: None
LANG: None
LOCALE: None.None
pandas: 0.24.2
pytest: None
pip: 19.1.1
setuptools: 28.8.0
Cython: None
numpy: 1.16.3
scipy: 1.1.0
pyarrow: None
xarray: None
IPython: 6.5.0
sphinx: None
patsy: None
dateutil: 2.7.2
pytz: 2018.3
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: 2.2.2
openpyxl: 2.5.4
xlrd: 1.1.0
xlwt: 1.3.0
xlsxwriter: 1.1.2
lxml.etree: 4.2.1
bs4: None
html5lib: 1.0.1
sqlalchemy: 1.2.8
pymysql: 0.9.0
psycopg2: None
jinja2: 2.10
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: 0.7.0
gcsfs: None
pd.version
'0.24.2'
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26452/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26452/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26453 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26453/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26453/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26453/events | https://github.com/pandas-dev/pandas/issues/26453 | 445,766,926 | MDU6SXNzdWU0NDU3NjY5MjY= | 26,453 | Replace Union annotations with TypeVar | {
"avatar_url": "https://avatars.githubusercontent.com/u/609873?v=4",
"events_url": "https://api.github.com/users/WillAyd/events{/privacy}",
"followers_url": "https://api.github.com/users/WillAyd/followers",
"following_url": "https://api.github.com/users/WillAyd/following{/other_user}",
"gists_url": "https://api.github.com/users/WillAyd/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/WillAyd",
"id": 609873,
"login": "WillAyd",
"node_id": "MDQ6VXNlcjYwOTg3Mw==",
"organizations_url": "https://api.github.com/users/WillAyd/orgs",
"received_events_url": "https://api.github.com/users/WillAyd/received_events",
"repos_url": "https://api.github.com/users/WillAyd/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/WillAyd/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/WillAyd/subscriptions",
"type": "User",
"url": "https://api.github.com/users/WillAyd"
} | [
{
"color": "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": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"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": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 6 | 2019-05-19T00:30:03Z | 2019-06-09T00:57:29Z | 2019-06-09T00:57:29Z | MEMBER | null | Had a revelation after https://github.com/python/mypy/issues/6847#issuecomment-493715355 and I think we've been using Union too liberally in places where a TypeVar may make more sense (especially in pandas._typing) so would be good to go back and swap those out.
@gwrome @vaibhavhrt | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26453/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26453/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26454 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26454/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26454/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26454/events | https://github.com/pandas-dev/pandas/issues/26454 | 445,773,015 | MDU6SXNzdWU0NDU3NzMwMTU= | 26,454 | GroupBy nth with Categorical, NA Data and dropna | {
"avatar_url": "https://avatars.githubusercontent.com/u/609873?v=4",
"events_url": "https://api.github.com/users/WillAyd/events{/privacy}",
"followers_url": "https://api.github.com/users/WillAyd/followers",
"following_url": "https://api.github.com/users/WillAyd/following{/other_user}",
"gists_url": "https://api.github.com/users/WillAyd/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/WillAyd",
"id": 609873,
"login": "WillAyd",
"node_id": "MDQ6VXNlcjYwOTg3Mw==",
"organizations_url": "https://api.github.com/users/WillAyd/orgs",
"received_events_url": "https://api.github.com/users/WillAyd/received_events",
"repos_url": "https://api.github.com/users/WillAyd/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/WillAyd/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/WillAyd/subscriptions",
"type": "User",
"url": "https://api.github.com/users/WillAyd"
} | [
{
"color": "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,
... | open | false | null | [] | null | 3 | 2019-05-19T02:30:51Z | 2020-06-28T23:20:03Z | null | MEMBER | null | The `nth` method of GroupBy objects can accept a `dropna` keyword, but it doesn't handle Categorical data appropriately. For instance:
```python-traceback
In [9]: cat = pd.Categorical(['a', np.nan, np.nan], categories=['a', 'b'])
...: ser = pd.Series([1, 2, 3])
...: df = pd.DataFrame({'cat': cat, 'ser': ser})
In [10]: df.groupby('cat')['ser'].nth(0, dropna='all')
ValueError: Length mismatch: Expected axis has 3 elements, new values have 2 elements
In [11]: df.groupby('cat', observed=True)['ser'].nth(0, dropna='all')
ValueError: Length mismatch: Expected axis has 3 elements, new values have 1 elements
```
Note that you can get a nonsensical result if the length of the categories matches the length of the Categorical:
```python-traceback
In [9]: cat = pd.Categorical(['a', np.nan, np.nan], categories=['a', 'b', 'c'])
...: ser = pd.Series([1, 2, 3])
...: df = pd.DataFrame({'cat': cat, 'ser': ser})
In [10]: df.groupby('cat')['ser'].nth(0, dropna='all')
Out[12]:
cat
a 1
b 2
c 3
Name: ser, dtype: int64
```
I'm not sure it makes sense to specify both observed and dropna anyway, so I *think* we should be raising if a categorical with NA values is detected within that method
@TomAugspurger | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26454/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26454/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26455 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26455/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26455/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26455/events | https://github.com/pandas-dev/pandas/pull/26455 | 445,778,861 | MDExOlB1bGxSZXF1ZXN0MjgwMTQyMzAx | 26,455 | BUG: Fix for pd.read_fwf not reading addinfourl object | {
"avatar_url": "https://avatars.githubusercontent.com/u/4872525?v=4",
"events_url": "https://api.github.com/users/shantanu-gontia/events{/privacy}",
"followers_url": "https://api.github.com/users/shantanu-gontia/followers",
"following_url": "https://api.github.com/users/shantanu-gontia/following{/other_user}",
"gists_url": "https://api.github.com/users/shantanu-gontia/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/shantanu-gontia",
"id": 4872525,
"login": "shantanu-gontia",
"node_id": "MDQ6VXNlcjQ4NzI1MjU=",
"organizations_url": "https://api.github.com/users/shantanu-gontia/orgs",
"received_events_url": "https://api.github.com/users/shantanu-gontia/received_events",
"repos_url": "https://api.github.com/users/shantanu-gontia/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/shantanu-gontia/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/shantanu-gontia/subscriptions",
"type": "User",
"url": "https://api.github.com/users/shantanu-gontia"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "06909A",
"default": false,
"description": "IO issues that don't fit... | closed | false | null | [] | null | 4 | 2019-05-19T04:26:59Z | 2019-06-27T03:34:39Z | 2019-06-27T03:34:39Z | CONTRIBUTOR | null | - [x] closes #26376
- [ ] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry
----
Not sure, how to add a new test for this particular case. Is it is possible without creating a `addinfourl` object with a specific URL? Thanks.
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26455/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26455/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26455.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26455",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/26455.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26455"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26456 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26456/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26456/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26456/events | https://github.com/pandas-dev/pandas/pull/26456 | 445,779,059 | MDExOlB1bGxSZXF1ZXN0MjgwMTQyNDMz | 26,456 | BUG-26214 fix colors parameter in DataFrame.boxplot | {
"avatar_url": "https://avatars.githubusercontent.com/u/29615021?v=4",
"events_url": "https://api.github.com/users/JustinZhengBC/events{/privacy}",
"followers_url": "https://api.github.com/users/JustinZhengBC/followers",
"following_url": "https://api.github.com/users/JustinZhengBC/following{/other_user}",
"gists_url": "https://api.github.com/users/JustinZhengBC/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/JustinZhengBC",
"id": 29615021,
"login": "JustinZhengBC",
"node_id": "MDQ6VXNlcjI5NjE1MDIx",
"organizations_url": "https://api.github.com/users/JustinZhengBC/orgs",
"received_events_url": "https://api.github.com/users/JustinZhengBC/received_events",
"repos_url": "https://api.github.com/users/JustinZhengBC/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/JustinZhengBC/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/JustinZhengBC/subscriptions",
"type": "User",
"url": "https://api.github.com/users/JustinZhengBC"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "8AE234",
"default": false,
"description": null,
"id": 2413328,
... | closed | false | null | [] | {
"closed_at": "2020-01-30T12:18:05Z",
"closed_issues": 2207,
"created_at": "2012-09-13T02:13:00Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/329591?v=4",
"events_url": "https://api.github.com/users/wesm/events{/privacy}",
"followers_url": "https://api.github.com/users/wesm/followers",
"following_url": "https://api.github.com/users/wesm/following{/other_user}",
"gists_url": "https://api.github.com/users/wesm/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/wesm",
"id": 329591,
"login": "wesm",
"node_id": "MDQ6VXNlcjMyOTU5MQ==",
"organizations_url": "https://api.github.com/users/wesm/orgs",
"received_events_url": "https://api.github.com/users/wesm/received_events",
"repos_url": "https://api.github.com/users/wesm/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/wesm/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/wesm/subscriptions",
"type": "User",
"url": "https://api.github.com/users/wesm"
},
"description": "on-merge: backport to 1.0.x",
"due_on": "2020-02-01T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/16",
"id": 174211,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16/labels",
"node_id": "MDk6TWlsZXN0b25lMTc0MjEx",
"number": 16,
"open_issues": 0,
"state": "closed",
"title": "1.0.0",
"updated_at": "2020-01-30T12:18:05Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16"
} | 11 | 2019-05-19T04:30:48Z | 2019-09-20T03:36:41Z | 2019-09-20T03:36:34Z | CONTRIBUTOR | null | - [X] closes #26214
- [X] tests added / passed
- [X] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [X] whatsnew entry
This PR fixes issues in the handling of the `color` parameter in the implementation of `DataFrame.boxplot` that do not exist in `DataFrame.plot.box`
- the `color` parameter is now removed from `kwds` before the `matplotlib` call, preventing an error
- an alternative implementation of color extraction from `color`, as `_get_standard_colors` did not preserve the appropriate order (without looking at that function, one can see that the previous implementation would give the boxes and the medians the same color even when otherwise specified)
- checking that `color` is actually a `dict`
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26456/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26456/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26456.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26456",
"merged_at": "2019-09-20T03:36:34Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26456.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26456"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26457 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26457/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26457/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26457/events | https://github.com/pandas-dev/pandas/pull/26457 | 445,779,122 | MDExOlB1bGxSZXF1ZXN0MjgwMTQyNDcx | 26,457 | WIP: Add indent support in to_json | {
"avatar_url": "https://avatars.githubusercontent.com/u/609873?v=4",
"events_url": "https://api.github.com/users/WillAyd/events{/privacy}",
"followers_url": "https://api.github.com/users/WillAyd/followers",
"following_url": "https://api.github.com/users/WillAyd/following{/other_user}",
"gists_url": "https://api.github.com/users/WillAyd/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/WillAyd",
"id": 609873,
"login": "WillAyd",
"node_id": "MDQ6VXNlcjYwOTg3Mw==",
"organizations_url": "https://api.github.com/users/WillAyd/orgs",
"received_events_url": "https://api.github.com/users/WillAyd/received_events",
"repos_url": "https://api.github.com/users/WillAyd/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/WillAyd/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/WillAyd/subscriptions",
"type": "User",
"url": "https://api.github.com/users/WillAyd"
} | [
{
"color": "207de5",
"default": false,
"description": "read_json, to_json, json_normalize",
"id": 49379259,
"name": "IO JSON",
"node_id": "MDU6TGFiZWw0OTM3OTI1OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20JSON"
}
] | closed | false | null | [] | null | 3 | 2019-05-19T04:31:48Z | 2020-01-16T00:34:47Z | 2019-05-20T19:40:28Z | MEMBER | null | - [X] closes #12004
- [ ] tests added / passed
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
This is a WIP and requires a little more refinement (namely around how `level` is incremented in the extension module, testing arrays) but is more or less the direction I think we could head in
This is mostly inspired by changes done in https://github.com/esnme/ultrajson/commit/930dfa5525219d52c8422cf416ca308bc7382870#diff-edae06c872e58ad6edf574f4414aac9f
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26457/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26457/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26457.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26457",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/26457.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26457"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26458 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26458/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26458/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26458/events | https://github.com/pandas-dev/pandas/pull/26458 | 445,781,524 | MDExOlB1bGxSZXF1ZXN0MjgwMTQ0MDc2 | 26,458 | Remove py.path special handling from io.common | {
"avatar_url": "https://avatars.githubusercontent.com/u/33784207?v=4",
"events_url": "https://api.github.com/users/nandahkrishna/events{/privacy}",
"followers_url": "https://api.github.com/users/nandahkrishna/followers",
"following_url": "https://api.github.com/users/nandahkrishna/following{/other_user}",
"gists_url": "https://api.github.com/users/nandahkrishna/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nandahkrishna",
"id": 33784207,
"login": "nandahkrishna",
"node_id": "MDQ6VXNlcjMzNzg0MjA3",
"organizations_url": "https://api.github.com/users/nandahkrishna/orgs",
"received_events_url": "https://api.github.com/users/nandahkrishna/received_events",
"repos_url": "https://api.github.com/users/nandahkrishna/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nandahkrishna/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nandahkrishna/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nandahkrishna"
} | [
{
"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": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"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": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 5 | 2019-05-19T05:18:58Z | 2019-05-26T05:34:25Z | 2019-05-26T01:48:03Z | CONTRIBUTOR | null | - [x] closes #26450
- [x] tests added / passed
- [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/26458/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26458/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26458.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26458",
"merged_at": "2019-05-26T01:48:03Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26458.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26458"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26459 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26459/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26459/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26459/events | https://github.com/pandas-dev/pandas/issues/26459 | 445,856,427 | MDU6SXNzdWU0NDU4NTY0Mjc= | 26,459 | DataFrame constructor with MultiIndex DataFrame raises ValueError | {
"avatar_url": "https://avatars.githubusercontent.com/u/13159005?v=4",
"events_url": "https://api.github.com/users/simonjayhawkins/events{/privacy}",
"followers_url": "https://api.github.com/users/simonjayhawkins/followers",
"following_url": "https://api.github.com/users/simonjayhawkins/following{/other_user}",
"gists_url": "https://api.github.com/users/simonjayhawkins/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/simonjayhawkins",
"id": 13159005,
"login": "simonjayhawkins",
"node_id": "MDQ6VXNlcjEzMTU5MDA1",
"organizations_url": "https://api.github.com/users/simonjayhawkins/orgs",
"received_events_url": "https://api.github.com/users/simonjayhawkins/received_events",
"repos_url": "https://api.github.com/users/simonjayhawkins/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/simonjayhawkins/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/simonjayhawkins/subscriptions",
"type": "User",
"url": "https://api.github.com/users/simonjayhawkins"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "207de5",
"default": false,
"description": null,
"id": 71268330,... | 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"
} | 0 | 2019-05-19T19:42:48Z | 2020-04-23T15:08:27Z | null | MEMBER | null | xref #26451
```python
import numpy as np
import pandas as pd
df = pd.DataFrame(np.random.randn(3, 3),
columns=[['i', 'i', 'j'], ['A', 'A', 'B']],
index=[['i', 'i', 'j'], ['X', 'X', 'Y']])
pd.DataFrame(df.iloc[[0, 1]], index=['X', 'X'])
```
#### Problem description
The error message is self-explanatory, but this case should work?
```python-traceback
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\simon\OneDrive\code\pandas-simonjayhawkins\pandas\core\frame.py", line 389, in __init__
dtype=dtype, copy=copy)
File "C:\Users\simon\OneDrive\code\pandas-simonjayhawkins\pandas\core\generic.py", line 147, in _init_mg
r
copy=False)
File "C:\Users\simon\OneDrive\code\pandas-simonjayhawkins\pandas\core\internals\managers.py", line 1189,
in reindex_axis
limit=limit)
File "C:\Users\simon\OneDrive\code\pandas-simonjayhawkins\pandas\core\indexes\multi.py", line 2245, in r
eindex
raise ValueError("cannot handle a non-unique multi-index!")
ValueError: cannot handle a non-unique multi-index!
```
#### Expected Output
```
i j
A A B
X 0.097722 0.726944 2.751392
X 0.396623 -0.564745 -0.153548
```
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit: 5a286e458f9693351c83eeaa5c484dfdd654e65c
python: 3.7.3.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: en_GB.UTF-8
LOCALE: None.None
pandas: 0.25.0.dev0+584.g5a286e458
pytest: 4.4.2
pip: 19.1.1
setuptools: 40.6.3
Cython: 0.29.7
numpy: 1.16.3
scipy: 1.2.1
pyarrow: 0.11.1
xarray: 0.12.1
IPython: 7.5.0
sphinx: 2.0.1
patsy: 0.5.1
dateutil: 2.8.0
pytz: 2019.1
blosc: None
bottleneck: 1.2.1
tables: 3.5.1
numexpr: 2.6.9
feather: None
matplotlib: 3.0.3
openpyxl: 2.6.2
xlrd: 1.2.0
xlwt: 1.3.0
xlsxwriter: 1.1.8
lxml.etree: 4.3.3
bs4: 4.7.1
html5lib: 1.0.1
sqlalchemy: 1.3.3
pymysql: None
psycopg2: None
jinja2: 2.10.1
s3fs: 0.2.1
fastparquet: 0.3.0
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/26459/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26459/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26460 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26460/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26460/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26460/events | https://github.com/pandas-dev/pandas/issues/26460 | 445,859,335 | MDU6SXNzdWU0NDU4NTkzMzU= | 26,460 | unhelpful error message with DataFrame constructor and integer MultiIndex DataFrame | {
"avatar_url": "https://avatars.githubusercontent.com/u/13159005?v=4",
"events_url": "https://api.github.com/users/simonjayhawkins/events{/privacy}",
"followers_url": "https://api.github.com/users/simonjayhawkins/followers",
"following_url": "https://api.github.com/users/simonjayhawkins/following{/other_user}",
"gists_url": "https://api.github.com/users/simonjayhawkins/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/simonjayhawkins",
"id": 13159005,
"login": "simonjayhawkins",
"node_id": "MDQ6VXNlcjEzMTU5MDA1",
"organizations_url": "https://api.github.com/users/simonjayhawkins/orgs",
"received_events_url": "https://api.github.com/users/simonjayhawkins/received_events",
"repos_url": "https://api.github.com/users/simonjayhawkins/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/simonjayhawkins/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/simonjayhawkins/subscriptions",
"type": "User",
"url": "https://api.github.com/users/simonjayhawkins"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "ffa0ff",
"default": false,
"description": "Incorrect or improved er... | open | false | null | [] | null | 0 | 2019-05-19T20:12:51Z | 2020-04-25T11:27:26Z | null | MEMBER | null | similar to #26459, but with integer MultiIndex
#### Code Sample, a copy-pastable example if possible
```python
import numpy as np
import pandas as pd
df = pd.DataFrame(np.random.randn(3, 3),
columns=[[2, 2, 4], [6, 8, 10]],
index=[[4, 4, 8], [8, 10, 12]])
pd.DataFrame(df.iloc[[0, 1]], index=[8, 10])
```
#### Problem description
should either work or give similar message to #26459
```python-traceback
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\simon\OneDrive\code\pandas-simonjayhawkins\pandas\core\frame.py", line 389, in __init__
dtype=dtype, copy=copy)
File "C:\Users\simon\OneDrive\code\pandas-simonjayhawkins\pandas\core\generic.py", line 147, in _init_mg
r
copy=False)
File "C:\Users\simon\OneDrive\code\pandas-simonjayhawkins\pandas\core\internals\managers.py", line 1189,
in reindex_axis
limit=limit)
File "C:\Users\simon\OneDrive\code\pandas-simonjayhawkins\pandas\core\indexes\multi.py", line 2254, in r
eindex
target = MultiIndex.from_tuples(target)
File "C:\Users\simon\OneDrive\code\pandas-simonjayhawkins\pandas\core\indexes\multi.py", line 400, in fr
om_tuples
arrays = list(lib.tuples_to_object_array(tuples).T)
File "pandas\_libs\lib.pyx", line 2230, in pandas._libs.lib.tuples_to_object_array
def tuples_to_object_array(ndarray[object] tuples):
ValueError: Buffer dtype mismatch, expected 'Python object' but got 'long long'
```
#### Expected Output
either
```
2 4
6 8 10
8 0.402010 0.228705 0.154561
10 -0.331031 1.321493 -0.193243
```
or
```
ValueError: cannot handle a non-unique multi-index!
```
#### Output of ``pd.show_versions()``
<details>
[paste the output of ``pd.show_versions()`` here below this line]
</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/26460/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26460/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26461 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26461/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26461/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26461/events | https://github.com/pandas-dev/pandas/pull/26461 | 445,862,029 | MDExOlB1bGxSZXF1ZXN0MjgwMTk2MzE3 | 26,461 | Fix 'observed' kwarg not doing anything on SeriesGroupBy | {
"avatar_url": "https://avatars.githubusercontent.com/u/13034472?v=4",
"events_url": "https://api.github.com/users/krsnik93/events{/privacy}",
"followers_url": "https://api.github.com/users/krsnik93/followers",
"following_url": "https://api.github.com/users/krsnik93/following{/other_user}",
"gists_url": "https://api.github.com/users/krsnik93/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/krsnik93",
"id": 13034472,
"login": "krsnik93",
"node_id": "MDQ6VXNlcjEzMDM0NDcy",
"organizations_url": "https://api.github.com/users/krsnik93/orgs",
"received_events_url": "https://api.github.com/users/krsnik93/received_events",
"repos_url": "https://api.github.com/users/krsnik93/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/krsnik93/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/krsnik93/subscriptions",
"type": "User",
"url": "https://api.github.com/users/krsnik93"
} | [
{
"color": "729FCF",
"default": false,
"description": null,
"id": 233160,
"name": "Groupby",
"node_id": "MDU6TGFiZWwyMzMxNjA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Groupby"
}
] | closed | false | null | [] | null | 4 | 2019-05-19T20:42:13Z | 2019-05-19T22:09:05Z | 2019-05-19T21:38:09Z | CONTRIBUTOR | null | - [x] closes #24880
- [x] tests added / passed
- [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/26461/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26461/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26461.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26461",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/26461.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26461"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26462 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26462/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26462/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26462/events | https://github.com/pandas-dev/pandas/issues/26462 | 445,863,941 | MDU6SXNzdWU0NDU4NjM5NDE= | 26,462 | `groupby` in combination with `rolling` provides unintuitve errors | {
"avatar_url": "https://avatars.githubusercontent.com/u/469983?v=4",
"events_url": "https://api.github.com/users/bgruening/events{/privacy}",
"followers_url": "https://api.github.com/users/bgruening/followers",
"following_url": "https://api.github.com/users/bgruening/following{/other_user}",
"gists_url": "https://api.github.com/users/bgruening/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/bgruening",
"id": 469983,
"login": "bgruening",
"node_id": "MDQ6VXNlcjQ2OTk4Mw==",
"organizations_url": "https://api.github.com/users/bgruening/orgs",
"received_events_url": "https://api.github.com/users/bgruening/received_events",
"repos_url": "https://api.github.com/users/bgruening/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/bgruening/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bgruening/subscriptions",
"type": "User",
"url": "https://api.github.com/users/bgruening"
} | [
{
"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": "ffa0ff",
"default": false,
"description": "Incorrect or improved... | 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"
} | 8 | 2019-05-19T21:03:54Z | 2020-01-08T16:13:53Z | 2020-01-08T16:13:53Z | NONE | null |
I think the minimal example here is
```
In [28]: df = pd.DataFrame({"A": range(12)})
In [29]: df.rolling(3, win_type='gaussian').mean()
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-29-82bac00d4424> in <module>
----> 1 df.rolling(3, win_type='gaussian').mean()
~/sandbox/pandas/pandas/core/window.py in mean(self, *args, **kwargs)
827 def mean(self, *args, **kwargs):
828 nv.validate_window_func("mean", args, kwargs)
--> 829 return self._apply_window(mean=True, **kwargs)
830
831
~/sandbox/pandas/pandas/core/window.py in _apply_window(self, mean, **kwargs)
711
712 """
--> 713 window = self._prep_window(**kwargs)
714 center = self.center
715
~/sandbox/pandas/pandas/core/window.py in _prep_window(self, **kwargs)
693 return all_args
694
--> 695 win_type = _validate_win_type(self.win_type, kwargs)
696 # GH #15662. `False` makes symmetric window, rather than periodic.
697 return sig.get_window(win_type, window, False).astype(float)
~/sandbox/pandas/pandas/core/window.py in _validate_win_type(win_type, kwargs)
674
675 if win_type in arg_map:
--> 676 win_args = _pop_args(win_type, arg_map[win_type], kwargs)
677 if win_type == "exponential":
678 # exponential window requires the first arg (center)
~/sandbox/pandas/pandas/core/window.py in _pop_args(win_type, arg_names, kwargs)
689 for n in arg_names:
690 if n not in kwargs:
--> 691 raise ValueError(msg % n)
692 all_args.append(kwargs.pop(n))
693 return all_args
ValueError: gaussian window requires std
```
Can you confirm @bgruening?
Apparently, passing `std` is required.
```python
In [40]: df.rolling(3, win_type='gaussian').mean(std=1)
Out[40]:
A
0 NaN
1 NaN
2 1.0
3 2.0
4 3.0
5 4.0
6 5.0
7 6.0
8 7.0
9 8.0
10 9.0
11 10.0
```
An example in the docs, and / or a better error message would be nice. https://github.com/pandas-dev/pandas/blob/32b47102aa95da5a68ef9939c0e9429269ced016/pandas/core/window/rolling.py#L569
*original example below*
---
#### Code Sample, a copy-pastable example if possible
```python
import pandas as pd
iris = pd.read_csv('https://raw.githubusercontent.com/mwaskom/seaborn-data/master/iris.csv')
# this one works, but should not imho
iris['gaussian'] = iris.groupby('species')['petal_width'].rolling(3, win_type='gaussian', center=False).mean().reset_index(drop=True)
# this one raises an `ValueError: gaussian window requires std`
iris['gaussian'] = iris['petal_width'].rolling(3, win_type='gaussian', center=False).mean().reset_index(drop=True)
```
#### Problem description
According to https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.rolling.html the `win_type='gaussian'` needs a `std`. The above example without the groupby errors if no `std` is given and this is the expected behaviour. However, the first example with the `groupby` does not error. I'm not even sure what happens in the first case.
#### Expected Output
The groupby example should give an error.
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit: None
python: 3.7.3.final.0
python-bits: 64
OS: Linux
OS-release: 5.0.0-15-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: de_DE.UTF-8
LOCALE: de_DE.UTF-8
pandas: 0.24.2
pytest: None
pip: 19.1
setuptools: 41.0.1
Cython: None
numpy: 1.16.3
scipy: 1.2.1
pyarrow: None
xarray: None
IPython: 7.5.0
sphinx: None
patsy: None
dateutil: 2.8.0
pytz: 2019.1
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: None
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml.etree: None
bs4: None
html5lib: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.10.1
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
gcsfs: None
</details>
| {
"+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/26462/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26462/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26463 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26463/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26463/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26463/events | https://github.com/pandas-dev/pandas/pull/26463 | 445,864,763 | MDExOlB1bGxSZXF1ZXN0MjgwMTk4MjMy | 26,463 | Fix 'observed' kwarg not doing anything on SeriesGroupBy | {
"avatar_url": "https://avatars.githubusercontent.com/u/13034472?v=4",
"events_url": "https://api.github.com/users/krsnik93/events{/privacy}",
"followers_url": "https://api.github.com/users/krsnik93/followers",
"following_url": "https://api.github.com/users/krsnik93/following{/other_user}",
"gists_url": "https://api.github.com/users/krsnik93/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/krsnik93",
"id": 13034472,
"login": "krsnik93",
"node_id": "MDQ6VXNlcjEzMDM0NDcy",
"organizations_url": "https://api.github.com/users/krsnik93/orgs",
"received_events_url": "https://api.github.com/users/krsnik93/received_events",
"repos_url": "https://api.github.com/users/krsnik93/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/krsnik93/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/krsnik93/subscriptions",
"type": "User",
"url": "https://api.github.com/users/krsnik93"
} | [
{
"color": "729FCF",
"default": false,
"description": null,
"id": 233160,
"name": "Groupby",
"node_id": "MDU6TGFiZWwyMzMxNjA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Groupby"
}
] | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"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": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 13 | 2019-05-19T21:13:24Z | 2019-06-17T14:10:26Z | 2019-05-30T01:33:50Z | CONTRIBUTOR | null | - [x] closes #24880
- [x] tests added / passed
- [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/26463/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26463/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26463.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26463",
"merged_at": "2019-05-30T01:33:50Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26463.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26463"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26464 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26464/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26464/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26464/events | https://github.com/pandas-dev/pandas/pull/26464 | 445,903,112 | MDExOlB1bGxSZXF1ZXN0MjgwMjI0ODc4 | 26,464 | CLN: Remove ExcelWriter.sheetname | {
"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": "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"
},
{
"color": "207de5",
"default": false,
"de... | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"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": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 6 | 2019-05-20T02:57:43Z | 2019-05-25T15:51:35Z | 2019-05-25T01:18:05Z | MEMBER | null | - [x] xref https://github.com/pandas-dev/pandas/issues/6581
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry
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/26464/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26464/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26464.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26464",
"merged_at": "2019-05-25T01:18:05Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26464.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26464"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26465 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26465/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26465/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26465/events | https://github.com/pandas-dev/pandas/pull/26465 | 445,943,795 | MDExOlB1bGxSZXF1ZXN0MjgwMjU1NTEz | 26,465 | DOC: #25723 passing kwargs to excel document engine | {
"avatar_url": "https://avatars.githubusercontent.com/u/29707787?v=4",
"events_url": "https://api.github.com/users/Dunni3/events{/privacy}",
"followers_url": "https://api.github.com/users/Dunni3/followers",
"following_url": "https://api.github.com/users/Dunni3/following{/other_user}",
"gists_url": "https://api.github.com/users/Dunni3/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Dunni3",
"id": 29707787,
"login": "Dunni3",
"node_id": "MDQ6VXNlcjI5NzA3Nzg3",
"organizations_url": "https://api.github.com/users/Dunni3/orgs",
"received_events_url": "https://api.github.com/users/Dunni3/received_events",
"repos_url": "https://api.github.com/users/Dunni3/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Dunni3/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Dunni3/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Dunni3"
} | [
{
"color": "3465A4",
"default": false,
"description": null,
"id": 134699,
"name": "Docs",
"node_id": "MDU6TGFiZWwxMzQ2OTk=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Docs"
},
{
"color": "bfe5bf",
"default": false,
"description": "read_excel, to_excel"... | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"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": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 3 | 2019-05-20T06:31:35Z | 2019-05-20T16:31:13Z | 2019-05-20T16:31:05Z | CONTRIBUTOR | null | - [x] closes #25723
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
This pr tries to address #25723.
Made a small addition to the ExcelFile section of user_guide/io.rst regarding the discussion in #25723.
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26465/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26465/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26465.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26465",
"merged_at": "2019-05-20T16:31:05Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26465.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26465"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26466 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26466/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26466/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26466/events | https://github.com/pandas-dev/pandas/pull/26466 | 445,951,840 | MDExOlB1bGxSZXF1ZXN0MjgwMjYxODE1 | 26,466 | Add defensive check for argument errors keyword in to_numeric | {
"avatar_url": "https://avatars.githubusercontent.com/u/5400810?v=4",
"events_url": "https://api.github.com/users/sumanau7/events{/privacy}",
"followers_url": "https://api.github.com/users/sumanau7/followers",
"following_url": "https://api.github.com/users/sumanau7/following{/other_user}",
"gists_url": "https://api.github.com/users/sumanau7/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sumanau7",
"id": 5400810,
"login": "sumanau7",
"node_id": "MDQ6VXNlcjU0MDA4MTA=",
"organizations_url": "https://api.github.com/users/sumanau7/orgs",
"received_events_url": "https://api.github.com/users/sumanau7/received_events",
"repos_url": "https://api.github.com/users/sumanau7/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sumanau7/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sumanau7/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sumanau7"
} | [
{
"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": "006b... | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"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": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 6 | 2019-05-20T06:59:11Z | 2019-05-20T11:11:50Z | 2019-05-20T11:11:37Z | CONTRIBUTOR | null | - [x] closes #26394
- [x] tests passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] Added defensive check for argument `errors` in func `to_numeric`
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26466/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26466/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26466.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26466",
"merged_at": "2019-05-20T11:11:36Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26466.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26466"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26467 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26467/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26467/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26467/events | https://github.com/pandas-dev/pandas/pull/26467 | 445,994,917 | MDExOlB1bGxSZXF1ZXN0MjgwMjk0OTE0 | 26,467 | DOC: fix example with Timestamp/integer addition | {
"avatar_url": "https://avatars.githubusercontent.com/u/1020496?v=4",
"events_url": "https://api.github.com/users/jorisvandenbossche/events{/privacy}",
"followers_url": "https://api.github.com/users/jorisvandenbossche/followers",
"following_url": "https://api.github.com/users/jorisvandenbossche/following{/other_user}",
"gists_url": "https://api.github.com/users/jorisvandenbossche/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jorisvandenbossche",
"id": 1020496,
"login": "jorisvandenbossche",
"node_id": "MDQ6VXNlcjEwMjA0OTY=",
"organizations_url": "https://api.github.com/users/jorisvandenbossche/orgs",
"received_events_url": "https://api.github.com/users/jorisvandenbossche/received_events",
"repos_url": "https://api.github.com/users/jorisvandenbossche/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jorisvandenbossche/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jorisvandenbossche/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jorisvandenbossche"
} | [
{
"color": "3465A4",
"default": false,
"description": null,
"id": 134699,
"name": "Docs",
"node_id": "MDU6TGFiZWwxMzQ2OTk=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Docs"
}
] | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"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": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 2 | 2019-05-20T08:49:00Z | 2019-05-20T13:14:58Z | 2019-05-20T13:14:57Z | MEMBER | null | Remaining warning that is being raised in the examples in the docs (the others are related to pyarrow). | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26467/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26467/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26467.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26467",
"merged_at": "2019-05-20T13:14:57Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26467.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26467"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26468 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26468/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26468/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26468/events | https://github.com/pandas-dev/pandas/issues/26468 | 446,038,212 | MDU6SXNzdWU0NDYwMzgyMTI= | 26,468 | BUG: setitem with boolean mask and series as value is broken for Series with EA type | {
"avatar_url": "https://avatars.githubusercontent.com/u/1020496?v=4",
"events_url": "https://api.github.com/users/jorisvandenbossche/events{/privacy}",
"followers_url": "https://api.github.com/users/jorisvandenbossche/followers",
"following_url": "https://api.github.com/users/jorisvandenbossche/following{/other_user}",
"gists_url": "https://api.github.com/users/jorisvandenbossche/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jorisvandenbossche",
"id": 1020496,
"login": "jorisvandenbossche",
"node_id": "MDQ6VXNlcjEwMjA0OTY=",
"organizations_url": "https://api.github.com/users/jorisvandenbossche/orgs",
"received_events_url": "https://api.github.com/users/jorisvandenbossche/received_events",
"repos_url": "https://api.github.com/users/jorisvandenbossche/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jorisvandenbossche/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jorisvandenbossche/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jorisvandenbossche"
} | [
{
"color": "0b02e1",
"default": false,
"description": "Related to indexing on series/frames, not to indexes themselves",
"id": 2822098,
"name": "Indexing",
"node_id": "MDU6TGFiZWwyODIyMDk4",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Indexing"
},
{
"color": "61... | 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"
} | 1 | 2019-05-20T10:23:40Z | 2020-11-17T01:21:38Z | 2020-11-17T01:21:38Z | MEMBER | null | Consider the following example (on master, 0.25.0dev) where the value being assigned to `s[boolean_mask] = value` is a Series itself (of the correct length + matching index):
```
In [1]: df = pd.DataFrame({'a': [0, 0, np.nan, np.nan], 'b': pd.array(range(4), dtype='Int64')})
In [2]: s = df['b'].copy()
In [3]: s[df['a'].isna()] = df.loc[df['a'].isna(), 'b']
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-3-04e8761e7ad9> in <module>
----> 1 s[df['a'].isna()] = df.loc[df['a'].isna(), 'b']
~/scipy/pandas/pandas/core/series.py in __setitem__(self, key, value)
1055 # do the setitem
1056 cacher_needs_updating = self._check_is_chained_assignment_possible()
-> 1057 setitem(key, value)
1058 if cacher_needs_updating:
1059 self._maybe_update_cacher()
~/scipy/pandas/pandas/core/series.py in setitem(key, value)
1046 key = check_bool_indexer(self.index, key)
1047 try:
-> 1048 self._where(~key, value, inplace=True)
1049 return
1050 except InvalidIndexError:
~/scipy/pandas/pandas/core/generic.py in _where(self, cond, other, inplace, axis, level, errors, try_cast)
8819 new_data = self._data.putmask(mask=cond, new=other, align=align,
8820 inplace=True, axis=block_axis,
-> 8821 transpose=self._AXIS_REVERSED)
8822 self._update_inplace(new_data)
8823
~/scipy/pandas/pandas/core/internals/managers.py in putmask(self, **kwargs)
511
512 def putmask(self, **kwargs):
--> 513 return self.apply('putmask', **kwargs)
514
515 def diff(self, **kwargs):
~/scipy/pandas/pandas/core/internals/managers.py in apply(self, f, axes, filter, do_integrity_check, consolidate, **kwargs)
393 copy=align_copy)
394
--> 395 applied = getattr(b, f)(**kwargs)
396 result_blocks = _extend_blocks(applied, result_blocks)
397
~/scipy/pandas/pandas/core/internals/blocks.py in putmask(self, mask, new, align, inplace, axis, transpose)
1593 mask = _safe_reshape(mask, new_values.shape)
1594
-> 1595 new_values[mask] = new
1596 new_values = self._try_coerce_result(new_values)
1597 return [self.make_block(values=new_values)]
~/scipy/pandas/pandas/core/arrays/integer.py in __setitem__(self, key, value)
399 mask = mask[0]
400
--> 401 self._data[key] = value
402 self._mask[key] = mask
403
ValueError: NumPy boolean array indexing assignment cannot assign 4 input values to the 2 output values where the mask is true
```
The reason this fails is because under the hood, the assigned value is aligned with the Series, turning it into a 4-len series, and then trying to assign this to an array with a boolean mask for 2 values.
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26468/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26468/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26469 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26469/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26469/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26469/events | https://github.com/pandas-dev/pandas/issues/26469 | 446,047,785 | MDU6SXNzdWU0NDYwNDc3ODU= | 26,469 | BUG: Series construction with EA dtype and index but no data fails | {
"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": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "6138b5",
"default": false,
"description": "Extending pandas with cu... | 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 | 2019-05-20T10:46:44Z | 2020-05-02T17:49:04Z | 2020-05-02T17:49:04Z | MEMBER | null | Using master (0.25.0dev):
```
In [8]: pd.Series(None, index=[1, 2, 3], dtype='Int64')
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
~/scipy/pandas/pandas/core/internals/construction.py in _try_cast(arr, take_fast_path, dtype, copy, raise_cast_failure)
691 if is_integer_dtype(dtype):
--> 692 subarr = maybe_cast_to_integer_array(arr, dtype)
693
~/scipy/pandas/pandas/core/dtypes/cast.py in maybe_cast_to_integer_array(arr, dtype, copy)
1311 if not hasattr(arr, "astype"):
-> 1312 casted = np.array(arr, dtype=dtype, copy=copy)
1313 else:
TypeError: data type not understood
During handling of the above exception, another exception occurred:
TypeError Traceback (most recent call last)
<ipython-input-8-9447295feee6> in <module>
----> 1 pd.Series(None, index=[1, 2, 3], dtype='Int64')
~/scipy/pandas/pandas/core/series.py in __init__(self, data, index, dtype, name, copy, fastpath)
202 data = data._data
203 elif isinstance(data, dict):
--> 204 data, index = self._init_dict(data, index, dtype)
205 dtype = None
206 copy = False
~/scipy/pandas/pandas/core/series.py in _init_dict(self, data, index, dtype)
295
296 # Input is now list-like, so rely on "standard" construction:
--> 297 s = Series(values, index=keys, dtype=dtype)
298
299 # Now we just make sure the order is respected, if any
~/scipy/pandas/pandas/core/series.py in __init__(self, data, index, dtype, name, copy, fastpath)
253 else:
254 data = sanitize_array(data, index, dtype, copy,
--> 255 raise_cast_failure=True)
256
257 data = SingleBlockManager(data, index, fastpath=True)
~/scipy/pandas/pandas/core/internals/construction.py in sanitize_array(data, index, dtype, copy, raise_cast_failure)
620 subarr = _try_cast(arr, False, dtype, copy, raise_cast_failure)
621 else:
--> 622 subarr = _try_cast(data, False, dtype, copy, raise_cast_failure)
623
624 # scalar like, GH
~/scipy/pandas/pandas/core/internals/construction.py in _try_cast(arr, take_fast_path, dtype, copy, raise_cast_failure)
711 # create an extension array from its dtype
712 array_type = dtype.construct_array_type()._from_sequence
--> 713 subarr = array_type(arr, dtype=dtype, copy=copy)
714 elif dtype is not None and raise_cast_failure:
715 raise
~/scipy/pandas/pandas/core/arrays/integer.py in _from_sequence(cls, scalars, dtype, copy)
305 @classmethod
306 def _from_sequence(cls, scalars, dtype=None, copy=False):
--> 307 return integer_array(scalars, dtype=dtype, copy=copy)
308
309 @classmethod
~/scipy/pandas/pandas/core/arrays/integer.py in integer_array(values, dtype, copy)
110 TypeError if incompatible types
111 """
--> 112 values, mask = coerce_to_array(values, dtype=dtype, copy=copy)
113 return IntegerArray(values, mask)
114
~/scipy/pandas/pandas/core/arrays/integer.py in coerce_to_array(values, dtype, mask, copy)
202
203 if not values.ndim == 1:
--> 204 raise TypeError("values must be a 1D list-like")
205 if not mask.ndim == 1:
206 raise TypeError("mask must be a 1D list-like")
TypeError: values must be a 1D list-like
```
while this works fine for non-EA dtypes.
The problem is that the None / np.nan is eventually passed to the `_from_sequence` method, which expects a list-like. I don't think we should let people fix their `_from_sequence`, but we should rather make sure we never pass that to it. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26469/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26469/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26470 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26470/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26470/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26470/events | https://github.com/pandas-dev/pandas/issues/26470 | 446,085,799 | MDU6SXNzdWU0NDYwODU3OTk= | 26,470 | Getting error while trying to read csv using pandas Python due to extra column values | {
"avatar_url": "https://avatars.githubusercontent.com/u/13446197?v=4",
"events_url": "https://api.github.com/users/JafferWilson/events{/privacy}",
"followers_url": "https://api.github.com/users/JafferWilson/followers",
"following_url": "https://api.github.com/users/JafferWilson/following{/other_user}",
"gists_url": "https://api.github.com/users/JafferWilson/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/JafferWilson",
"id": 13446197,
"login": "JafferWilson",
"node_id": "MDQ6VXNlcjEzNDQ2MTk3",
"organizations_url": "https://api.github.com/users/JafferWilson/orgs",
"received_events_url": "https://api.github.com/users/JafferWilson/received_events",
"repos_url": "https://api.github.com/users/JafferWilson/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/JafferWilson/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/JafferWilson/subscriptions",
"type": "User",
"url": "https://api.github.com/users/JafferWilson"
} | [] | closed | false | null | [] | null | 3 | 2019-05-20T12:18:24Z | 2019-05-20T13:20:20Z | 2019-05-20T13:02:09Z | NONE | null | Here is the scenario that I am trying to rid of:
I am trying to read the following type of csv:
```
para1,para2,para3,para4
1,2,3,4
1,2,3,4,5
1,2,3,4
2,3,4,5,6,7,8,9,0
```
I am using the following command and getting the following error:
```
>>> import pandas as pd
>>> df =pd.read_csv("test.csv")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python35\lib\site-packages\pandas\io\parsers.py", line 702, in parser_f
return _read(filepath_or_buffer, kwds)
File "C:\Python35\lib\site-packages\pandas\io\parsers.py", line 435, in _read
data = parser.read(nrows)
File "C:\Python35\lib\site-packages\pandas\io\parsers.py", line 1139, in read
ret = self._engine.read(nrows)
File "C:\Python35\lib\site-packages\pandas\io\parsers.py", line 1995, in read
data = self._reader.read(nrows)
File "pandas\_libs\parsers.pyx", line 899, in pandas._libs.parsers.TextReader.read
File "pandas\_libs\parsers.pyx", line 914, in pandas._libs.parsers.TextReader._read_low_memory
File "pandas\_libs\parsers.pyx", line 968, in pandas._libs.parsers.TextReader._read_rows
File "pandas\_libs\parsers.pyx", line 955, in pandas._libs.parsers.TextReader._tokenize_rows
File "pandas\_libs\parsers.pyx", line 2172, in pandas._libs.parsers.raise_parser_error
pandas.errors.ParserError: Error tokenizing data. C error: Expected 4 fields in line 3, saw 5
```
I tried to search for the issue and got this thread on SO:
Python Pandas Error tokenizing data
So, I tried. This is not what I was expecting. It is truncating the values.
```
>>> df =pd.read_csv("test.csv",error_bad_lines=False)
b'Skipping line 3: expected 4 fields, saw 5\nSkipping line 5: expected 4 fields, saw 9\n'
>>> df
para1 para2 para3 para4
0 1 2 3 4
1 1 2 3 4
```
What I wanted is something like this:
if there are extra values, then take the columns as the integer values with the highest column found in extra. then make the rest of the values as zero(0) till the last column and read the csv.
The output I am expecting is something like this:
```
>>> df =pd.read_csv("test.csv")
>>> df
para1 para2 para3 para4 0 1 2 3 4
0 1 2 3 4 NaN NaN NaN NaN NaN
1 1 2 3 4 5.0 NaN NaN NaN NaN
2 1 2 3 4 NaN NaN NaN NaN NaN
3 2 3 4 5 6.0 7.0 8.0 9.0 0.0
>>> df = df.fillna(0)
>>> df
para1 para2 para3 para4 0 1 2 3 4
0 1 2 3 4 0.0 0.0 0.0 0.0 0.0
1 1 2 3 4 5.0 0.0 0.0 0.0 0.0
2 1 2 3 4 0.0 0.0 0.0 0.0 0.0
3 2 3 4 5 6.0 7.0 8.0 9.0 0.0
```
But please take a note of, I do not want to take care of the column. Instead the program must automatically understand and make the column headers as given above.
Second, please try to avoid suggesting me to write the header. As there can be number of columns where I might not able to write the header but just leave it as it is. so the missing column header will be the number integer as stated above. Do someone have any solution for the query, please let me know?
<details>
>>> pd.show_versions()
INSTALLED VERSIONS
------------------
commit: None
python: 3.5.0.final.0
python-bits: 64
OS: Windows
OS-release:
machine: AMD64
processor: Intel64 Family 6 Model 61 Stepping 4, GenuineIntel
byteorder: little
LC_ALL: None
LANG: None
LOCALE: None.None
pandas: 0.24.2
pytest: None
pip: 19.1.1
setuptools: 39.1.0
Cython: 0.28.2
numpy: 1.14.0
scipy: 1.0.1
pyarrow: None
xarray: None
IPython: 6.4.0
sphinx: None
patsy: 0.5.0
dateutil: 2.7.2
pytz: 2018.4
blosc: None
bottleneck: 1.2.1
tables: 3.4.4
numexpr: 2.6.6
feather: None
matplotlib: 2.2.2
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml.etree: 4.2.1
bs4: 4.7.1
html5lib: 0.9999999
sqlalchemy: 1.2.10
pymysql: None
psycopg2: 2.7.5 (dt dec pq3 ext lo64)
jinja2: 2.10
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/26470/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26470/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26471 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26471/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26471/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26471/events | https://github.com/pandas-dev/pandas/pull/26471 | 446,140,692 | MDExOlB1bGxSZXF1ZXN0MjgwNDA5ODM5 | 26,471 | Fix bug where list like object not returning empty Index. | {
"avatar_url": "https://avatars.githubusercontent.com/u/5400810?v=4",
"events_url": "https://api.github.com/users/sumanau7/events{/privacy}",
"followers_url": "https://api.github.com/users/sumanau7/followers",
"following_url": "https://api.github.com/users/sumanau7/following{/other_user}",
"gists_url": "https://api.github.com/users/sumanau7/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sumanau7",
"id": 5400810,
"login": "sumanau7",
"node_id": "MDQ6VXNlcjU0MDA4MTA=",
"organizations_url": "https://api.github.com/users/sumanau7/orgs",
"received_events_url": "https://api.github.com/users/sumanau7/received_events",
"repos_url": "https://api.github.com/users/sumanau7/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sumanau7/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sumanau7/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sumanau7"
} | [
{
"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": "e1... | closed | false | null | [] | {
"closed_at": "2019-08-22T19:23:14Z",
"closed_issues": 145,
"created_at": "2019-06-30T19:32:22Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/1020496?v=4",
"events_url": "https://api.github.com/users/jorisvandenbossche/events{/privacy}",
"followers_url": "https://api.github.com/users/jorisvandenbossche/followers",
"following_url": "https://api.github.com/users/jorisvandenbossche/following{/other_user}",
"gists_url": "https://api.github.com/users/jorisvandenbossche/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jorisvandenbossche",
"id": 1020496,
"login": "jorisvandenbossche",
"node_id": "MDQ6VXNlcjEwMjA0OTY=",
"organizations_url": "https://api.github.com/users/jorisvandenbossche/orgs",
"received_events_url": "https://api.github.com/users/jorisvandenbossche/received_events",
"repos_url": "https://api.github.com/users/jorisvandenbossche/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jorisvandenbossche/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jorisvandenbossche/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jorisvandenbossche"
},
"description": "on-merge: backport to 0.25.x",
"due_on": "2019-08-21T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/65",
"id": 4452219,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/65/labels",
"node_id": "MDk6TWlsZXN0b25lNDQ1MjIxOQ==",
"number": 65,
"open_issues": 0,
"state": "closed",
"title": "0.25.1",
"updated_at": "2019-08-22T19:52:56Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/65"
} | 14 | 2019-05-20T14:12:39Z | 2019-08-22T11:41:02Z | 2019-08-22T11:40:59Z | CONTRIBUTOR | null | - [x] closes #17101
- [x] tests added / passed
- [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/26471/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26471/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26471.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26471",
"merged_at": "2019-08-22T11:40:59Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26471.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26471"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26472 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26472/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26472/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26472/events | https://github.com/pandas-dev/pandas/issues/26472 | 446,146,477 | MDU6SXNzdWU0NDYxNDY0Nzc= | 26,472 | Non-expected NaN numbers behavior for .dropna function in 0.24.2 | {
"avatar_url": "https://avatars.githubusercontent.com/u/1892703?v=4",
"events_url": "https://api.github.com/users/Uiuran/events{/privacy}",
"followers_url": "https://api.github.com/users/Uiuran/followers",
"following_url": "https://api.github.com/users/Uiuran/following{/other_user}",
"gists_url": "https://api.github.com/users/Uiuran/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Uiuran",
"id": 1892703,
"login": "Uiuran",
"node_id": "MDQ6VXNlcjE4OTI3MDM=",
"organizations_url": "https://api.github.com/users/Uiuran/orgs",
"received_events_url": "https://api.github.com/users/Uiuran/received_events",
"repos_url": "https://api.github.com/users/Uiuran/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Uiuran/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Uiuran/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Uiuran"
} | [
{
"color": "207de5",
"default": false,
"description": "Clarification about behavior needed to assess issue",
"id": 307649777,
"name": "Needs Info",
"node_id": "MDU6TGFiZWwzMDc2NDk3Nzc=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Needs%20Info"
}
] | closed | false | null | [] | null | 4 | 2019-05-20T14:23:44Z | 2019-05-28T13:41:38Z | 2019-05-28T13:41:38Z | NONE | null | Unfurtunately i cant provide the data iam using (since it's enterprise privative), but it has a lot of NaN values.
I do:
df = df.dropna(axis=0,thresh=1)
Returns a DataFrame with nan values, i can confirm this looping through the DataFrame and applying np.isnan.
Then i do:
df = df.fillna(0)
The new DataFrame has no more NaN. Why is this that dropna cant see all NaNs and fillna can ?
Thankyou in advance.
```
#### Problem description
[this should explain **why** the current behaviour is a problem and why the expected output is a better solution.]
**Note**: We receive a lot of issues on our GitHub tracker, so it is very possible that your issue has been posted before. Please check first before submitting so that we do not have to handle and close duplicates!
**Note**: Many problems can be resolved by simply upgrading `pandas` to the latest version. Before submitting, please check if that solution works for you. If possible, you may want to check if `master` addresses this issue, but that is not necessary.
For documentation-related issues, you can check the latest versions of the docs on `master` here:
https://pandas-docs.github.io/pandas-docs-travis/
If the issue has not been resolved there, go ahead and file it in the issue tracker.
#### Expected Output
#### Output of ``pd.show_versions()``
<details>
[paste the output of ``pd.show_versions()`` here below this line]
</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/26472/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26472/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26473 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26473/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26473/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26473/events | https://github.com/pandas-dev/pandas/pull/26473 | 446,249,028 | MDExOlB1bGxSZXF1ZXN0MjgwNDk0NTg1 | 26,473 | Excel Test Cleanup - ReadWriteClass | {
"avatar_url": "https://avatars.githubusercontent.com/u/609873?v=4",
"events_url": "https://api.github.com/users/WillAyd/events{/privacy}",
"followers_url": "https://api.github.com/users/WillAyd/followers",
"following_url": "https://api.github.com/users/WillAyd/following{/other_user}",
"gists_url": "https://api.github.com/users/WillAyd/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/WillAyd",
"id": 609873,
"login": "WillAyd",
"node_id": "MDQ6VXNlcjYwOTg3Mw==",
"organizations_url": "https://api.github.com/users/WillAyd/orgs",
"received_events_url": "https://api.github.com/users/WillAyd/received_events",
"repos_url": "https://api.github.com/users/WillAyd/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/WillAyd/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/WillAyd/subscriptions",
"type": "User",
"url": "https://api.github.com/users/WillAyd"
} | [
{
"color": "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": "bfe5bf",
"d... | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"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": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 3 | 2019-05-20T18:21:47Z | 2020-01-16T00:34:48Z | 2019-05-24T16:01:09Z | MEMBER | null | The tests we have in this module need a pretty big refactor as they mix a few testing idioms together. This is slowing down contributions on items like #25092 and #25427
This is going to require quite a few PRs to get it where it needs to be. This one simply:
- Moves tests that require both reading and writing into a dedicated class
- Moves skip fixtures off of the SharedItems class onto the classes that actually use them
I'd eventually like to get rid of the SharedItems class and use parametrization on Reader/Writer classes to test the various combinations of engines and extensions, though again going to take a few PRs to get there | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26473/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26473/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26473.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26473",
"merged_at": "2019-05-24T16:01:09Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26473.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26473"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26474 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26474/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26474/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26474/events | https://github.com/pandas-dev/pandas/pull/26474 | 446,259,424 | MDExOlB1bGxSZXF1ZXN0MjgwNTAyODM5 | 26,474 | Fix the output of df.describe on an empty categorical / object column | {
"avatar_url": "https://avatars.githubusercontent.com/u/20344154?v=4",
"events_url": "https://api.github.com/users/enisnazif/events{/privacy}",
"followers_url": "https://api.github.com/users/enisnazif/followers",
"following_url": "https://api.github.com/users/enisnazif/following{/other_user}",
"gists_url": "https://api.github.com/users/enisnazif/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/enisnazif",
"id": 20344154,
"login": "enisnazif",
"node_id": "MDQ6VXNlcjIwMzQ0MTU0",
"organizations_url": "https://api.github.com/users/enisnazif/orgs",
"received_events_url": "https://api.github.com/users/enisnazif/received_events",
"repos_url": "https://api.github.com/users/enisnazif/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/enisnazif/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/enisnazif/subscriptions",
"type": "User",
"url": "https://api.github.com/users/enisnazif"
} | [
{
"color": "006b75",
"default": false,
"description": "Arithmetic, Comparison, and Logical operations",
"id": 47223669,
"name": "Numeric Operations",
"node_id": "MDU6TGFiZWw0NzIyMzY2OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Numeric%20Operations"
}
] | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"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": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 12 | 2019-05-20T18:50:35Z | 2019-06-01T14:52:41Z | 2019-06-01T14:52:36Z | CONTRIBUTOR | null | - [x] closes #26397
- [x] tests added / passed
- [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/26474/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26474/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26474.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26474",
"merged_at": "2019-06-01T14:52:36Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26474.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26474"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26475 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26475/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26475/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26475/events | https://github.com/pandas-dev/pandas/issues/26475 | 446,299,977 | MDU6SXNzdWU0NDYyOTk5Nzc= | 26,475 | df.groupby on a column with complex numbers is broken | {
"avatar_url": "https://avatars.githubusercontent.com/u/6897215?v=4",
"events_url": "https://api.github.com/users/basnijholt/events{/privacy}",
"followers_url": "https://api.github.com/users/basnijholt/followers",
"following_url": "https://api.github.com/users/basnijholt/following{/other_user}",
"gists_url": "https://api.github.com/users/basnijholt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/basnijholt",
"id": 6897215,
"login": "basnijholt",
"node_id": "MDQ6VXNlcjY4OTcyMTU=",
"organizations_url": "https://api.github.com/users/basnijholt/orgs",
"received_events_url": "https://api.github.com/users/basnijholt/received_events",
"repos_url": "https://api.github.com/users/basnijholt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/basnijholt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/basnijholt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/basnijholt"
} | [
{
"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,
... | open | false | null | [] | {
"closed_at": null,
"closed_issues": 786,
"created_at": "2015-01-13T10:53:19Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "Changes that would be nice to have in the next release. These issues are not blocking. They will be pushed to the next release if no one has time to fix them.",
"due_on": null,
"html_url": "https://github.com/pandas-dev/pandas/milestone/32",
"id": 933188,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/32/labels",
"node_id": "MDk6TWlsZXN0b25lOTMzMTg4",
"number": 32,
"open_issues": 1053,
"state": "open",
"title": "Contributions Welcome",
"updated_at": "2021-11-21T00:50:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/32"
} | 1 | 2019-05-20T20:38:53Z | 2019-05-20T21:37:13Z | null | CONTRIBUTOR | null | Currently, grouping by a key that has complex numbers is broken, see the following example
```python
import pandas as pd
df = pd.DataFrame([dict(a=1, b=1 + 1j), dict(a=1, b=1 + 2j)])
df.groupby("b").groups
```
output:
```
{1.0: Int64Index([0, 1], dtype='int64')}
```
expected:
```
{0: Int64Index([0], dtype='int64'), 1: Int64Index([1], dtype='int64')}
```
Related https://github.com/pandas-dev/pandas/issues/10921 | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26475/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26475/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26476 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26476/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26476/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26476/events | https://github.com/pandas-dev/pandas/issues/26476 | 446,300,873 | MDU6SXNzdWU0NDYzMDA4NzM= | 26,476 | Standard Error of the Mean Unavailable in RollingGroupby | {
"avatar_url": "https://avatars.githubusercontent.com/u/12834389?v=4",
"events_url": "https://api.github.com/users/blalterman/events{/privacy}",
"followers_url": "https://api.github.com/users/blalterman/followers",
"following_url": "https://api.github.com/users/blalterman/following{/other_user}",
"gists_url": "https://api.github.com/users/blalterman/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/blalterman",
"id": 12834389,
"login": "blalterman",
"node_id": "MDQ6VXNlcjEyODM0Mzg5",
"organizations_url": "https://api.github.com/users/blalterman/orgs",
"received_events_url": "https://api.github.com/users/blalterman/received_events",
"repos_url": "https://api.github.com/users/blalterman/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/blalterman/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/blalterman/subscriptions",
"type": "User",
"url": "https://api.github.com/users/blalterman"
} | [
{
"color": "4E9A06",
"default": false,
"description": null,
"id": 76812,
"name": "Enhancement",
"node_id": "MDU6TGFiZWw3NjgxMg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Enhancement"
},
{
"color": "d4c5f9",
"default": false,
"description": "rolling,... | 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"
} | 0 | 2019-05-20T20:41:04Z | 2020-10-12T15:30:03Z | 2020-10-12T15:30:03Z | NONE | null | #### Code Sample, a copy-pastable example if possible
Standard Error of the Mean works on `Groupby` objects, but not `RollingGroupby` objects.
`Groupby` object
```python
data = pd.DataFrame({"a": np.linspace(0, 100, 101),
"b": np.random.random(101).round(1) # values we can group on
})
# print values to 2 decimal places. Just showing it works.
data.groupby("b").sem().T.round(2)
```
#### Problem description
`RollingGroupby` object raises `AttributeError`
```python
data = pd.DataFrame({"a": np.linspace(0, 100, 101),
"b": np.random.random(101).round(1) # values we can group on
})
# print values to 2 decimal places. Just showing it works.
data.rolling(5).sem()
```
I believe API of `Groupby` and `RollingGroupby` are supposed to be as similar as possible. Than an optomized aggregation is available in one, but not the other is a problem.
#### Expected Output
The output should be the equivalent of
```python
>>> data.rolling(5).std() / (data.rolling(5).count() - ddof).pow(0.5)
```
where ``ddof`` is degrees of freedom.
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit: None
python: 3.7.3.final.0
python-bits: 64
OS: Linux
OS-release: 3.10.0-693.11.6.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: 0.24.2
pytest: 4.4.1
pip: 19.0.3
setuptools: 41.0.0
Cython: None
numpy: 1.16.3
scipy: 1.2.1
pyarrow: None
xarray: None
IPython: 7.4.0
sphinx: 2.0.1
patsy: None
dateutil: 2.8.0
pytz: 2019.1
blosc: None
bottleneck: 1.2.1
tables: 3.5.1
numexpr: 2.6.9
feather: None
matplotlib: 3.0.3
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml.etree: None
bs4: None
html5lib: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.10.1
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/26476/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26476/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26477 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26477/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26477/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26477/events | https://github.com/pandas-dev/pandas/pull/26477 | 446,369,000 | MDExOlB1bGxSZXF1ZXN0MjgwNTg3MjY2 | 26,477 | CLN: pd.TimeGrouper | {
"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": "AFEEEE",
"default": false,
"description": null,
"id": 211840,
"name": "Timeseries",
"node_id": "MDU6TGFiZWwyMTE4NDA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Timeseries"
},
{
"color": "207de5",
"default": false,
"description": null,
... | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"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": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 3 | 2019-05-21T00:50:21Z | 2019-06-04T21:18:49Z | 2019-05-24T22:07:54Z | MEMBER | null | - [x] xref #6581
- [x] tests added / passed
- [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/26477/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26477/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26477.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26477",
"merged_at": "2019-05-24T22:07:54Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26477.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26477"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26478 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26478/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26478/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26478/events | https://github.com/pandas-dev/pandas/issues/26478 | 446,431,773 | MDU6SXNzdWU0NDY0MzE3NzM= | 26,478 | mergebug | {
"avatar_url": "https://avatars.githubusercontent.com/u/35362083?v=4",
"events_url": "https://api.github.com/users/skysunsun/events{/privacy}",
"followers_url": "https://api.github.com/users/skysunsun/followers",
"following_url": "https://api.github.com/users/skysunsun/following{/other_user}",
"gists_url": "https://api.github.com/users/skysunsun/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/skysunsun",
"id": 35362083,
"login": "skysunsun",
"node_id": "MDQ6VXNlcjM1MzYyMDgz",
"organizations_url": "https://api.github.com/users/skysunsun/orgs",
"received_events_url": "https://api.github.com/users/skysunsun/received_events",
"repos_url": "https://api.github.com/users/skysunsun/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/skysunsun/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/skysunsun/subscriptions",
"type": "User",
"url": "https://api.github.com/users/skysunsun"
} | [
{
"color": "0052cc",
"default": false,
"description": null,
"id": 34444536,
"name": "Usage Question",
"node_id": "MDU6TGFiZWwzNDQ0NDUzNg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Usage%20Question"
}
] | closed | false | null | [] | null | 2 | 2019-05-21T06:05:29Z | 2019-05-21T10:47:57Z | 2019-05-21T06:07:42Z | NONE | null | #### My code
```python
def mer_new():
data1 = read_file.reduce_mem_usage(pd.read_csv('E:\\skysun\\JDA\\jdata\\jdata_action.csv', sep=',', nrows=6000000,
dtype={'acoustic_data': np.int16, 'time_to_failure': np.float64}))
data1 = data1[['user_id', 'sku_id', 'action_time', 'type']]
print('行为数据:%d' % len(data1))
print('\n')
data2 = read_file.reduce_mem_usage(pd.read_csv('E:\\skysun\\JDA\\jdata\\jdata_comment.csv', sep=',', nrows=6000000,
dtype={'acoustic_data': np.int16, 'time_to_failure': np.float64}))
data2 = data2[['sku_id', 'good_comments', 'bad_comments']]
print('评论数据:%d' % len(data2))
print('\n')
data = pd.merge(data1, data2, how='left', on='sku_id')
print('合并数据:%d'%len(data))
# data =pd.concat([data1,data2],axis=1,join='outer')
data = data.drop_duplicates()
data.to_csv('data/action_comment.csv', mode='w', index=False)
mer_new()
```
#### Problem description
when I merge two table,I set the 'how='left'', so the length of original data should be equal the length of merge data.(the second table's length is 1774233)
But it return
len(data1):6000000
len(data):284428008
It does not equal!!!! Why???
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26478/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26478/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26479 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26479/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26479/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26479/events | https://github.com/pandas-dev/pandas/issues/26479 | 446,550,265 | MDU6SXNzdWU0NDY1NTAyNjU= | 26,479 | BUG: .shift() on IntervalArray column raises ValueError | {
"avatar_url": "https://avatars.githubusercontent.com/u/10058240?v=4",
"events_url": "https://api.github.com/users/datapythonista/events{/privacy}",
"followers_url": "https://api.github.com/users/datapythonista/followers",
"following_url": "https://api.github.com/users/datapythonista/following{/other_user}",
"gists_url": "https://api.github.com/users/datapythonista/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/datapythonista",
"id": 10058240,
"login": "datapythonista",
"node_id": "MDQ6VXNlcjEwMDU4MjQw",
"organizations_url": "https://api.github.com/users/datapythonista/orgs",
"received_events_url": "https://api.github.com/users/datapythonista/received_events",
"repos_url": "https://api.github.com/users/datapythonista/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/datapythonista/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/datapythonista/subscriptions",
"type": "User",
"url": "https://api.github.com/users/datapythonista"
} | [
{
"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 ... | closed | false | null | [] | null | 1 | 2019-05-21T10:51:00Z | 2019-05-21T14:59:17Z | 2019-05-21T14:59:05Z | MEMBER | null | #### Code Sample, a copy-pastable example if possible
```python
>>> import pandas
>>> interval_array = pandas.arrays.IntervalArray.from_arrays([1, 2, 3], [4, 5, 6])
>>> interval_array
IntervalArray([(1, 4], (2, 5], (3, 6]],
closed='right',
dtype='interval[int64]')
>>> interval_series = pandas.Series(interval_array)
>>> interval_series
0 (1, 4]
1 (2, 5]
2 (3, 6]
dtype: interval
>>> interval_series.shift(1)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\msys64\home\UKC3153\src\pandas\pandas\core\series.py", line 3960, in shift
fill_value=fill_value)
File "C:\msys64\home\UKC3153\src\pandas\pandas\core\generic.py", line 9091, in shift
fill_value=fill_value)
File "C:\msys64\home\UKC3153\src\pandas\pandas\core\internals\managers.py", line 522, in shift
return self.apply('shift', **kwargs)
File "C:\msys64\home\UKC3153\src\pandas\pandas\core\internals\managers.py", line 395, in apply
applied = getattr(b, f)(**kwargs)
File "C:\msys64\home\UKC3153\src\pandas\pandas\core\internals\blocks.py", line 1828, in shift
self.values.shift(periods=periods, fill_value=fill_value),
File "C:\msys64\home\UKC3153\src\pandas\pandas\core\arrays\base.py", line 527, in shift
dtype=self.dtype
File "C:\msys64\home\UKC3153\src\pandas\pandas\core\arrays\interval.py", line 214, in _from_sequence
return cls(scalars, dtype=dtype, copy=copy)
File "C:\msys64\home\UKC3153\src\pandas\pandas\core\arrays\interval.py", line 159, in __new__
verify_integrity=verify_integrity)
File "C:\msys64\home\UKC3153\src\pandas\pandas\core\arrays\interval.py", line 177, in _simple_new
left = left.astype(dtype.subtype)
File "C:\msys64\home\UKC3153\src\pandas\pandas\core\indexes\numeric.py", line 331, in astype
raise ValueError('Cannot convert NA to integer')
ValueError: Cannot convert NA to integer
```
#### Problem description
Applying a `.shift()` on a `Series` backed by the `IntervalArray` extension array raises an exception
#### Expected Output
```
0 NaN
1 (1, 4]
2 (2, 5]
dtype: interval
```
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
python: 3.7.3.final.0
python-bits: 64
OS: Windows
OS-release: 10
machine: AMD64
processor: Intel64 Family 6 Model 142 Stepping 9, GenuineIntel
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: None.None
pandas: 0.25.0.dev0+592.gb563d452f
pytest: 4.5.0
pip: 19.1.1
setuptools: 41.0.1
Cython: 0.29.7
numpy: 1.16.3
scipy: 1.2.1
pyarrow: 0.11.1
xarray: 0.12.1
IPython: 7.5.0
sphinx: 2.0.1
patsy: 0.5.1
dateutil: 2.8.0
pytz: 2019.1
blosc: None
bottleneck: 1.2.1
tables: 3.5.1
numexpr: 2.6.9
feather: None
matplotlib: 3.0.3
openpyxl: 2.6.2
xlrd: 1.2.0
xlwt: 1.3.0
xlsxwriter: 1.1.8
lxml.etree: 4.3.3
bs4: 4.7.1
html5lib: 1.0.1
sqlalchemy: 1.3.3
pymysql: None
psycopg2: None
jinja2: 2.10.1
s3fs: None
fastparquet: 0.3.0
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/26479/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26479/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26480 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26480/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26480/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26480/events | https://github.com/pandas-dev/pandas/issues/26480 | 446,709,991 | MDU6SXNzdWU0NDY3MDk5OTE= | 26,480 | pd.DataFrame.dot does not work when column index is set | {
"avatar_url": "https://avatars.githubusercontent.com/u/38796540?v=4",
"events_url": "https://api.github.com/users/JuliBerz/events{/privacy}",
"followers_url": "https://api.github.com/users/JuliBerz/followers",
"following_url": "https://api.github.com/users/JuliBerz/following{/other_user}",
"gists_url": "https://api.github.com/users/JuliBerz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/JuliBerz",
"id": 38796540,
"login": "JuliBerz",
"node_id": "MDQ6VXNlcjM4Nzk2NTQw",
"organizations_url": "https://api.github.com/users/JuliBerz/orgs",
"received_events_url": "https://api.github.com/users/JuliBerz/received_events",
"repos_url": "https://api.github.com/users/JuliBerz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/JuliBerz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/JuliBerz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/JuliBerz"
} | [
{
"color": "3465A4",
"default": false,
"description": null,
"id": 134699,
"name": "Docs",
"node_id": "MDU6TGFiZWwxMzQ2OTk=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Docs"
},
{
"color": "0e8a16",
"default": true,
"description": null,
"id": 7171206... | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 786,
"created_at": "2015-01-13T10:53:19Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "Changes that would be nice to have in the next release. These issues are not blocking. They will be pushed to the next release if no one has time to fix them.",
"due_on": null,
"html_url": "https://github.com/pandas-dev/pandas/milestone/32",
"id": 933188,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/32/labels",
"node_id": "MDk6TWlsZXN0b25lOTMzMTg4",
"number": 32,
"open_issues": 1053,
"state": "open",
"title": "Contributions Welcome",
"updated_at": "2021-11-21T00:50:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/32"
} | 3 | 2019-05-21T16:18:48Z | 2019-05-23T16:46:20Z | 2019-05-23T16:46:20Z | NONE | null | From the [documentation](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.dot.html) we see that the following code is just fine:
```python
df = pd.DataFrame([[0, 1, -2, -1], [1, 1, 1, 1]])
s = pd.Series([1, 1, 2, 1])
df.dot(s)
```
and will return
```python
pd.Series([-4,5])
```
Inconsistently, the same code fails, when one adds column labels to the first dataframe like such
```python
df = pd.DataFrame([[0, 1, -2, -1], [1, 1, 1, 1]], columns=['1','2', '3', '4'])
```
#### Expected Output
As seen above
```python
pd.Series([-4,5])
```
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit: None
python: 3.6.8.final.0
python-bits: 64
OS: Windows
OS-release: 10
machine: AMD64
processor: Intel64 Family 6 Model 78 Stepping 3, GenuineIntel
byteorder: little
LC_ALL: None
LANG: de_DE.UTF-8
LOCALE: None.None
pandas: 0.23.4
pytest: 4.1.1
pip: 18.1
setuptools: 40.6.3
Cython: 0.29.2
numpy: 1.15.4
scipy: 1.1.0
pyarrow: None
xarray: None
IPython: 7.2.0
sphinx: 1.8.2
patsy: 0.5.1
dateutil: 2.7.5
pytz: 2018.9
blosc: None
bottleneck: 1.2.1
tables: 3.4.4
numexpr: 2.6.9
feather: None
matplotlib: 3.0.2
openpyxl: 2.5.12
xlrd: 1.2.0
xlwt: 1.3.0
xlsxwriter: 1.1.2
lxml: 4.3.0
bs4: 4.7.1
html5lib: 1.0.1
sqlalchemy: 1.2.16
pymysql: None
psycopg2: 2.7.6.1 (dt dec pq3 ext lo64)
jinja2: 2.10
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: 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/26480/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26480/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26481 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26481/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26481/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26481/events | https://github.com/pandas-dev/pandas/issues/26481 | 446,756,456 | MDU6SXNzdWU0NDY3NTY0NTY= | 26,481 | iterating pandas dataframe difference between python 3.5.6 and 3.7.3 | {
"avatar_url": "https://avatars.githubusercontent.com/u/10064493?v=4",
"events_url": "https://api.github.com/users/kfrendrich/events{/privacy}",
"followers_url": "https://api.github.com/users/kfrendrich/followers",
"following_url": "https://api.github.com/users/kfrendrich/following{/other_user}",
"gists_url": "https://api.github.com/users/kfrendrich/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kfrendrich",
"id": 10064493,
"login": "kfrendrich",
"node_id": "MDQ6VXNlcjEwMDY0NDkz",
"organizations_url": "https://api.github.com/users/kfrendrich/orgs",
"received_events_url": "https://api.github.com/users/kfrendrich/received_events",
"repos_url": "https://api.github.com/users/kfrendrich/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kfrendrich/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kfrendrich/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kfrendrich"
} | [
{
"color": "0052cc",
"default": false,
"description": null,
"id": 34444536,
"name": "Usage Question",
"node_id": "MDU6TGFiZWwzNDQ0NDUzNg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Usage%20Question"
}
] | closed | false | null | [] | null | 2 | 2019-05-21T18:14:02Z | 2019-05-21T18:59:02Z | 2019-05-21T18:59:02Z | NONE | null | Hi.
I realized a difference when I am iterating the dataframe in python 3.5.6 and 3.7.3 and I can't decide if it is good or bad.
```python
import pandas as pd
class Something(object):
def __init__(self, data):
self.data = data
data = {
'col1': [1, 2, 4],
'col2': [3, 4, None],
'col3': ['-', None, 2.4],
'Time': [0, 0.1, 0.5],
}
df = pd.DataFrame(data=data, index=['a', 'b', 'c'])
something = Something(df)
ret = []
for i in something.data:
ret.append(i)
print(ret)
```
#### Problem description
**3.5.6**: always return with: [**'Time', 'col1', 'col2', 'col3']** (it looks the pandas **sorts** the keys?)
**3.7.3**: always return with: **['col1', 'col2', 'col3', 'Time']** (it looks the pandas **preserves** the original order? (in python3.6+ it is the default behavior with dicts)
So... my problem is that with Python **3.5.6** when I iterated the dataframe I always got the keys in the same **sorted** order, but with Python 3.7.3 I got the keys **in the order of the dict definition.**
Could you please help me if it is an issue or not?
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26481/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26481/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26482 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26482/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26482/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26482/events | https://github.com/pandas-dev/pandas/pull/26482 | 446,778,991 | MDExOlB1bGxSZXF1ZXN0MjgwOTExNjM0 | 26,482 | CLN: Remove StringMixin from pandas.core.computation | {
"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"
} | [] | closed | false | null | [] | null | 2 | 2019-05-21T19:10:18Z | 2019-10-15T20:11:01Z | 2019-05-21T19:58:28Z | CONTRIBUTOR | null | - [x] xref #25725
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
StringMixin is not really useful anymore and only functions to reverse the calling order of ``__str__`` and ``__repr__``, which is now not-standard in Python3.
This removes the usage of StringMixin in pandas.core.computation. Followups will remove the class from other modules.
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26482/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26482/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26482.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26482",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/26482.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26482"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26483 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26483/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26483/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26483/events | https://github.com/pandas-dev/pandas/pull/26483 | 446,781,365 | MDExOlB1bGxSZXF1ZXN0MjgwOTEzNDc3 | 26,483 | Better error message for DataFrame.hist() without numerical columns (… | {
"avatar_url": "https://avatars.githubusercontent.com/u/32721837?v=4",
"events_url": "https://api.github.com/users/matsmaiwald/events{/privacy}",
"followers_url": "https://api.github.com/users/matsmaiwald/followers",
"following_url": "https://api.github.com/users/matsmaiwald/following{/other_user}",
"gists_url": "https://api.github.com/users/matsmaiwald/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/matsmaiwald",
"id": 32721837,
"login": "matsmaiwald",
"node_id": "MDQ6VXNlcjMyNzIxODM3",
"organizations_url": "https://api.github.com/users/matsmaiwald/orgs",
"received_events_url": "https://api.github.com/users/matsmaiwald/received_events",
"repos_url": "https://api.github.com/users/matsmaiwald/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/matsmaiwald/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/matsmaiwald/subscriptions",
"type": "User",
"url": "https://api.github.com/users/matsmaiwald"
} | [
{
"color": "8AE234",
"default": false,
"description": null,
"id": 2413328,
"name": "Visualization",
"node_id": "MDU6TGFiZWwyNDEzMzI4",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Visualization"
},
{
"color": "e102d8",
"default": false,
"description": "Un... | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"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": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 8 | 2019-05-21T19:16:14Z | 2019-05-25T12:57:38Z | 2019-05-24T15:47:02Z | CONTRIBUTOR | null | Closes #10444
Added simple check for non-zero number of numeric columns plus suggested error message in case the check fails.
Happy to make any adjustments this if desired.
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26483/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26483/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26483.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26483",
"merged_at": "2019-05-24T15:47:02Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26483.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26483"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26484 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26484/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26484/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26484/events | https://github.com/pandas-dev/pandas/pull/26484 | 446,814,410 | MDExOlB1bGxSZXF1ZXN0MjgwOTQwMzE4 | 26,484 | DOC/CLN: wil -> will | {
"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"
},
{
"color": "207de5",
"default": false,
"description": null,
"id": 211029... | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"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": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 3 | 2019-05-21T20:38:52Z | 2019-05-22T14:09:46Z | 2019-05-21T22:33:42Z | 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/26484/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26484/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26484.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26484",
"merged_at": "2019-05-21T22:33:42Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26484.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26484"
} | |
https://api.github.com/repos/pandas-dev/pandas/issues/26485 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26485/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26485/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26485/events | https://github.com/pandas-dev/pandas/issues/26485 | 446,968,967 | MDU6SXNzdWU0NDY5Njg5Njc= | 26,485 | A memory leak when using bottleneck nanmax | {
"avatar_url": "https://avatars.githubusercontent.com/u/4227238?v=4",
"events_url": "https://api.github.com/users/aviolov/events{/privacy}",
"followers_url": "https://api.github.com/users/aviolov/followers",
"following_url": "https://api.github.com/users/aviolov/following{/other_user}",
"gists_url": "https://api.github.com/users/aviolov/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/aviolov",
"id": 4227238,
"login": "aviolov",
"node_id": "MDQ6VXNlcjQyMjcyMzg=",
"organizations_url": "https://api.github.com/users/aviolov/orgs",
"received_events_url": "https://api.github.com/users/aviolov/received_events",
"repos_url": "https://api.github.com/users/aviolov/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/aviolov/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/aviolov/subscriptions",
"type": "User",
"url": "https://api.github.com/users/aviolov"
} | [
{
"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": "d93f0b",
"default"... | 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"
} | 4 | 2019-05-22T07:11:56Z | 2020-07-10T02:23:40Z | 2020-07-10T02:23:40Z | CONTRIBUTOR | null | #### Code Sample, a copy-pastable example if possible
```python
import numpy as np
import pandas as pd
from bottleneck import nanmax
#from numpy import nanmax ~ using numpy.nanmax will not create a memory leak
import gc
import tracemalloc
def pDbN_dosomething(df, rip_values = False):
#ms = []
for col in df.columns:
if rip_values:
'If explicitly ripping the values of the column memory will NOT leak'
m = abs(nanmax(df.loc[:, col].values))
else:
'If refering to the Series memory will leak'
m = abs(nanmax(df.loc[:, col]))
'random calculation to modify `df` - NOT required to trigger the memory leak'
#df.loc[:, col] = df.loc[:, col] / df.iloc[:, 0]
'persist `m` outside loop - NOT required to trigger the memory leak'
#ms.append(m)
return df
def printTraceStats():
snapshot = tracemalloc.take_snapshot()
top_stats = snapshot.statistics('lineno')
print("[ Top 3 ]")
for stat in top_stats[:3]:
print(stat)
if __name__ == '__main__':
tracemalloc.start()
D = pd.DataFrame(np.random.rand(1000000, 12))
for _ in range(8):
df = D.copy()
df = pDbN_dosomething(df, rip_values=True)
del df
gc.collect()
printTraceStats()
"""
[ Top 3 ]
bug_PandasBottleneck_MemoryLeak.py:35: size=91.6 MiB, count=5, average=18.3 MiB
# this is initial allocation of the mother dataframe
C:\tools\Anaconda3\envs\quant_env_r20190129_9d8c4b42\lib\_weakrefset.py:37: size=4224 B, count=32, average=132 B
# not important
...
"""
for _ in range(8):
df = D.copy()
df = pDbN_dosomething(df, rip_values=False)
del df
gc.collect()
printTraceStats()
r'''[ Top 3 ]
C:\tools\Anaconda3\envs\quant_env_r20190129_9d8c4b42\lib\site-packages\pandas\core\internals.py:736: size=732 MiB, count=24, average=30.5 MiB
# The df has now been duplicated 8 times 732 = 91*8
C:\Users\alexandre.iolov\Documents\PySpace\NumPyBox\pandas_xarray\bug_PandasBottleneck_MemoryLeak.py:35: size=91.6 MiB, count=5, average=18.3 MiB
# The original DataFrame from above
C:\tools\Anaconda3\envs\quant_env_r20190129_9d8c4b42\lib\site-packages\pandas\core\internals.py:179: size=8960 B, count=176, average=51 B
# not important
'''
```
#### Problem description
I am experiencing what appears to be a memory leak when using bottleneck.nanmax on a pandas Series. Calling `abs(bottleneck.nanmax(df.loc[:, col]))` will retain a reference to df in memory even after `df` has been explicitly deleted and `gc.collect` called. This also sounds like a bottleneck issue, so let me know if I should cross-post. The issue is NOT present if I explicitly use `.values` on the Series or if I use `numpy.nanmax`
#### Expected Output
I expect the output, i.e. the total memory footprint when working on the `Series` to be the same as when working on the underlying `values`.
#### Output of ``pd.show_versions()``
<details>
pd.show_versions()
INSTALLED VERSIONS
------------------
commit: None
python: 3.6.5.final.0
python-bits: 64
OS: Windows
OS-release: 10
machine: AMD64
processor: Intel64 Family 6 Model 79 Stepping 1, GenuineIntel
byteorder: little
LC_ALL: None
LANG: en
LOCALE: None.None
pandas: 0.22.0
pytest: 3.5.1
pip: 10.0.1
setuptools: 39.1.0
Cython: 0.28.2
numpy: 1.14.3
scipy: 1.1.0
pyarrow: None
xarray: 0.10.9
IPython: 6.4.0
sphinx: 1.7.4
patsy: 0.5.0
dateutil: 2.7.3
pytz: 2018.4
blosc: None
bottleneck: 1.2.1
tables: 3.4.3
numexpr: 2.6.5
feather: None
matplotlib: 2.2.2
openpyxl: 2.5.3
xlrd: 1.1.0
xlwt: 1.3.0
xlsxwriter: 1.0.4
lxml: 4.2.1
bs4: 4.6.0
html5lib: 1.0.1
sqlalchemy: 1.2.7
pymysql: None
psycopg2: None
jinja2: 2.10
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: 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/26485/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26485/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26486 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26486/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26486/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26486/events | https://github.com/pandas-dev/pandas/pull/26486 | 447,066,460 | MDExOlB1bGxSZXF1ZXN0MjgxMTM3OTg4 | 26,486 | DOC/CLN: Change API reference section title | {
"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": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"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": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 7 | 2019-05-22T10:51:41Z | 2019-05-29T10:55:19Z | 2019-05-24T15:11: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/26486/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26486/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26486.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26486",
"merged_at": "2019-05-24T15:11:26Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26486.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26486"
} | |
https://api.github.com/repos/pandas-dev/pandas/issues/26487 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26487/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26487/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26487/events | https://github.com/pandas-dev/pandas/issues/26487 | 447,069,291 | MDU6SXNzdWU0NDcwNjkyOTE= | 26,487 | Please stop relying on xlrd | {
"avatar_url": "https://avatars.githubusercontent.com/u/632049?v=4",
"events_url": "https://api.github.com/users/cjw296/events{/privacy}",
"followers_url": "https://api.github.com/users/cjw296/followers",
"following_url": "https://api.github.com/users/cjw296/following{/other_user}",
"gists_url": "https://api.github.com/users/cjw296/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cjw296",
"id": 632049,
"login": "cjw296",
"node_id": "MDQ6VXNlcjYzMjA0OQ==",
"organizations_url": "https://api.github.com/users/cjw296/orgs",
"received_events_url": "https://api.github.com/users/cjw296/received_events",
"repos_url": "https://api.github.com/users/cjw296/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cjw296/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cjw296/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cjw296"
} | [
{
"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": "bfe5bf",
... | closed | false | null | [] | null | 9 | 2019-05-22T10:58:34Z | 2019-05-26T16:24:47Z | 2019-05-26T06:20:31Z | CONTRIBUTOR | null | #### Problem description
Guys, xlrd is unmaintained. I know, I'm the maintainer!
Please can you use [openpyxl]( https://openpyxl.readthedocs.io/en/stable/) for reading xlsx files instead.
If you really must keep support for the ancient and outdated .xls format, by all means fall back to xlrd, but warn people they're on shaky territory and should sort their data source out!
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26487/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26487/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26488 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26488/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26488/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26488/events | https://github.com/pandas-dev/pandas/issues/26488 | 447,122,093 | MDU6SXNzdWU0NDcxMjIwOTM= | 26,488 | Set single cell of Multindex DataFrame to array | {
"avatar_url": "https://avatars.githubusercontent.com/u/36264376?v=4",
"events_url": "https://api.github.com/users/giacomopareschi/events{/privacy}",
"followers_url": "https://api.github.com/users/giacomopareschi/followers",
"following_url": "https://api.github.com/users/giacomopareschi/following{/other_user}",
"gists_url": "https://api.github.com/users/giacomopareschi/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/giacomopareschi",
"id": 36264376,
"login": "giacomopareschi",
"node_id": "MDQ6VXNlcjM2MjY0Mzc2",
"organizations_url": "https://api.github.com/users/giacomopareschi/orgs",
"received_events_url": "https://api.github.com/users/giacomopareschi/received_events",
"repos_url": "https://api.github.com/users/giacomopareschi/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/giacomopareschi/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/giacomopareschi/subscriptions",
"type": "User",
"url": "https://api.github.com/users/giacomopareschi"
} | [
{
"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 | [] | null | 3 | 2019-05-22T12:59:36Z | 2019-06-03T15:42:05Z | 2019-06-03T10:38:39Z | NONE | null | I am creating a Multindex DataFrame but I don't know in advance how many rows I will have, since I reading from a pool of files. I basically want to append a new row every time. The best way I found is:
```python
idx = pd.MultiIndex(levels=[[],[]], codes=[[],[]], names=['level0', 'level1'])
df = pd.DataFrame(columns=['Categorical', 'Integer', 'Vector'], index=idx)
df.loc[('a',0),:] = ['apple', 1, 2.3]
df.loc[('a',1),:] = ['banana', 1, 3.4]
```
this works fine. But then I want to set ```df.loc[('a',1),'Vector]``` to an array, not a single value. By trying either
```python
df.loc[pd.IndexSlice['a', 1], 'Vector'] = [1,2]
```
or
```python
df.loc[('a',1), 'Vector'] = [1,2]
```
I get
```python
~\AppData\Local\Continuum\Anaconda3\lib\site-packages\pandas\core\indexing.py in _setitem_with_indexer(self, indexer, value)
491 value) and lplane_indexer != len(value):
492
--> 493 if len(obj[idx]) != len(value):
494 raise ValueError("cannot set using a multi-index "
495 "selection indexer with a different "
TypeError: object of type 'float' has no len()
```
#### Expected Output
I would like the vector [1,2] to be set as a single element at [('a',1), 'Vector']
I don't want to expand the vector as a new level of the Multindex since it's usually thousands of element.
I have no work around that can accomplish that. I believe it's an issue because Pandas tries to align the vector along some levels of the Multindex, but it fails to do so. Pandas should understand that my vector cannot be aligned along the Mutlindex since I am setting it on a single row and a single column.
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit: None
python: 3.5.5.final.0
python-bits: 64
OS: Windows
OS-release: 7
machine: AMD64
processor: Intel64 Family 6 Model 94 Stepping 3, GenuineIntel
byteorder: little
LC_ALL: None
LANG: None
LOCALE: None.None
pandas: 0.24.2
pytest: 3.0.7
pip: 19.0.3
setuptools: 40.8.0
Cython: 0.25.2
numpy: 1.15.2
scipy: 1.1.0
pyarrow: 0.12.1
xarray: 0.10.7
IPython: 6.2.1
sphinx: 1.3.1
patsy: 0.4.1
dateutil: 2.6.0
pytz: 2017.2
blosc: None
bottleneck: 1.2.1
tables: 3.4.4
numexpr: 2.6.4
feather: None
matplotlib: 2.2.2
openpyxl: 2.4.7
xlrd: 1.0.0
xlwt: 1.2.0
xlsxwriter: 0.9.6
lxml.etree: 3.7.3
bs4: 4.6.0
html5lib: 0.999
sqlalchemy: 1.1.9
pymysql: None
psycopg2: 2.7.7 (dt dec pq3 ext lo64)
jinja2: 2.9.6
s3fs: None
fastparquet: 0.2.1
pandas_gbq: None
pandas_datareader: None
gcsfs: 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/26488/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26488/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26489 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26489/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26489/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26489/events | https://github.com/pandas-dev/pandas/pull/26489 | 447,131,606 | MDExOlB1bGxSZXF1ZXN0MjgxMTkwMjcw | 26,489 | Fixed typo mutiplication -> multiplication | {
"avatar_url": "https://avatars.githubusercontent.com/u/1103477?v=4",
"events_url": "https://api.github.com/users/javabrett/events{/privacy}",
"followers_url": "https://api.github.com/users/javabrett/followers",
"following_url": "https://api.github.com/users/javabrett/following{/other_user}",
"gists_url": "https://api.github.com/users/javabrett/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/javabrett",
"id": 1103477,
"login": "javabrett",
"node_id": "MDQ6VXNlcjExMDM0Nzc=",
"organizations_url": "https://api.github.com/users/javabrett/orgs",
"received_events_url": "https://api.github.com/users/javabrett/received_events",
"repos_url": "https://api.github.com/users/javabrett/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/javabrett/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/javabrett/subscriptions",
"type": "User",
"url": "https://api.github.com/users/javabrett"
} | [
{
"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": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"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": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 3 | 2019-05-22T13:18:29Z | 2019-05-22T14:02:33Z | 2019-05-22T13:58:19Z | CONTRIBUTOR | null | Docstring typo fix only. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26489/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26489/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26489.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26489",
"merged_at": "2019-05-22T13:58:19Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26489.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26489"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26490 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26490/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26490/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26490/events | https://github.com/pandas-dev/pandas/issues/26490 | 447,161,040 | MDU6SXNzdWU0NDcxNjEwNDA= | 26,490 | RecursionError when selecting single column from IntervalIndex | {
"avatar_url": "https://avatars.githubusercontent.com/u/320128?v=4",
"events_url": "https://api.github.com/users/sbitzer/events{/privacy}",
"followers_url": "https://api.github.com/users/sbitzer/followers",
"following_url": "https://api.github.com/users/sbitzer/following{/other_user}",
"gists_url": "https://api.github.com/users/sbitzer/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sbitzer",
"id": 320128,
"login": "sbitzer",
"node_id": "MDQ6VXNlcjMyMDEyOA==",
"organizations_url": "https://api.github.com/users/sbitzer/orgs",
"received_events_url": "https://api.github.com/users/sbitzer/received_events",
"repos_url": "https://api.github.com/users/sbitzer/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sbitzer/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sbitzer/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sbitzer"
} | [
{
"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 s... | 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"
} | 3 | 2019-05-22T14:11:24Z | 2020-10-17T01:53:49Z | 2020-10-17T01:53:49Z | NONE | null | #### Code Sample, a copy-pastable example if possible
```python
df = pd.DataFrame(
np.ones((3, 4)),
columns=pd.IntervalIndex.from_breaks(np.arange(5)))
df[0.5]
df.loc[:, 0.5]
```
#### Problem description
Instead of returning the selected column, either calling `df[0.5]` or `df.loc[:, 0.5]` raises `RecursionError`.
The issue is in `frame.__getitem__` where `key in self.columns == False`. The code then correctly identifies the desired column by integer index using `self.columns.get_loc(key)`, but then goes on to call
```python
data = self._take(indexer, axis=1)
data = data[key]
```
Because `self._take` returns a DataFrame, `data[key]` enters `frame.__getitem__` again and we are caught in an infinite loop.
#### Expected Output
The selected column as Series.
#### Output of ``pd.show_versions()``
<details>
commit: None
python: 3.6.8.final.0
python-bits: 64
OS: Windows
OS-release: 7
machine: AMD64
processor: Intel64 Family 6 Model 42 Stepping 7, GenuineIntel
byteorder: little
LC_ALL: None
LANG: en
LOCALE: None.None
pandas: 0.24.2
pytest: 4.3.1
pip: 19.0.3
setuptools: 40.8.0
Cython: 0.29.7
numpy: 1.16.2
scipy: 1.2.1
pyarrow: None
xarray: None
IPython: 7.4.0
sphinx: 1.8.5
patsy: 0.5.1
dateutil: 2.8.0
pytz: 2018.9
blosc: None
bottleneck: None
tables: 3.5.1
numexpr: 2.6.9
feather: None
matplotlib: 3.0.3
openpyxl: 2.6.1
xlrd: 1.2.0
xlwt: None
xlsxwriter: None
lxml.etree: None
bs4: None
html5lib: None
sqlalchemy: 1.3.1
pymysql: None
psycopg2: None
jinja2: 2.10
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/26490/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26490/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26491 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26491/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26491/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26491/events | https://github.com/pandas-dev/pandas/issues/26491 | 447,237,850 | MDU6SXNzdWU0NDcyMzc4NTA= | 26,491 | Label-based indexing on a Series with an index of dtype=object raises TypeError when using slices with integer bound | {
"avatar_url": "https://avatars.githubusercontent.com/u/18049056?v=4",
"events_url": "https://api.github.com/users/plammens/events{/privacy}",
"followers_url": "https://api.github.com/users/plammens/followers",
"following_url": "https://api.github.com/users/plammens/following{/other_user}",
"gists_url": "https://api.github.com/users/plammens/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/plammens",
"id": 18049056,
"login": "plammens",
"node_id": "MDQ6VXNlcjE4MDQ5MDU2",
"organizations_url": "https://api.github.com/users/plammens/orgs",
"received_events_url": "https://api.github.com/users/plammens/received_events",
"repos_url": "https://api.github.com/users/plammens/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/plammens/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/plammens/subscriptions",
"type": "User",
"url": "https://api.github.com/users/plammens"
} | [
{
"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 s... | 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"
} | 1 | 2019-05-22T16:39:13Z | 2020-11-09T02:52:06Z | 2020-11-09T02:52:06Z | CONTRIBUTOR | null | When indexing a pandas axis that has an `index` of `dtype=object`, with label-based indexing, passing a slice that contains an integer bound results in a `TypeError`, even if the integer *is indeed a label* in the `index` of the series.
### Details
#### Code Sample
When indexing a pandas axis that has an `index` of `dtype=object`, with label-based indexing, passing a slice that contains an integer bound results in a `TypeError`, even if the integer *is indeed a label* in the `index` of the series.
```python
import pandas as pd
series = pd.Series(range(4), index=[1, 'spam', 2, 'eggs'])
series
## 1 0
## spam 1
## 2 2
## eggs 3
## dtype: int64
series.index
## Index([1, 'spam', 2, 'eggs'], dtype='object')
series.loc['spam':'eggs']
## spam 1
## 2 2
## eggs 3
## dtype: int64
series.loc[1:'eggs']
# raises TypeError
```
#### Problem description
When indexing a `pd.Series` (or an equivalent pandas object) that has an `index` of `dtype=object` (upcasted for example from a list of `int`s and `str`s), with `.loc`'s label-based indexing, passing a slice that contains an integer bound (as in `1:'eggs'`) results in a `TypeError`, even if the integer *is indeed a label* in the `index` of the series:
```text
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\Paolo\Code\PycharmProjects\pandas\pandas\core\indexing.py", line 1504, in __getitem__
return self._getitem_axis(maybe_callable, axis=axis)
File "C:\Users\Paolo\Code\PycharmProjects\pandas\pandas\core\indexing.py", line 1871, in _getitem_axis
return self._get_slice_axis(key, axis=axis)
File "C:\Users\Paolo\Code\PycharmProjects\pandas\pandas\core\indexing.py", line 1537, in _get_slice_axis
slice_obj.step, kind=self.name)
File "C:\Users\Paolo\Code\PycharmProjects\pandas\pandas\core\indexes\base.py", line 4784, in slice_indexer
kind=kind)
File "C:\Users\Paolo\Code\PycharmProjects\pandas\pandas\core\indexes\base.py", line 5002, in slice_locs
start_slice = self.get_slice_bound(start, 'left', kind)
File "C:\Users\Paolo\Code\PycharmProjects\pandas\pandas\core\indexes\base.py", line 4914, in get_slice_bound
label = self._maybe_cast_slice_bound(label, side, kind)
File "C:\Users\Paolo\Code\PycharmProjects\pandas\pandas\core\indexes\base.py", line 4861, in _maybe_cast_slice_bound
self._invalid_indexer('slice', label)
File "C:\Users\Paolo\Code\PycharmProjects\pandas\pandas\core\indexes\base.py", line 3154, in _invalid_indexer
kind=type(key)))
TypeError: cannot do slice indexing on <class 'pandas.core.indexes.base.Index'> with these indexers [1] of <class 'int'>
```
Other non-integer (and non-float) slice bounds are accepted, as shown above.
Is this the expected behaviour? Possibly it's a documentation issue. According to the section [Selection by Label](http://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#indexing-label) in the indexing doc page, the second warning says:
> .loc is strict when you present slicers that are not compatible (or convertible) with the index type. For example using integers in a DatetimeIndex. These will raise a TypeError.
What exactly is meant by "compatible or convertible"? An `int` is definitely an `object`, so it should be compatible with the index type.
Furthermore, the first paragraph in the section reads (emphasis mine):
> pandas provides a suite of methods in order to have purely label based indexing. This is a strict inclusion based protocol. Every label asked for must be in the index, or a KeyError will be raised. When slicing, both the start bound AND the stop bound are included, if present in the index. **Integers are valid labels**, but they refer to the label and not the position.
And, finally, the subsection [Slicing with labels](http://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#slicing-with-labels) says:
> When using .loc with slices, if both the start and the stop labels are present in the index, then elements located between the two (including them) are returned
By reading this, to me it would seem that using a slice such as `1:'eggs'` or `1:2` in the above example with `loc` should be perfectly valid. The indexers are present in the index, and, as stated above, integers are valid labels.
----------------------------
The exception originates at the `_maybe_cast_slice_bound` check, which rejects all integers regardless of whether the `Index` contains any integers:
https://github.com/pandas-dev/pandas/blob/6d2398a58fda68e40f116f199439504558c7774c/pandas/core/indexes/base.py#L4846-L4863
#### Expected Output
I expected `series.loc[1:'eggs']` not to raise `TypeError` because of the integer label. I expected that expression to return the following slice view of the `Series`:
```text
1 0
spam 1
2 2
eggs 3
dtype: int64
```
#### Output of ``pd.show_versions()``
<details>
```text
INSTALLED VERSIONS
------------------
commit: 6d2398a58fda68e40f116f199439504558c7774c
python: 3.7.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: None.None
pandas: 0.25.0.dev0+598.g6d2398a58
pytest: 4.5.0
pip: 19.1.1
setuptools: 41.0.1
Cython: 0.29.7
numpy: 1.16.3
scipy: 1.3.0
pyarrow: 0.13.0
xarray: 0.12.1
IPython: 7.5.0
sphinx: 2.0.1
patsy: 0.5.1
dateutil: 2.8.0
pytz: 2019.1
blosc: 1.8.1
bottleneck: 1.2.1
tables: 3.5.1
numexpr: 2.6.9
feather: None
matplotlib: 3.1.0
openpyxl: 2.6.2
xlrd: 1.2.0
xlwt: 1.3.0
xlsxwriter: 1.1.8
lxml.etree: 4.3.3
bs4: 4.7.1
html5lib: 1.0.1
sqlalchemy: 1.3.3
pymysql: None
psycopg2: None
jinja2: 2.10.1
s3fs: 0.2.1
fastparquet: 0.3.1
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/26491/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26491/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26492 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26492/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26492/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26492/events | https://github.com/pandas-dev/pandas/pull/26492 | 447,295,897 | MDExOlB1bGxSZXF1ZXN0MjgxMzIxNjMx | 26,492 | TST: Test sorting levels not aligned with index (#25775) | {
"avatar_url": "https://avatars.githubusercontent.com/u/42970828?v=4",
"events_url": "https://api.github.com/users/mahepe/events{/privacy}",
"followers_url": "https://api.github.com/users/mahepe/followers",
"following_url": "https://api.github.com/users/mahepe/following{/other_user}",
"gists_url": "https://api.github.com/users/mahepe/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mahepe",
"id": 42970828,
"login": "mahepe",
"node_id": "MDQ6VXNlcjQyOTcwODI4",
"organizations_url": "https://api.github.com/users/mahepe/orgs",
"received_events_url": "https://api.github.com/users/mahepe/received_events",
"repos_url": "https://api.github.com/users/mahepe/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mahepe/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mahepe/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mahepe"
} | [
{
"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",
"d... | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"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": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 4 | 2019-05-22T19:04:53Z | 2019-06-05T12:54:40Z | 2019-06-05T12:54:35Z | CONTRIBUTOR | null | - [x] closes #25775
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry (empty since no user-facing changs)
With `master` at 6d2398a58fda68e40f116f199439504558c7774c, issue #25775 seems resolved. Added validation tests. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26492/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26492/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26492.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26492",
"merged_at": "2019-06-05T12:54:35Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26492.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26492"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26493 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26493/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26493/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26493/events | https://github.com/pandas-dev/pandas/issues/26493 | 447,295,983 | MDU6SXNzdWU0NDcyOTU5ODM= | 26,493 | BUG: combination of out of bound date and nan with errors='ignore' gives nonsense data | {
"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": "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,
... | 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 | 2019-05-22T19:05:06Z | 2019-05-27T07:41:01Z | null | MEMBER | null | ```python
In [46]: pd.__version__
Out[46]: '0.25.0.dev0+593.g307265e28'
In [47]: pd.to_datetime(['15010101', '20150101', np.nan], format="%Y%m%d", errors='ignore')
Out[47]: DatetimeIndex(['2085-07-20 23:34:33.709551616', '2015-01-01 00:00:00', 'NaT'], dtype='datetime64[ns]', freq=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/26493/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26493/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26494 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26494/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26494/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26494/events | https://github.com/pandas-dev/pandas/issues/26494 | 447,312,586 | MDU6SXNzdWU0NDczMTI1ODY= | 26,494 | assert_frame_equal with check_like throws exception if frames have repeat indices | {
"avatar_url": "https://avatars.githubusercontent.com/u/201996?v=4",
"events_url": "https://api.github.com/users/fiendish/events{/privacy}",
"followers_url": "https://api.github.com/users/fiendish/followers",
"following_url": "https://api.github.com/users/fiendish/following{/other_user}",
"gists_url": "https://api.github.com/users/fiendish/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/fiendish",
"id": 201996,
"login": "fiendish",
"node_id": "MDQ6VXNlcjIwMTk5Ng==",
"organizations_url": "https://api.github.com/users/fiendish/orgs",
"received_events_url": "https://api.github.com/users/fiendish/received_events",
"repos_url": "https://api.github.com/users/fiendish/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/fiendish/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/fiendish/subscriptions",
"type": "User",
"url": "https://api.github.com/users/fiendish"
} | [
{
"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": 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 | 2019-05-22T19:48:59Z | 2019-11-08T00:34:55Z | 2019-11-08T00:34:50Z | CONTRIBUTOR | null | #### Code Sample, a copy-pastable example if possible
```python
a = pandas.DataFrame({'A': [1, 2, 1]}, index=[0, 1, 0])
b = pandas.DataFrame({'A': [1, 1, 2]}, index=[0, 0, 1])
pandas.testing.assert_frame_equal(a, b, check_like=True)
```
#### Problem description
It raises an exception (and with a not helpful message)
```
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/Users/kelmana/Documents/kids-first/kf-lib-data-ingest/venv/lib/python3.7/site-packages/pandas/util/testing.py", line 1461, in assert_frame_equal
left, right = left.reindex_like(right), right
File "/Users/kelmana/Documents/kids-first/kf-lib-data-ingest/venv/lib/python3.7/site-packages/pandas/core/generic.py", line 3757, in reindex_like
return self.reindex(**d)
File "/Users/kelmana/Documents/kids-first/kf-lib-data-ingest/venv/lib/python3.7/site-packages/pandas/util/_decorators.py", line 197, in wrapper
return func(*args, **kwargs)
File "/Users/kelmana/Documents/kids-first/kf-lib-data-ingest/venv/lib/python3.7/site-packages/pandas/core/frame.py", line 3809, in reindex
return super(DataFrame, self).reindex(**kwargs)
File "/Users/kelmana/Documents/kids-first/kf-lib-data-ingest/venv/lib/python3.7/site-packages/pandas/core/generic.py", line 4356, in reindex
fill_value, copy).__finalize__(self)
File "/Users/kelmana/Documents/kids-first/kf-lib-data-ingest/venv/lib/python3.7/site-packages/pandas/core/frame.py", line 3741, in _reindex_axes
fill_value, limit, tolerance)
File "/Users/kelmana/Documents/kids-first/kf-lib-data-ingest/venv/lib/python3.7/site-packages/pandas/core/frame.py", line 3752, in _reindex_index
allow_dups=False)
File "/Users/kelmana/Documents/kids-first/kf-lib-data-ingest/venv/lib/python3.7/site-packages/pandas/core/generic.py", line 4490, in _reindex_with_indexers
copy=copy)
File "/Users/kelmana/Documents/kids-first/kf-lib-data-ingest/venv/lib/python3.7/site-packages/pandas/core/internals/managers.py", line 1224, in reindex_indexer
self.axes[axis]._can_reindex(indexer)
File "/Users/kelmana/Documents/kids-first/kf-lib-data-ingest/venv/lib/python3.7/site-packages/pandas/core/indexes/base.py", line 3087, in _can_reindex
raise ValueError("cannot reindex from a duplicate axis")
ValueError: cannot reindex from a duplicate axis
```
#### Expected Output
It should return that they are equal because, ignoring index order, the two dataframes are equal.
#### Output of ``pd.show_versions()``
```
>>> pandas.show_versions()
INSTALLED VERSIONS
------------------
commit: None
python: 3.7.3.final.0
python-bits: 64
OS: Darwin
OS-release: 18.5.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8
pandas: 0.24.2
pytest: 4.4.0
pip: 19.1.1
setuptools: 41.0.1
Cython: None
numpy: 1.15.0
scipy: None
pyarrow: None
xarray: None
IPython: None
sphinx: None
patsy: None
dateutil: 2.7.3
pytz: 2018.5
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: None
openpyxl: None
xlrd: 1.1.0
xlwt: None
xlsxwriter: None
lxml.etree: None
bs4: None
html5lib: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.10.1
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/26494/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26494/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26495 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26495/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26495/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26495/events | https://github.com/pandas-dev/pandas/issues/26495 | 447,318,813 | MDU6SXNzdWU0NDczMTg4MTM= | 26,495 | Remove StringMixin from code base | {
"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": "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... | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"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": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 1 | 2019-05-22T20:04:56Z | 2019-05-25T07:33:33Z | 2019-05-24T15:29:33Z | CONTRIBUTOR | null | I`m thinking about making a PR to remove ``StringMixin`` from the code base in order to make pandas use more standard string output methodology (putting the base string representations in the ``__repr__`` , as is standard in python3, instead of in ``__str__``).
Any objections to this? This is backwards compatible for users of Pandas, but may be slightly backwards incompatible for subclasses of Pandas classes located in external packages, e.g. If a downstream package did this:
```python
>>> class MyFrame(pd.DataFrame):
... def __str__(self):
... return “abc”
```
the repr would output an unexpected string.
Would this e.g. affect Geopandas, @jorisvandenbossche? | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26495/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26495/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26496 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26496/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26496/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26496/events | https://github.com/pandas-dev/pandas/pull/26496 | 447,335,194 | MDExOlB1bGxSZXF1ZXN0MjgxMzUzMjQz | 26,496 | DOC: Highlighted role of index alignment in DataFrame.dot(other) (#26… | {
"avatar_url": "https://avatars.githubusercontent.com/u/32721837?v=4",
"events_url": "https://api.github.com/users/matsmaiwald/events{/privacy}",
"followers_url": "https://api.github.com/users/matsmaiwald/followers",
"following_url": "https://api.github.com/users/matsmaiwald/following{/other_user}",
"gists_url": "https://api.github.com/users/matsmaiwald/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/matsmaiwald",
"id": 32721837,
"login": "matsmaiwald",
"node_id": "MDQ6VXNlcjMyNzIxODM3",
"organizations_url": "https://api.github.com/users/matsmaiwald/orgs",
"received_events_url": "https://api.github.com/users/matsmaiwald/received_events",
"repos_url": "https://api.github.com/users/matsmaiwald/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/matsmaiwald/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/matsmaiwald/subscriptions",
"type": "User",
"url": "https://api.github.com/users/matsmaiwald"
} | [
{
"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": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"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": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 3 | 2019-05-22T20:45:53Z | 2019-05-25T12:56:50Z | 2019-05-23T16:46:21Z | CONTRIBUTOR | null | …480)
- [X] closes #26480
- [X] tests passed
Added note highlighting that column names of DataFrame and index of other need to same.
Added example showing that reshuffling of objects does not change which elements are multiplied with which. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26496/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26496/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26496.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26496",
"merged_at": "2019-05-23T16:46:20Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26496.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26496"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26497 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26497/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26497/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26497/events | https://github.com/pandas-dev/pandas/pull/26497 | 447,341,121 | MDExOlB1bGxSZXF1ZXN0MjgxMzU4MDU5 | 26,497 | DOC: Fixed redirects in various parts of the documentation | {
"avatar_url": "https://avatars.githubusercontent.com/u/50599110?v=4",
"events_url": "https://api.github.com/users/lrjball/events{/privacy}",
"followers_url": "https://api.github.com/users/lrjball/followers",
"following_url": "https://api.github.com/users/lrjball/following{/other_user}",
"gists_url": "https://api.github.com/users/lrjball/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/lrjball",
"id": 50599110,
"login": "lrjball",
"node_id": "MDQ6VXNlcjUwNTk5MTEw",
"organizations_url": "https://api.github.com/users/lrjball/orgs",
"received_events_url": "https://api.github.com/users/lrjball/received_events",
"repos_url": "https://api.github.com/users/lrjball/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/lrjball/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/lrjball/subscriptions",
"type": "User",
"url": "https://api.github.com/users/lrjball"
} | [
{
"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": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"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": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 9 | 2019-05-22T21:00:45Z | 2019-06-03T19:32:49Z | 2019-05-31T12:41:11Z | CONTRIBUTOR | null | Links in the docs to part way down a page were being sent to the top of the page due to a generic redirect from pandas.pydata.org/pandas-doc/stable/... -> pandas.pydata.org/pandas-doc/stable/user_guide/... . These links have been change to go straight to the .../user_guide/... version of the page to ensure the link goes to the correct part of the docs.
For example, the link within the `chunksize` parameter of pandas.read_json() currently goes to the top of the IO Tools page, when the relevant section is the 'Line delimited json' heading about half way down. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26497/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26497/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26497.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26497",
"merged_at": "2019-05-31T12:41:11Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26497.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26497"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26498 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26498/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26498/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26498/events | https://github.com/pandas-dev/pandas/issues/26498 | 447,358,531 | MDU6SXNzdWU0NDczNTg1MzE= | 26,498 | rename doesn't work with mutliindex | {
"avatar_url": "https://avatars.githubusercontent.com/u/12551293?v=4",
"events_url": "https://api.github.com/users/pjadzinsky/events{/privacy}",
"followers_url": "https://api.github.com/users/pjadzinsky/followers",
"following_url": "https://api.github.com/users/pjadzinsky/following{/other_user}",
"gists_url": "https://api.github.com/users/pjadzinsky/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/pjadzinsky",
"id": 12551293,
"login": "pjadzinsky",
"node_id": "MDQ6VXNlcjEyNTUxMjkz",
"organizations_url": "https://api.github.com/users/pjadzinsky/orgs",
"received_events_url": "https://api.github.com/users/pjadzinsky/received_events",
"repos_url": "https://api.github.com/users/pjadzinsky/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/pjadzinsky/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/pjadzinsky/subscriptions",
"type": "User",
"url": "https://api.github.com/users/pjadzinsky"
} | [
{
"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 | 2019-05-22T21:48:52Z | 2019-05-28T15:55:18Z | 2019-05-28T15:55:17Z | NONE | null | #### Code Sample, a copy-pastable example if possible
```python
# Your code here
mi = pd.MultiIndex.from_product([['A','B'], [0, 1]])
df1 = pd.DataFrame(np.ones((1,4)), columns=mi)
df2 = df1.rename(columns={df1.columns[1]: ('C', 3)})
print(df1)
print(df2)
```
Currently both df1 and df2 are:
```
A B
0 1 0 1
0 1.0 1.0 1.0 1.0
```
#### Problem description
I was expecting df.columns[1] to change to ('C', 3) but it remains ('A', 1)
#### Expected Output
```
A C B
0 3 0 1
0 1.0 1.0 1.0 1.0
```
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26498/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26498/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26499 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26499/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26499/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26499/events | https://github.com/pandas-dev/pandas/pull/26499 | 447,375,067 | MDExOlB1bGxSZXF1ZXN0MjgxMzg1NzU4 | 26,499 | DOC: fix SyntaxError in doc build on Windows | {
"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"
},
{
"color": "fbca04",
"default": false,
"description": "Windows OS",
"id"... | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"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": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 3 | 2019-05-22T22:46:53Z | 2019-05-24T06:32:59Z | 2019-05-23T13:04:57Z | MEMBER | null | i'm getting this error for most files during doc build on Windows...
```
>>>-------------------------------------------------------------------------
Exception in C:\Users\simon\OneDrive\code\pandas-simonjayhawkins\doc\source\development\contributing.rst at block ending on line None
Specify :okexcept: as an option in the ipython:: block to suppress this message
File "<ipython-input-1-9cb881b1c9b0>", line 1
os.chdir('C:\Users\simon\OneDrive\code\pandas-simonjayhawkins\doc')
^
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape
<<<-------------------------------------------------------------------------
``` | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26499/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26499/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26499.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26499",
"merged_at": "2019-05-23T13:04:57Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26499.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26499"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26500 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26500/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26500/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26500/events | https://github.com/pandas-dev/pandas/issues/26500 | 447,393,762 | MDU6SXNzdWU0NDczOTM3NjI= | 26,500 | MAINT: port numpy#13188 for np_datetime simplification | {
"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": "d93f0b... | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"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": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 2 | 2019-05-23T00:08:21Z | 2019-05-26T17:57:48Z | 2019-05-26T17:57:48Z | MEMBER | null | our _libs/tslibs/src/np_datetime.c is based off of the numpy version. A recent PR there made a pretty nice simplfication to the relevant code. We should do the same.
https://github.com/numpy/numpy/pull/13188/files | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26500/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26500/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26501 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26501/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26501/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26501/events | https://github.com/pandas-dev/pandas/issues/26501 | 447,591,987 | MDU6SXNzdWU0NDc1OTE5ODc= | 26,501 | Adding column to filtered dataframe takes longer than copying and then adding | {
"avatar_url": "https://avatars.githubusercontent.com/u/9658781?v=4",
"events_url": "https://api.github.com/users/jendrikjoe/events{/privacy}",
"followers_url": "https://api.github.com/users/jendrikjoe/followers",
"following_url": "https://api.github.com/users/jendrikjoe/following{/other_user}",
"gists_url": "https://api.github.com/users/jendrikjoe/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jendrikjoe",
"id": 9658781,
"login": "jendrikjoe",
"node_id": "MDQ6VXNlcjk2NTg3ODE=",
"organizations_url": "https://api.github.com/users/jendrikjoe/orgs",
"received_events_url": "https://api.github.com/users/jendrikjoe/received_events",
"repos_url": "https://api.github.com/users/jendrikjoe/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jendrikjoe/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jendrikjoe/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jendrikjoe"
} | [] | closed | false | null | [] | null | 2 | 2019-05-23T11:08:07Z | 2019-05-23T11:31:34Z | 2019-05-23T11:11:43Z | NONE | null | #### Code Sample, a copy-pastable example if possible
```python
import pandas as pd
import time
def change_df(df):
print(f"columns {df.columns}")
for col in df.columns:
start_time = time.time()
df[col] = df[col].apply(lambda x: int(x))
took = time.time() - start_time
print(f"assign {col} took: {took}")
def test_df_conversion_time_local():
start_time = time.time()
numbers = {str(i): str(i) for i in range(10)}
df = pd.DataFrame([numbers], dtype=str)
df = df[[f'{i}' for i in range(5)]]
change_df(df)
print(f"test took: {time.time() - start_time}")
def test_df_conversion_time_local_2():
start_time = time.time()
numbers = {str(i): str(i) for i in range(10)}
df = pd.DataFrame([numbers], dtype=str)
df = df[[f'{i}' for i in range(5)]].copy()
change_df(df)
print(f"test took: {time.time() - start_time}")
test_df_conversion_time_local()
test_df_conversion_time_local_2()
```
#### Problem description
When adding a new column to a filtered dataframe, the execution takes longer than copying the whole filtered dataframe and adding a column to the copy (at least for dataframes with just one column (33 ms vs. 5ms)). Working on a time critical application the difference matters a lot to me personally, but it seems to be interesting that copying data is faster than working on a reference of it.
#### Expected Output
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit: None
python: 3.7.2.final.0
python-bits: 64
OS: Linux
OS-release: 4.15.0-50-generic
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: 0.24.1
pytest: None
pip: 18.1
setuptools: 40.6.2
Cython: None
numpy: 1.16.1
scipy: None
pyarrow: None
xarray: None
IPython: 7.2.0
sphinx: None
patsy: None
dateutil: 2.7.5
pytz: 2018.9
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: 3.0.3
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml.etree: None
bs4: None
html5lib: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.10.1
s3fs: None
fastparquet: 0.3.0
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/26501/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26501/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26502 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26502/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26502/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26502/events | https://github.com/pandas-dev/pandas/issues/26502 | 447,637,459 | MDU6SXNzdWU0NDc2Mzc0NTk= | 26,502 | Copy and grouby-sum changes column-major-ordering to row-major-ordering with huge impact on performance | {
"avatar_url": "https://avatars.githubusercontent.com/u/50952830?v=4",
"events_url": "https://api.github.com/users/TannhauserGate42/events{/privacy}",
"followers_url": "https://api.github.com/users/TannhauserGate42/followers",
"following_url": "https://api.github.com/users/TannhauserGate42/following{/other_user}",
"gists_url": "https://api.github.com/users/TannhauserGate42/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/TannhauserGate42",
"id": 50952830,
"login": "TannhauserGate42",
"node_id": "MDQ6VXNlcjUwOTUyODMw",
"organizations_url": "https://api.github.com/users/TannhauserGate42/orgs",
"received_events_url": "https://api.github.com/users/TannhauserGate42/received_events",
"repos_url": "https://api.github.com/users/TannhauserGate42/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/TannhauserGate42/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/TannhauserGate42/subscriptions",
"type": "User",
"url": "https://api.github.com/users/TannhauserGate42"
} | [
{
"color": "729FCF",
"default": false,
"description": null,
"id": 233160,
"name": "Groupby",
"node_id": "MDU6TGFiZWwyMzMxNjA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Groupby"
},
{
"color": "a10c02",
"default": false,
"description": "Memory or execu... | 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"
} | 11 | 2019-05-23T12:37:03Z | 2019-05-28T16:27:57Z | 2019-05-28T16:27:57Z | NONE | null | #### Code Sample, a copy-pastable example if possible
```python
import numpy as np
import pandas as pd
print("pandas version: ", pd.__version__)
array = np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]])
array.flags
print("Numpy array is C-contiguous: ", data.flags.c_contiguous)
dataframe = pd.DataFrame(array, index = pd.MultiIndex.from_tuples([('A', 'U'), ('A', 'V'), ('B', 'W')], names=['dim_one', 'dim_two']))
print("DataFrame is C-contiguous: ", dataframe.values.flags.c_contiguous)
dataframe_copy = dataframe.copy()
print("Copy of DataFrame is C-contiguous: ", dataframe_copy.values.flags.c_contiguous)
aggregated_dataframe = dataframe.groupby('dim_one').sum()
print("Aggregated DataFrame is C-contiguous: ", aggregated_dataframe.values.flags.c_contiguous)
## Output in Jupyter Notebook
# pandas version: 0.23.4
# Numpy array is C-contiguous: True
# DataFrame is C-contiguous: True
# Copy of DataFrame is C-contiguous: False
# Aggregated DataFrame is C-contiguous: False
```
#### Problem description
pandas.DataFrame.copy return a copy with underlying numpy array with the major-ordering changed from C to F if initially was C order
pandas.DataFrame.groupby.sum return a a DataFrame with underlying numpy array with the major-ordering changed from C to F if initially was C order on the DataFrames values.
This impacts performance on aggregation substantially! I observer a decrease from 17 seconds to 5 min 46 seconds when aggregating on the index on a 45023 times 100000 scenarios dataset.
Copy and Aggregation operations need to preserve the major-order on the underlying data!
#### Expected Output
```python
# Output in Jupyter Notebook
pandas version: 0.23.4
Numpy array is C-contiguous: True
DataFrame is C-contiguous: True
Copy of DataFrame is C-contiguous: True
Aggregated DataFrame is C-contiguous: True
```
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit: None
python: 3.6.7.final.0
python-bits: 64
OS: Linux
OS-release: 3.10.0-862.14.4.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: 0.23.4
pytest: 3.2.3
pip: 19.0.2
setuptools: 40.8.0
Cython: 0.22
numpy: 1.15.4
scipy: 0.19.1
pyarrow: None
xarray: None
IPython: 7.2.0
sphinx: 1.6.3
patsy: 0.5.1
dateutil: 2.8.0
pytz: 2018.9
blosc: None
bottleneck: None
tables: 3.5.1
numexpr: 2.6.9
feather: None
matplotlib: 2.2.2
openpyxl: 2.4.7
xlrd: 1.1.0
xlwt: None
xlsxwriter: 1.0.2
lxml: None
bs4: None
html5lib: None
sqlalchemy: 1.3.3
pymysql: None
psycopg2: None
jinja2: 2.10
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: 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/26502/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26502/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26503 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26503/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26503/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26503/events | https://github.com/pandas-dev/pandas/issues/26503 | 447,641,048 | MDU6SXNzdWU0NDc2NDEwNDg= | 26,503 | MemoryError: INNER JOIN in a cluster of 65gb ram | {
"avatar_url": "https://avatars.githubusercontent.com/u/1332249?v=4",
"events_url": "https://api.github.com/users/set92/events{/privacy}",
"followers_url": "https://api.github.com/users/set92/followers",
"following_url": "https://api.github.com/users/set92/following{/other_user}",
"gists_url": "https://api.github.com/users/set92/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/set92",
"id": 1332249,
"login": "set92",
"node_id": "MDQ6VXNlcjEzMzIyNDk=",
"organizations_url": "https://api.github.com/users/set92/orgs",
"received_events_url": "https://api.github.com/users/set92/received_events",
"repos_url": "https://api.github.com/users/set92/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/set92/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/set92/subscriptions",
"type": "User",
"url": "https://api.github.com/users/set92"
} | [] | closed | false | null | [] | null | 1 | 2019-05-23T12:44:19Z | 2019-05-23T12:48:16Z | 2019-05-23T12:48:15Z | NONE | null | #### Code
```python
import pandas as pd
df_trans_items = pd.read_csv('../data/raw/df_transaction_item_201905091747.csv', dtype={'stock_code': str, 'system_reference': str}) #1.5gb
df_trans = pd.read_csv('../data/raw/df_transaction_201905091745.csv', dtype={'system_reference': str, 'trans_reference': str, 'pos_user_code': str }) # 1.0 gb
df_stock = pd.read_csv('../data/raw/df_stock_201905091744.csv') # 6.2 mb
df_trans_flight = pd.read_csv('../data/raw/df_transaction_flight_201905091747.csv') # 5.7 mb
df_stock_category = pd.read_csv('../data/raw/df_stock_category_201905091744.csv') # 12.7 kb
df_pos = pd.read_csv('../data/raw/df_pos_201905091657.csv') # 3.8 kb
df_shops = pd.read_csv('../data/raw/df_shop_201905091744.csv') # 2.1 kb
df_concessionaire = pd.read_csv('../data/raw/df_concessionaire_201905091656.csv')
df_ikdec = pd.read_csv('../data/raw/df_ikdec_201905091657.csv')
df_trans_staff = pd.read_csv('../data/raw/df_transaction_staff_201905091749.csv') # 872 bytes
stock_category_merged = pd.merge(df_stock, df_stock_category, how='inner',
on=['company_code', 'shop_code', 'category_code'], suffixes=('_stock', '_stck_category'))
stock_concessionaire_merged = pd.merge(stock_category_merged, df_concessionaire, how='inner',
on=['company_code'], suffixes=('_stock', '_concessionaire'))
stock_shop_merged = pd.merge(stock_concessionaire_merged, df_shops, how='inner',
on=['company_code', 'shop_code'], suffixes=('_stock', '_shops'))
trans_items_merged = pd.merge(df_trans, df_trans_items, how='inner',
on=['system_reference'], suffixes=('_trans', '_trans_items'))
trans_pos_merged = pd.merge(trans_items_merged, df_pos, how='inner',
on=['pos_code', 'shop_code'], suffixes=('_trans', '_pos'))
# And here fails
df_final = pd.merge(trans_pos_merged, stock_shop_merged, how='inner',
on=['shop_code'], suffixes=('_trans', '_shop'))
```
#### Problem description
So I have some tables exported from PostgreSQL, and I wanted to join all of them, I saw in my laptop(archlinux x64) that the ram consumption got to 14gb, and I switched to a linux cluster my company has. And there keep happening the same, all the joins works fine until the last one where it always outputs MemoryError, I tried **del** variables and using Dask without luck. So not sure how I can do to join all this tables, the bigger files are
df_trans.shape - (7807645, 11)
df_trans_items.shape - (11618559, 14)
But the ones used for the merge of df_final are
trans_pos_merged.shape = (11618500, 25)
stock_shop_merged.shape = (101441, 16)
So I'm not sure from where it comes the MemoryError since I think it can fit in 65gb ram.
```python
---------------------------------------------------------------------------
MemoryError Traceback (most recent call last)
<ipython-input-7-0e1d858584c1> in <module>
----> 1 df_final = pd.merge(trans_pos_merged, stock_shop_merged, how='inner',
on=['shop_code'], suffixes=('_trans', '_shop'))
/usr/lib64/python3.6/site-packages/pandas/core/reshape/merge.py in merge(left, right, how, on, left_on, right_on, left_index, right_index, sort, suffixes, copy, indicator, validate)
46 copy=copy, indicator=indicator,
47 validate=validate)
---> 48 return op.get_result()
49
50
/usr/lib64/python3.6/site-packages/pandas/core/reshape/merge.py in get_result(self)
544 self.left, self.right)
545
--> 546 join_index, left_indexer, right_indexer = self._get_join_info()
547
548 ldata, rdata = self.left._data, self.right._data
/usr/lib64/python3.6/site-packages/pandas/core/reshape/merge.py in _get_join_info(self)
742 join_index, left_indexer, right_indexer = \
743 left_ax.join(right_ax, how=self.how, return_indexers=True,
--> 744 sort=self.sort)
745 elif self.right_index and self.how == 'left':
746 join_index, left_indexer, right_indexer = \
/usr/lib64/python3.6/site-packages/pandas/core/indexes/base.py in join(self, other, how, level, return_indexers, sort)
3287 if not self.is_unique and not other.is_unique:
3288 return self._join_non_unique(other, how=how,
-> 3289 return_indexers=return_indexers)
3290 elif not self.is_unique or not other.is_unique:
3291 if self.is_monotonic and other.is_monotonic:
/usr/lib64/python3.6/site-packages/pandas/core/indexes/base.py in _join_non_unique(self, other, how, return_indexers)
3406 [other._ndarray_values],
3407 how=how,
-> 3408 sort=True)
3409
3410 left_idx = ensure_platform_int(left_idx)
/usr/lib64/python3.6/site-packages/pandas/core/reshape/merge.py in _get_join_indexers(left_keys, right_keys, sort, how, **kwargs)
1144 join_func = _join_functions[how]
1145
-> 1146 return join_func(lkey, rkey, count, **kwargs)
1147
1148
pandas/_libs/join.pyx in pandas._libs.join.inner_join()
MemoryError:
```
#### Expected Output
The merge of trans_pos_merged and stock_shop_merged.
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit: None
python: 3.6.7.final.0
python-bits: 64
OS: Linux
OS-release: 3.10.0-862.14.4.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: 0.24.2
pytest: None
pip: 19.1.1
setuptools: 39.0.1
Cython: None
numpy: 1.16.2
scipy: 1.2.1
pyarrow: None
xarray: None
IPython: 7.3.0
sphinx: None
patsy: None
dateutil: 2.8.0
pytz: 2018.9
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: 3.0.3
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml.etree: None
bs4: None
html5lib: None
sqlalchemy: 1.2.18
pymysql: None
psycopg2: None
jinja2: 2.10
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/26503/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26503/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26504 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26504/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26504/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26504/events | https://github.com/pandas-dev/pandas/issues/26504 | 447,715,182 | MDU6SXNzdWU0NDc3MTUxODI= | 26,504 | BUG: ordered categorical comparison with missing values evaluates to True | {
"avatar_url": "https://avatars.githubusercontent.com/u/1563689?v=4",
"events_url": "https://api.github.com/users/mzwiessele/events{/privacy}",
"followers_url": "https://api.github.com/users/mzwiessele/followers",
"following_url": "https://api.github.com/users/mzwiessele/following{/other_user}",
"gists_url": "https://api.github.com/users/mzwiessele/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mzwiessele",
"id": 1563689,
"login": "mzwiessele",
"node_id": "MDQ6VXNlcjE1NjM2ODk=",
"organizations_url": "https://api.github.com/users/mzwiessele/orgs",
"received_events_url": "https://api.github.com/users/mzwiessele/received_events",
"repos_url": "https://api.github.com/users/mzwiessele/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mzwiessele/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mzwiessele/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mzwiessele"
} | [
{
"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"
},
{
"c... | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"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": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 3 | 2019-05-23T15:01:00Z | 2019-06-01T14:51:27Z | 2019-06-01T14:51:27Z | NONE | null | #### Code Sample, a copy-pastable example if possible
```python
import pandas as pd
pd.Categorical(["1", "2", "3", None], categories=["1", "2", "3"], ordered=True) <= "2"
# => array([ True, True, False, True])
```
#### Problem description
Here a missing entry is being evaluated as `None <= "2" == True`. Shouldn't missing values always be evaluate to `False` in any comparison?
I think this is related to #4537
#### Expected Output
```python
import pandas as pd
pd.Categorical(["1", "2", "3", None], categories=["1", "2", "3"], ordered=True) <= "2"
# => array([ True, True, False, False])
```
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit: None
python: 3.6.8.final.0
python-bits: 64
OS: Darwin
OS-release: 17.5.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: en_GB.UTF-8
LOCALE: en_GB.UTF-8
pandas: 0.24.2
pytest: 3.6.2
pip: 10.0.1
setuptools: 39.2.0
Cython: 0.28.3
numpy: 1.16.3
scipy: 1.2.1
pyarrow: None
xarray: None
IPython: 7.1.1
sphinx: 1.7.5
patsy: 0.5.0
dateutil: 2.7.3
pytz: 2018.4
blosc: None
bottleneck: 1.2.1
tables: 3.4.4
numexpr: 2.6.9
feather: None
matplotlib: 3.0.3
openpyxl: 2.5.4
xlrd: 1.1.0
xlwt: 1.2.0
xlsxwriter: 1.0.5
lxml.etree: 4.2.2
bs4: 4.6.0
html5lib: 0.9999999
sqlalchemy: 1.2.8
pymysql: None
psycopg2: None
jinja2: 2.10
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/26504/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26504/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26505 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26505/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26505/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26505/events | https://github.com/pandas-dev/pandas/pull/26505 | 447,763,754 | MDExOlB1bGxSZXF1ZXN0MjgxNjk1MDE3 | 26,505 | CLN: Remove StringMixin from PandasObject | {
"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": "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... | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"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": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 3 | 2019-05-23T16:36:03Z | 2019-05-25T07:32:31Z | 2019-05-24T15:29:33Z | CONTRIBUTOR | null | - [x] closes #26495
- [ ] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry
Addresses #26495. In addition to the use of StringMixin in PandasObject, StringMixin is also used in core.computation and the io.pytables. I'd like to tackle those in a different PR, as there is some funkyness there (calls that depend on frame depth etc.)
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26505/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26505/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26505.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26505",
"merged_at": "2019-05-24T15:29:33Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26505.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26505"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26506 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26506/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26506/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26506/events | https://github.com/pandas-dev/pandas/issues/26506 | 447,817,399 | MDU6SXNzdWU0NDc4MTczOTk= | 26,506 | IntervalIndex.get_indexer "method" options are not implemented but documentation implies they are | {
"avatar_url": "https://avatars.githubusercontent.com/u/17896221?v=4",
"events_url": "https://api.github.com/users/lucianoviola/events{/privacy}",
"followers_url": "https://api.github.com/users/lucianoviola/followers",
"following_url": "https://api.github.com/users/lucianoviola/following{/other_user}",
"gists_url": "https://api.github.com/users/lucianoviola/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/lucianoviola",
"id": 17896221,
"login": "lucianoviola",
"node_id": "MDQ6VXNlcjE3ODk2MjIx",
"organizations_url": "https://api.github.com/users/lucianoviola/orgs",
"received_events_url": "https://api.github.com/users/lucianoviola/received_events",
"repos_url": "https://api.github.com/users/lucianoviola/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/lucianoviola/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/lucianoviola/subscriptions",
"type": "User",
"url": "https://api.github.com/users/lucianoviola"
} | [
{
"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": "0b02e1",
"default": false,
"description": "Related to indexing o... | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"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": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 4 | 2019-05-23T18:45:44Z | 2019-05-30T01:28:42Z | 2019-05-30T01:28:42Z | CONTRIBUTOR | null | #### Problem description
`IntervalIndex.get_indexer` returns `NotImplementedError` if `method` is any of the ones shown in the docstring and documentation (except for 'method=None'). I understand that they are not implemented yet, but that is not clear from the docstring. It presents the 5 available options as if they are implemented.
Wouldn't it be better to remove `method`, if none of the options are available? Or at least make it more clear in the documentation.
Documentation: https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.IntervalIndex.get_indexer.html
Exception is raised here:
https://github.com/pandas-dev/pandas/blob/master/pandas/core/indexes/interval.py#L811
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26506/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26506/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26507 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26507/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26507/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26507/events | https://github.com/pandas-dev/pandas/issues/26507 | 447,970,991 | MDU6SXNzdWU0NDc5NzA5OTE= | 26,507 | Merge fails when the dataframe contains an empty UInt/Int column | {
"avatar_url": "https://avatars.githubusercontent.com/u/14134694?v=4",
"events_url": "https://api.github.com/users/alvarodemig/events{/privacy}",
"followers_url": "https://api.github.com/users/alvarodemig/followers",
"following_url": "https://api.github.com/users/alvarodemig/following{/other_user}",
"gists_url": "https://api.github.com/users/alvarodemig/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/alvarodemig",
"id": 14134694,
"login": "alvarodemig",
"node_id": "MDQ6VXNlcjE0MTM0Njk0",
"organizations_url": "https://api.github.com/users/alvarodemig/orgs",
"received_events_url": "https://api.github.com/users/alvarodemig/received_events",
"repos_url": "https://api.github.com/users/alvarodemig/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/alvarodemig/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/alvarodemig/subscriptions",
"type": "User",
"url": "https://api.github.com/users/alvarodemig"
} | [
{
"color": "207de5",
"default": false,
"description": "Clarification about behavior needed to assess issue",
"id": 307649777,
"name": "Needs Info",
"node_id": "MDU6TGFiZWwzMDc2NDk3Nzc=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Needs%20Info"
}
] | closed | false | null | [] | null | 2 | 2019-05-24T04:11:51Z | 2019-08-21T16:30:40Z | 2019-08-21T16:30:40Z | NONE | null |
```python
import pandas as pd
import numpy as np
df = pd.DataFrame({'a': [np.nan, np.nan], 'b': [np.nan, 1], 'c': [0,1]}, dtype='Int8')
df['c'] = df.c.astype(int)
df.merge(df, on ='a') # Does not work
df.merge(df, on ='b') # Does not work
df.merge(df, on ='c') # Does not work
df.merge(df, right_index = True, left_index = True) # Works
df[['b']].merge(df[['b']], on ='b') #Works
df[['a']].merge(df[['a']], on ='a') #Does not work
df[['b', 'c']].merge(df[['b', 'c']], on ='b') #Works
df[['b', 'c']].merge(df[['b', 'c']], on ='c') #Works
df[['a', 'c']].merge(df[['a', 'c']], on ='a') #Does not work
df[['a', 'c']].merge(df[['a', 'c']], on ='c') #Does not work
```
#### Problem description
Merge fails returning `TypeError: data type not understood` when you try to merge a dataframe that contains an empty Int/UInt column and you don't use the index for the merge.
It seems to work if you use the index to merge, but it will fail if you use any other, no matter the type of the column
#### Expected Output
It is expected to complete the merge.
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit: None
python: 3.6.7.final.0
python-bits: 64
OS: Darwin
OS-release: 17.7.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8
pandas: 0.24.1
pytest: None
pip: 19.1
setuptools: 41.0.1
Cython: None
numpy: 1.14.1
scipy: 1.0.0
pyarrow: 0.10.0
xarray: None
IPython: 7.2.0
sphinx: None
patsy: None
dateutil: 2.7.5
pytz: 2019.1
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: 2.1.2
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: 1.1.7
lxml.etree: 4.3.3
bs4: 4.6.3
html5lib: None
sqlalchemy: None
pymysql: None
psycopg2: 2.7.3.2 (dt dec pq3 ext lo64)
jinja2: 2.10.1
s3fs: 0.1.4
fastparquet: 0.2.1
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/26507/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26507/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26508 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26508/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26508/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26508/events | https://github.com/pandas-dev/pandas/issues/26508 | 448,035,079 | MDU6SXNzdWU0NDgwMzUwNzk= | 26,508 | Cannot map column values based on column index | {
"avatar_url": "https://avatars.githubusercontent.com/u/585279?v=4",
"events_url": "https://api.github.com/users/mitar/events{/privacy}",
"followers_url": "https://api.github.com/users/mitar/followers",
"following_url": "https://api.github.com/users/mitar/following{/other_user}",
"gists_url": "https://api.github.com/users/mitar/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mitar",
"id": 585279,
"login": "mitar",
"node_id": "MDQ6VXNlcjU4NTI3OQ==",
"organizations_url": "https://api.github.com/users/mitar/orgs",
"received_events_url": "https://api.github.com/users/mitar/received_events",
"repos_url": "https://api.github.com/users/mitar/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mitar/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mitar/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mitar"
} | [
{
"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 | [] | {
"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 | 2019-05-24T08:09:35Z | 2019-05-24T16:39:24Z | 2019-05-24T16:22:37Z | CONTRIBUTOR | null | #### Code Sample, a copy-pastable example if possible
```python
df.iloc[:, 0] = df.iloc[:, 0].map(lambda x: x + 1)
```
#### Problem description
The above raises a warning:
```
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
```
I have not found a way where I could map values in a column, but that column would be identified by the column index and that it would work with columns with non-unique column names.
#### Output of ``pd.show_versions()``
<details>
Python 3.6.7 (default, Oct 22 2018, 11:32:17)
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pandas as pd
pd.show_versions()>>> pd.show_versions()
INSTALLED VERSIONS
------------------
commit: None
python: 3.6.7.final.0
python-bits: 64
OS: Linux
OS-release: 4.18.0-20-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: en_US.UTF-8
LANG: None
LOCALE: en_US.UTF-8
pandas: 0.23.4
pytest: 4.5.0
pip: 19.0.3
setuptools: 41.0.1
Cython: 0.29.7
numpy: 1.15.4
scipy: 1.2.1
pyarrow: 0.13.0
xarray: None
IPython: None
sphinx: 1.6.7
patsy: 0.5.1
dateutil: 2.8.0
pytz: 2018.3
blosc: None
bottleneck: 1.2.1
tables: None
numexpr: 2.6.9
feather: None
matplotlib: 3.1.0
openpyxl: 2.5.14
xlrd: 1.2.0
xlwt: 1.3.0
xlsxwriter: None
lxml: 4.3.3
bs4: 4.7.1
html5lib: 1.0.1
sqlalchemy: None
pymysql: None
psycopg2: 2.8.2 (dt dec pq3 ext lo64)
jinja2: 2.10
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: 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/26508/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26508/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26509 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26509/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26509/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26509/events | https://github.com/pandas-dev/pandas/issues/26509 | 448,184,904 | MDU6SXNzdWU0NDgxODQ5MDQ= | 26,509 | Extremely slow custom function in pandas aggregate | {
"avatar_url": "https://avatars.githubusercontent.com/u/46532942?v=4",
"events_url": "https://api.github.com/users/mmoraschini/events{/privacy}",
"followers_url": "https://api.github.com/users/mmoraschini/followers",
"following_url": "https://api.github.com/users/mmoraschini/following{/other_user}",
"gists_url": "https://api.github.com/users/mmoraschini/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mmoraschini",
"id": 46532942,
"login": "mmoraschini",
"node_id": "MDQ6VXNlcjQ2NTMyOTQy",
"organizations_url": "https://api.github.com/users/mmoraschini/orgs",
"received_events_url": "https://api.github.com/users/mmoraschini/received_events",
"repos_url": "https://api.github.com/users/mmoraschini/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mmoraschini/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mmoraschini/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mmoraschini"
} | [] | closed | false | null | [] | null | 1 | 2019-05-24T13:55:33Z | 2019-05-24T13:58:49Z | 2019-05-24T13:58:49Z | NONE | null | I have a DataFrame of ~3 million rows and 5 columns. I take a subset of ~450000 rows from it and I want to apply a function on a moving window (the index is a datetime). If use a custom function the performance is extremely low.
This is a reproducible example of my problem:
```
import numpy as np
import pandas as pd
import time
def mymean(x):
return x.mean()
nrows = 3000000
ntrue = 450000
window = 5
rng = pd.date_range('2015-01-01 00:00:00', periods=nrows, freq='min')
data = pd.DataFrame({ 'A': rng, 'B' : np.random.randn(len(rng)), 'C' : np.random.randn(len(rng)), 'D' : np.random.randn(len(rng)), 'E' : np.zeros(len(rng), dtype=bool)})
data.loc[np.random.choice(np.arange(nrows), ntrue, replace=False), 'E'] = True
start_time = time.time()
channel_data = data[data['E'] == True].sort_values('A')
channel_data['A'] = pd.to_datetime(channel_data['A'],format='%Y-%m-%d %H:%M:%S').dt.floor('d')
channel_data = channel_data.set_index('A')
rolling_data = channel_data.rolling('{}D'.format(window)).agg({ 'B': mymean })
rolling_data = rolling_data.groupby(rolling_data.index.floor('d')).last()[window:]
print(rolling_data['B'].std())
print('Time needed: {} seconds'.format(time.time() - start_time))
```
If I use `mymean` in the `aggregate` line, the execution time is:
`Time needed: 50.55572175979614 seconds`
If I use `np.mean` or I just pass in the string 'mean':
`Time needed: 0.09020495414733887 seconds`
#### Output of ``pd.show_versions()``
INSTALLED VERSIONS
------------------
commit: None
python: 3.5.6.final.0
python-bits: 64
OS: Linux
OS-release: 4.15.0-50-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_GB.UTF-8
LOCALE: en_GB.UTF-8
pandas: 0.23.4
pytest: None
pip: 10.0.1
setuptools: 40.2.0
Cython: None
numpy: 1.14.2
scipy: 1.1.0
pyarrow: None
xarray: None
IPython: 6.5.0
sphinx: 1.7.9
patsy: None
dateutil: 2.7.3
pytz: 2018.5
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: 3.0.0
openpyxl: None
xlrd: 1.1.0
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: 0.9999999
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.10
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: 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/26509/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26509/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26510 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26510/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26510/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26510/events | https://github.com/pandas-dev/pandas/issues/26510 | 448,243,171 | MDU6SXNzdWU0NDgyNDMxNzE= | 26,510 | CLN: modernize describe_categorical_1d | {
"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"
} | [
{
"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... | 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"
} | 2 | 2019-05-24T15:58:11Z | 2021-07-10T01:48:42Z | 2021-07-10T01:48:42Z | CONTRIBUTOR | null | https://github.com/pandas-dev/pandas/pull/26474/files#diff-03b380f521c43cf003207b0711bac67fL9898
This is very hacky way of processing datetimelikes. Also this likely doesn't properly handle categoricals that have other things as categories (Timedelta, Extension scalars) | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26510/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26510/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26511 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26511/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26511/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26511/events | https://github.com/pandas-dev/pandas/issues/26511 | 448,272,420 | MDU6SXNzdWU0NDgyNzI0MjA= | 26,511 | Inconsistent behaviour of __getitem__ and .loc with slices for DataFrames with MultiIndex columns | {
"avatar_url": "https://avatars.githubusercontent.com/u/18049056?v=4",
"events_url": "https://api.github.com/users/plammens/events{/privacy}",
"followers_url": "https://api.github.com/users/plammens/followers",
"following_url": "https://api.github.com/users/plammens/following{/other_user}",
"gists_url": "https://api.github.com/users/plammens/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/plammens",
"id": 18049056,
"login": "plammens",
"node_id": "MDQ6VXNlcjE4MDQ5MDU2",
"organizations_url": "https://api.github.com/users/plammens/orgs",
"received_events_url": "https://api.github.com/users/plammens/received_events",
"repos_url": "https://api.github.com/users/plammens/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/plammens/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/plammens/subscriptions",
"type": "User",
"url": "https://api.github.com/users/plammens"
} | [
{
"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 s... | 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"
} | 11 | 2019-05-24T17:15:48Z | 2021-07-10T01:50:52Z | null | CONTRIBUTOR | null | #### Code Sample
```python
import numpy as np
import pandas as pd
data = np.zeros((3, 6), dtype=np.int16)
col_index = pd.MultiIndex.from_product([['A', 'B', 'C'], ['t1', 't2']])
df = pd.DataFrame(data, columns=col_index)
```
```python
>>> df
A B C
t1 t2 t1 t2 t1 t2
0 0 0 0 0 0 0
1 0 0 0 0 0 0
2 0 0 0 0 0 0
```
```python
>>> df['A']
t1 t2
0 0 0
1 0 0
2 0 0
```
```python
>>> df[:, 't1']
Traceback (most recent call last):
File "<ipython-input-20-c0e18fe6137b>", line 1, in <module>
df[:, 't1']
File "c:\users\paolo\code\ipython\lib\site-packages\pandas\core\frame.py", line 2926, in __getitem__
return self._getitem_multilevel(key)
File "c:\users\paolo\code\ipython\lib\site-packages\pandas\core\frame.py", line 2972, in _getitem_multilevel
loc = self.columns.get_loc(key)
File "c:\users\paolo\code\ipython\lib\site-packages\pandas\core\indexes\multi.py", line 2406, in get_loc
return self._engine.get_loc(key)
File "pandas\_libs\index.pyx", line 665, in pandas._libs.index.BaseMultiIndexCodesEngine.get_loc
TypeError: '(slice(None, None, None), 't1')' is an invalid key
```
but
```python
>>> df.loc[:, (slice(None), 't1')]
A B C
t1 t1 t1
0 0 0 0
1 0 0 0
2 0 0 0
```
#### Problem description
Dataframes with `MultiIndex` columns aren't able to make a "cross section" slice (i.e., selecting all sub-columns of a certain label for every "major" column). I know this behaviour is provided by [`DataFrame.xs` & company](http://pandas.pydata.org/pandas-docs/stable/user_guide/advanced.html#cross-section), but I don't see why it is beneficial to ignore this inconsistency and make a separate method for the purpose, since `DataFrame.__getitem__` already interprets a tuple indexer as a column indexing when `columns` is a `MultiIndex` (but it just supports selecting exactly one label for each sub-index).
#### Expected Output
`df[:, 't1']` doesn't throw; it returns a `DataFrame` with only the `t1` sub-columns from columns `A`, `B`, and `C` (like the one returned by `df.loc[:, (slice(None), 't1')]`.
#### Output of ``pd.show_versions()``
<details>
```text
INSTALLED VERSIONS
------------------
commit: 998a0deea39f11fa06071af77cc1afba65900330
python: 3.7.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: None.None
pandas: 0.25.0.dev0+605.gb730ab35e
pytest: 4.5.0
pip: 19.1.1
setuptools: 41.0.1
Cython: 0.29.7
numpy: 1.16.3
scipy: 1.3.0
pyarrow: 0.13.0
xarray: 0.12.1
IPython: 7.5.0
sphinx: 2.0.1
patsy: 0.5.1
dateutil: 2.8.0
pytz: 2019.1
blosc: 1.8.1
bottleneck: 1.2.1
tables: 3.5.1
numexpr: 2.6.9
feather: None
matplotlib: 3.1.0
openpyxl: 2.6.2
xlrd: 1.2.0
xlwt: 1.3.0
xlsxwriter: 1.1.8
lxml.etree: 4.3.3
bs4: 4.7.1
html5lib: 1.0.1
sqlalchemy: 1.3.3
pymysql: None
psycopg2: None
jinja2: 2.10.1
s3fs: 0.2.1
fastparquet: 0.3.1
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/26511/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26511/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26512 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26512/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26512/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26512/events | https://github.com/pandas-dev/pandas/issues/26512 | 448,321,151 | MDU6SXNzdWU0NDgzMjExNTE= | 26,512 | Allow Keyword aggregation in SeriesGroupBy | {
"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": "e11d21",
"default": false,
"description": "Blocking issue ... | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"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": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 0 | 2019-05-24T19:24:56Z | 2019-06-10T12:45:05Z | 2019-06-10T12:45:05Z | CONTRIBUTOR | null | Followup to https://github.com/pandas-dev/pandas/pull/26399
```python
In [1]: df = pd.DataFrame({'A': [1, 1, 1, 2, 2],
...: 'B': range(5),
...: 'C': range(5)})
In [2]: df
Out[2]:
A B C
0 1 0 0
1 1 1 1
2 1 2 2
3 2 3 3
4 2 4 4
In [3]: df.groupby('A').B.agg(foo='count')
Out[3]:
foo
A
1 3
2 2
```
https://github.com/pandas-dev/pandas/pull/26399#pullrequestreview-241906201
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26512/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26512/timeline | null | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.