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/40019 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40019/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40019/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40019/events | https://github.com/pandas-dev/pandas/pull/40019 | 815,575,729 | MDExOlB1bGxSZXF1ZXN0NTc5MzgyODI3 | 40,019 | DOC: Edit regression fix release note | {
"avatar_url": "https://avatars.githubusercontent.com/u/2658661?v=4",
"events_url": "https://api.github.com/users/dsaxton/events{/privacy}",
"followers_url": "https://api.github.com/users/dsaxton/followers",
"following_url": "https://api.github.com/users/dsaxton/following{/other_user}",
"gists_url": "https://api.github.com/users/dsaxton/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dsaxton",
"id": 2658661,
"login": "dsaxton",
"node_id": "MDQ6VXNlcjI2NTg2NjE=",
"organizations_url": "https://api.github.com/users/dsaxton/orgs",
"received_events_url": "https://api.github.com/users/dsaxton/received_events",
"repos_url": "https://api.github.com/users/dsaxton/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dsaxton/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dsaxton/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dsaxton"
} | [
{
"color": "3465A4",
"default": false,
"description": null,
"id": 134699,
"name": "Docs",
"node_id": "MDU6TGFiZWwxMzQ2OTk=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Docs"
},
{
"color": "6138b5",
"default": false,
"description": "Extending pandas with custom dtypes or arrays.",
"id": 849023693,
"name": "ExtensionArray",
"node_id": "MDU6TGFiZWw4NDkwMjM2OTM=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/ExtensionArray"
}
] | closed | false | null | [] | {
"closed_at": "2021-03-02T08:40:51Z",
"closed_issues": 49,
"created_at": "2021-02-07T13:58:05Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/13159005?v=4",
"events_url": "https://api.github.com/users/simonjayhawkins/events{/privacy}",
"followers_url": "https://api.github.com/users/simonjayhawkins/followers",
"following_url": "https://api.github.com/users/simonjayhawkins/following{/other_user}",
"gists_url": "https://api.github.com/users/simonjayhawkins/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/simonjayhawkins",
"id": 13159005,
"login": "simonjayhawkins",
"node_id": "MDQ6VXNlcjEzMTU5MDA1",
"organizations_url": "https://api.github.com/users/simonjayhawkins/orgs",
"received_events_url": "https://api.github.com/users/simonjayhawkins/received_events",
"repos_url": "https://api.github.com/users/simonjayhawkins/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/simonjayhawkins/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/simonjayhawkins/subscriptions",
"type": "User",
"url": "https://api.github.com/users/simonjayhawkins"
},
"description": "on-merge: backport to 1.2.x\r\n\r\n",
"due_on": "2021-03-01T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/83",
"id": 6402340,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/83/labels",
"node_id": "MDk6TWlsZXN0b25lNjQwMjM0MA==",
"number": 83,
"open_issues": 0,
"state": "closed",
"title": "1.2.3",
"updated_at": "2021-03-02T17:15:27Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/83"
} | 2 | 2021-02-24T15:18:21Z | 2021-02-27T12:20:32Z | 2021-02-24T17:03:04Z | MEMBER | null | https://github.com/pandas-dev/pandas/pull/39971#discussion_r581750590 | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40019/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40019/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40019.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40019",
"merged_at": "2021-02-24T17:03:04Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/40019.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40019"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/40020 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40020/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40020/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40020/events | https://github.com/pandas-dev/pandas/pull/40020 | 815,603,381 | MDExOlB1bGxSZXF1ZXN0NTc5NDA1Nzk1 | 40,020 | CI/TST: Supply dtype to coo_matrix until scipy is fixed | {
"avatar_url": "https://avatars.githubusercontent.com/u/45562402?v=4",
"events_url": "https://api.github.com/users/rhshadrach/events{/privacy}",
"followers_url": "https://api.github.com/users/rhshadrach/followers",
"following_url": "https://api.github.com/users/rhshadrach/following{/other_user}",
"gists_url": "https://api.github.com/users/rhshadrach/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/rhshadrach",
"id": 45562402,
"login": "rhshadrach",
"node_id": "MDQ6VXNlcjQ1NTYyNDAy",
"organizations_url": "https://api.github.com/users/rhshadrach/orgs",
"received_events_url": "https://api.github.com/users/rhshadrach/received_events",
"repos_url": "https://api.github.com/users/rhshadrach/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/rhshadrach/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rhshadrach/subscriptions",
"type": "User",
"url": "https://api.github.com/users/rhshadrach"
} | [
{
"color": "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": "a2bca7",
"default": false,
"description": "Continuous Integration",
"id": 48070600,
"name": "CI",
"node_id": "MDU6TGFiZWw0ODA3MDYwMA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/CI"
},
{
"color": "d93f0b",
"default": false,
"description": "Required and optional dependencies",
"id": 527603109,
"name": "Dependencies",
"node_id": "MDU6TGFiZWw1Mjc2MDMxMDk=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Dependencies"
}
] | closed | false | null | [] | {
"closed_at": "2021-03-02T08:40:51Z",
"closed_issues": 49,
"created_at": "2021-02-07T13:58:05Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/13159005?v=4",
"events_url": "https://api.github.com/users/simonjayhawkins/events{/privacy}",
"followers_url": "https://api.github.com/users/simonjayhawkins/followers",
"following_url": "https://api.github.com/users/simonjayhawkins/following{/other_user}",
"gists_url": "https://api.github.com/users/simonjayhawkins/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/simonjayhawkins",
"id": 13159005,
"login": "simonjayhawkins",
"node_id": "MDQ6VXNlcjEzMTU5MDA1",
"organizations_url": "https://api.github.com/users/simonjayhawkins/orgs",
"received_events_url": "https://api.github.com/users/simonjayhawkins/received_events",
"repos_url": "https://api.github.com/users/simonjayhawkins/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/simonjayhawkins/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/simonjayhawkins/subscriptions",
"type": "User",
"url": "https://api.github.com/users/simonjayhawkins"
},
"description": "on-merge: backport to 1.2.x\r\n\r\n",
"due_on": "2021-03-01T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/83",
"id": 6402340,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/83/labels",
"node_id": "MDk6TWlsZXN0b25lNjQwMjM0MA==",
"number": 83,
"open_issues": 0,
"state": "closed",
"title": "1.2.3",
"updated_at": "2021-03-02T17:15:27Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/83"
} | 9 | 2021-02-24T15:48:17Z | 2021-02-24T23:15:40Z | 2021-02-24T23:09:28Z | MEMBER | null | - [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
Fixes CI for Windows 3.7 np1.6; regression in scipy 1.6.1 (https://github.com/scipy/scipy/issues/13585)
Alternative would be to pin build, wasn't sure which is prefered over the other. Will open tracking issue once the method is decided. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40020/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40020/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40020.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40020",
"merged_at": "2021-02-24T23:09:28Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/40020.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40020"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/40021 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40021/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40021/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40021/events | https://github.com/pandas-dev/pandas/issues/40021 | 815,610,132 | MDU6SXNzdWU4MTU2MTAxMzI= | 40,021 | TST: find solution for extension/tests_numpy.py (PandasArray base extension tests) | {
"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": "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": "6138b5",
"default": false,
"description": "Extending pandas with custom dtypes or arrays.",
"id": 849023693,
"name": "ExtensionArray",
"node_id": "MDU6TGFiZWw4NDkwMjM2OTM=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/ExtensionArray"
}
] | open | false | null | [] | null | 1 | 2021-02-24T15:55:33Z | 2021-02-24T17:14:06Z | null | MEMBER | null | We currently run the base extension tests also for the `PandasArray` (to have coverage of this array class), but because we actually don't allow to store this in a Series/DataFrame, the tests do some patching to workaround this:
https://github.com/pandas-dev/pandas/blob/dec7d213fb27e9eafb61201f173c241d7105f772/pandas/tests/extension/test_numpy.py#L36-L54
However, this regularly gives problems, see eg https://github.com/pandas-dev/pandas/pull/39991#discussion_r581114674 or https://github.com/pandas-dev/pandas/pull/39722#discussion_r573896611, where for some reason those PandasArrays do / don't get preserved in a DataFrame/Series due to some other code changes that impact this, and the tests are not written to deal with it.
(one example: `extract_array` will convert a pandas Series with numpy dtype into a PandasArray, when the patch is enabled. This can then cause the result to include the PandasArray EA, while the expected result is not created that way)
So we should try to find a solution for this (as it gets quite annoying to deal with it just to get those tests passing). But I don't directly know what the best solution would be.
Some ideas:
- Simply remove `tests/extension/test_numpy.py` and thus don't run the base extension interface tests for PandasArray. We still have `tests/arrays/test_numpy.py` for some other tests. The easiest solution, but would also remove test coverage.
- In some way only run the tests in `tests/extension/test_numpy.py` that only deal with the array, and not with the array stored in DataFrame/Series.
cc @TomAugspurger @jbrockmendel | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40021/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40021/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/40022 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40022/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40022/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40022/events | https://github.com/pandas-dev/pandas/pull/40022 | 815,613,393 | MDExOlB1bGxSZXF1ZXN0NTc5NDE0MDYy | 40,022 | BUG: raise on RangeIndex.array | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [
{
"color": "0052cc",
"default": false,
"description": "pandas objects compatability with Numpy or Python functions",
"id": 76865106,
"name": "Compat",
"node_id": "MDU6TGFiZWw3Njg2NTEwNg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Compat"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 15 | 2021-02-24T15:59:13Z | 2021-04-08T01:15:19Z | 2021-04-08T00:53:58Z | MEMBER | null | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
xerf #37277 cc @TomAugspurger this is failing one of the dask tests locally, looks like dask is calling `index.array`. Thoughts on how to handle this?
Might be worth folding the RangeIndex check into a keyword in extract_array. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40022/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40022/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40022.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40022",
"merged_at": "2021-04-08T00:53:58Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/40022.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40022"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/40023 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40023/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40023/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40023/events | https://github.com/pandas-dev/pandas/issues/40023 | 815,616,509 | MDU6SXNzdWU4MTU2MTY1MDk= | 40,023 | Adding a down-sampling function based on an input list/array for new column/index resolution. Does not depend on uniform distribution. | {
"avatar_url": "https://avatars.githubusercontent.com/u/78487684?v=4",
"events_url": "https://api.github.com/users/bernski/events{/privacy}",
"followers_url": "https://api.github.com/users/bernski/followers",
"following_url": "https://api.github.com/users/bernski/following{/other_user}",
"gists_url": "https://api.github.com/users/bernski/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/bernski",
"id": 78487684,
"login": "bernski",
"node_id": "MDQ6VXNlcjc4NDg3Njg0",
"organizations_url": "https://api.github.com/users/bernski/orgs",
"received_events_url": "https://api.github.com/users/bernski/received_events",
"repos_url": "https://api.github.com/users/bernski/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/bernski/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bernski/subscriptions",
"type": "User",
"url": "https://api.github.com/users/bernski"
} | [
{
"color": "4E9A06",
"default": false,
"description": null,
"id": 76812,
"name": "Enhancement",
"node_id": "MDU6TGFiZWw3NjgxMg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Enhancement"
},
{
"color": "207de5",
"default": false,
"description": "Clarification about behavior needed to assess issue",
"id": 307649777,
"name": "Needs Info",
"node_id": "MDU6TGFiZWwzMDc2NDk3Nzc=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Needs%20Info"
}
] | closed | false | null | [] | null | 6 | 2021-02-24T16:02:39Z | 2021-02-25T14:01:57Z | 2021-02-25T14:01:57Z | NONE | null | #### Is your feature request related to a problem?
I recently posted an inquiry on Stack Overflow requesting assistance regarding Pandas and down-sampling. I had some forward binned data, particle counts logged at various diameters:
296.54,303.14,311.88,320.87,330.12,339.63,349.42,359.49,369.86,380.52,391.49,402.77 nm
The counts were logged at between 296.54 and 303.14 nm, and so on.
I wanted to re-bin those counts to a new set of diameters:
300,325,350,375,400 nm
where the counts would be logged between 300 and 325 nm and so on.
I had to, column by column, brute force add and interpolate matching diameters. For instance the 300-325 nm bin would contain part of the 296-303 bin, plus the bins up to 320 nm, and part of the 320-330nm bin. and so on.
#### Describe the solution you'd like
I would like to see a solution where one pandas dataframe can be interpolated to not a higher resolution, but a lower one, set by a second set of values, either on columns (my specific example) or indices. Currently the interpolate function only fills missing data, it does not, to my knowledge, completely rebuild the dataframe to an entirely new resolution, one that may not, in fact, be uniformly distributed.
#### API breaking implications
[this should provide a description of how this feature will affect the API]
#### Describe alternatives you've considered
The challenge is that the size spectrum cannot be linearly interpreted between the smallest and largest diameters. So a simple sum, re-index and interpolate would not conserve spectral data.
Nor does the resample function do the trick since it applies to datetime indices only.
#### Additional context
This particular example if for forward-binned data. Some thought would have to be given to manage backward-binned or center-binned data.
### My code example
I apologize for the crudity, but I am not a Pandas developer. Here is what my implementation ended up being:
```python
# set up a 10x12 test array
test_array=(np.arange(120)).reshape(10,12)
# set a simple index
index_list=list(string.ascii_lowercase)[:10]
# initialize the high-resolution dataframe
df=pd.DataFrame(test_array, index=index_list)
# set the high-resolution column headers
df.columns=[296.54,303.14,311.88,320.87,330.12,339.63,349.42,359.49,369.86,380.52,391.49,402.77]
# set a column diameter array to search sort through
df_column_array=np.array(df.columns)
# set the new low-resolution diameters
new_columns=np.array([300,325,350,375,400])
# intialize a low-res dataframe
new_df=pd.DataFrame(columns=new_columns,index=index_list)
# loop through the low-res columns up to the second last (since these bins are forward counted)
for i,column in enumerate(new_columns[:-1]):
df_columns_backward_index=np.searchsorted(df.columns,column)-1 # locate the closest high-res bin before the current low res bin
df_columns_forward_index=np.searchsorted(df.columns,new_columns[i+1]) # locate the closest high-res bin after the current low res bin
backward_bin_size=df.columns[df_columns_backward_index+1]-df.columns[df_columns_backward_index] # calculate the first high-res bin size
# calculate the offset and fraction for interpolation
backward_offset=column-df.columns[df_columns_backward_index]
backward_fraction=1-backward_offset/backward_bin_size
# repeat for the last high-res bins closest to the current low-res bin
forward_bin_size=df.columns[df_columns_forward_index]-df.columns[df_columns_forward_index-1]
forward_offset=df.columns[df_columns_forward_index]-new_columns[i+1]
forward_fraction=1-forward_offset/forward_bin_size
# sum the fraction of high-res bins partially in the low-res bin along with the high-res bins fully within the low-res bin
new_df[column]=df.iloc[:,df_columns_backward_index]*backward_fraction+df.iloc[:,df_columns_backward_index+1:df_columns_forward_index-1].sum(axis=1)+df.iloc[:,df_columns_forward_index-1]*forward_fraction
```
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40023/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40023/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/40024 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40024/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40024/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40024/events | https://github.com/pandas-dev/pandas/issues/40024 | 815,662,770 | MDU6SXNzdWU4MTU2NjI3NzA= | 40,024 | BUG: Calling to_html with float_format strips all trailing zeros if an integer string is returned from the formatter | {
"avatar_url": "https://avatars.githubusercontent.com/u/69582254?v=4",
"events_url": "https://api.github.com/users/gregmagee/events{/privacy}",
"followers_url": "https://api.github.com/users/gregmagee/followers",
"following_url": "https://api.github.com/users/gregmagee/following{/other_user}",
"gists_url": "https://api.github.com/users/gregmagee/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/gregmagee",
"id": 69582254,
"login": "gregmagee",
"node_id": "MDQ6VXNlcjY5NTgyMjU0",
"organizations_url": "https://api.github.com/users/gregmagee/orgs",
"received_events_url": "https://api.github.com/users/gregmagee/received_events",
"repos_url": "https://api.github.com/users/gregmagee/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/gregmagee/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gregmagee/subscriptions",
"type": "User",
"url": "https://api.github.com/users/gregmagee"
} | [
{
"color": "ededed",
"default": false,
"description": "__repr__ of pandas objects, to_string",
"id": 13101118,
"name": "Output-Formatting",
"node_id": "MDU6TGFiZWwxMzEwMTExOA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Output-Formatting"
},
{
"color": "e11d21",
"default": false,
"description": "Functionality that used to work in a prior pandas version",
"id": 32815646,
"name": "Regression",
"node_id": "MDU6TGFiZWwzMjgxNTY0Ng==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Regression"
},
{
"color": "006b75",
"default": false,
"description": "read_html, to_html, Styler.apply, Styler.applymap",
"id": 57395487,
"name": "IO HTML",
"node_id": "MDU6TGFiZWw1NzM5NTQ4Nw==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20HTML"
}
] | closed | false | null | [] | {
"closed_at": "2021-04-13T15:44:36Z",
"closed_issues": 46,
"created_at": "2021-03-01T08:32:08Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/13159005?v=4",
"events_url": "https://api.github.com/users/simonjayhawkins/events{/privacy}",
"followers_url": "https://api.github.com/users/simonjayhawkins/followers",
"following_url": "https://api.github.com/users/simonjayhawkins/following{/other_user}",
"gists_url": "https://api.github.com/users/simonjayhawkins/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/simonjayhawkins",
"id": 13159005,
"login": "simonjayhawkins",
"node_id": "MDQ6VXNlcjEzMTU5MDA1",
"organizations_url": "https://api.github.com/users/simonjayhawkins/orgs",
"received_events_url": "https://api.github.com/users/simonjayhawkins/received_events",
"repos_url": "https://api.github.com/users/simonjayhawkins/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/simonjayhawkins/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/simonjayhawkins/subscriptions",
"type": "User",
"url": "https://api.github.com/users/simonjayhawkins"
},
"description": "on-merge: backport to 1.2.x",
"due_on": "2021-04-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/84",
"id": 6490488,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/84/labels",
"node_id": "MDk6TWlsZXN0b25lNjQ5MDQ4OA==",
"number": 84,
"open_issues": 0,
"state": "closed",
"title": "1.2.4",
"updated_at": "2021-04-14T14:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/84"
} | 2 | 2021-02-24T16:52:41Z | 2021-04-11T12:39:10Z | 2021-04-11T12:39:10Z | NONE | null | - [x] I have checked that this issue has not already been reported.
- [x] I have confirmed this bug exists on the latest version of pandas.
- [ ] (optional) I have confirmed this bug exists on the master branch of pandas.
---
#### Code Sample, a copy-pastable example
```python
import pandas as pd
df = pd.DataFrame(data={'x': [1000.0, 'test']}) # Column dtype must be object
df.to_html(float_format=lambda x: '{:,.0f}'.format(x))
```
#### Output:
```html
'<table border="1" class="dataframe">\n <thead>\n <tr style="text-align: right;">\n <th></th>\n <th>x</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <th>0</th>\n <td>1,</td>\n </tr>\n <tr>\n <th>1</th>\n <td>test</td>\n </tr>\n </tbody>\n</table>'
```
#### Problem description
This caused by the rstrip in pandas.io.formats.format._trim_zeros_single_float()
#### Expected Output
```html
'<table border="1" class="dataframe">\n <thead>\n <tr style="text-align: right;">\n <th></th>\n <th>x</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <th>0</th>\n <td>1,000</td>\n </tr>\n <tr>\n <th>1</th>\n <td>test</td>\n </tr>\n </tbody>\n</table>'
```
#### Output of ``pd.show_versions()``
<details>
```
INSTALLED VERSIONS
------------------
pandas : 1.2.2
numpy : 1.20.1
pytz : 2021.1
dateutil : 2.8.1
pip : 20.3.3
setuptools : 51.3.3
```
</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/40024/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40024/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/40025 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40025/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40025/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40025/events | https://github.com/pandas-dev/pandas/pull/40025 | 815,672,087 | MDExOlB1bGxSZXF1ZXN0NTc5NDYzMDA5 | 40,025 | Backport PR #40019 on branch 1.2.x (DOC: Edit regression fix release note) | {
"avatar_url": "https://avatars.githubusercontent.com/u/39504233?v=4",
"events_url": "https://api.github.com/users/meeseeksmachine/events{/privacy}",
"followers_url": "https://api.github.com/users/meeseeksmachine/followers",
"following_url": "https://api.github.com/users/meeseeksmachine/following{/other_user}",
"gists_url": "https://api.github.com/users/meeseeksmachine/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/meeseeksmachine",
"id": 39504233,
"login": "meeseeksmachine",
"node_id": "MDQ6VXNlcjM5NTA0MjMz",
"organizations_url": "https://api.github.com/users/meeseeksmachine/orgs",
"received_events_url": "https://api.github.com/users/meeseeksmachine/received_events",
"repos_url": "https://api.github.com/users/meeseeksmachine/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/meeseeksmachine/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/meeseeksmachine/subscriptions",
"type": "User",
"url": "https://api.github.com/users/meeseeksmachine"
} | [
{
"color": "3465A4",
"default": false,
"description": null,
"id": 134699,
"name": "Docs",
"node_id": "MDU6TGFiZWwxMzQ2OTk=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Docs"
}
] | closed | false | null | [] | {
"closed_at": "2021-03-02T08:40:51Z",
"closed_issues": 49,
"created_at": "2021-02-07T13:58:05Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/13159005?v=4",
"events_url": "https://api.github.com/users/simonjayhawkins/events{/privacy}",
"followers_url": "https://api.github.com/users/simonjayhawkins/followers",
"following_url": "https://api.github.com/users/simonjayhawkins/following{/other_user}",
"gists_url": "https://api.github.com/users/simonjayhawkins/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/simonjayhawkins",
"id": 13159005,
"login": "simonjayhawkins",
"node_id": "MDQ6VXNlcjEzMTU5MDA1",
"organizations_url": "https://api.github.com/users/simonjayhawkins/orgs",
"received_events_url": "https://api.github.com/users/simonjayhawkins/received_events",
"repos_url": "https://api.github.com/users/simonjayhawkins/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/simonjayhawkins/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/simonjayhawkins/subscriptions",
"type": "User",
"url": "https://api.github.com/users/simonjayhawkins"
},
"description": "on-merge: backport to 1.2.x\r\n\r\n",
"due_on": "2021-03-01T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/83",
"id": 6402340,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/83/labels",
"node_id": "MDk6TWlsZXN0b25lNjQwMjM0MA==",
"number": 83,
"open_issues": 0,
"state": "closed",
"title": "1.2.3",
"updated_at": "2021-03-02T17:15:27Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/83"
} | 0 | 2021-02-24T17:03:28Z | 2021-02-25T00:45:25Z | 2021-02-25T00:45:25Z | NONE | null | Backport PR #40019: DOC: Edit regression fix release note | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40025/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40025/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40025.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40025",
"merged_at": "2021-02-25T00:45:25Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/40025.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40025"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/40026 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40026/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40026/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40026/events | https://github.com/pandas-dev/pandas/pull/40026 | 815,693,044 | MDExOlB1bGxSZXF1ZXN0NTc5NDgwNTY2 | 40,026 | REF: extract_array earlier in block construction | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [
{
"color": "fbca04",
"default": false,
"description": "Related to non-user accessible pandas implementation",
"id": 49094459,
"name": "Internals",
"node_id": "MDU6TGFiZWw0OTA5NDQ1OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Internals"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 1 | 2021-02-24T17:29:07Z | 2021-02-25T07:35:55Z | 2021-02-25T00:40:59Z | MEMBER | null | The idea is to eventually get the extract_array out of maybe_coerce_values which will improve `Block.__init__` perf.
The main remaining blocker to that is downstream usage. @jorisvandenbossche i know pyarrow accesses some of core.internals, do you know if it is just `make_block` or is anything else accessed? | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40026/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40026/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40026.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40026",
"merged_at": "2021-02-25T00:40:59Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/40026.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40026"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/40027 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40027/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40027/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40027/events | https://github.com/pandas-dev/pandas/issues/40027 | 815,717,400 | MDU6SXNzdWU4MTU3MTc0MDA= | 40,027 | CLN/TST: Revert supplying dtype to scipy.sparse.coo_matrix | {
"avatar_url": "https://avatars.githubusercontent.com/u/45562402?v=4",
"events_url": "https://api.github.com/users/rhshadrach/events{/privacy}",
"followers_url": "https://api.github.com/users/rhshadrach/followers",
"following_url": "https://api.github.com/users/rhshadrach/following{/other_user}",
"gists_url": "https://api.github.com/users/rhshadrach/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/rhshadrach",
"id": 45562402,
"login": "rhshadrach",
"node_id": "MDQ6VXNlcjQ1NTYyNDAy",
"organizations_url": "https://api.github.com/users/rhshadrach/orgs",
"received_events_url": "https://api.github.com/users/rhshadrach/received_events",
"repos_url": "https://api.github.com/users/rhshadrach/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/rhshadrach/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rhshadrach/subscriptions",
"type": "User",
"url": "https://api.github.com/users/rhshadrach"
} | [
{
"color": "C4A000",
"default": false,
"description": "pandas testing functions or related to the test suite",
"id": 127685,
"name": "Testing",
"node_id": "MDU6TGFiZWwxMjc2ODU=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Testing"
},
{
"color": "207de5",
"default": false,
"description": null,
"id": 211029535,
"name": "Clean",
"node_id": "MDU6TGFiZWwyMTEwMjk1MzU=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Clean"
},
{
"color": "d93f0b",
"default": false,
"description": "Required and optional dependencies",
"id": 527603109,
"name": "Dependencies",
"node_id": "MDU6TGFiZWw1Mjc2MDMxMDk=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Dependencies"
}
] | open | false | null | [] | null | 0 | 2021-02-24T18:01:58Z | 2021-02-24T18:01:58Z | null | MEMBER | null | Ref: #40020 | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40027/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40027/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/40028 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40028/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40028/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40028/events | https://github.com/pandas-dev/pandas/pull/40028 | 815,721,384 | MDExOlB1bGxSZXF1ZXN0NTc5NTA0MjM0 | 40,028 | REF: catch less in maybe_cast_to_datetime | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [
{
"color": "FCE94F",
"default": false,
"description": "Internal refactoring of code",
"id": 127681,
"name": "Refactor",
"node_id": "MDU6TGFiZWwxMjc2ODE=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Refactor"
},
{
"color": "ffa0ff",
"default": false,
"description": "Incorrect or improved errors from pandas",
"id": 42670965,
"name": "Error Reporting",
"node_id": "MDU6TGFiZWw0MjY3MDk2NQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Error%20Reporting"
}
] | closed | false | null | [] | null | 1 | 2021-02-24T18:07:52Z | 2021-02-24T21:15:55Z | 2021-02-24T21:15:55Z | MEMBER | null | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40028/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40028/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40028.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40028",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/40028.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40028"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/40029 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40029/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40029/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40029/events | https://github.com/pandas-dev/pandas/pull/40029 | 815,725,159 | MDExOlB1bGxSZXF1ZXN0NTc5NTA3NDI1 | 40,029 | STYLE: Inconsistent namespace - apply (pandas-dev#39992) | {
"avatar_url": "https://avatars.githubusercontent.com/u/9531144?v=4",
"events_url": "https://api.github.com/users/punitvara/events{/privacy}",
"followers_url": "https://api.github.com/users/punitvara/followers",
"following_url": "https://api.github.com/users/punitvara/following{/other_user}",
"gists_url": "https://api.github.com/users/punitvara/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/punitvara",
"id": 9531144,
"login": "punitvara",
"node_id": "MDQ6VXNlcjk1MzExNDQ=",
"organizations_url": "https://api.github.com/users/punitvara/orgs",
"received_events_url": "https://api.github.com/users/punitvara/received_events",
"repos_url": "https://api.github.com/users/punitvara/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/punitvara/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/punitvara/subscriptions",
"type": "User",
"url": "https://api.github.com/users/punitvara"
} | [
{
"color": "eb6420",
"default": false,
"description": "Code style, linting, code_checks",
"id": 106935113,
"name": "Code Style",
"node_id": "MDU6TGFiZWwxMDY5MzUxMTM=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Code%20Style"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 5 | 2021-02-24T18:13:39Z | 2021-02-24T18:55:17Z | 2021-02-24T18:55:16Z | CONTRIBUTOR | null | Fix inconsistent namespace in apply directory.
- [x] xref #39992
- [ ] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40029/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40029/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40029.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40029",
"merged_at": "2021-02-24T18:55:16Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/40029.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40029"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/40030 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40030/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40030/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40030/events | https://github.com/pandas-dev/pandas/pull/40030 | 815,746,847 | MDExOlB1bGxSZXF1ZXN0NTc5NTI1NTk5 | 40,030 | REF: share common code in ArrayManager.get_numeric_data/get_bool_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": "FCE94F",
"default": false,
"description": "Internal refactoring of code",
"id": 127681,
"name": "Refactor",
"node_id": "MDU6TGFiZWwxMjc2ODE=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Refactor"
},
{
"color": "fbca04",
"default": false,
"description": "Related to non-user accessible pandas implementation",
"id": 49094459,
"name": "Internals",
"node_id": "MDU6TGFiZWw0OTA5NDQ1OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Internals"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 1 | 2021-02-24T18:45:16Z | 2021-02-24T20:45:42Z | 2021-02-24T20:45:38Z | MEMBER | null | See https://github.com/pandas-dev/pandas/pull/39719/files#r578859353 @jreback | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40030/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40030/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40030.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40030",
"merged_at": "2021-02-24T20:45:38Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/40030.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40030"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/40031 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40031/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40031/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40031/events | https://github.com/pandas-dev/pandas/pull/40031 | 815,752,277 | MDExOlB1bGxSZXF1ZXN0NTc5NTI5OTQz | 40,031 | STYLE: Inconsistent namespace - base (pandas-dev#39992) | {
"avatar_url": "https://avatars.githubusercontent.com/u/9531144?v=4",
"events_url": "https://api.github.com/users/punitvara/events{/privacy}",
"followers_url": "https://api.github.com/users/punitvara/followers",
"following_url": "https://api.github.com/users/punitvara/following{/other_user}",
"gists_url": "https://api.github.com/users/punitvara/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/punitvara",
"id": 9531144,
"login": "punitvara",
"node_id": "MDQ6VXNlcjk1MzExNDQ=",
"organizations_url": "https://api.github.com/users/punitvara/orgs",
"received_events_url": "https://api.github.com/users/punitvara/received_events",
"repos_url": "https://api.github.com/users/punitvara/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/punitvara/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/punitvara/subscriptions",
"type": "User",
"url": "https://api.github.com/users/punitvara"
} | [
{
"color": "eb6420",
"default": false,
"description": "Code style, linting, code_checks",
"id": 106935113,
"name": "Code Style",
"node_id": "MDU6TGFiZWwxMDY5MzUxMTM=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Code%20Style"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 4 | 2021-02-24T18:53:05Z | 2021-02-25T04:45:43Z | 2021-02-24T19:23:44Z | CONTRIBUTOR | null | - [x] xref #39992
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40031/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40031/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40031.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40031",
"merged_at": "2021-02-24T19:23:44Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/40031.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40031"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/40032 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40032/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40032/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40032/events | https://github.com/pandas-dev/pandas/issues/40032 | 815,785,551 | MDU6SXNzdWU4MTU3ODU1NTE= | 40,032 | BUG: Styler format `na_rep` arg overwrites existing when not given. | {
"avatar_url": "https://avatars.githubusercontent.com/u/24256554?v=4",
"events_url": "https://api.github.com/users/attack68/events{/privacy}",
"followers_url": "https://api.github.com/users/attack68/followers",
"following_url": "https://api.github.com/users/attack68/following{/other_user}",
"gists_url": "https://api.github.com/users/attack68/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/attack68",
"id": 24256554,
"login": "attack68",
"node_id": "MDQ6VXNlcjI0MjU2NTU0",
"organizations_url": "https://api.github.com/users/attack68/orgs",
"received_events_url": "https://api.github.com/users/attack68/received_events",
"repos_url": "https://api.github.com/users/attack68/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/attack68/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/attack68/subscriptions",
"type": "User",
"url": "https://api.github.com/users/attack68"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "006b75",
"default": false,
"description": "conditional formatting using DataFrame.style",
"id": 1728592794,
"name": "Styler",
"node_id": "MDU6TGFiZWwxNzI4NTkyNzk0",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Styler"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 0 | 2021-02-24T19:41:58Z | 2021-03-08T21:08:24Z | 2021-03-08T21:08:24Z | CONTRIBUTOR | null | `Styler` has its own `format()` method that sets a formatter for columns, and a function `set_na_rep()` for dealing with missing data.
It seems the two do not play well together:
```
df = pd.DataFrame([[1,2],[3,4]])
df.iloc[0,0] = np.nan
df.style.set_na_rep('MISS').set_precision(1)
MISS | 2
3.0 | 4
df.style.set_na_rep('MISS').format('{:,.1f}')
nan | 2.0
3.0 | 4.0
df.style.set_na_rep('MISS').format('{:,.1f}', na_rep='PASS')
PASS | 2.0
3.0 | 4.0
```
could probably do with a review how the attribute `na_rep` interacts with the formatter and try to make it more dynamic or use pointers instead of static value, if 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/40032/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40032/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/40033 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40033/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40033/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40033/events | https://github.com/pandas-dev/pandas/pull/40033 | 815,868,777 | MDExOlB1bGxSZXF1ZXN0NTc5NjI3MDk5 | 40,033 | PERF: make Categorical _ndarray, attribute, _codes property | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [
{
"color": "e11d21",
"default": false,
"description": "Categorical Data Type",
"id": 78527356,
"name": "Categorical",
"node_id": "MDU6TGFiZWw3ODUyNzM1Ng==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Categorical"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 2 | 2021-02-24T21:38:29Z | 2021-02-27T13:28:51Z | 2021-02-25T00:38:08Z | MEMBER | null | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40033/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40033/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40033.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40033",
"merged_at": "2021-02-25T00:38:08Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/40033.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40033"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/40034 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40034/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40034/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40034/events | https://github.com/pandas-dev/pandas/pull/40034 | 815,921,344 | MDExOlB1bGxSZXF1ZXN0NTc5NjcwMDYy | 40,034 | Backport PR #40020 on branch 1.2.x (CI/TST: Supply dtype to coo_matrix until scipy is fixed) | {
"avatar_url": "https://avatars.githubusercontent.com/u/39504233?v=4",
"events_url": "https://api.github.com/users/meeseeksmachine/events{/privacy}",
"followers_url": "https://api.github.com/users/meeseeksmachine/followers",
"following_url": "https://api.github.com/users/meeseeksmachine/following{/other_user}",
"gists_url": "https://api.github.com/users/meeseeksmachine/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/meeseeksmachine",
"id": 39504233,
"login": "meeseeksmachine",
"node_id": "MDQ6VXNlcjM5NTA0MjMz",
"organizations_url": "https://api.github.com/users/meeseeksmachine/orgs",
"received_events_url": "https://api.github.com/users/meeseeksmachine/received_events",
"repos_url": "https://api.github.com/users/meeseeksmachine/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/meeseeksmachine/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/meeseeksmachine/subscriptions",
"type": "User",
"url": "https://api.github.com/users/meeseeksmachine"
} | [
{
"color": "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": "2021-03-02T08:40:51Z",
"closed_issues": 49,
"created_at": "2021-02-07T13:58:05Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/13159005?v=4",
"events_url": "https://api.github.com/users/simonjayhawkins/events{/privacy}",
"followers_url": "https://api.github.com/users/simonjayhawkins/followers",
"following_url": "https://api.github.com/users/simonjayhawkins/following{/other_user}",
"gists_url": "https://api.github.com/users/simonjayhawkins/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/simonjayhawkins",
"id": 13159005,
"login": "simonjayhawkins",
"node_id": "MDQ6VXNlcjEzMTU5MDA1",
"organizations_url": "https://api.github.com/users/simonjayhawkins/orgs",
"received_events_url": "https://api.github.com/users/simonjayhawkins/received_events",
"repos_url": "https://api.github.com/users/simonjayhawkins/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/simonjayhawkins/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/simonjayhawkins/subscriptions",
"type": "User",
"url": "https://api.github.com/users/simonjayhawkins"
},
"description": "on-merge: backport to 1.2.x\r\n\r\n",
"due_on": "2021-03-01T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/83",
"id": 6402340,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/83/labels",
"node_id": "MDk6TWlsZXN0b25lNjQwMjM0MA==",
"number": 83,
"open_issues": 0,
"state": "closed",
"title": "1.2.3",
"updated_at": "2021-03-02T17:15:27Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/83"
} | 0 | 2021-02-24T23:10:18Z | 2021-02-25T00:36:39Z | 2021-02-25T00:36:38Z | NONE | null | Backport PR #40020: CI/TST: Supply dtype to coo_matrix until scipy is fixed | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40034/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40034/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40034.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40034",
"merged_at": "2021-02-25T00:36:38Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/40034.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40034"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/40035 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40035/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40035/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40035/events | https://github.com/pandas-dev/pandas/pull/40035 | 815,921,500 | MDExOlB1bGxSZXF1ZXN0NTc5NjcwMTkw | 40,035 | PERF: json_normalize, for basic use case | {
"avatar_url": "https://avatars.githubusercontent.com/u/63923521?v=4",
"events_url": "https://api.github.com/users/smpurkis/events{/privacy}",
"followers_url": "https://api.github.com/users/smpurkis/followers",
"following_url": "https://api.github.com/users/smpurkis/following{/other_user}",
"gists_url": "https://api.github.com/users/smpurkis/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/smpurkis",
"id": 63923521,
"login": "smpurkis",
"node_id": "MDQ6VXNlcjYzOTIzNTIx",
"organizations_url": "https://api.github.com/users/smpurkis/orgs",
"received_events_url": "https://api.github.com/users/smpurkis/received_events",
"repos_url": "https://api.github.com/users/smpurkis/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/smpurkis/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/smpurkis/subscriptions",
"type": "User",
"url": "https://api.github.com/users/smpurkis"
} | [
{
"color": "a10c02",
"default": false,
"description": "Memory or execution speed performance",
"id": 8935311,
"name": "Performance",
"node_id": "MDU6TGFiZWw4OTM1MzEx",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Performance"
},
{
"color": "207de5",
"default": false,
"description": "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 | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 16 | 2021-02-24T23:10:37Z | 2021-03-05T00:39:16Z | 2021-03-05T00:39:10Z | CONTRIBUTOR | null | - [X] closes #15621
- [X] tests passed
- [X] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
Proposed speed up for very simple use cases using the `pd.json_normalize` function. E.g. `pd.json_normalize(data)`
The speed up can be seen in this example:
```
import datetime
import pandas as pd
# example json data
data = {"hello": ["thisisatest", 999898, datetime.date.today()],
"nest1": {"nest2": {"nest3": "nest3_value", "nest3_int": 3445}},
"nest1_list": {"nest2": ["blah", 32423, 546456.876, 92030234]},
"hello2": "string"}
hundred_thousand_rows = [data for i in range(100000)]
s = time()
pd.json_normalize(hundred_thousand_rows)
pandas_json_normalize_time_taken = time() - s
print(f"\npandas time taken for a 100,000 rows: {pandas_json_normalize_time_taken} seconds")
```
With output from Pandas 1.2.2: `pandas time taken for a 100,000 rows: 3.0518009662628174 seconds`
From this branch: `pandas time taken for a 100,000 rows: 0.632451057434082 seconds`
To show tests pass for the appropriate file, ran `pytest pandas/tests/io/json/test_normalize.py -v` [test_normalize.py_pytest.log](https://github.com/pandas-dev/pandas/files/6039361/test_normalize.py_pytest.log)
To show pre-commit passed on file, ran `pre-commit run --files pandas/io/json/_normalize.py` [_normalize.py_pre-commit.log](https://github.com/pandas-dev/pandas/files/6039363/_normalize.py_pre-commit.log)
There was one code check that was caught, running `./ci/code_checks.sh` [code_checks.log](https://github.com/pandas-dev/pandas/files/6039360/code_checks.log)
```
pandas/io/json/_normalize.py:208: error: Incompatible types in assignment (expression has type "List[Union[List[Dict[Any, Any]], Dict[Any, Any]]]", variable has type "Dict[Any, Any]") [assignment]
```
As it a type hint issue, decided to still make pull request. Can you advice on how to fix, I'm fairly new to type hints?
Kind regards,
Sam | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40035/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40035/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40035.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40035",
"merged_at": "2021-03-05T00:39:10Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/40035.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40035"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/40036 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40036/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40036/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40036/events | https://github.com/pandas-dev/pandas/pull/40036 | 815,924,054 | MDExOlB1bGxSZXF1ZXN0NTc5NjcyMzU2 | 40,036 | CI: troubleshoot OOB timedelta test | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [
{
"color": "C4A000",
"default": false,
"description": "pandas testing functions or related to the test suite",
"id": 127685,
"name": "Testing",
"node_id": "MDU6TGFiZWwxMjc2ODU=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Testing"
},
{
"color": "5319e7",
"default": false,
"description": "Timedelta data type",
"id": 49597148,
"name": "Timedelta",
"node_id": "MDU6TGFiZWw0OTU5NzE0OA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Timedelta"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 4 | 2021-02-24T23:16:06Z | 2021-02-25T03:13:03Z | 2021-02-25T02:25:55Z | MEMBER | null | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40036/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40036/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40036.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40036",
"merged_at": "2021-02-25T02:25:55Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/40036.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40036"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/40037 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40037/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40037/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40037/events | https://github.com/pandas-dev/pandas/pull/40037 | 815,935,034 | MDExOlB1bGxSZXF1ZXN0NTc5NjgxMzg5 | 40,037 | REF: catch less in maybe_cast_to_datetime | {
"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": "ffa0ff",
"default": false,
"description": "Incorrect or improved errors from pandas",
"id": 42670965,
"name": "Error Reporting",
"node_id": "MDU6TGFiZWw0MjY3MDk2NQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Error%20Reporting"
},
{
"color": "5319e7",
"default": false,
"description": "Timedelta data type",
"id": 49597148,
"name": "Timedelta",
"node_id": "MDU6TGFiZWw0OTU5NzE0OA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Timedelta"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 1 | 2021-02-24T23:39:11Z | 2021-02-25T01:49:16Z | 2021-02-25T00:46:31Z | 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/40037/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40037/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40037.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40037",
"merged_at": "2021-02-25T00:46:31Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/40037.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40037"
} |
|
https://api.github.com/repos/pandas-dev/pandas/issues/40038 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40038/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40038/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40038/events | https://github.com/pandas-dev/pandas/issues/40038 | 815,939,507 | MDU6SXNzdWU4MTU5Mzk1MDc= | 40,038 | ENH: change behavior in reading malformat file | {
"avatar_url": "https://avatars.githubusercontent.com/u/10204334?v=4",
"events_url": "https://api.github.com/users/smohr003/events{/privacy}",
"followers_url": "https://api.github.com/users/smohr003/followers",
"following_url": "https://api.github.com/users/smohr003/following{/other_user}",
"gists_url": "https://api.github.com/users/smohr003/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/smohr003",
"id": 10204334,
"login": "smohr003",
"node_id": "MDQ6VXNlcjEwMjA0MzM0",
"organizations_url": "https://api.github.com/users/smohr003/orgs",
"received_events_url": "https://api.github.com/users/smohr003/received_events",
"repos_url": "https://api.github.com/users/smohr003/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/smohr003/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/smohr003/subscriptions",
"type": "User",
"url": "https://api.github.com/users/smohr003"
} | [
{
"color": "4E9A06",
"default": false,
"description": null,
"id": 76812,
"name": "Enhancement",
"node_id": "MDU6TGFiZWw3NjgxMg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Enhancement"
},
{
"color": "5319e7",
"default": false,
"description": "read_csv, to_csv",
"id": 47229171,
"name": "IO CSV",
"node_id": "MDU6TGFiZWw0NzIyOTE3MQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20CSV"
},
{
"color": "0052cc",
"default": false,
"description": "Issue that has not been reviewed by a pandas team member",
"id": 1954720290,
"name": "Needs Triage",
"node_id": "MDU6TGFiZWwxOTU0NzIwMjkw",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Needs%20Triage"
}
] | closed | false | null | [] | null | 3 | 2021-02-24T23:49:13Z | 2021-08-19T01:15:41Z | 2021-08-19T01:15:41Z | NONE | null | #### Is your feature request related to a problem?
Currently, for large CSV files, pandas parse a column with mixed data types with only a warning (DtypeWarning)
[https://github.com/pandas-dev/pandas/blob/v1.2.2/pandas/errors/__init__.py#L57-L112](url)
[https://github.com/pandas-dev/pandas/blob/master/pandas/_libs/parsers.pyx](url)
This behavior of keeping mix data type in a column is totally unexpected and a warning for it is not enough.
#### Describe the solution you'd like
Just convert all the values of the column to one type and produce a warning. For example, if it is a mix of int and object, just convert all to object and then produce a warning. This way, there would be no unexpected behavior/error later in the manipulation of DataFrame.
#### API breaking implications
API will not change. The behavior of API becomes more predictable.
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40038/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40038/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/40039 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40039/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40039/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40039/events | https://github.com/pandas-dev/pandas/pull/40039 | 816,037,408 | MDExOlB1bGxSZXF1ZXN0NTc5NzY3MzAy | 40,039 | BUG: Sampling over selected groupbys does not reflect the selection | {
"avatar_url": "https://avatars.githubusercontent.com/u/8284922?v=4",
"events_url": "https://api.github.com/users/wjsi/events{/privacy}",
"followers_url": "https://api.github.com/users/wjsi/followers",
"following_url": "https://api.github.com/users/wjsi/following{/other_user}",
"gists_url": "https://api.github.com/users/wjsi/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/wjsi",
"id": 8284922,
"login": "wjsi",
"node_id": "MDQ6VXNlcjgyODQ5MjI=",
"organizations_url": "https://api.github.com/users/wjsi/orgs",
"received_events_url": "https://api.github.com/users/wjsi/received_events",
"repos_url": "https://api.github.com/users/wjsi/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/wjsi/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/wjsi/subscriptions",
"type": "User",
"url": "https://api.github.com/users/wjsi"
} | [
{
"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": "02d7e1",
"default": false,
"description": "Concat, Merge/Join, Stack/Unstack, Explode",
"id": 13098779,
"name": "Reshaping",
"node_id": "MDU6TGFiZWwxMzA5ODc3OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Reshaping"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 1 | 2021-02-25T03:01:58Z | 2021-03-01T03:31:38Z | 2021-02-27T19:10:19Z | CONTRIBUTOR | null | - [x] closes #39928
- [x] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [x] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40039/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40039/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40039.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40039",
"merged_at": "2021-02-27T19:10:19Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/40039.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40039"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/40040 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40040/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40040/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40040/events | https://github.com/pandas-dev/pandas/pull/40040 | 816,072,655 | MDExOlB1bGxSZXF1ZXN0NTc5Nzk1ODc3 | 40,040 | Backport PR #40010 on branch 1.2.x | {
"avatar_url": "https://avatars.githubusercontent.com/u/6618166?v=4",
"events_url": "https://api.github.com/users/twoertwein/events{/privacy}",
"followers_url": "https://api.github.com/users/twoertwein/followers",
"following_url": "https://api.github.com/users/twoertwein/following{/other_user}",
"gists_url": "https://api.github.com/users/twoertwein/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/twoertwein",
"id": 6618166,
"login": "twoertwein",
"node_id": "MDQ6VXNlcjY2MTgxNjY=",
"organizations_url": "https://api.github.com/users/twoertwein/orgs",
"received_events_url": "https://api.github.com/users/twoertwein/received_events",
"repos_url": "https://api.github.com/users/twoertwein/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/twoertwein/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/twoertwein/subscriptions",
"type": "User",
"url": "https://api.github.com/users/twoertwein"
} | [
{
"color": "e4a5f1",
"default": false,
"description": "Local or Cloud (AWS, GCS, etc.) IO Issues",
"id": 49381477,
"name": "IO Network",
"node_id": "MDU6TGFiZWw0OTM4MTQ3Nw==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20Network"
}
] | closed | false | null | [] | {
"closed_at": "2021-03-02T08:40:51Z",
"closed_issues": 49,
"created_at": "2021-02-07T13:58:05Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/13159005?v=4",
"events_url": "https://api.github.com/users/simonjayhawkins/events{/privacy}",
"followers_url": "https://api.github.com/users/simonjayhawkins/followers",
"following_url": "https://api.github.com/users/simonjayhawkins/following{/other_user}",
"gists_url": "https://api.github.com/users/simonjayhawkins/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/simonjayhawkins",
"id": 13159005,
"login": "simonjayhawkins",
"node_id": "MDQ6VXNlcjEzMTU5MDA1",
"organizations_url": "https://api.github.com/users/simonjayhawkins/orgs",
"received_events_url": "https://api.github.com/users/simonjayhawkins/received_events",
"repos_url": "https://api.github.com/users/simonjayhawkins/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/simonjayhawkins/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/simonjayhawkins/subscriptions",
"type": "User",
"url": "https://api.github.com/users/simonjayhawkins"
},
"description": "on-merge: backport to 1.2.x\r\n\r\n",
"due_on": "2021-03-01T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/83",
"id": 6402340,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/83/labels",
"node_id": "MDk6TWlsZXN0b25lNjQwMjM0MA==",
"number": 83,
"open_issues": 0,
"state": "closed",
"title": "1.2.3",
"updated_at": "2021-03-02T17:15:27Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/83"
} | 2 | 2021-02-25T04:29:55Z | 2021-06-05T20:50:47Z | 2021-02-26T00:11:36Z | CONTRIBUTOR | null | Backport PR #40010 | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40040/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40040/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40040.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40040",
"merged_at": "2021-02-26T00:11:36Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/40040.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40040"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/40041 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40041/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40041/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40041/events | https://github.com/pandas-dev/pandas/issues/40041 | 816,112,330 | MDU6SXNzdWU4MTYxMTIzMzA= | 40,041 | PERF: Performance Regression GroupBy apply | {
"avatar_url": "https://avatars.githubusercontent.com/u/924583?v=4",
"events_url": "https://api.github.com/users/shouyu/events{/privacy}",
"followers_url": "https://api.github.com/users/shouyu/followers",
"following_url": "https://api.github.com/users/shouyu/following{/other_user}",
"gists_url": "https://api.github.com/users/shouyu/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/shouyu",
"id": 924583,
"login": "shouyu",
"node_id": "MDQ6VXNlcjkyNDU4Mw==",
"organizations_url": "https://api.github.com/users/shouyu/orgs",
"received_events_url": "https://api.github.com/users/shouyu/received_events",
"repos_url": "https://api.github.com/users/shouyu/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/shouyu/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/shouyu/subscriptions",
"type": "User",
"url": "https://api.github.com/users/shouyu"
} | [
{
"color": "729FCF",
"default": false,
"description": null,
"id": 233160,
"name": "Groupby",
"node_id": "MDU6TGFiZWwyMzMxNjA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Groupby"
},
{
"color": "a10c02",
"default": false,
"description": "Memory or execution speed performance",
"id": 8935311,
"name": "Performance",
"node_id": "MDU6TGFiZWw4OTM1MzEx",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Performance"
},
{
"color": "fbca04",
"default": false,
"description": "Apply, Aggregate, Transform",
"id": 697792067,
"name": "Apply",
"node_id": "MDU6TGFiZWw2OTc3OTIwNjc=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Apply"
}
] | open | false | null | [] | null | 0 | 2021-02-25T05:56:33Z | 2021-06-06T17:35:25Z | null | NONE | null | - [x] I have checked that this issue has not already been reported.
- [x] I have confirmed this bug exists on the latest version of pandas.
- [ ] (optional) I have confirmed this bug exists on the master branch of pandas.
---
#### Code Sample, a copy-pastable example
```python
import pandas as pd
import numpy as np
ROWS=[1000, 2000, 4000, 8000, 16000, 32000]
for rows in ROWS:
print("rows", rows)
df = pd.DataFrame({"a": np.random.randint(0, rows, size=rows).astype(str), "b": range(0, rows)})
%timeit df.groupby("a").apply(lambda x: x.head(1))
for rows in ROWS:
print("rows", rows)
df = pd.DataFrame({"a": np.random.randint(0, rows, size=rows).astype(str), "b": range(0, rows)})
%timeit df.groupby("a").apply(lambda x: x.max())
```
#### Problem description
As a result of comparing 1.2.2 with 0.25.3, 1.2.2 is much slower. In particular, the head processing time is proportional to the number of lines in 0.25.3, but in 1.2.2, when the number of lines doubles, the processing time triples.
```
pandas 1.2.2
In [1]: for rows in ROWS:
...: print("rows", rows)
...: df = pd.DataFrame({"a": np.random.randint(0, rows, size=rows).astype(str), "b": range(0, rows)})
...: %timeit df.groupby("a").apply(lambda x: x.head(1))
...:
rows 1000
187 ms ± 1.14 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)
rows 2000
421 ms ± 2.86 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
rows 4000
1.06 s ± 13 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
rows 8000
3.01 s ± 59.6 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
rows 16000
9.49 s ± 81.8 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
rows 32000
32.3 s ± 214 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
In [2]: for rows in ROWS:
...: print("rows", rows)
...: df = pd.DataFrame({"a": np.random.randint(0, rows, size=rows).astype(str), "b": range(0, rows)})
...: %timeit df.groupby("a").apply(lambda x: x.max())
...:
rows 1000
314 ms ± 2.68 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
rows 2000
599 ms ± 2.48 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
rows 4000
1.23 s ± 17.9 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
rows 8000
2.49 s ± 18.7 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
rows 16000
4.94 s ± 22.5 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
rows 32000
9.81 s ± 50.9 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
```
```
pandas 0.25.3
In [9]: for rows in ROWS:
...: print("rows", rows)
...: df = pd.DataFrame({"a": np.random.randint(0, rows, size=rows).astype(str), "b": range(0, rows)})
...: %timeit df.groupby("a").apply(lambda x: x.head(1))
...:
rows 1000
103 ms ± 142 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)
rows 2000
212 ms ± 1.23 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
rows 4000
414 ms ± 1.88 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
rows 8000
837 ms ± 2.61 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
rows 16000
1.69 s ± 2.62 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
rows 32000
3.41 s ± 36.7 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
In [10]: for rows in ROWS:
...: print("rows", rows)
...: df = pd.DataFrame({"a": np.random.randint(0, rows, size=rows).astype(str), "b": range(0, rows)})
...: %timeit df.groupby("a").apply(lambda x: x.max())
...:
rows 1000
118 ms ± 827 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)
rows 2000
235 ms ± 652 µs per loop (mean ± std. dev. of 7 runs, 1 loop each)
rows 4000
473 ms ± 1.19 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
rows 8000
945 ms ± 9.25 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
rows 16000
1.87 s ± 10.1 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
rows 32000
3.74 s ± 19.8 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
```
#### Output of ``pd.show_versions()``
<details>
```
INSTALLED VERSIONS
------------------
commit : 7d32926db8f7541c356066dcadabf854487738de
python : 3.8.8.final.0
python-bits : 64
OS : Linux
OS-release : 5.10.16-arch1-1
Version : #1 SMP PREEMPT Sat, 13 Feb 2021 20:50:18 +0000
machine : x86_64
processor :
byteorder : little
LC_ALL : None
LANG : C.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.2.2
numpy : 1.20.1
pytz : 2021.1
dateutil : 2.8.1
pip : 21.0.1
setuptools : 53.0.0
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : None
IPython : 7.20.0
pandas_datareader: None
bs4 : None
bottleneck : None
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pyxlsb : None
s3fs : None
scipy : None
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
numba : None
```
</details> | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40041/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40041/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/40042 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40042/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40042/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40042/events | https://github.com/pandas-dev/pandas/pull/40042 | 816,114,549 | MDExOlB1bGxSZXF1ZXN0NTc5ODMxNDI1 | 40,042 | TST: collect indexing tests by method | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [
{
"color": "C4A000",
"default": false,
"description": "pandas testing functions or related to the test suite",
"id": 127685,
"name": "Testing",
"node_id": "MDU6TGFiZWwxMjc2ODU=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Testing"
},
{
"color": "0b02e1",
"default": false,
"description": "Related to indexing on series/frames, not to indexes themselves",
"id": 2822098,
"name": "Indexing",
"node_id": "MDU6TGFiZWwyODIyMDk4",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Indexing"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 1 | 2021-02-25T06:00:54Z | 2021-02-25T16:51:34Z | 2021-02-25T13:40:16Z | 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/40042/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40042/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40042.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40042",
"merged_at": "2021-02-25T13:40:16Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/40042.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40042"
} |
|
https://api.github.com/repos/pandas-dev/pandas/issues/40043 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40043/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40043/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40043/events | https://github.com/pandas-dev/pandas/issues/40043 | 816,198,814 | MDU6SXNzdWU4MTYxOTg4MTQ= | 40,043 | BUG: Sum on large integers incorrect after rolling timewindow | {
"avatar_url": "https://avatars.githubusercontent.com/u/946663?v=4",
"events_url": "https://api.github.com/users/snthibaud/events{/privacy}",
"followers_url": "https://api.github.com/users/snthibaud/followers",
"following_url": "https://api.github.com/users/snthibaud/following{/other_user}",
"gists_url": "https://api.github.com/users/snthibaud/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/snthibaud",
"id": 946663,
"login": "snthibaud",
"node_id": "MDQ6VXNlcjk0NjY2Mw==",
"organizations_url": "https://api.github.com/users/snthibaud/orgs",
"received_events_url": "https://api.github.com/users/snthibaud/received_events",
"repos_url": "https://api.github.com/users/snthibaud/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/snthibaud/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/snthibaud/subscriptions",
"type": "User",
"url": "https://api.github.com/users/snthibaud"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "009800",
"default": false,
"description": "Duplicate issue or pull request",
"id": 40153326,
"name": "Duplicate Report",
"node_id": "MDU6TGFiZWw0MDE1MzMyNg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Duplicate%20Report"
},
{
"color": "d4c5f9",
"default": false,
"description": "rolling, ewma, expanding",
"id": 1045950827,
"name": "Window",
"node_id": "MDU6TGFiZWwxMDQ1OTUwODI3",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Window"
},
{
"color": "be21f2",
"default": false,
"description": "May be closeable, needs more eyeballs",
"id": 2365504893,
"name": "Closing Candidate",
"node_id": "MDU6TGFiZWwyMzY1NTA0ODkz",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Closing%20Candidate"
}
] | closed | false | null | [] | {
"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"
} | 2 | 2021-02-25T08:15:31Z | 2021-02-27T18:06:31Z | 2021-02-27T18:06:25Z | NONE | null | - [x] I have checked that this issue has not already been reported.
- [x] I have confirmed this bug exists on the latest version of pandas.
- [ ] (optional) I have confirmed this bug exists on the master branch of pandas.
---
#### Code Sample, a copy-pastable example
```python
import pandas as pd
from datetime import datetime, timedelta
s1 = pd.Series([138, 2377900603251717750], index=pd.Index([datetime(year=1970, month=1, day=1), datetime(year=1970, month=1, day=1)+timedelta(microseconds=1)]))
s2 = s1.rolling("1D").sum()
print(s2.sum() >= s1.sum())
```
#### Problem description
The sum of the rolling window should be higher or equal to the original series because only positive values are in it. However, 'False' is printed.
#### Expected Output
True
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit : 7d32926db8f7541c356066dcadabf854487738de
python : 3.7.10.final.0
python-bits : 64
OS : Darwin
OS-release : 20.3.0
Version : Darwin Kernel Version 20.3.0: Thu Jan 21 00:07:06 PST 2021; root:xnu-7195.81.3~1/RELEASE_X86_64
machine : x86_64
processor : i386
byteorder : little
LC_ALL : None
LANG : None
LOCALE : None.UTF-8
pandas : 1.2.2
numpy : 1.19.4
pytz : 2020.1
dateutil : 2.8.1
pip : 21.0.1
setuptools : 49.6.0.post20210108
Cython : None
pytest : 6.2.2
hypothesis : 6.3.1
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : 4.5.2
html5lib : None
pymysql : 1.0.2
psycopg2 : None
jinja2 : 2.11.2
IPython : 7.20.0
pandas_datareader: None
bs4 : 4.7.1
bottleneck : None
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : 3.2.2
numexpr : None
odfpy : None
openpyxl : 3.0.6
pandas_gbq : None
pyarrow : 3.0.0
pyxlsb : None
s3fs : None
scipy : 1.6.0
sqlalchemy : 1.3.23
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
numba : None
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40043/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40043/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/40044 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40044/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40044/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40044/events | https://github.com/pandas-dev/pandas/issues/40044 | 816,320,459 | MDU6SXNzdWU4MTYzMjA0NTk= | 40,044 | BUG: plotting with `secondary_y` and then plotting another line results in wrong color for (right) line | {
"avatar_url": "https://avatars.githubusercontent.com/u/33491632?v=4",
"events_url": "https://api.github.com/users/MarcoGorelli/events{/privacy}",
"followers_url": "https://api.github.com/users/MarcoGorelli/followers",
"following_url": "https://api.github.com/users/MarcoGorelli/following{/other_user}",
"gists_url": "https://api.github.com/users/MarcoGorelli/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/MarcoGorelli",
"id": 33491632,
"login": "MarcoGorelli",
"node_id": "MDQ6VXNlcjMzNDkxNjMy",
"organizations_url": "https://api.github.com/users/MarcoGorelli/orgs",
"received_events_url": "https://api.github.com/users/MarcoGorelli/received_events",
"repos_url": "https://api.github.com/users/MarcoGorelli/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/MarcoGorelli/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/MarcoGorelli/subscriptions",
"type": "User",
"url": "https://api.github.com/users/MarcoGorelli"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "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 | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 2 | 2021-02-25T10:50:18Z | 2021-04-09T00:52:24Z | 2021-04-09T00:52:24Z | MEMBER | null | - [x] I have checked that this issue has not already been reported.
- [x] I have confirmed this bug exists on the latest version of pandas.
- [x] (optional) I have confirmed this bug exists on the master branch of pandas.
---
**Note**: Please read [this guide](https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) detailing how to provide the necessary information for us to reproduce your bug.
#### Code Sample, a copy-pastable example
```python
import pandas as pd
df = pd.DataFrame({'a': [1, 1], 'b': [2, 2]})
df2 = pd.DataFrame({'d': [2.5, 2.5]})
ax = df.plot(legend=True, secondary_y='b')
df2.plot(legend=False, ax=ax);
```
#### Problem description
Here's what we get:

#### Expected Output
The colours in the legend should be correct, i.e.:

#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit : 272435073c70b4421f72184663837f4864601f11
python : 3.8.6.final.0
python-bits : 64
OS : Linux
OS-release : 5.4.0-66-generic
Version : #74-Ubuntu SMP Wed Jan 27 22:54:38 UTC 2021
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_GB.UTF-8
LOCALE : en_GB.UTF-8
pandas : 1.3.0.dev0+841.g272435073c
numpy : 1.19.5
pytz : 2021.1
dateutil : 2.8.1
pip : 20.3.3
setuptools : 49.6.0.post20201009
Cython : 0.29.21
pytest : 6.2.2
hypothesis : 6.2.0
sphinx : 3.5.1
blosc : None
feather : None
xlsxwriter : 1.3.7
lxml.etree : 4.6.2
html5lib : 1.1
pymysql : None
psycopg2 : None
jinja2 : 2.11.3
IPython : 7.19.0
pandas_datareader: None
bs4 : 4.9.3
bottleneck : 1.3.2
fsspec : 0.8.5
fastparquet : 0.5.0
gcsfs : 0.7.2
matplotlib : 3.3.3
numexpr : 2.7.2
odfpy : None
openpyxl : 3.0.6
pandas_gbq : None
pyarrow : 2.0.0
pyxlsb : None
s3fs : 0.5.2
scipy : 1.6.0
sqlalchemy : 1.3.23
tables : 3.6.1
tabulate : 0.8.7
xarray : 0.16.2
xlrd : 2.0.1
xlwt : 1.3.0
numba : 0.52.0
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40044/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40044/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/40045 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40045/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40045/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40045/events | https://github.com/pandas-dev/pandas/issues/40045 | 816,327,585 | MDU6SXNzdWU4MTYzMjc1ODU= | 40,045 | BUG: Series.groupby.sum fails because result has _values attribute but not ndim attribute | {
"avatar_url": "https://avatars.githubusercontent.com/u/51399800?v=4",
"events_url": "https://api.github.com/users/venaturum/events{/privacy}",
"followers_url": "https://api.github.com/users/venaturum/followers",
"following_url": "https://api.github.com/users/venaturum/following{/other_user}",
"gists_url": "https://api.github.com/users/venaturum/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/venaturum",
"id": 51399800,
"login": "venaturum",
"node_id": "MDQ6VXNlcjUxMzk5ODAw",
"organizations_url": "https://api.github.com/users/venaturum/orgs",
"received_events_url": "https://api.github.com/users/venaturum/received_events",
"repos_url": "https://api.github.com/users/venaturum/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/venaturum/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/venaturum/subscriptions",
"type": "User",
"url": "https://api.github.com/users/venaturum"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "0052cc",
"default": false,
"description": "Issue that has not been reviewed by a pandas team member",
"id": 1954720290,
"name": "Needs Triage",
"node_id": "MDU6TGFiZWwxOTU0NzIwMjkw",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Needs%20Triage"
}
] | closed | false | null | [] | null | 10 | 2021-02-25T10:59:17Z | 2021-02-26T11:08:31Z | 2021-02-26T11:07:21Z | CONTRIBUTOR | null | - [x] I have checked that this issue has not already been reported.
- [x] I have confirmed this bug exists on the latest version of pandas.
- [x] (optional) I have confirmed this bug exists on the master branch of pandas.
---
**Note**: Please read [this guide](https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) detailing how to provide the necessary information for us to reproduce your bug.
#### Code Sample, a copy-pastable example
```python
import pandas as pd
class TestClass:
def __init__(self, num):
self.num = num
self._values = []
def __add__(self, other):
return TestClass(self.num + other.num)
s = pd.Series(
[TestClass(1), TestClass(2), TestClass(3)],
index=pd.Index([0,1,1], name="ind"),
)
s.sum()
s.groupby("ind").sum()
```
#### Problem description
s.sum() works but, for pandas >= 1.2.0, s.groupby("ind").sum() results in the following error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\rclement\tempenv\lib\site-packages\pandas\core\groupby\groupby.py", line 1654, in sum
npfunc=np.sum,
File "C:\Users\rclement\tempenv\lib\site-packages\pandas\core\groupby\groupby.py", line 1044, in _agg_general
result = self.aggregate(lambda x: npfunc(x, axis=self.axis))
File "C:\Users\rclement\tempenv\lib\site-packages\pandas\core\groupby\generic.py", line 259, in aggregate
return self._python_agg_general(func, *args, **kwargs)
File "C:\Users\rclement\tempenv\lib\site-packages\pandas\core\groupby\groupby.py", line 1173, in _python_agg_general
result, counts = self.grouper.agg_series(obj, f)
File "C:\Users\rclement\tempenv\lib\site-packages\pandas\core\groupby\ops.py", line 706, in agg_series
return self._aggregate_series_fast(obj, func)
File "C:\Users\rclement\tempenv\lib\site-packages\pandas\core\groupby\ops.py", line 732, in _aggregate_series_fast
result, counts = grouper.get_result()
File "pandas\_libs\reduction.pyx", line 260, in pandas._libs.reduction.SeriesGrouper.get_result
File "pandas\_libs\reduction.pyx", line 77, in pandas._libs.reduction._BaseGrouper._apply_to_group
File "pandas\_libs\reduction.pyx", line 289, in pandas._libs.reduction.extract_result
AttributeError: 'list' object has no attribute 'ndim'
The error is due to an assumption in pandas\_libs\reduction.pyx in the following function, where if the result of the sum has an attribute _values, then it is also assumed to have an attribute ndim (and the __len__ method), which is not necessarily true for user defined objects like "TestClass"
```python
cpdef inline extract_result(object res, bint squeeze=True):
""" extract the result object, it might be a 0-dim ndarray
or a len-1 0-dim, or a scalar """
if hasattr(res, "_values"):
# Preserve EA
res = res._values
if squeeze and res.ndim == 1 and len(res) == 1:
res = res[0]
if hasattr(res, 'values') and is_array(res.values):
res = res.values
if is_array(res):
if res.ndim == 0:
res = res.item()
elif squeeze and res.ndim == 1 and len(res) == 1:
res = res[0]
return res
```
#### Expected Output
```python
>>> s.sum()
<__main__.TestClass object at 0x000002359C7F2C08>
>>> s.groupby("ind").sum()
ind
0 <__main__.TestClass object at 0x000002359C7F2E48>
1 <__main__.TestClass object at 0x000002359C80B788>
dtype: object
```
We could check hasattr(res, "ndim") and hasattr(res, "__len__") is True, before trying to access those attributes, but it seems like the check for _values attribute is being used as a proxy for a more concrete assumption, eg is the result a pandas object? Could the check for _values attribute be replaced with a more explicit check?
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit : 7d32926db8f7541c356066dcadabf854487738de
python : 3.7.5.final.0
python-bits : 64
OS : Windows
OS-release : 10
Version : 10.0.18362
machine : AMD64
processor : Intel64 Family 6 Model 158 Stepping 10, GenuineIntel
byteorder : little
LC_ALL : None
LANG : None
LOCALE : None.None
pandas : 1.2.2
numpy : 1.20.1
pytz : 2021.1
dateutil : 2.8.1
pip : 19.2.3
setuptools : 41.2.0
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : None
IPython : None
pandas_datareader: None
bs4 : None
bottleneck : None
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pyxlsb : None
s3fs : None
scipy : None
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
numba : None
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40045/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40045/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/40046 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40046/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40046/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40046/events | https://github.com/pandas-dev/pandas/pull/40046 | 816,397,867 | MDExOlB1bGxSZXF1ZXN0NTgwMDY2MTI0 | 40,046 | VIS Wrong legend when combining multiple plots on the same axes , plotting with `legend=False` messes up legend | {
"avatar_url": "https://avatars.githubusercontent.com/u/33491632?v=4",
"events_url": "https://api.github.com/users/MarcoGorelli/events{/privacy}",
"followers_url": "https://api.github.com/users/MarcoGorelli/followers",
"following_url": "https://api.github.com/users/MarcoGorelli/following{/other_user}",
"gists_url": "https://api.github.com/users/MarcoGorelli/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/MarcoGorelli",
"id": 33491632,
"login": "MarcoGorelli",
"node_id": "MDQ6VXNlcjMzNDkxNjMy",
"organizations_url": "https://api.github.com/users/MarcoGorelli/orgs",
"received_events_url": "https://api.github.com/users/MarcoGorelli/received_events",
"repos_url": "https://api.github.com/users/MarcoGorelli/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/MarcoGorelli/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/MarcoGorelli/subscriptions",
"type": "User",
"url": "https://api.github.com/users/MarcoGorelli"
} | [] | closed | false | null | [] | null | 1 | 2021-02-25T12:36:46Z | 2021-02-25T13:11:42Z | 2021-02-25T13:11:42Z | MEMBER | null | - [x] closes #39522
- [x] closes #40044
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [x] whatsnew entry
So, in #27808 , `leg.legendHandles` was replaced with `ax.get_legend_handles_labels()[0]` in order to preserve marker info.
However, `ax.get_legend_handles_labels()[0]` may contain extra elements which aren't (yet) visible, which means we may end up at
https://github.com/pandas-dev/pandas/blob/272435073c70b4421f72184663837f4864601f11/pandas/plotting/_matplotlib/core.py#L625
with
```python
(Pdb) handles
[<matplotlib.lines.Line2D object at 0x7f0938a37430>, <ErrorbarContainer object of 3 artists>, <matplotlib.lines.Line2D object at 0x7f0938a37430>]
(Pdb) labels
['orange', 'blue']
```
This causes the permuting noted in #39522
Ideally, there would be a way to get `leg.legendHandles` in a way that preserves the marker info. However, I can't find a way to do that - have asked on the matplotlib discourse. Also, the current test doesn't quite work (as it passes on `master` too). I'm working on finding a satisfactory solution
---
On master:

On this branch:

---
cc @charlesdong1991 in case you have comments / suggestions | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40046/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40046/timeline | null | 1 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40046.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40046",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/40046.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40046"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/40047 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40047/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40047/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40047/events | https://github.com/pandas-dev/pandas/pull/40047 | 816,444,139 | MDExOlB1bGxSZXF1ZXN0NTgwMTA0MTIw | 40,047 | [ArrayManager] Groupby cython aggregation - python pyfallback | {
"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": "729FCF",
"default": false,
"description": null,
"id": 233160,
"name": "Groupby",
"node_id": "MDU6TGFiZWwyMzMxNjA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Groupby"
},
{
"color": "fbca04",
"default": false,
"description": "Related to non-user accessible pandas implementation",
"id": 49094459,
"name": "Internals",
"node_id": "MDU6TGFiZWw0OTA5NDQ1OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Internals"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 2 | 2021-02-25T13:37:05Z | 2021-02-25T17:05:43Z | 2021-02-25T16:17:52Z | MEMBER | null | Follow-up on #39885 | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40047/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40047/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40047.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40047",
"merged_at": "2021-02-25T16:17:52Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/40047.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40047"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/40048 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40048/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40048/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40048/events | https://github.com/pandas-dev/pandas/issues/40048 | 816,447,925 | MDU6SXNzdWU4MTY0NDc5MjU= | 40,048 | CI: tests failing on 3.7 builds | {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.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": "a2bca7",
"default": false,
"description": "Continuous Integration",
"id": 48070600,
"name": "CI",
"node_id": "MDU6TGFiZWw0ODA3MDYwMA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/CI"
},
{
"color": "d93f0b",
"default": false,
"description": "Required and optional dependencies",
"id": 527603109,
"name": "Dependencies",
"node_id": "MDU6TGFiZWw1Mjc2MDMxMDk=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Dependencies"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 2 | 2021-02-25T13:41:47Z | 2021-02-26T11:49:17Z | 2021-02-25T23:56:20Z | CONTRIBUTOR | null | clearly something changed for dateutil
```
pytest -m "not slow and not network" -n auto --dist=loadfile -s --strict-markers --durations=30 --junitxml=test-data.xml pandas
ImportError while loading conftest '/Users/runner/work/1/s/pandas/conftest.py'.
pandas/__init__.py:51: in <module>
from pandas.core.api import (
pandas/core/api.py:24: in <module>
from pandas.core.algorithms import (
pandas/core/algorithms.py:39: in <module>
from pandas.core.dtypes.cast import (
pandas/core/dtypes/cast.py:29: in <module>
from dateutil.parser import ParserError
E ImportError: cannot import name 'ParserError' from 'dateutil.parser' (/Users/runner/miniconda3/envs/pandas-dev/lib/python3.7/site-packages/dateutil/parser/__init__.py)
``` | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40048/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40048/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/40049 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40049/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40049/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40049/events | https://github.com/pandas-dev/pandas/issues/40049 | 816,485,001 | MDU6SXNzdWU4MTY0ODUwMDE= | 40,049 | BUG: read_csv accepts bad lines when option usecols is used | {
"avatar_url": "https://avatars.githubusercontent.com/u/13088092?v=4",
"events_url": "https://api.github.com/users/lodo1995/events{/privacy}",
"followers_url": "https://api.github.com/users/lodo1995/followers",
"following_url": "https://api.github.com/users/lodo1995/following{/other_user}",
"gists_url": "https://api.github.com/users/lodo1995/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/lodo1995",
"id": 13088092,
"login": "lodo1995",
"node_id": "MDQ6VXNlcjEzMDg4MDky",
"organizations_url": "https://api.github.com/users/lodo1995/orgs",
"received_events_url": "https://api.github.com/users/lodo1995/received_events",
"repos_url": "https://api.github.com/users/lodo1995/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/lodo1995/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/lodo1995/subscriptions",
"type": "User",
"url": "https://api.github.com/users/lodo1995"
} | [
{
"color": "5319e7",
"default": false,
"description": "read_csv, to_csv",
"id": 47229171,
"name": "IO CSV",
"node_id": "MDU6TGFiZWw0NzIyOTE3MQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20CSV"
},
{
"color": "5319e7",
"default": false,
"description": "Functionality to remove in pandas",
"id": 87485152,
"name": "Deprecate",
"node_id": "MDU6TGFiZWw4NzQ4NTE1Mg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Deprecate"
},
{
"color": "207de5",
"default": false,
"description": "Requires discussion from core team before further action",
"id": 219960758,
"name": "Needs Discussion",
"node_id": "MDU6TGFiZWwyMTk5NjA3NTg=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Needs%20Discussion"
}
] | open | false | null | [] | null | 3 | 2021-02-25T14:25:06Z | 2021-08-19T01:20:37Z | null | NONE | null | - [x] I have checked that this issue has not already been reported (couldn't find it)
- [x] I have confirmed this bug exists on the latest version of pandas (current version is 1.2.2 on conda)
- [ ] (optional) I have confirmed this bug exists on the master branch of pandas.
---
#### Code Sample, a copy-pastable example
Bad CSV file:
```csv
A,B,C
foo,1,2
bar,bar,3,4
baz,5,6
```
Python code:
```python
import pandas as pd
df_all = pd.read_csv('bad.csv', error_bad_lines = False, warn_bad_lines = False)
print(df_all)
# A B C
# 0 foo 1 2
# 1 baz 5 6
df_sub = pd.read_csv('bad.csv', error_bad_lines = False, warn_bad_lines = False, usecols = ['A','B'])
print(df_sub)
# A B
# 0 foo 1
# 1 bar bar
# 2 baz 5
```
#### Problem description
As can be seen in the example above, when not using `usecols`, `read_csv` correctly ignores the line that is too long.
However, this is not the case when `usecols` is used.
#### Expected Output
Using `usecols` should not affect which lines are discarded due to being too long.
#### Output of ``pd.show_versions()``
<details>
```
INSTALLED VERSIONS
------------------
commit : 7d32926db8f7541c356066dcadabf854487738de
python : 3.8.6.final.0
python-bits : 64
OS : Linux
OS-release : 5.3.0-64-generic
Version : #58-Ubuntu SMP Fri Jul 10 19:33:51 UTC 2020
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.2.2
numpy : 1.20.1
pytz : 2021.1
dateutil : 2.8.1
pip : 21.0.1
setuptools : 49.6.0.post20210108
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : None
IPython : None
pandas_datareader: None
bs4 : None
bottleneck : None
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : 3.3.4
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pyxlsb : None
s3fs : None
scipy : 1.6.0
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
numba : None
```
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40049/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40049/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/40050 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40050/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40050/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40050/events | https://github.com/pandas-dev/pandas/pull/40050 | 816,604,930 | MDExOlB1bGxSZXF1ZXN0NTgwMjM4Mzg3 | 40,050 | [ArrayManager] Remaining GroupBy tests (fix count, pass on libreduction for now) | {
"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": "729FCF",
"default": false,
"description": null,
"id": 233160,
"name": "Groupby",
"node_id": "MDU6TGFiZWwyMzMxNjA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Groupby"
},
{
"color": "fbca04",
"default": false,
"description": "Related to non-user accessible pandas implementation",
"id": 49094459,
"name": "Internals",
"node_id": "MDU6TGFiZWw0OTA5NDQ1OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Internals"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 2 | 2021-02-25T16:41:01Z | 2021-03-01T09:14:13Z | 2021-02-27T19:02:03Z | MEMBER | null | Follow-up on #39885 and #40047
This passes / skips all groupby tests (in `/tests/groupby`). Actual code changes:
- fix `groupby().count()` to not create a ArrayManager with 2D arrays
- for now skip the usage of `fast_apply` / `libreduction.apply_frame_axis0` for DataFrames with ArrayManager. This can be tackled separately, while for now already getting more test coverage by using the python fallback (as we eg also do for EAs).
- implement `ignore_failures` for `ArrayManager.grouped_reduction` (this keyword is actually always True at the moment, so we could also leave away the keyword itself)
Most of the skips are related `quantile` (or `describe`) not yet being implemented. And it also uncovered a few other failures, that can be worked on as follow-ups.
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40050/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40050/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40050.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40050",
"merged_at": "2021-02-27T19:02:03Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/40050.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40050"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/40051 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40051/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40051/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40051/events | https://github.com/pandas-dev/pandas/pull/40051 | 816,613,886 | MDExOlB1bGxSZXF1ZXN0NTgwMjQ1OTYx | 40,051 | TST: fix moved test reference | {
"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": "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": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 1 | 2021-02-25T16:51:24Z | 2021-02-25T19:27:25Z | 2021-02-25T19:27:25Z | MEMBER | null | Fixup for https://github.com/pandas-dev/pandas/pull/40042
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40051/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40051/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40051.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40051",
"merged_at": "2021-02-25T19:27:25Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/40051.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40051"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/40052 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40052/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40052/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40052/events | https://github.com/pandas-dev/pandas/pull/40052 | 816,622,366 | MDExOlB1bGxSZXF1ZXN0NTgwMjUzMTA2 | 40,052 | REF/BUG: cast back to datetimelike in pad/backfill | {
"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": "d7e102",
"default": false,
"description": "np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate",
"id": 2822342,
"name": "Missing-data",
"node_id": "MDU6TGFiZWwyODIyMzQy",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Missing-data"
},
{
"color": "e102d8",
"default": false,
"description": "Unexpected or buggy dtype conversions",
"id": 31404521,
"name": "Dtype Conversions",
"node_id": "MDU6TGFiZWwzMTQwNDUyMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Dtype%20Conversions"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 0 | 2021-02-25T17:01:16Z | 2021-02-27T19:02:03Z | 2021-02-27T18:59:34Z | MEMBER | null | Goal: simplify/perf for simple_new by requiring correct-type (no i8) values
Problem: a bunch of places pass i8 values
Solution: track then down and pass/return the right thing in the first place. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40052/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40052/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40052.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40052",
"merged_at": "2021-02-27T18:59:34Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/40052.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40052"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/40053 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40053/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40053/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40053/events | https://github.com/pandas-dev/pandas/pull/40053 | 816,677,153 | MDExOlB1bGxSZXF1ZXN0NTgwMjk4Mjc2 | 40,053 | BUG: revert parts of #40037 | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [
{
"color": "C4A000",
"default": false,
"description": "pandas testing functions or related to the test suite",
"id": 127685,
"name": "Testing",
"node_id": "MDU6TGFiZWwxMjc2ODU=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Testing"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 1 | 2021-02-25T18:15:41Z | 2021-02-26T00:17:09Z | 2021-02-25T23:56:20Z | MEMBER | null | - [x] closes #40048
- [ ] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40053/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40053/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40053.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40053",
"merged_at": "2021-02-25T23:56:20Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/40053.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40053"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/40054 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40054/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40054/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40054/events | https://github.com/pandas-dev/pandas/pull/40054 | 816,691,482 | MDExOlB1bGxSZXF1ZXN0NTgwMzA5OTc4 | 40,054 | PERF: NDArrayBacked in cython | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [] | closed | false | null | [] | null | 5 | 2021-02-25T18:36:34Z | 2021-04-15T02:28:29Z | 2021-03-04T02:36:09Z | MEMBER | null | Context: looking at backing `DatetimeBlock`/`TimedeltaBlock` by `DatetimeArray`/`TimedeltaArray` directly (as opposed to the status quo where we back by ndarrays) and profiling, the constructors stand out as a major source of overhead.
Idea: put the ndarray-wrapping methods in cython
Upsides: performance! stats currently pasted into the NDArrayBacked docstring:
```
import pandas as pd
from pandas._libs.lib import NDArrayBacked as cls
dti = pd.date_range("2016-01-01", periods=3)
dta = dti._data
arr = dta._ndarray
obj = cls._simpler_new(arr, arr.dtype)
# for foo in [arr, dta, obj]: ...
%timeit foo.copy()
299 ns ± 30 ns per loop # <-- arr underlying ndarray (for reference)
530 ns ± 9.24 ns per loop # <-- dta with cython NDArrayBacked
1.66 µs ± 46.3 ns per loop # <-- dta without cython NDArrayBacked <-- i.e. master
328 ns ± 5.29 ns per loop # <-- obj with NDArrayBacked.__cinit__
371 ns ± 6.97 ns per loop # <-- obj with NDArrayBacked._simpler_new
%timeit foo.T
125 ns ± 6.27 ns per loop # <-- arr underlying ndarray (for reference)
226 ns ± 7.66 ns per loop # <-- dta with cython NDArrayBacked
911 ns ± 16.6 ns per loop # <-- dta without cython NDArrayBacked <-- i.e. master
215 ns ± 4.54 ns per loop # <-- obj with NDArrayBacked._simpler_new
```
i.e. `dta.copy()` is 3x faster, and within 2x of numpy. With further tweaks we could get within 10% of numpy (the 328 ns number). `dta.T` is 4x faster and within 2x of numpy.
(T is more-improved than copy bc we override copy in python to copy `.freq`)
Downsides: 1) pickle is a PITA, 2) constructor gymnastics
Future:
- lib.pyx is likely not the best place for this
- can squeeze out more perf if we use `__cinit__`; requires more constructor gymnatics
- can use in PeriodArray, Categorical, PandasArray with some effort
- more methods could be optimized
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40054/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40054/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40054.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40054",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/40054.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40054"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/40055 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40055/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40055/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40055/events | https://github.com/pandas-dev/pandas/issues/40055 | 816,730,216 | MDU6SXNzdWU4MTY3MzAyMTY= | 40,055 | How to stop sorting in pivot_table and pivot? | {
"avatar_url": "https://avatars.githubusercontent.com/u/41958569?v=4",
"events_url": "https://api.github.com/users/SaiPrabhu611/events{/privacy}",
"followers_url": "https://api.github.com/users/SaiPrabhu611/followers",
"following_url": "https://api.github.com/users/SaiPrabhu611/following{/other_user}",
"gists_url": "https://api.github.com/users/SaiPrabhu611/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/SaiPrabhu611",
"id": 41958569,
"login": "SaiPrabhu611",
"node_id": "MDQ6VXNlcjQxOTU4NTY5",
"organizations_url": "https://api.github.com/users/SaiPrabhu611/orgs",
"received_events_url": "https://api.github.com/users/SaiPrabhu611/received_events",
"repos_url": "https://api.github.com/users/SaiPrabhu611/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/SaiPrabhu611/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/SaiPrabhu611/subscriptions",
"type": "User",
"url": "https://api.github.com/users/SaiPrabhu611"
} | [
{
"color": "02d7e1",
"default": false,
"description": "Concat, Merge/Join, Stack/Unstack, Explode",
"id": 13098779,
"name": "Reshaping",
"node_id": "MDU6TGFiZWwxMzA5ODc3OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Reshaping"
},
{
"color": "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": "be21f2",
"default": false,
"description": "May be closeable, needs more eyeballs",
"id": 2365504893,
"name": "Closing Candidate",
"node_id": "MDU6TGFiZWwyMzY1NTA0ODkz",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Closing%20Candidate"
}
] | closed | false | null | [] | null | 5 | 2021-02-25T19:31:24Z | 2021-02-27T02:11:46Z | 2021-02-27T02:11:46Z | NONE | null | <img width="646" alt="stack1" src="https://user-images.githubusercontent.com/41958569/109206385-cb6f4480-77cd-11eb-8cee-f1cc90af0a10.PNG">
<img width="669" alt="stack2" src="https://user-images.githubusercontent.com/41958569/109206396-d0cc8f00-77cd-11eb-8633-42bd91a15877.PNG">
as in the image 2 the transformation from dataframe has been done but it is auto sorted, i couldn't find any way to unsort it or stop sorting!
Is there any way sorting 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/40055/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40055/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/40056 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40056/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40056/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40056/events | https://github.com/pandas-dev/pandas/pull/40056 | 816,740,450 | MDExOlB1bGxSZXF1ZXN0NTgwMzQ5MDc2 | 40,056 | STYLE: Inconsistent namespace - groupby (#39992) | {
"avatar_url": "https://avatars.githubusercontent.com/u/46272939?v=4",
"events_url": "https://api.github.com/users/alexprincel/events{/privacy}",
"followers_url": "https://api.github.com/users/alexprincel/followers",
"following_url": "https://api.github.com/users/alexprincel/following{/other_user}",
"gists_url": "https://api.github.com/users/alexprincel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/alexprincel",
"id": 46272939,
"login": "alexprincel",
"node_id": "MDQ6VXNlcjQ2MjcyOTM5",
"organizations_url": "https://api.github.com/users/alexprincel/orgs",
"received_events_url": "https://api.github.com/users/alexprincel/received_events",
"repos_url": "https://api.github.com/users/alexprincel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/alexprincel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/alexprincel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/alexprincel"
} | [
{
"color": "eb6420",
"default": false,
"description": "Code style, linting, code_checks",
"id": 106935113,
"name": "Code Style",
"node_id": "MDU6TGFiZWwxMDY5MzUxMTM=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Code%20Style"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 2 | 2021-02-25T19:47:08Z | 2021-02-25T20:34:26Z | 2021-02-25T19:54:00Z | CONTRIBUTOR | null | - [ ] closes #xxxx
- [ ] tests added / passed
- [X] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40056/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40056/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40056.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40056",
"merged_at": "2021-02-25T19:54:00Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/40056.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40056"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/40057 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40057/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40057/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40057/events | https://github.com/pandas-dev/pandas/issues/40057 | 816,749,519 | MDU6SXNzdWU4MTY3NDk1MTk= | 40,057 | ENH: Group names in a groupby should be `namedtuple` instead of `tuple` | {
"avatar_url": "https://avatars.githubusercontent.com/u/766670?v=4",
"events_url": "https://api.github.com/users/rben01/events{/privacy}",
"followers_url": "https://api.github.com/users/rben01/followers",
"following_url": "https://api.github.com/users/rben01/following{/other_user}",
"gists_url": "https://api.github.com/users/rben01/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/rben01",
"id": 766670,
"login": "rben01",
"node_id": "MDQ6VXNlcjc2NjY3MA==",
"organizations_url": "https://api.github.com/users/rben01/orgs",
"received_events_url": "https://api.github.com/users/rben01/received_events",
"repos_url": "https://api.github.com/users/rben01/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/rben01/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rben01/subscriptions",
"type": "User",
"url": "https://api.github.com/users/rben01"
} | [
{
"color": "4E9A06",
"default": false,
"description": null,
"id": 76812,
"name": "Enhancement",
"node_id": "MDU6TGFiZWw3NjgxMg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Enhancement"
},
{
"color": "729FCF",
"default": false,
"description": null,
"id": 233160,
"name": "Groupby",
"node_id": "MDU6TGFiZWwyMzMxNjA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Groupby"
},
{
"color": "207de5",
"default": false,
"description": "Requires discussion from core team before further action",
"id": 219960758,
"name": "Needs Discussion",
"node_id": "MDU6TGFiZWwyMTk5NjA3NTg=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Needs%20Discussion"
}
] | open | false | null | [] | null | 3 | 2021-02-25T20:00:47Z | 2021-08-19T01:21:25Z | null | NONE | null | #### Is your feature request related to a problem?
The columns in a DataFrame have names. When you iterate over a groupby object and get the names of the groups (which correspond to values in the original DataFrame), the group names are returned as ordinary `tuple`s and so their correspondence to the columns of the DataFrame is lost. Fields in the `name` tuple can only be accessed by their index; the more natural option of using the corresponding column name in the original DataFrame is not possible.
#### Describe the solution you'd like
When iterating over a groupby -- `for name, group in df.groupby(...):` -- `name` should be a `namedtuple` instead of an ordinary `tuple` so as to allow accessing fields by column name. Any other function that returns the name of a group should return it as a `namedtuple` and not a tuple. The ordinary considerations about what happens when an invalid Python identifier is used as a `namedtuple` field should occur (I think they get replaced with `_1`, `_2`, etc, but not sure about this), especially when the columns have names that are not strings.
#### API breaking implications
As far as I know, `namedtuple`s expose a strict superset of the API of `tuple`s, so there shouldn't be any breaking changes.
#### Describe alternatives you've considered
This very ugly solution:
grouping_cols = ["col1", "col2"]
g = df.groupby(grouping_cols)
name, _ = next(iter(g))
name_col1 = name[grouping_cols.index("col1")]
# now name_col1 is the value in the `name` tuple corresponding to the `"col1"` column
#### Additional context
Ideally I could simply write `name.col1`. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40057/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40057/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/40058 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40058/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40058/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40058/events | https://github.com/pandas-dev/pandas/pull/40058 | 816,750,793 | MDExOlB1bGxSZXF1ZXN0NTgwMzU3NTM3 | 40,058 | STYLE: Inconsistent namespace - reshape (#39992) | {
"avatar_url": "https://avatars.githubusercontent.com/u/46272939?v=4",
"events_url": "https://api.github.com/users/alexprincel/events{/privacy}",
"followers_url": "https://api.github.com/users/alexprincel/followers",
"following_url": "https://api.github.com/users/alexprincel/following{/other_user}",
"gists_url": "https://api.github.com/users/alexprincel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/alexprincel",
"id": 46272939,
"login": "alexprincel",
"node_id": "MDQ6VXNlcjQ2MjcyOTM5",
"organizations_url": "https://api.github.com/users/alexprincel/orgs",
"received_events_url": "https://api.github.com/users/alexprincel/received_events",
"repos_url": "https://api.github.com/users/alexprincel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/alexprincel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/alexprincel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/alexprincel"
} | [
{
"color": "eb6420",
"default": false,
"description": "Code style, linting, code_checks",
"id": 106935113,
"name": "Code Style",
"node_id": "MDU6TGFiZWwxMDY5MzUxMTM=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Code%20Style"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 2 | 2021-02-25T20:02:42Z | 2021-02-28T14:14:15Z | 2021-02-28T13:41:21Z | CONTRIBUTOR | null | - [ ] closes #xxxx
- [ ] tests added / passed
- [X] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40058/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40058/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40058.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40058",
"merged_at": "2021-02-28T13:41:21Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/40058.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40058"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/40059 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40059/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40059/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40059/events | https://github.com/pandas-dev/pandas/issues/40059 | 816,753,783 | MDU6SXNzdWU4MTY3NTM3ODM= | 40,059 | BUG: pandas read_json | {
"avatar_url": "https://avatars.githubusercontent.com/u/13468919?v=4",
"events_url": "https://api.github.com/users/alison199/events{/privacy}",
"followers_url": "https://api.github.com/users/alison199/followers",
"following_url": "https://api.github.com/users/alison199/following{/other_user}",
"gists_url": "https://api.github.com/users/alison199/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/alison199",
"id": 13468919,
"login": "alison199",
"node_id": "MDQ6VXNlcjEzNDY4OTE5",
"organizations_url": "https://api.github.com/users/alison199/orgs",
"received_events_url": "https://api.github.com/users/alison199/received_events",
"repos_url": "https://api.github.com/users/alison199/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/alison199/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/alison199/subscriptions",
"type": "User",
"url": "https://api.github.com/users/alison199"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "0052cc",
"default": false,
"description": "Issue that has not been reviewed by a pandas team member",
"id": 1954720290,
"name": "Needs Triage",
"node_id": "MDU6TGFiZWwxOTU0NzIwMjkw",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Needs%20Triage"
}
] | closed | false | null | [] | null | 1 | 2021-02-25T20:06:55Z | 2021-02-25T20:08:36Z | 2021-02-25T20:07:04Z | NONE | null | - [ ] I have checked that this issue has not already been reported.
- [x] I have confirmed this bug exists on the latest version of pandas.
- [ ] (optional) I have confirmed this bug exists on the master branch of pandas.
---
**Note**: Please read [this guide](https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) detailing how to provide the necessary information for us to reproduce your bug.
#### Code Sample, a copy-pastable example
```python
# Your code here
```
#### Problem description
[this should explain **why** the current behaviour is a problem and why the expected output is a better solution]
#### Expected Output
#### Output of ``pd.show_versions()``
<details>
[paste the output of ``pd.show_versions()`` here leaving a blank line after the details tag]
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40059/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40059/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/40060 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40060/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40060/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40060/events | https://github.com/pandas-dev/pandas/pull/40060 | 816,758,211 | MDExOlB1bGxSZXF1ZXN0NTgwMzYzOTYy | 40,060 | BUG/ENH: `Styler.format()` always inherits from `.set_na_rep()` | {
"avatar_url": "https://avatars.githubusercontent.com/u/24256554?v=4",
"events_url": "https://api.github.com/users/attack68/events{/privacy}",
"followers_url": "https://api.github.com/users/attack68/followers",
"following_url": "https://api.github.com/users/attack68/following{/other_user}",
"gists_url": "https://api.github.com/users/attack68/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/attack68",
"id": 24256554,
"login": "attack68",
"node_id": "MDQ6VXNlcjI0MjU2NTU0",
"organizations_url": "https://api.github.com/users/attack68/orgs",
"received_events_url": "https://api.github.com/users/attack68/received_events",
"repos_url": "https://api.github.com/users/attack68/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/attack68/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/attack68/subscriptions",
"type": "User",
"url": "https://api.github.com/users/attack68"
} | [
{
"color": "eb6420",
"default": false,
"description": "Code style, linting, code_checks",
"id": 106935113,
"name": "Code Style",
"node_id": "MDU6TGFiZWwxMDY5MzUxMTM=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Code%20Style"
},
{
"color": "b60205",
"default": false,
"description": "Internal Consistency of API/Behavior",
"id": 1741841389,
"name": "API - Consistency",
"node_id": "MDU6TGFiZWwxNzQxODQxMzg5",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/API%20-%20Consistency"
}
] | closed | false | null | [] | null | 4 | 2021-02-25T20:11:26Z | 2021-03-05T21:17:05Z | 2021-03-03T13:21:04Z | CONTRIBUTOR | null | - [X] closes #40032
- [X] tests added: `test_display_format_subset_interaction`: why: see below.
- [X] tests removed: `test_format_bad_na_rep`: why: `na_rep` works if not string in some cases - changed to duck-typing.
- [X] tests lefts unchanged that pass: `test_display_format`, `test_display_set_precision`, `test_format_subset`, `test_display_dict`
- [X] tests expanded: `test_display_format_raises`
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
The issue is that there are currently two competing methods in `Styler` for missing value represenatation:
- `.set_na_rep('x')` and
- `.format(na_rep='y')`.
The two do not interact well together dynamically. This PR brings the `format wrapping` into the class so that `format` can be updated and inherit values in `set_na_rep` after it has been called. The image below highlights the impact this PR has and the added test replicates this pattern:

Also at the bottom here, we add a `KeyError` to remove the ambiguity between what happens when a dict is provided with a column Key that is not specifically included within the provided `subset` slice.
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40060/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40060/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40060.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40060",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/40060.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40060"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/40061 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40061/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40061/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40061/events | https://github.com/pandas-dev/pandas/pull/40061 | 816,762,027 | MDExOlB1bGxSZXF1ZXN0NTgwMzY3NDY2 | 40,061 | TYP: incorrect annotations in internals.construction | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [
{
"color": "ea91a4",
"default": false,
"description": "type annotations, mypy/pyright type checking",
"id": 1280988427,
"name": "Typing",
"node_id": "MDU6TGFiZWwxMjgwOTg4NDI3",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Typing"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 2 | 2021-02-25T20:14:25Z | 2021-02-27T18:37:41Z | 2021-02-27T18:13:51Z | MEMBER | null | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40061/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40061/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40061.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40061",
"merged_at": "2021-02-27T18:13:51Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/40061.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40061"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/40062 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40062/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40062/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40062/events | https://github.com/pandas-dev/pandas/pull/40062 | 816,765,387 | MDExOlB1bGxSZXF1ZXN0NTgwMzcwNjE3 | 40,062 | BUG: maybe_convert_objects with timedelta64 nat | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [
{
"color": "5319e7",
"default": false,
"description": "Timedelta data type",
"id": 49597148,
"name": "Timedelta",
"node_id": "MDU6TGFiZWw0OTU5NzE0OA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Timedelta"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 2 | 2021-02-25T20:16:25Z | 2021-02-26T22:39:43Z | 2021-02-26T22:26:03Z | MEMBER | null | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40062/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40062/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40062.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40062",
"merged_at": "2021-02-26T22:26:03Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/40062.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40062"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/40063 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40063/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40063/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40063/events | https://github.com/pandas-dev/pandas/issues/40063 | 816,773,465 | MDU6SXNzdWU4MTY3NzM0NjU= | 40,063 | BUG: cannot use category dtype in pandas read_json method | {
"avatar_url": "https://avatars.githubusercontent.com/u/13468919?v=4",
"events_url": "https://api.github.com/users/alison199/events{/privacy}",
"followers_url": "https://api.github.com/users/alison199/followers",
"following_url": "https://api.github.com/users/alison199/following{/other_user}",
"gists_url": "https://api.github.com/users/alison199/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/alison199",
"id": 13468919,
"login": "alison199",
"node_id": "MDQ6VXNlcjEzNDY4OTE5",
"organizations_url": "https://api.github.com/users/alison199/orgs",
"received_events_url": "https://api.github.com/users/alison199/received_events",
"repos_url": "https://api.github.com/users/alison199/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/alison199/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/alison199/subscriptions",
"type": "User",
"url": "https://api.github.com/users/alison199"
} | [
{
"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": "207de5",
"default": false,
"description": "read_json, to_json, json_normalize",
"id": 49379259,
"name": "IO JSON",
"node_id": "MDU6TGFiZWw0OTM3OTI1OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20JSON"
},
{
"color": "e11d21",
"default": false,
"description": "Categorical Data Type",
"id": 78527356,
"name": "Categorical",
"node_id": "MDU6TGFiZWw3ODUyNzM1Ng==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Categorical"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 2361,
"created_at": "2015-02-26T19:29:05Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/1020496?v=4",
"events_url": "https://api.github.com/users/jorisvandenbossche/events{/privacy}",
"followers_url": "https://api.github.com/users/jorisvandenbossche/followers",
"following_url": "https://api.github.com/users/jorisvandenbossche/following{/other_user}",
"gists_url": "https://api.github.com/users/jorisvandenbossche/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jorisvandenbossche",
"id": 1020496,
"login": "jorisvandenbossche",
"node_id": "MDQ6VXNlcjEwMjA0OTY=",
"organizations_url": "https://api.github.com/users/jorisvandenbossche/orgs",
"received_events_url": "https://api.github.com/users/jorisvandenbossche/received_events",
"repos_url": "https://api.github.com/users/jorisvandenbossche/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jorisvandenbossche/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jorisvandenbossche/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jorisvandenbossche"
},
"description": "A milestone for closed or open issues for which there is no action needed (eg not a bug, just a question / discussion, nothing to resolve, wontfix, etc).\r\n\r\n",
"due_on": null,
"html_url": "https://github.com/pandas-dev/pandas/milestone/33",
"id": 997544,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/33/labels",
"node_id": "MDk6TWlsZXN0b25lOTk3NTQ0",
"number": 33,
"open_issues": 11,
"state": "open",
"title": "No action",
"updated_at": "2021-11-19T17:33:16Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/33"
} | 1 | 2021-02-25T20:21:38Z | 2021-02-25T23:04:49Z | 2021-02-25T23:04:49Z | NONE | null | - [x] I have confirmed this bug exists on the latest version of pandas.
import pandas as pd
print(pd.__version__)
1.2.2
Problem described in other places:
1) https://github.com/pandas-dev/pandas/issues/21892
2) https://github.com/pandas-dev/pandas/pull/25573
3) https://github.com/pandas-dev/pandas/pull/30728
---
**Note**: Please read [this guide](https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) detailing how to provide the necessary information for us to reproduce your bug.
#### Code Sample, a copy-pastable example
```
import pandas as pd
content = '[{"score": 1,"color":"red"},{"score":10,"color":"green"}]'
dtypes_dict = {'score': 'uint8', 'colour': 'category'}
data_frame = pd.read_json(content, dtype=dtypes_dict)
print(data_frame.dtypes)
```
#### Problem description
When I run the above, I get the following dtypes for the dataframe columns:
score uint8
color object
#### Expected Output
score uint8
color category
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40063/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40063/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/40064 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40064/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40064/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40064/events | https://github.com/pandas-dev/pandas/pull/40064 | 816,788,095 | MDExOlB1bGxSZXF1ZXN0NTgwMzkxMDQ1 | 40,064 | REF/BUG: ensure we get DTA/TDA/PA back from Index._intersection | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [
{
"color": "0052cc",
"default": false,
"description": "pandas objects compatability with Numpy or Python functions",
"id": 76865106,
"name": "Compat",
"node_id": "MDU6TGFiZWw3Njg2NTEwNg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Compat"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 0 | 2021-02-25T20:37:51Z | 2021-02-27T19:25:35Z | 2021-02-27T19:08:46Z | MEMBER | null | motivation: stop allowing i8 in _simple_new | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40064/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40064/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40064.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40064",
"merged_at": "2021-02-27T19:08:46Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/40064.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40064"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/40065 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40065/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40065/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40065/events | https://github.com/pandas-dev/pandas/pull/40065 | 816,812,948 | MDExOlB1bGxSZXF1ZXN0NTgwNDExOTI1 | 40,065 | ERR: re-raise OverflowError as OutOfBoundsTimedelta | {
"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": "ffa0ff",
"default": false,
"description": "Incorrect or improved errors from pandas",
"id": 42670965,
"name": "Error Reporting",
"node_id": "MDU6TGFiZWw0MjY3MDk2NQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Error%20Reporting"
},
{
"color": "5319e7",
"default": false,
"description": "Timedelta data type",
"id": 49597148,
"name": "Timedelta",
"node_id": "MDU6TGFiZWw0OTU5NzE0OA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Timedelta"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 0 | 2021-02-25T21:10:58Z | 2021-02-26T22:42:57Z | 2021-02-26T22:24:49Z | MEMBER | null | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40065/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40065/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40065.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40065",
"merged_at": "2021-02-26T22:24:49Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/40065.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40065"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/40066 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40066/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40066/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40066/events | https://github.com/pandas-dev/pandas/issues/40066 | 816,826,161 | MDU6SXNzdWU4MTY4MjYxNjE= | 40,066 | Mystery: bi-modal benchmarks | {
"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": "ae68cc",
"default": false,
"description": "Performance (ASV) benchmarks",
"id": 732775912,
"name": "Benchmark",
"node_id": "MDU6TGFiZWw3MzI3NzU5MTI=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Benchmark"
}
] | closed | false | null | [] | null | 1 | 2021-02-25T21:29:51Z | 2021-06-26T18:57:01Z | 2021-06-26T18:57:01Z | MEMBER | null | Running some asvs and seeing changes in benchmarks that should be unaffected, yet those changes are consistent across runs.
Hunting this down, I'm replicating the most-weird benchmark (asv reports 1.27±0ms vs 789±3μs) in ipython
```
arr = np.ones(10**6, dtype="int8")
ser = pd.Series(arr)
func = ser.sum
%timeit func()
```
The first few runs matched the asv results really closely:
```
In [4]: %timeit func()
781 µs ± 552 ns per loop (mean ± std. dev. of 7 runs, 1000 loops each) # <-- branch
1.27 ms ± 1.82 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each) # <-- master
```
But running it again just for kicks the results flipped:
```
In [5]: %timeit func()
1.27 ms ± 5.05 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each) # <-- branch
780 µs ± 4.81 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each) # <-- master
In [5]: %timeit func()
1.26 ms ± 691 ns per loop (mean ± std. dev. of 7 runs, 1000 loops each) # <-- branch
1.26 ms ± 578 ns per loop (mean ± std. dev. of 7 runs, 1000 loops each) # <-- master
In [10]: %timeit func()
1.26 ms ± 818 ns per loop (mean ± std. dev. of 7 runs, 1000 loops each) # <-- branch
773 µs ± 200 ns per loop (mean ± std. dev. of 7 runs, 1000 loops each) # <-- master
```
Eventually the ~780 number stopped showing up and got replaced a mode between 895-907, but the 1.26-1.27 mode hasn't moved a bit.
No obvious pattern as to which mode will show up in any given run (through they are positively auto-correlated). But in the asv results there must be something causing the modes to be split between the two branches.
I get the same behavior even if I use the same branch, just different terminal windows.
Looking at this with `%prun -s cumtime for i in range(1000): func()` points at `{method 'reduce' of 'numpy.ufunc' objects}`
```
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.000 0.000 0.796 0.796 {built-in method builtins.exec}
1 0.001 0.001 0.796 0.796 <string>:1(<module>)
1000 0.001 0.000 0.795 0.001 generic.py:10747(sum)
1000 0.001 0.000 0.794 0.001 generic.py:10489(sum)
1000 0.002 0.000 0.793 0.001 generic.py:10454(_min_count_stat_function)
1000 0.004 0.000 0.791 0.001 series.py:4133(_reduce)
1000 0.004 0.000 0.778 0.001 nanops.py:82(_f)
1000 0.001 0.000 0.763 0.001 nanops.py:392(new_func)
1000 0.003 0.000 0.761 0.001 nanops.py:528(nansum)
1000 0.001 0.000 0.738 0.001 {method 'sum' of 'numpy.ndarray' objects}
1000 0.000 0.000 0.738 0.001 _methods.py:45(_sum)
1000 0.737 0.001 0.737 0.001 {method 'reduce' of 'numpy.ufunc' objects} # <--
1000 0.003 0.000 0.017 0.000 nanops.py:256(_get_values)
4000 0.005 0.000 0.010 0.000 _ufunc_config.py:32(seterr)
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.000 0.000 1.292 1.292 {built-in method builtins.exec}
1 0.001 0.001 1.292 1.292 <string>:1(<module>)
1000 0.001 0.000 1.292 0.001 generic.py:10747(sum)
1000 0.001 0.000 1.291 0.001 generic.py:10489(sum)
1000 0.002 0.000 1.290 0.001 generic.py:10454(_min_count_stat_function)
1000 0.004 0.000 1.288 0.001 series.py:4133(_reduce)
1000 0.004 0.000 1.275 0.001 nanops.py:82(_f)
1000 0.001 0.000 1.260 0.001 nanops.py:392(new_func)
1000 0.002 0.000 1.258 0.001 nanops.py:528(nansum)
1000 0.001 0.000 1.235 0.001 {method 'sum' of 'numpy.ndarray' objects}
1000 0.000 0.000 1.234 0.001 _methods.py:45(_sum)
1000 1.234 0.001 1.234 0.001 {method 'reduce' of 'numpy.ufunc' objects} # <--
1000 0.003 0.000 0.018 0.000 nanops.py:256(_get_values)
4000 0.005 0.000 0.010 0.000 _ufunc_config.py:32(seterr)
```
The total difference is 1.292 - 0.796 = 0.496 and the difference in the `reduce` ufunc is 1.234 - 0.737 = 0.497, which is pretty suggestive. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40066/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40066/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/40067 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40067/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40067/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40067/events | https://github.com/pandas-dev/pandas/issues/40067 | 816,849,540 | MDU6SXNzdWU4MTY4NDk1NDA= | 40,067 | BUG: groupby.rolling drops MultiIndex level | {
"avatar_url": "https://avatars.githubusercontent.com/u/35338267?v=4",
"events_url": "https://api.github.com/users/JanHomann/events{/privacy}",
"followers_url": "https://api.github.com/users/JanHomann/followers",
"following_url": "https://api.github.com/users/JanHomann/following{/other_user}",
"gists_url": "https://api.github.com/users/JanHomann/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/JanHomann",
"id": 35338267,
"login": "JanHomann",
"node_id": "MDQ6VXNlcjM1MzM4MjY3",
"organizations_url": "https://api.github.com/users/JanHomann/orgs",
"received_events_url": "https://api.github.com/users/JanHomann/received_events",
"repos_url": "https://api.github.com/users/JanHomann/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/JanHomann/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/JanHomann/subscriptions",
"type": "User",
"url": "https://api.github.com/users/JanHomann"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "d4c5f9",
"default": false,
"description": "rolling, ewma, expanding",
"id": 1045950827,
"name": "Window",
"node_id": "MDU6TGFiZWwxMDQ1OTUwODI3",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Window"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 2361,
"created_at": "2015-02-26T19:29:05Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/1020496?v=4",
"events_url": "https://api.github.com/users/jorisvandenbossche/events{/privacy}",
"followers_url": "https://api.github.com/users/jorisvandenbossche/followers",
"following_url": "https://api.github.com/users/jorisvandenbossche/following{/other_user}",
"gists_url": "https://api.github.com/users/jorisvandenbossche/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jorisvandenbossche",
"id": 1020496,
"login": "jorisvandenbossche",
"node_id": "MDQ6VXNlcjEwMjA0OTY=",
"organizations_url": "https://api.github.com/users/jorisvandenbossche/orgs",
"received_events_url": "https://api.github.com/users/jorisvandenbossche/received_events",
"repos_url": "https://api.github.com/users/jorisvandenbossche/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jorisvandenbossche/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jorisvandenbossche/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jorisvandenbossche"
},
"description": "A milestone for closed or open issues for which there is no action needed (eg not a bug, just a question / discussion, nothing to resolve, wontfix, etc).\r\n\r\n",
"due_on": null,
"html_url": "https://github.com/pandas-dev/pandas/milestone/33",
"id": 997544,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/33/labels",
"node_id": "MDk6TWlsZXN0b25lOTk3NTQ0",
"number": 33,
"open_issues": 11,
"state": "open",
"title": "No action",
"updated_at": "2021-11-19T17:33:16Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/33"
} | 1 | 2021-02-25T22:10:08Z | 2021-02-26T00:20:25Z | 2021-02-26T00:20:14Z | NONE | null | - [x] I have checked that this issue has not already been reported.
- [x] I have confirmed this bug exists on the latest version of pandas.
- [ ] (optional) I have confirmed this bug exists on the master branch of pandas.
---
**Note**: Please read [this guide](https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) detailing how to provide the necessary information for us to reproduce your bug.
#### Code Sample, a copy-pastable example
```python
# prepare a dataframe where problem becomes obvious (details not important)
df = pd.DataFrame({'A': [1] * 20 + [2] * 12 + [3] * 8,
'B': np.arange(40)})
df = df.reset_index().set_index(['index','A']).reorder_levels([1,0])
index_mapping = {a:(a-20)/10 for a in range(20,32)}
df = df.rename(index=index_mapping)
index_mapping = {a:(a-32)/10 for a in range(32,40)}
df = df.rename(index=index_mapping)
df = df.rename_axis(index={'index':'time'})
# groupby - rolling operation (here is the bug)
df.groupby('A').rolling(4).mean()
```
#### Problem description
Applying groupby.rolling on a multiindex dataframe should preserve the level that the rolling operation is applied to. Instead that index level is removed. This loses information and causes non-unique index values.
### **df**
<img width="97" alt="Screen Shot 2021-02-25 at 4 58 03 PM" src="https://user-images.githubusercontent.com/35338267/109225102-d2c12e80-778a-11eb-92b5-27e094b60c78.png">
### **df after applying groupby('A').rolling misses index level 'time'**
<img width="73" alt="Screen Shot 2021-02-25 at 4 58 09 PM" src="https://user-images.githubusercontent.com/35338267/109225082-cb9a2080-778a-11eb-9ee8-c76351852e71.png">
#### Expected Output
All index levels should be preserved. In older versions of pandas (1.1.2) the index levels were preserved, but there used to be a different bug: The whole multilevel index structure was duplicated, leading to twice the number of original levels. I guess that in an attempt to fix this, this new bug got introduced.
#### Output of ``pd.show_versions()``
INSTALLED VERSIONS
------------------
commit : 7d32926db8f7541c356066dcadabf854487738de
python : 3.8.1.final.0
python-bits : 64
OS : Darwin
OS-release : 19.6.0
Version : Darwin Kernel Version 19.6.0: Mon Aug 31 22:12:52 PDT 2020; root:xnu-6153.141.2~1/RELEASE_X86_64
machine : x86_64
processor : i386
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : None.UTF-8
pandas : 1.2.2
numpy : 1.20.1
pytz : 2020.1
dateutil : 2.8.1
pip : 21.0.1
setuptools : 41.2.0
Cython : 0.29.20
pytest : 5.4.2
hypothesis : None
sphinx : 3.0.4
blosc : None
feather : None
xlsxwriter : None
lxml.etree : 4.5.2
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 2.11.2
IPython : 7.14.0
pandas_datareader: None
bs4 : 4.9.1
bottleneck : None
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : 3.3.1
numexpr : 2.7.1
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : 0.16.0
pyxlsb : None
s3fs : None
scipy : 1.4.1
sqlalchemy : None
tables : 3.6.1
tabulate : 0.8.7
xarray : 0.16.0
xlrd : 1.2.0
xlwt : None
numba : 0.48.0
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40067/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40067/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/40068 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40068/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40068/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40068/events | https://github.com/pandas-dev/pandas/pull/40068 | 816,866,360 | MDExOlB1bGxSZXF1ZXN0NTgwNDU2NTk0 | 40,068 | BUG: construct_1d_ndarray_preserving_na with dt64/td64 and object dtype | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [
{
"color": "e102d8",
"default": false,
"description": "Unexpected or buggy dtype conversions",
"id": 31404521,
"name": "Dtype Conversions",
"node_id": "MDU6TGFiZWwzMTQwNDUyMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Dtype%20Conversions"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 2 | 2021-02-25T22:39:29Z | 2021-02-26T22:41:05Z | 2021-02-26T22:25:42Z | MEMBER | null | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40068/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40068/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40068.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40068",
"merged_at": "2021-02-26T22:25:42Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/40068.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40068"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/40069 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40069/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40069/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40069/events | https://github.com/pandas-dev/pandas/pull/40069 | 816,902,085 | MDExOlB1bGxSZXF1ZXN0NTgwNDg2NDQ3 | 40,069 | STYLE: inconsistent namespace (io, reshape) | {
"avatar_url": "https://avatars.githubusercontent.com/u/9087854?v=4",
"events_url": "https://api.github.com/users/AA-Turner/events{/privacy}",
"followers_url": "https://api.github.com/users/AA-Turner/followers",
"following_url": "https://api.github.com/users/AA-Turner/following{/other_user}",
"gists_url": "https://api.github.com/users/AA-Turner/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/AA-Turner",
"id": 9087854,
"login": "AA-Turner",
"node_id": "MDQ6VXNlcjkwODc4NTQ=",
"organizations_url": "https://api.github.com/users/AA-Turner/orgs",
"received_events_url": "https://api.github.com/users/AA-Turner/received_events",
"repos_url": "https://api.github.com/users/AA-Turner/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/AA-Turner/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/AA-Turner/subscriptions",
"type": "User",
"url": "https://api.github.com/users/AA-Turner"
} | [
{
"color": "eb6420",
"default": false,
"description": "Code style, linting, code_checks",
"id": 106935113,
"name": "Code Style",
"node_id": "MDU6TGFiZWwxMDY5MzUxMTM=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Code%20Style"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 10 | 2021-02-25T23:51:04Z | 2021-02-26T22:36:05Z | 2021-02-26T19:16:35Z | CONTRIBUTOR | null | - [x] xref #39992
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40069/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40069/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40069.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40069",
"merged_at": "2021-02-26T19:16:35Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/40069.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40069"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/40070 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40070/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40070/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40070/events | https://github.com/pandas-dev/pandas/pull/40070 | 816,952,266 | MDExOlB1bGxSZXF1ZXN0NTgwNTI2NDE5 | 40,070 | TST: collect Index tests by method | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [
{
"color": "C4A000",
"default": false,
"description": "pandas testing functions or related to the test suite",
"id": 127685,
"name": "Testing",
"node_id": "MDU6TGFiZWwxMjc2ODU=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Testing"
},
{
"color": "e99695",
"default": false,
"description": "Related to the Index class or subclasses",
"id": 1218227310,
"name": "Index",
"node_id": "MDU6TGFiZWwxMjE4MjI3MzEw",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Index"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 0 | 2021-02-26T01:51:19Z | 2021-02-26T15:18:02Z | 2021-02-26T14:45:12Z | MEMBER | null | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40070/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40070/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40070.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40070",
"merged_at": "2021-02-26T14:45:12Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/40070.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40070"
} |
|
https://api.github.com/repos/pandas-dev/pandas/issues/40071 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40071/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40071/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40071/events | https://github.com/pandas-dev/pandas/pull/40071 | 817,002,080 | MDExOlB1bGxSZXF1ZXN0NTgwNTY4ODMx | 40,071 | CLN: remove unused arg from _ensure_data | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [
{
"color": "e102d8",
"default": false,
"description": "Unexpected or buggy dtype conversions",
"id": 31404521,
"name": "Dtype Conversions",
"node_id": "MDU6TGFiZWwzMTQwNDUyMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Dtype%20Conversions"
},
{
"color": "eb6420",
"default": false,
"description": "Non-arithmetic algos: value_counts, factorize, sorting, isin, clip, shift, diff",
"id": 57296398,
"name": "Algos",
"node_id": "MDU6TGFiZWw1NzI5NjM5OA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Algos"
},
{
"color": "207de5",
"default": false,
"description": null,
"id": 211029535,
"name": "Clean",
"node_id": "MDU6TGFiZWwyMTEwMjk1MzU=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Clean"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 1 | 2021-02-26T03:17:20Z | 2021-02-26T15:17:05Z | 2021-02-26T14:44:23Z | MEMBER | null | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40071/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40071/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40071.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40071",
"merged_at": "2021-02-26T14:44:23Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/40071.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40071"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/40072 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40072/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40072/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40072/events | https://github.com/pandas-dev/pandas/pull/40072 | 817,054,188 | MDExOlB1bGxSZXF1ZXN0NTgwNjExNTA4 | 40,072 | PERF: EWMA with times | {
"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": "a10c02",
"default": false,
"description": "Memory or execution speed performance",
"id": 8935311,
"name": "Performance",
"node_id": "MDU6TGFiZWw4OTM1MzEx",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Performance"
},
{
"color": "d4c5f9",
"default": false,
"description": "rolling, ewma, expanding",
"id": 1045950827,
"name": "Window",
"node_id": "MDU6TGFiZWwxMDQ1OTUwODI3",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Window"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 3 | 2021-02-26T05:31:16Z | 2021-07-01T14:16:55Z | 2021-02-26T14:46:40Z | MEMBER | null | - [x] closes #39784
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [x] whatsnew entry
```
In [1]: idx=pd.date_range('20000101','20201231',periods=50000)
...:
...: df=pd.DataFrame(data=range(50000),index=idx)
In [2]: %timeit df.ewm(halflife=pd.Timedelta('100d'),times=df.index).mean()
1.2 ms ± 13.8 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each) <-- PR
10.2 s ± 32.2 ms per loop (mean ± std. dev. of 7 runs, 1 loop each) <-- master
``` | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40072/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40072/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40072.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40072",
"merged_at": "2021-02-26T14:46:40Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/40072.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40072"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/40073 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40073/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40073/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40073/events | https://github.com/pandas-dev/pandas/issues/40073 | 817,250,408 | MDU6SXNzdWU4MTcyNTA0MDg= | 40,073 | BUG: Outer merge casts EA dtype to object | {
"avatar_url": "https://avatars.githubusercontent.com/u/25004501?v=4",
"events_url": "https://api.github.com/users/adaitche/events{/privacy}",
"followers_url": "https://api.github.com/users/adaitche/followers",
"following_url": "https://api.github.com/users/adaitche/following{/other_user}",
"gists_url": "https://api.github.com/users/adaitche/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/adaitche",
"id": 25004501,
"login": "adaitche",
"node_id": "MDQ6VXNlcjI1MDA0NTAx",
"organizations_url": "https://api.github.com/users/adaitche/orgs",
"received_events_url": "https://api.github.com/users/adaitche/received_events",
"repos_url": "https://api.github.com/users/adaitche/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/adaitche/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/adaitche/subscriptions",
"type": "User",
"url": "https://api.github.com/users/adaitche"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "02d7e1",
"default": false,
"description": "Concat, Merge/Join, Stack/Unstack, Explode",
"id": 13098779,
"name": "Reshaping",
"node_id": "MDU6TGFiZWwxMzA5ODc3OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Reshaping"
},
{
"color": "e102d8",
"default": false,
"description": "Unexpected or buggy dtype conversions",
"id": 31404521,
"name": "Dtype Conversions",
"node_id": "MDU6TGFiZWwzMTQwNDUyMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Dtype%20Conversions"
},
{
"color": "e11d21",
"default": false,
"description": "Functionality that used to work in a prior pandas version",
"id": 32815646,
"name": "Regression",
"node_id": "MDU6TGFiZWwzMjgxNTY0Ng==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Regression"
},
{
"color": "6138b5",
"default": false,
"description": "Extending pandas with custom dtypes or arrays.",
"id": 849023693,
"name": "ExtensionArray",
"node_id": "MDU6TGFiZWw4NDkwMjM2OTM=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/ExtensionArray"
}
] | closed | false | null | [] | {
"closed_at": "2021-09-12T08:21:30Z",
"closed_issues": 79,
"created_at": "2021-08-15T08:07:48Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/13159005?v=4",
"events_url": "https://api.github.com/users/simonjayhawkins/events{/privacy}",
"followers_url": "https://api.github.com/users/simonjayhawkins/followers",
"following_url": "https://api.github.com/users/simonjayhawkins/following{/other_user}",
"gists_url": "https://api.github.com/users/simonjayhawkins/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/simonjayhawkins",
"id": 13159005,
"login": "simonjayhawkins",
"node_id": "MDQ6VXNlcjEzMTU5MDA1",
"organizations_url": "https://api.github.com/users/simonjayhawkins/orgs",
"received_events_url": "https://api.github.com/users/simonjayhawkins/received_events",
"repos_url": "https://api.github.com/users/simonjayhawkins/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/simonjayhawkins/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/simonjayhawkins/subscriptions",
"type": "User",
"url": "https://api.github.com/users/simonjayhawkins"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-09-12T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/89",
"id": 7059576,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/89/labels",
"node_id": "MI_kwDOAA0YD84Aa7h4",
"number": 89,
"open_issues": 0,
"state": "closed",
"title": "1.3.3",
"updated_at": "2021-09-12T20:30:04Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/89"
} | 3 | 2021-02-26T10:49:21Z | 2021-09-03T21:52:08Z | 2021-09-03T21:52:08Z | NONE | null | - [x] I have checked that this issue has not already been reported.
- [x] I have confirmed this bug exists on the latest version of pandas.
- [ ] (optional) I have confirmed this bug exists on the master branch of pandas.
---
#### Code Sample, a copy-pastable example
```python
d1 = pd.DataFrame([("a",)], columns=["id"], dtype="string")
d2 = pd.DataFrame([("b",)], columns=["id"], dtype="string")
result = d1.merge(d2, on="id", how="outer")
dtype = result.dtypes["id"]
print(dtype) # expected 'string', but is 'object'
```
#### Problem description
When doing an outer merge on a column of type `string`, the result contains this column with the type `object`. This makes it more difficult to use the new `string` type.
The problem doesn't occur with the types `Int32`, `Float32`, `boolean`. It seems to be specific to the `string` type.
The problem doesn't occur with a left, right or inner-merge.
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit : 7d32926db8f7541c356066dcadabf854487738de
python : 3.7.3.final.0
python-bits : 64
OS : Darwin
OS-release : 18.7.0
Version : Darwin Kernel Version 18.7.0: Tue Nov 10 00:07:31 PST 2020; root:xnu-4903.278.51~1/RELEASE_X86_64
machine : x86_64
processor : i386
byteorder : little
LC_ALL : en_US.UTF-8
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.2.2
numpy : 1.20.1
pytz : 2021.1
dateutil : 2.8.1
pip : 20.2.4
setuptools : 52.0.0.post20210125
Cython : None
pytest : 6.0.1
hypothesis : 5.30.1
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 2.11.3
IPython : 7.20.0
pandas_datareader: None
bs4 : None
bottleneck : None
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pyxlsb : None
s3fs : None
scipy : None
sqlalchemy : 1.3.23
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
numba : None
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40073/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40073/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/40074 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40074/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40074/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40074/events | https://github.com/pandas-dev/pandas/pull/40074 | 817,255,127 | MDExOlB1bGxSZXF1ZXN0NTgwNzc3Njc2 | 40,074 | CLN: rename init_dict/ndarray to dict/ndarray_to_mgr for consistency | {
"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": "fbca04",
"default": false,
"description": "Related to non-user accessible pandas implementation",
"id": 49094459,
"name": "Internals",
"node_id": "MDU6TGFiZWw0OTA5NDQ1OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Internals"
},
{
"color": "207de5",
"default": false,
"description": null,
"id": 211029535,
"name": "Clean",
"node_id": "MDU6TGFiZWwyMTEwMjk1MzU=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Clean"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 1 | 2021-02-26T10:55:53Z | 2021-02-26T14:29:00Z | 2021-02-26T14:22:53Z | MEMBER | null | See https://github.com/pandas-dev/pandas/pull/39991#discussion_r582632186, in case this is preferred for consistency with `arrays_to_mgr` (I don't have a strong preference myself, since they are only used in `__init__` the current name is also nice) | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40074/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40074/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40074.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40074",
"merged_at": "2021-02-26T14:22:53Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/40074.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40074"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/40075 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40075/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40075/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40075/events | https://github.com/pandas-dev/pandas/pull/40075 | 817,280,880 | MDExOlB1bGxSZXF1ZXN0NTgwNzk5MTg5 | 40,075 | REF: move logic of 'block manager axis' into the BlockManager | {
"avatar_url": "https://avatars.githubusercontent.com/u/1020496?v=4",
"events_url": "https://api.github.com/users/jorisvandenbossche/events{/privacy}",
"followers_url": "https://api.github.com/users/jorisvandenbossche/followers",
"following_url": "https://api.github.com/users/jorisvandenbossche/following{/other_user}",
"gists_url": "https://api.github.com/users/jorisvandenbossche/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jorisvandenbossche",
"id": 1020496,
"login": "jorisvandenbossche",
"node_id": "MDQ6VXNlcjEwMjA0OTY=",
"organizations_url": "https://api.github.com/users/jorisvandenbossche/orgs",
"received_events_url": "https://api.github.com/users/jorisvandenbossche/received_events",
"repos_url": "https://api.github.com/users/jorisvandenbossche/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jorisvandenbossche/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jorisvandenbossche/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jorisvandenbossche"
} | [
{
"color": "FCE94F",
"default": false,
"description": "Internal refactoring of code",
"id": 127681,
"name": "Refactor",
"node_id": "MDU6TGFiZWwxMjc2ODE=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Refactor"
},
{
"color": "fbca04",
"default": false,
"description": "Related to non-user accessible pandas implementation",
"id": 49094459,
"name": "Internals",
"node_id": "MDU6TGFiZWw0OTA5NDQ1OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Internals"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 5 | 2021-02-26T11:32:46Z | 2021-03-05T16:35:45Z | 2021-03-05T16:35:36Z | MEMBER | null | @jreback @jbrockmendel what are your thoughts about doing this?
Currently the 0/1 -> 1/0 axis switch for the BlockManager happens on the DataFrame side, while I think it would be a bit cleaner to let this be the responsibility of the BlockManager method being called.
For illustration, the diff of this PR is such a change for the `diff()` method: instead of using `_get_block_manager_axis` in frame.py, it's the `BlockManager.diff()` method that takes care of this (so just moving it down a level). | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40075/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40075/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40075.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40075",
"merged_at": "2021-03-05T16:35:36Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/40075.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40075"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/40076 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40076/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40076/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40076/events | https://github.com/pandas-dev/pandas/issues/40076 | 817,289,478 | MDU6SXNzdWU4MTcyODk0Nzg= | 40,076 | BUG: | {
"avatar_url": "https://avatars.githubusercontent.com/u/45946200?v=4",
"events_url": "https://api.github.com/users/JayMan91/events{/privacy}",
"followers_url": "https://api.github.com/users/JayMan91/followers",
"following_url": "https://api.github.com/users/JayMan91/following{/other_user}",
"gists_url": "https://api.github.com/users/JayMan91/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/JayMan91",
"id": 45946200,
"login": "JayMan91",
"node_id": "MDQ6VXNlcjQ1OTQ2MjAw",
"organizations_url": "https://api.github.com/users/JayMan91/orgs",
"received_events_url": "https://api.github.com/users/JayMan91/received_events",
"repos_url": "https://api.github.com/users/JayMan91/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/JayMan91/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/JayMan91/subscriptions",
"type": "User",
"url": "https://api.github.com/users/JayMan91"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "0052cc",
"default": false,
"description": "Issue that has not been reviewed by a pandas team member",
"id": 1954720290,
"name": "Needs Triage",
"node_id": "MDU6TGFiZWwxOTU0NzIwMjkw",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Needs%20Triage"
}
] | closed | false | null | [] | null | 0 | 2021-02-26T11:45:54Z | 2021-02-26T11:46:11Z | 2021-02-26T11:46:11Z | NONE | null | - [ ] I have checked that this issue has not already been reported.
- [ ] I have confirmed this bug exists on the latest version of pandas.
- [ ] (optional) I have confirmed this bug exists on the master branch of pandas.
---
**Note**: Please read [this guide](https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) detailing how to provide the necessary information for us to reproduce your bug.
#### Code Sample, a copy-pastable example
```python
# Your code here
```
#### Problem description
[this should explain **why** the current behaviour is a problem and why the expected output is a better solution]
#### Expected Output
#### Output of ``pd.show_versions()``
<details>
[paste the output of ``pd.show_versions()`` here leaving a blank line after the details tag]
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40076/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40076/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/40077 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40077/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40077/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40077/events | https://github.com/pandas-dev/pandas/issues/40077 | 817,323,247 | MDU6SXNzdWU4MTczMjMyNDc= | 40,077 | BUG: Empty dataframe created with Index, not RangeIndex | {
"avatar_url": "https://avatars.githubusercontent.com/u/13164166?v=4",
"events_url": "https://api.github.com/users/connesy/events{/privacy}",
"followers_url": "https://api.github.com/users/connesy/followers",
"following_url": "https://api.github.com/users/connesy/following{/other_user}",
"gists_url": "https://api.github.com/users/connesy/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/connesy",
"id": 13164166,
"login": "connesy",
"node_id": "MDQ6VXNlcjEzMTY0MTY2",
"organizations_url": "https://api.github.com/users/connesy/orgs",
"received_events_url": "https://api.github.com/users/connesy/received_events",
"repos_url": "https://api.github.com/users/connesy/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/connesy/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/connesy/subscriptions",
"type": "User",
"url": "https://api.github.com/users/connesy"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "e99695",
"default": false,
"description": "Related to the Index class or subclasses",
"id": 1218227310,
"name": "Index",
"node_id": "MDU6TGFiZWwxMjE4MjI3MzEw",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Index"
},
{
"color": "d4c5f9",
"default": false,
"description": "Series/DataFrame/Index/pd.array Constructors",
"id": 1465286368,
"name": "Constructors",
"node_id": "MDU6TGFiZWwxNDY1Mjg2MzY4",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Constructors"
},
{
"color": "b60205",
"default": false,
"description": "Internal Consistency of API/Behavior",
"id": 1741841389,
"name": "API - Consistency",
"node_id": "MDU6TGFiZWwxNzQxODQxMzg5",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/API%20-%20Consistency"
}
] | open | false | null | [] | {
"closed_at": null,
"closed_issues": 786,
"created_at": "2015-01-13T10:53:19Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "Changes that would be nice to have in the next release. These issues are not blocking. They will be pushed to the next release if no one has time to fix them.",
"due_on": null,
"html_url": "https://github.com/pandas-dev/pandas/milestone/32",
"id": 933188,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/32/labels",
"node_id": "MDk6TWlsZXN0b25lOTMzMTg4",
"number": 32,
"open_issues": 1053,
"state": "open",
"title": "Contributions Welcome",
"updated_at": "2021-11-21T00:50:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/32"
} | 2 | 2021-02-26T12:37:44Z | 2021-07-01T23:57:58Z | null | CONTRIBUTOR | null | - [x] I have checked that this issue has not already been reported.
- [x] I have confirmed this bug exists on the latest version of pandas.
- [ ] (optional) I have confirmed this bug exists on the master branch of pandas.
---
**Note**: Please read [this guide](https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) detailing how to provide the necessary information for us to reproduce your bug.
#### Code Sample, a copy-pastable example
```python
# Your code here
>>> import pandas as pd
>>> df = pd.DataFrame(columns=['a', 'b'])
>>> print(df.index)
Index([], dtype='object')
>>> df2 = df.append(df, ignore_index=True)
>>> print(df2.index)
RangeIndex(start=0, stop=0, step=1)
>>> pd.testing.assert_frame_equal(df, df2)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/stefan/miniconda3/envs/pandas/lib/python3.9/site-packages/pandas/_testing.py", line 1657, in assert_frame_equal
assert_index_equal(
File "/home/stefan/miniconda3/envs/pandas/lib/python3.9/site-packages/pandas/_testing.py", line 773, in assert_index_equal
_check_types(left, right, obj=obj)
File "/home/stefan/miniconda3/envs/pandas/lib/python3.9/site-packages/pandas/_testing.py", line 740, in _check_types
assert_class_equal(left, right, exact=exact, obj=obj)
File "/home/stefan/miniconda3/envs/pandas/lib/python3.9/site-packages/pandas/_testing.py", line 868, in assert_class_equal
raise_assert_detail(obj, msg, repr_class(left), repr_class(right))
File "/home/stefan/miniconda3/envs/pandas/lib/python3.9/site-packages/pandas/_testing.py", line 1073, in raise_assert_detail
raise AssertionError(msg)
AssertionError: DataFrame.index are different
DataFrame.index classes are not equivalent
[left]: Index([], dtype='object')
[right]: RangeIndex(start=0, stop=0, step=1)
```
#### Problem description
When creating an empty dataframe it is created with `Index`, and not with a `RangeIndex` as specified in the [docs](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.html). This is a problem, e.g. in the example shown above, where I would not expect the index to change when appending the empty dataframe to itself. However, `pd.testing.assert_frame_equals` raises `AssertionError` since the indeces are not equivalent.
#### Expected Output
```python
>>> df = pd.DataFrame(columns=['a', 'b'])
>>> print(df.index)
RangeIndex(start=0, stop=0, step=1)
```
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit : 7d32926db8f7541c356066dcadabf854487738de
python : 3.9.2.final.0
python-bits : 64
OS : Linux
OS-release : 5.4.0-59-generic
Version : #65-Ubuntu SMP Thu Dec 10 12:01:51 UTC 2020
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.2.2
numpy : 1.20.1
pytz : 2021.1
dateutil : 2.8.1
pip : 21.0.1
setuptools : 49.6.0.post20210108
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : None
IPython : None
pandas_datareader: None
bs4 : None
bottleneck : None
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pyxlsb : None
s3fs : None
scipy : None
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
numba : None
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40077/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40077/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/40078 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40078/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40078/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40078/events | https://github.com/pandas-dev/pandas/pull/40078 | 817,327,874 | MDExOlB1bGxSZXF1ZXN0NTgwODM4NzY1 | 40,078 | REF, TYP: factor out _mark_right from _add_legend_handle | {
"avatar_url": "https://avatars.githubusercontent.com/u/33491632?v=4",
"events_url": "https://api.github.com/users/MarcoGorelli/events{/privacy}",
"followers_url": "https://api.github.com/users/MarcoGorelli/followers",
"following_url": "https://api.github.com/users/MarcoGorelli/following{/other_user}",
"gists_url": "https://api.github.com/users/MarcoGorelli/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/MarcoGorelli",
"id": 33491632,
"login": "MarcoGorelli",
"node_id": "MDQ6VXNlcjMzNDkxNjMy",
"organizations_url": "https://api.github.com/users/MarcoGorelli/orgs",
"received_events_url": "https://api.github.com/users/MarcoGorelli/received_events",
"repos_url": "https://api.github.com/users/MarcoGorelli/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/MarcoGorelli/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/MarcoGorelli/subscriptions",
"type": "User",
"url": "https://api.github.com/users/MarcoGorelli"
} | [
{
"color": "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 | 5 | 2021-02-26T12:44:46Z | 2021-03-27T11:11:01Z | 2021-03-27T07:42:45Z | MEMBER | null | - [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
This PR factors out adding ` (right)` to labels which are meant to go on the right y-axis. This does not change anything user-facing, and is simply a precursor to fixing #40044 and #39522 .
The change is that on `master`, only `leg.get_texts()` shows `b (right)` while `ax.right_ax.get_legend_handles_labels()` shows `b`. The former is used for constructing the user-facing legend. The reason I think it needs doing is that I believe that to address #40044 and #39522, we need to use `.get_legend_handles_labels()` for both handles and labels, while currently `.get_legend_handles_labels` is used for handles and `leg.get_texts()` is used for labels.
Putting a breakpoint after
https://github.com/pandas-dev/pandas/blob/ab687aec38668cdb0139ca02d6e37e8c8386ae7d/pandas/plotting/_matplotlib/core.py#L591
results in , on this branch:
```python
(Pdb) ax.right_ax.get_legend_handles_labels()
([<matplotlib.lines.Line2D object at 0x7fc94adf1dc0>], ['b (right)'])
```
and on master:
```python
(Pdb) ax.right_ax.get_legend_handles_labels()
([<matplotlib.lines.Line2D object at 0x7ff2892abbe0>], ['b'])
``` | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40078/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40078/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40078.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40078",
"merged_at": "2021-03-27T07:42:45Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/40078.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40078"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/40079 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40079/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40079/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40079/events | https://github.com/pandas-dev/pandas/pull/40079 | 817,386,113 | MDExOlB1bGxSZXF1ZXN0NTgwODg3NjYy | 40,079 | [ArrayManager] Remove apply_with_block usage for diff() | {
"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": "fbca04",
"default": false,
"description": "Related to non-user accessible pandas implementation",
"id": 49094459,
"name": "Internals",
"node_id": "MDU6TGFiZWw0OTA5NDQ1OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Internals"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 0 | 2021-02-26T14:08:21Z | 2021-03-01T10:01:11Z | 2021-02-27T19:04:30Z | MEMBER | null | xref https://github.com/pandas-dev/pandas/issues/39146/
This turned out to be an easy one | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40079/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40079/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40079.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40079",
"merged_at": "2021-02-27T19:04:30Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/40079.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40079"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/40080 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40080/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40080/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40080/events | https://github.com/pandas-dev/pandas/issues/40080 | 817,401,006 | MDU6SXNzdWU4MTc0MDEwMDY= | 40,080 | BUG: Categorical dtype in MultiIndex levels is lost during set operations (difference, union, intersection,...) | {
"avatar_url": "https://avatars.githubusercontent.com/u/28730622?v=4",
"events_url": "https://api.github.com/users/tscheburaschka/events{/privacy}",
"followers_url": "https://api.github.com/users/tscheburaschka/followers",
"following_url": "https://api.github.com/users/tscheburaschka/following{/other_user}",
"gists_url": "https://api.github.com/users/tscheburaschka/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/tscheburaschka",
"id": 28730622,
"login": "tscheburaschka",
"node_id": "MDQ6VXNlcjI4NzMwNjIy",
"organizations_url": "https://api.github.com/users/tscheburaschka/orgs",
"received_events_url": "https://api.github.com/users/tscheburaschka/received_events",
"repos_url": "https://api.github.com/users/tscheburaschka/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/tscheburaschka/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/tscheburaschka/subscriptions",
"type": "User",
"url": "https://api.github.com/users/tscheburaschka"
} | [
{
"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": "e102d8",
"default": false,
"description": "Unexpected or buggy dtype conversions",
"id": 31404521,
"name": "Dtype Conversions",
"node_id": "MDU6TGFiZWwzMTQwNDUyMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Dtype%20Conversions"
},
{
"color": "207de5",
"default": false,
"description": null,
"id": 71268330,
"name": "MultiIndex",
"node_id": "MDU6TGFiZWw3MTI2ODMzMA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/MultiIndex"
},
{
"color": "e11d21",
"default": false,
"description": "Categorical Data Type",
"id": 78527356,
"name": "Categorical",
"node_id": "MDU6TGFiZWw3ODUyNzM1Ng==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Categorical"
},
{
"color": "006b75",
"default": false,
"description": "union, intersection, difference, symmetric_difference",
"id": 3073524400,
"name": "setops",
"node_id": "MDU6TGFiZWwzMDczNTI0NDAw",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/setops"
}
] | open | false | null | [] | {
"closed_at": null,
"closed_issues": 786,
"created_at": "2015-01-13T10:53:19Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "Changes that would be nice to have in the next release. These issues are not blocking. They will be pushed to the next release if no one has time to fix them.",
"due_on": null,
"html_url": "https://github.com/pandas-dev/pandas/milestone/32",
"id": 933188,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/32/labels",
"node_id": "MDk6TWlsZXN0b25lOTMzMTg4",
"number": 32,
"open_issues": 1053,
"state": "open",
"title": "Contributions Welcome",
"updated_at": "2021-11-21T00:50:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/32"
} | 1 | 2021-02-26T14:27:36Z | 2021-08-19T01:23:13Z | null | NONE | null | - [X] I have checked that this issue has not already been reported.
- [X] I have confirmed this bug exists on the latest version of pandas.
- [X] (optional) I have confirmed this bug exists on the master branch of pandas.
---
Coming from [here](https://github.com/pandas-dev/pandas/issues/13432#issuecomment-786604695), I tried my issue on current HEAD@master and the erroneous behaviour still persists.
#### Code Sample, a copy-pastable example
```python
import pandas as pd
cat = pd.CategoricalDtype(categories=[1, 2, 3, 4])
df = pd.DataFrame({'a': [1, 2, 3, 4, 3, 2, 1], 'b': [4, 3, 2, 3, 1, 2, 3]}, dtype=cat)
# flat categorical index, no MultiIndex
df_cat = df.set_index('a', drop=False)
diff_ind = df_cat.index.difference(df_cat.head(3).index)
print(diff_ind.dtype) # -> category
union_ind = df_cat.index.union(df_cat.head(3).index)
print(union_ind.dtype) # -> category
# same set operations on MultiIndex, categorical gets lost
df_cat_multi = df.set_index(['a', 'b'], drop=False)
# just make sure, we have a categorical in the first place
print(df_cat_multi.index.get_level_values(0).dtype) # -> category
print(df_cat_multi.index.get_level_values(1).dtype) # -> category
diff_multi_ind = df_cat_multi.index.difference(df_cat_multi.head(3).index)
print(diff_multi_ind.get_level_values(0).dtype) # -> int64
print(diff_multi_ind.get_level_values(1).dtype) # -> int64
union_multi_ind = df_cat_multi.index.union(df_cat_multi.head(3).index)
print(union_multi_ind.get_level_values(0).dtype) # -> int64
print(union_multi_ind.get_level_values(1).dtype) # -> int64
```
#### Problem description
In contrast to set operations involving flat categorical indices, the same operations on multi-indices with categorical level values revert the result back to the underlying datatype.
#### Expected Output
The set-operations on multi-indices should preserve the categorical dtype of level values.
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit : ab687aec38668cdb0139ca02d6e37e8c8386ae7d
python : 3.8.6.final.0
python-bits : 64
OS : Windows
OS-release : 10
Version : 10.0.19041
machine : AMD64
processor : Intel64 Family 6 Model 94 Stepping 3, GenuineIntel
byteorder : little
LC_ALL : None
LANG : None
LOCALE : de_DE.cp1252
pandas : 1.3.0.dev0+849.gab687aec38
numpy : 1.19.5
pytz : 2021.1
dateutil : 2.8.1
pip : 21.0.1
setuptools : 53.1.0
Cython : 0.29.22
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : None
IPython : None
pandas_datareader: None
bs4 : None
bottleneck : None
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pyxlsb : None
s3fs : None
scipy : None
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
numba : None
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40080/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40080/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/40081 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40081/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40081/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40081/events | https://github.com/pandas-dev/pandas/issues/40081 | 817,425,598 | MDU6SXNzdWU4MTc0MjU1OTg= | 40,081 | QST: Invalid representation of data | {
"avatar_url": "https://avatars.githubusercontent.com/u/4992216?v=4",
"events_url": "https://api.github.com/users/AlexandreDecan/events{/privacy}",
"followers_url": "https://api.github.com/users/AlexandreDecan/followers",
"following_url": "https://api.github.com/users/AlexandreDecan/following{/other_user}",
"gists_url": "https://api.github.com/users/AlexandreDecan/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/AlexandreDecan",
"id": 4992216,
"login": "AlexandreDecan",
"node_id": "MDQ6VXNlcjQ5OTIyMTY=",
"organizations_url": "https://api.github.com/users/AlexandreDecan/orgs",
"received_events_url": "https://api.github.com/users/AlexandreDecan/received_events",
"repos_url": "https://api.github.com/users/AlexandreDecan/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/AlexandreDecan/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/AlexandreDecan/subscriptions",
"type": "User",
"url": "https://api.github.com/users/AlexandreDecan"
} | [
{
"color": "0052cc",
"default": false,
"description": null,
"id": 34444536,
"name": "Usage Question",
"node_id": "MDU6TGFiZWwzNDQ0NDUzNg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Usage%20Question"
},
{
"color": "0052cc",
"default": false,
"description": "Issue that has not been reviewed by a pandas team member",
"id": 1954720290,
"name": "Needs Triage",
"node_id": "MDU6TGFiZWwxOTU0NzIwMjkw",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Needs%20Triage"
}
] | closed | false | null | [] | null | 4 | 2021-02-26T14:58:53Z | 2021-02-27T08:56:58Z | 2021-02-27T08:56:58Z | CONTRIBUTOR | null | - [x] I have searched the [[pandas] tag](https://stackoverflow.com/questions/tagged/pandas) on StackOverflow for similar questions.
- [ ] I have asked my usage related question on [StackOverflow](https://stackoverflow.com).
---
#### Question about pandas
Hello,
I'm the maintainer of a Python library to store and manipulate (disjunctions of) intervals of arbitrary values (as long as they are comparable). It's called `portion` and it's available on PyPI and also on GitHub (https://github.com/AlexandreDecan/portion).
This data type defines a `__repr__` method (e.g. the interval from 0 to 1 included is represented as "[0,1]"). When I use this data type in `pandas`, I got a representation that does not correct to what can be expected. Let me provide a very simple example:
```python
>>> import portion as P
>>> P.closed(0, 1)
[0,1]
>>> import pandas as pd
>>> df = pd.DataFrame([P.closed(0,1)])
>>> df
| 0
-- | --
((([0,1])))
```
As you can see, the expected output has three extra "(" and three extra ")", this is:
EXPECTED OUTPUT= "[0,1]"
CURRENT_OUTPUT = "((([0,1])))"
The same occurs when I display the corresponding index:
```python
>>> df.loc[0]
0 ((([0,1])))
Name: 0, dtype: object
```
But not when I display the corresponding "cell":
```python
>>> df.loc[0][0]
[0,1]
```
Actually, if I get the object from `df.loc[0][0]`, I got the correct instance and its expected behaviour.
I looked at how `__repr__` is handled by `pandas` but couldn't find the reason why this occurs.
For what is worth, here's the implementation of `__repr__` in `portion`(see https://github.com/AlexandreDecan/portion/blob/master/portion/interval.py#L584):
```python
def __repr__(self):
intervals = []
for interval in self:
if interval.empty:
intervals.append('()')
elif interval.lower == interval.upper:
intervals.append('[{}]'.format(repr(interval.lower)))
else:
intervals.append(
'{}{},{}{}'.format(
'[' if interval.left == Bound.CLOSED else '(',
repr(interval.lower),
repr(interval.upper),
']' if interval.right == Bound.CLOSED else ')',
)
)
return ' | '.join(intervals)
```
In the above snippet, `self` is an `Interval` instance that can be iterated over. Each `interval in self` is an `Interval` instance as well (they correspond to all the atomic intervals you can have in a disjunctive one, e.g., "[0,1] | [3,4]" has two atomic intervals: [0,1] and [3,4]). Each `interval` has several attributes, but the ones of interest here are `left` and `right` (either `Bound.CLOSED` or `Bound.OPEN`, two constants from an enum based on Booleans), and `upper` and `lower` that respectively correspond to the upper bound of the interval and the lower bound of the interval (e.g., for [0,1], upper = 1, and lower = 0).
FYI, I'm using pandas 1.2.2 but I already got this "issue" with a previous version (unfortunately, I do not remember which one).
Thank 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/40081/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40081/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/40082 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40082/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40082/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40082/events | https://github.com/pandas-dev/pandas/pull/40082 | 817,454,436 | MDExOlB1bGxSZXF1ZXN0NTgwOTQ0NzA4 | 40,082 | REF: avoid object-dtype casting in Block.replace | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [
{
"color": "e102d8",
"default": false,
"description": "Unexpected or buggy dtype conversions",
"id": 31404521,
"name": "Dtype Conversions",
"node_id": "MDU6TGFiZWwzMTQwNDUyMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Dtype%20Conversions"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 2 | 2021-02-26T15:36:06Z | 2021-02-26T23:10:46Z | 2021-02-26T23:09:25Z | MEMBER | null | ATM we do `self.astype(object)`, where the idiomatic thing to do is `self.coerce_to_target_dtype(value)`, which in some cases means we dont need to cast on the back-end | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40082/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40082/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40082.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40082",
"merged_at": "2021-02-26T23:09:25Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/40082.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40082"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/40083 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40083/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40083/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40083/events | https://github.com/pandas-dev/pandas/pull/40083 | 817,500,063 | MDExOlB1bGxSZXF1ZXN0NTgwOTgzMDE5 | 40,083 | Backport PR #39451: BUG: raise when sort_index with ascending=None | {
"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": "02d7e1",
"default": false,
"description": "Concat, Merge/Join, Stack/Unstack, Explode",
"id": 13098779,
"name": "Reshaping",
"node_id": "MDU6TGFiZWwxMzA5ODc3OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Reshaping"
}
] | closed | false | null | [] | {
"closed_at": "2021-03-02T08:40:51Z",
"closed_issues": 49,
"created_at": "2021-02-07T13:58:05Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/13159005?v=4",
"events_url": "https://api.github.com/users/simonjayhawkins/events{/privacy}",
"followers_url": "https://api.github.com/users/simonjayhawkins/followers",
"following_url": "https://api.github.com/users/simonjayhawkins/following{/other_user}",
"gists_url": "https://api.github.com/users/simonjayhawkins/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/simonjayhawkins",
"id": 13159005,
"login": "simonjayhawkins",
"node_id": "MDQ6VXNlcjEzMTU5MDA1",
"organizations_url": "https://api.github.com/users/simonjayhawkins/orgs",
"received_events_url": "https://api.github.com/users/simonjayhawkins/received_events",
"repos_url": "https://api.github.com/users/simonjayhawkins/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/simonjayhawkins/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/simonjayhawkins/subscriptions",
"type": "User",
"url": "https://api.github.com/users/simonjayhawkins"
},
"description": "on-merge: backport to 1.2.x\r\n\r\n",
"due_on": "2021-03-01T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/83",
"id": 6402340,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/83/labels",
"node_id": "MDk6TWlsZXN0b25lNjQwMjM0MA==",
"number": 83,
"open_issues": 0,
"state": "closed",
"title": "1.2.3",
"updated_at": "2021-03-02T17:15:27Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/83"
} | 0 | 2021-02-26T16:37:32Z | 2021-02-26T18:26:34Z | 2021-02-26T18:26:30Z | MEMBER | null | Backport PR #39451 | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40083/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40083/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40083.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40083",
"merged_at": "2021-02-26T18:26:30Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/40083.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40083"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/40084 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40084/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40084/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40084/events | https://github.com/pandas-dev/pandas/pull/40084 | 817,510,319 | MDExOlB1bGxSZXF1ZXN0NTgwOTkxNTM5 | 40,084 | API: dont-special-case datetimelike in setting new column | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [
{
"color": "e102d8",
"default": false,
"description": "Unexpected or buggy dtype conversions",
"id": 31404521,
"name": "Dtype Conversions",
"node_id": "MDU6TGFiZWwzMTQwNDUyMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Dtype%20Conversions"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 4 | 2021-02-26T16:52:09Z | 2021-03-31T22:22:40Z | 2021-02-27T18:34:22Z | MEMBER | null | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40084/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40084/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40084.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40084",
"merged_at": "2021-02-27T18:34:22Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/40084.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40084"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/40085 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40085/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40085/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40085/events | https://github.com/pandas-dev/pandas/pull/40085 | 817,513,183 | MDExOlB1bGxSZXF1ZXN0NTgwOTkzODc0 | 40,085 | [ArrayManager] TST: resample tests | {
"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": "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": "fbca04",
"default": false,
"description": "Related to non-user accessible pandas implementation",
"id": 49094459,
"name": "Internals",
"node_id": "MDU6TGFiZWw0OTA5NDQ1OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Internals"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 1 | 2021-02-26T16:56:21Z | 2021-03-01T13:51:26Z | 2021-03-01T13:51:23Z | MEMBER | null | xref https://github.com/pandas-dev/pandas/issues/39146/
This will only pass once https://github.com/pandas-dev/pandas/pull/40050 is merged | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40085/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40085/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40085.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40085",
"merged_at": "2021-03-01T13:51:23Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/40085.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40085"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/40086 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40086/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40086/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40086/events | https://github.com/pandas-dev/pandas/pull/40086 | 817,537,453 | MDExOlB1bGxSZXF1ZXN0NTgxMDEzOTY3 | 40,086 | REF: tighter types in maybe_infer_to_datetimelike | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [
{
"color": "ea91a4",
"default": false,
"description": "type annotations, mypy/pyright type checking",
"id": 1280988427,
"name": "Typing",
"node_id": "MDU6TGFiZWwxMjgwOTg4NDI3",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Typing"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 2 | 2021-02-26T17:32:03Z | 2021-02-26T22:55:19Z | 2021-02-26T22:52:19Z | MEMBER | null | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40086/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40086/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40086.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40086",
"merged_at": "2021-02-26T22:52:19Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/40086.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40086"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/40087 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40087/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40087/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40087/events | https://github.com/pandas-dev/pandas/pull/40087 | 817,540,290 | MDExOlB1bGxSZXF1ZXN0NTgxMDE2MzUx | 40,087 | REF: tighten types in maybe_downcast_numeric, maybe_downcast_to_dtype | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [
{
"color": "e102d8",
"default": false,
"description": "Unexpected or buggy dtype conversions",
"id": 31404521,
"name": "Dtype Conversions",
"node_id": "MDU6TGFiZWwzMTQwNDUyMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Dtype%20Conversions"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 1 | 2021-02-26T17:36:36Z | 2021-02-27T02:35:47Z | 2021-02-27T00:00:45Z | MEMBER | null | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40087/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40087/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40087.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40087",
"merged_at": "2021-02-27T00:00:45Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/40087.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40087"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/40088 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40088/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40088/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40088/events | https://github.com/pandas-dev/pandas/pull/40088 | 817,593,401 | MDExOlB1bGxSZXF1ZXN0NTgxMDYwMDkx | 40,088 | CI: typo fixup for ResourceWarning | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [
{
"color": "C4A000",
"default": false,
"description": "pandas testing functions or related to the test suite",
"id": 127685,
"name": "Testing",
"node_id": "MDU6TGFiZWwxMjc2ODU=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Testing"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 3 | 2021-02-26T19:05:06Z | 2021-02-27T03:59:43Z | 2021-02-27T03:58:42Z | MEMBER | null | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40088/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40088/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40088.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40088",
"merged_at": "2021-02-27T03:58:42Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/40088.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40088"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/40089 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40089/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40089/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40089/events | https://github.com/pandas-dev/pandas/pull/40089 | 817,619,792 | MDExOlB1bGxSZXF1ZXN0NTgxMDgxOTgy | 40,089 | REF: remove sanitize_index | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [
{
"color": "FCE94F",
"default": false,
"description": "Internal refactoring of code",
"id": 127681,
"name": "Refactor",
"node_id": "MDU6TGFiZWwxMjc2ODE=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Refactor"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 0 | 2021-02-26T19:50:24Z | 2021-02-27T18:35:22Z | 2021-02-27T18:23:08Z | MEMBER | null | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40089/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40089/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40089.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40089",
"merged_at": "2021-02-27T18:23:08Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/40089.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40089"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/40090 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40090/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40090/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40090/events | https://github.com/pandas-dev/pandas/pull/40090 | 817,658,149 | MDExOlB1bGxSZXF1ZXN0NTgxMTEzNDUx | 40,090 | REG: DataFrame/Series.transform with list and non-list dict values | {
"avatar_url": "https://avatars.githubusercontent.com/u/45562402?v=4",
"events_url": "https://api.github.com/users/rhshadrach/events{/privacy}",
"followers_url": "https://api.github.com/users/rhshadrach/followers",
"following_url": "https://api.github.com/users/rhshadrach/following{/other_user}",
"gists_url": "https://api.github.com/users/rhshadrach/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/rhshadrach",
"id": 45562402,
"login": "rhshadrach",
"node_id": "MDQ6VXNlcjQ1NTYyNDAy",
"organizations_url": "https://api.github.com/users/rhshadrach/orgs",
"received_events_url": "https://api.github.com/users/rhshadrach/received_events",
"repos_url": "https://api.github.com/users/rhshadrach/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/rhshadrach/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rhshadrach/subscriptions",
"type": "User",
"url": "https://api.github.com/users/rhshadrach"
} | [
{
"color": "e11d21",
"default": false,
"description": "Functionality that used to work in a prior pandas version",
"id": 32815646,
"name": "Regression",
"node_id": "MDU6TGFiZWwzMjgxNTY0Ng==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Regression"
},
{
"color": "fbca04",
"default": false,
"description": "Apply, Aggregate, Transform",
"id": 697792067,
"name": "Apply",
"node_id": "MDU6TGFiZWw2OTc3OTIwNjc=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Apply"
}
] | closed | false | null | [] | {
"closed_at": "2021-03-02T08:40:51Z",
"closed_issues": 49,
"created_at": "2021-02-07T13:58:05Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/13159005?v=4",
"events_url": "https://api.github.com/users/simonjayhawkins/events{/privacy}",
"followers_url": "https://api.github.com/users/simonjayhawkins/followers",
"following_url": "https://api.github.com/users/simonjayhawkins/following{/other_user}",
"gists_url": "https://api.github.com/users/simonjayhawkins/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/simonjayhawkins",
"id": 13159005,
"login": "simonjayhawkins",
"node_id": "MDQ6VXNlcjEzMTU5MDA1",
"organizations_url": "https://api.github.com/users/simonjayhawkins/orgs",
"received_events_url": "https://api.github.com/users/simonjayhawkins/received_events",
"repos_url": "https://api.github.com/users/simonjayhawkins/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/simonjayhawkins/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/simonjayhawkins/subscriptions",
"type": "User",
"url": "https://api.github.com/users/simonjayhawkins"
},
"description": "on-merge: backport to 1.2.x\r\n\r\n",
"due_on": "2021-03-01T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/83",
"id": 6402340,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/83/labels",
"node_id": "MDk6TWlsZXN0b25lNjQwMjM0MA==",
"number": 83,
"open_issues": 0,
"state": "closed",
"title": "1.2.3",
"updated_at": "2021-03-02T17:15:27Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/83"
} | 4 | 2021-02-26T20:56:54Z | 2021-02-28T14:08:34Z | 2021-02-27T18:18:33Z | MEMBER | null | - [x] closes #40018
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [x] whatsnew entry
Currently on master, `agg` does some preprocessing on dict-like arguments that `transform` does not, leading to incorrect behavior in `transform`. This PR moves `agg`'s preprocessing into `validate_dictlike_arg` which is used by both `agg` and `transform`, fixing the issue.
As identified [in #40018](https://github.com/pandas-dev/pandas/issues/40018#issuecomment-785678614), this is a regression from 1.1 -> 1.2 (almost certainly from one of my PRs, but I haven't checked which). Backporting this to 1.2 will probably require a bit of a different fix. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40090/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40090/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40090.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40090",
"merged_at": "2021-02-27T18:18:33Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/40090.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40090"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/40091 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40091/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40091/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40091/events | https://github.com/pandas-dev/pandas/issues/40091 | 817,674,359 | MDU6SXNzdWU4MTc2NzQzNTk= | 40,091 | BUG: IO unit test creates file at home directory | {
"avatar_url": "https://avatars.githubusercontent.com/u/2436203?v=4",
"events_url": "https://api.github.com/users/chrispe/events{/privacy}",
"followers_url": "https://api.github.com/users/chrispe/followers",
"following_url": "https://api.github.com/users/chrispe/following{/other_user}",
"gists_url": "https://api.github.com/users/chrispe/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/chrispe",
"id": 2436203,
"login": "chrispe",
"node_id": "MDQ6VXNlcjI0MzYyMDM=",
"organizations_url": "https://api.github.com/users/chrispe/orgs",
"received_events_url": "https://api.github.com/users/chrispe/received_events",
"repos_url": "https://api.github.com/users/chrispe/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/chrispe/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/chrispe/subscriptions",
"type": "User",
"url": "https://api.github.com/users/chrispe"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "C4A000",
"default": false,
"description": "pandas testing functions or related to the test suite",
"id": 127685,
"name": "Testing",
"node_id": "MDU6TGFiZWwxMjc2ODU=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Testing"
},
{
"color": "06909A",
"default": false,
"description": "IO issues that don't fit into a more specific label",
"id": 2301354,
"name": "IO Data",
"node_id": "MDU6TGFiZWwyMzAxMzU0",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20Data"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 6 | 2021-02-26T21:27:49Z | 2021-03-02T17:26:44Z | 2021-03-02T17:26:44Z | CONTRIBUTOR | null | - [X] I have checked that this issue has not already been reported.
- [X] I have confirmed this bug exists on the latest version of pandas.
- [X] (optional) I have confirmed this bug exists on the master branch of pandas.
---
The unit test at `pandas/tests/io/test_common.py` produces a file using a hardcoded name as shown below:
```python
filename = path_type("~/sometest")
with icom.get_handle(filename, "w") as handles:
assert os.path.isabs(handles.handle.name)
assert os.path.expanduser(filename) == handles.handle.name
```
#### Problem description
A developer may encounter an empty file "sometest" appearing in their home directory (after running `pytest`). If the developer is unaware of that, then it may raise some wrong security concerns on their side. Also, in the extreme scenario that the developer has a file at the exact same path, then its content may be replaced.
#### Expected Output
I would expect the file produced by the unit test to be temporary and get deleted afterwards. Also, that the filename is generated rather than hardcoded. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40091/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40091/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/40092 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40092/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40092/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40092/events | https://github.com/pandas-dev/pandas/pull/40092 | 817,689,331 | MDExOlB1bGxSZXF1ZXN0NTgxMTM5OTQ0 | 40,092 | TST/REF: Consolidate tests in apply.test_invalid_arg | {
"avatar_url": "https://avatars.githubusercontent.com/u/45562402?v=4",
"events_url": "https://api.github.com/users/rhshadrach/events{/privacy}",
"followers_url": "https://api.github.com/users/rhshadrach/followers",
"following_url": "https://api.github.com/users/rhshadrach/following{/other_user}",
"gists_url": "https://api.github.com/users/rhshadrach/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/rhshadrach",
"id": 45562402,
"login": "rhshadrach",
"node_id": "MDQ6VXNlcjQ1NTYyNDAy",
"organizations_url": "https://api.github.com/users/rhshadrach/orgs",
"received_events_url": "https://api.github.com/users/rhshadrach/received_events",
"repos_url": "https://api.github.com/users/rhshadrach/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/rhshadrach/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rhshadrach/subscriptions",
"type": "User",
"url": "https://api.github.com/users/rhshadrach"
} | [
{
"color": "FCE94F",
"default": false,
"description": "Internal refactoring of code",
"id": 127681,
"name": "Refactor",
"node_id": "MDU6TGFiZWwxMjc2ODE=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Refactor"
},
{
"color": "C4A000",
"default": false,
"description": "pandas testing functions or related to the test suite",
"id": 127685,
"name": "Testing",
"node_id": "MDU6TGFiZWwxMjc2ODU=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Testing"
},
{
"color": "fbca04",
"default": false,
"description": "Apply, Aggregate, Transform",
"id": 697792067,
"name": "Apply",
"node_id": "MDU6TGFiZWw2OTc3OTIwNjc=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Apply"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 3 | 2021-02-26T21:49:49Z | 2021-03-03T03:10:36Z | 2021-03-03T03:07:31Z | MEMBER | null | - [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
Moves relevant tests into test_invalid_arg. Had to rename two tests because they were of the same name, but no other changes. I organized the file by the reason for the exception, and indicated this at the top of the file. Certainly open to any other ways of organizing. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40092/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40092/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40092.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40092",
"merged_at": "2021-03-03T03:07:31Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/40092.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40092"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/40093 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40093/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40093/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40093/events | https://github.com/pandas-dev/pandas/issues/40093 | 817,711,364 | MDU6SXNzdWU4MTc3MTEzNjQ= | 40,093 | BUG: GroupBy.apply reruns the full loop if an exception is raised | {
"avatar_url": "https://avatars.githubusercontent.com/u/322730?v=4",
"events_url": "https://api.github.com/users/Kodiologist/events{/privacy}",
"followers_url": "https://api.github.com/users/Kodiologist/followers",
"following_url": "https://api.github.com/users/Kodiologist/following{/other_user}",
"gists_url": "https://api.github.com/users/Kodiologist/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Kodiologist",
"id": 322730,
"login": "Kodiologist",
"node_id": "MDQ6VXNlcjMyMjczMA==",
"organizations_url": "https://api.github.com/users/Kodiologist/orgs",
"received_events_url": "https://api.github.com/users/Kodiologist/received_events",
"repos_url": "https://api.github.com/users/Kodiologist/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Kodiologist/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Kodiologist/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Kodiologist"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "0052cc",
"default": false,
"description": "Issue that has not been reviewed by a pandas team member",
"id": 1954720290,
"name": "Needs Triage",
"node_id": "MDU6TGFiZWwxOTU0NzIwMjkw",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Needs%20Triage"
}
] | closed | false | null | [] | null | 1 | 2021-02-26T22:04:24Z | 2021-08-19T01:28:04Z | 2021-08-19T01:28:03Z | CONTRIBUTOR | null | - [X] I have checked that this issue has not already been reported.
- [X] I have confirmed this bug exists on the latest version of pandas.
#### Code Sample
```python
import pandas as pd
d = pd.DataFrame(dict(a = range(10)))
def f(x):
print(x)
if x.iloc[0,0] == 2:
raise Exception('problem')
print(d.groupby('a').apply(f))
```
The result is
```
a
0 0
a
1 1
a
2 2
a
0 0
a
1 1
a
2 2
Traceback (most recent call last):
File "/tmp/ex.py", line 10, in <module>
print(d.groupby('a').apply(f))
File "/usr/local/lib/python3.8/dist-packages/pandas/core/groupby/groupby.py", line 894, in apply
result = self._python_apply_general(f, self._selected_obj)
File "/usr/local/lib/python3.8/dist-packages/pandas/core/groupby/groupby.py", line 928, in _python_apply_general
keys, values, mutated = self.grouper.apply(f, data, self.axis)
File "/usr/local/lib/python3.8/dist-packages/pandas/core/groupby/ops.py", line 238, in apply
res = f(group)
File "/tmp/ex.py", line 8, in f
raise Exception('problem')
Exception: problem
```
#### Problem description
If the `func` given to `GroupBy.apply(func)` raises an exception, the exception is suppressed and the application loop restarts from the beginning. My guess is that this is related to the behavior of one of pandas's `apply` functions that's supposed to ignore exceptions only for the first iteration, or only when an empty argument is provided, to guess the appropriate shape for the output.
#17326 may be related.
#### Expected Output
The loop shouldn't catch the exception, terminating as soon as it hits the `raise`.
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit : 7d32926db8f7541c356066dcadabf854487738de
python : 3.8.6.final.0
python-bits : 64
OS : Linux
OS-release : 5.8.0-44-generic
Version : #50-Ubuntu SMP Tue Feb 9 06:29:41 UTC 2021
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.2.2
numpy : 1.18.4
pytz : 2020.1
dateutil : 2.8.1
pip : 21.0.1
setuptools : 51.3.3
Cython : None
pytest : 6.2.1
hypothesis : None
sphinx : 3.4.3
blosc : None
feather : None
xlsxwriter : None
lxml.etree : 4.5.1
html5lib : 1.1
pymysql : None
psycopg2 : 2.8.5 (dt dec pq3 ext lo64)
jinja2 : 2.11.2
IPython : None
pandas_datareader: None
bs4 : 4.9.1
bottleneck : None
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : 3.3.0
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pyxlsb : None
s3fs : None
scipy : 1.4.1
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
numba : None
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40093/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40093/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/40094 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40094/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40094/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40094/events | https://github.com/pandas-dev/pandas/pull/40094 | 817,726,642 | MDExOlB1bGxSZXF1ZXN0NTgxMTczOTM1 | 40,094 | TST: Fix pandas.io.stata imports in test_stata.py | {
"avatar_url": "https://avatars.githubusercontent.com/u/9087854?v=4",
"events_url": "https://api.github.com/users/AA-Turner/events{/privacy}",
"followers_url": "https://api.github.com/users/AA-Turner/followers",
"following_url": "https://api.github.com/users/AA-Turner/following{/other_user}",
"gists_url": "https://api.github.com/users/AA-Turner/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/AA-Turner",
"id": 9087854,
"login": "AA-Turner",
"node_id": "MDQ6VXNlcjkwODc4NTQ=",
"organizations_url": "https://api.github.com/users/AA-Turner/orgs",
"received_events_url": "https://api.github.com/users/AA-Turner/received_events",
"repos_url": "https://api.github.com/users/AA-Turner/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/AA-Turner/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/AA-Turner/subscriptions",
"type": "User",
"url": "https://api.github.com/users/AA-Turner"
} | [
{
"color": "eb6420",
"default": false,
"description": "Code style, linting, code_checks",
"id": 106935113,
"name": "Code Style",
"node_id": "MDU6TGFiZWwxMDY5MzUxMTM=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Code%20Style"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 6 | 2021-02-26T22:33:39Z | 2021-02-27T09:22:30Z | 2021-02-26T23:53:33Z | CONTRIBUTOR | null | - [x] Fixes test failures introduced in #40069
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40094/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40094/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40094.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40094",
"merged_at": "2021-02-26T23:53:33Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/40094.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40094"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/40095 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40095/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40095/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40095/events | https://github.com/pandas-dev/pandas/pull/40095 | 817,760,473 | MDExOlB1bGxSZXF1ZXN0NTgxMjAyNDM4 | 40,095 | Excel skip blank lines | {
"avatar_url": "https://avatars.githubusercontent.com/u/50434302?v=4",
"events_url": "https://api.github.com/users/ahawryluk/events{/privacy}",
"followers_url": "https://api.github.com/users/ahawryluk/followers",
"following_url": "https://api.github.com/users/ahawryluk/following{/other_user}",
"gists_url": "https://api.github.com/users/ahawryluk/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ahawryluk",
"id": 50434302,
"login": "ahawryluk",
"node_id": "MDQ6VXNlcjUwNDM0MzAy",
"organizations_url": "https://api.github.com/users/ahawryluk/orgs",
"received_events_url": "https://api.github.com/users/ahawryluk/received_events",
"repos_url": "https://api.github.com/users/ahawryluk/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ahawryluk/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ahawryluk/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ahawryluk"
} | [
{
"color": "bfe5bf",
"default": false,
"description": "read_excel, to_excel",
"id": 49254273,
"name": "IO Excel",
"node_id": "MDU6TGFiZWw0OTI1NDI3Mw==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20Excel"
}
] | closed | false | null | [] | null | 0 | 2021-02-27T00:02:44Z | 2021-03-04T03:17:09Z | 2021-03-04T03:16:47Z | CONTRIBUTOR | null | - [x] closes #39808
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [x] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40095/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40095/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40095.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40095",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/40095.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40095"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/40096 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40096/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40096/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40096/events | https://github.com/pandas-dev/pandas/pull/40096 | 817,798,408 | MDExOlB1bGxSZXF1ZXN0NTgxMjMzMDU3 | 40,096 | BUG: df.loc setitem-with-expansion with duplicate index | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [
{
"color": "0b02e1",
"default": false,
"description": "Related to indexing on series/frames, not to indexes themselves",
"id": 2822098,
"name": "Indexing",
"node_id": "MDU6TGFiZWwyODIyMDk4",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Indexing"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 3 | 2021-02-27T02:25:44Z | 2021-03-02T22:16:21Z | 2021-03-02T21:14:35Z | MEMBER | null | - [ ] closes #xxxx
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [x] whatsnew entry
also CategoricalIndex.insert | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40096/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40096/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40096.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40096",
"merged_at": "2021-03-02T21:14:35Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/40096.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40096"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/40097 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40097/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40097/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40097/events | https://github.com/pandas-dev/pandas/pull/40097 | 817,799,650 | MDExOlB1bGxSZXF1ZXN0NTgxMjM0MDM0 | 40,097 | REF: unify casting logic in Categorical.__init__ | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [
{
"color": "FCE94F",
"default": false,
"description": "Internal refactoring of code",
"id": 127681,
"name": "Refactor",
"node_id": "MDU6TGFiZWwxMjc2ODE=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Refactor"
},
{
"color": "e11d21",
"default": false,
"description": "Categorical Data Type",
"id": 78527356,
"name": "Categorical",
"node_id": "MDU6TGFiZWw3ODUyNzM1Ng==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Categorical"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 1 | 2021-02-27T02:32:48Z | 2021-11-20T23:23:32Z | 2021-02-27T18:24:20Z | MEMBER | null | Big picture, trying to call maybe_infer_to_datetimelike in fewer places so we can simplify scattered datetimelike casting.
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40097/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40097/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40097.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40097",
"merged_at": "2021-02-27T18:24:20Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/40097.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40097"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/40098 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40098/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40098/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40098/events | https://github.com/pandas-dev/pandas/issues/40098 | 817,803,078 | MDU6SXNzdWU4MTc4MDMwNzg= | 40,098 | BUG: ewma with time gives strange results with adjust = False vs. True, difference is too large to make sense | {
"avatar_url": "https://avatars.githubusercontent.com/u/78990487?v=4",
"events_url": "https://api.github.com/users/jasonzhang2s/events{/privacy}",
"followers_url": "https://api.github.com/users/jasonzhang2s/followers",
"following_url": "https://api.github.com/users/jasonzhang2s/following{/other_user}",
"gists_url": "https://api.github.com/users/jasonzhang2s/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jasonzhang2s",
"id": 78990487,
"login": "jasonzhang2s",
"node_id": "MDQ6VXNlcjc4OTkwNDg3",
"organizations_url": "https://api.github.com/users/jasonzhang2s/orgs",
"received_events_url": "https://api.github.com/users/jasonzhang2s/received_events",
"repos_url": "https://api.github.com/users/jasonzhang2s/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jasonzhang2s/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jasonzhang2s/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jasonzhang2s"
} | [
{
"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 core team before further action",
"id": 219960758,
"name": "Needs Discussion",
"node_id": "MDU6TGFiZWwyMTk5NjA3NTg=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Needs%20Discussion"
},
{
"color": "d4c5f9",
"default": false,
"description": "rolling, ewma, expanding",
"id": 1045950827,
"name": "Window",
"node_id": "MDU6TGFiZWwxMDQ1OTUwODI3",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Window"
}
] | open | false | null | [] | null | 3 | 2021-02-27T02:49:35Z | 2021-03-09T04:59:48Z | null | NONE | null | - [ yes ] I have checked that this issue has not already been reported.
- [ yes ] I have confirmed this bug exists on the latest version of pandas.
- [ ] (optional) I have confirmed this bug exists on the master branch of pandas.
---
**Note**: Please read [this guide](https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) detailing how to provide the necessary information for us to reproduce your bug.
#### Code Sample, a copy-pastable example
```python
np.random.seed(0)
idx=pd.date_range('20000101','20201231',periods=50000)
df=pd.DataFrame(data=np.random.normal(0, 1, 50000),index=idx)
# exclude first 1000 to avoid un-primed periods
df.ewm(halflife=pd.Timedelta('10d'),times=df.index,adjust=True).mean().iloc[1000:].plot()
df.ewm(halflife=pd.Timedelta('10d'),times=df.index,adjust=False).mean().iloc[1000:].plot()
# Your code here
```
#### Problem description
[this should explain **why** the current behaviour is a problem and why the expected output is a better solution]
#### Expected Output
#### Output of ``pd.show_versions()``
<details>
[paste the output of ``pd.show_versions()`` here leaving a blank line after the details tag]
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40098/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40098/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/40099 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40099/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40099/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40099/events | https://github.com/pandas-dev/pandas/issues/40099 | 817,807,365 | MDU6SXNzdWU4MTc4MDczNjU= | 40,099 | BUG: ewma with time should not update value when timedelta between two steps is 0 | {
"avatar_url": "https://avatars.githubusercontent.com/u/78990487?v=4",
"events_url": "https://api.github.com/users/jasonzhang2s/events{/privacy}",
"followers_url": "https://api.github.com/users/jasonzhang2s/followers",
"following_url": "https://api.github.com/users/jasonzhang2s/following{/other_user}",
"gists_url": "https://api.github.com/users/jasonzhang2s/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jasonzhang2s",
"id": 78990487,
"login": "jasonzhang2s",
"node_id": "MDQ6VXNlcjc4OTkwNDg3",
"organizations_url": "https://api.github.com/users/jasonzhang2s/orgs",
"received_events_url": "https://api.github.com/users/jasonzhang2s/received_events",
"repos_url": "https://api.github.com/users/jasonzhang2s/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jasonzhang2s/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jasonzhang2s/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jasonzhang2s"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "d4c5f9",
"default": false,
"description": "rolling, ewma, expanding",
"id": 1045950827,
"name": "Window",
"node_id": "MDU6TGFiZWwxMDQ1OTUwODI3",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Window"
},
{
"color": "be21f2",
"default": false,
"description": "May be closeable, needs more eyeballs",
"id": 2365504893,
"name": "Closing Candidate",
"node_id": "MDU6TGFiZWwyMzY1NTA0ODkz",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Closing%20Candidate"
}
] | closed | false | null | [] | null | 2 | 2021-02-27T03:09:06Z | 2021-08-19T01:29:17Z | 2021-08-19T01:29:17Z | NONE | null | - [yes ] I have checked that this issue has not already been reported.
- [ yes] I have confirmed this bug exists on the latest version of pandas.
- [ ] (optional) I have confirmed this bug exists on the master branch of pandas.
---
**Note**: Please read [this guide](https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) detailing how to provide the necessary information for us to reproduce your bug.
#### Code Sample, a copy-pastable example
```
idx=pd.date_range('20000101','20201231')
idx2=[idx[0]]*5 + [idx[1]]*5
df=pd.DataFrame(data=range(10),index=idx2)
df.ewm(halflife=pd.Timedelta('1D'), times=df.index).mean()
```
```python
# Your code here
```
| 0
-- | --
0.000000
0.500000
1.000000
1.500000
2.000000
2.857143
3.555556
4.181818
4.769231
5.333333
#### Problem description
Why is the value being updated when time hasn't elapsed yet?
#### Expected Output
#### Output of ``pd.show_versions()``
<details>
[paste the output of ``pd.show_versions()`` here leaving a blank line after the details tag]
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40099/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40099/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/40100 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40100/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40100/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40100/events | https://github.com/pandas-dev/pandas/pull/40100 | 817,817,383 | MDExOlB1bGxSZXF1ZXN0NTgxMjQ3Njky | 40,100 | BUG: Series([Timestamp, int], dtype=m8ns) dropping nanoseconds | {
"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": "AFEEEE",
"default": false,
"description": null,
"id": 211840,
"name": "Timeseries",
"node_id": "MDU6TGFiZWwyMTE4NDA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Timeseries"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 0 | 2021-02-27T04:06:36Z | 2021-02-27T19:31:26Z | 2021-02-27T19:15:57Z | MEMBER | null | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40100/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40100/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40100.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40100",
"merged_at": "2021-02-27T19:15:57Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/40100.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40100"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/40101 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40101/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40101/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40101/events | https://github.com/pandas-dev/pandas/pull/40101 | 817,818,636 | MDExOlB1bGxSZXF1ZXN0NTgxMjQ4Njg2 | 40,101 | DEPS: replace pyperclip with pyclip #39834 | {
"avatar_url": "https://avatars.githubusercontent.com/u/7614606?v=4",
"events_url": "https://api.github.com/users/fangchenli/events{/privacy}",
"followers_url": "https://api.github.com/users/fangchenli/followers",
"following_url": "https://api.github.com/users/fangchenli/following{/other_user}",
"gists_url": "https://api.github.com/users/fangchenli/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/fangchenli",
"id": 7614606,
"login": "fangchenli",
"node_id": "MDQ6VXNlcjc2MTQ2MDY=",
"organizations_url": "https://api.github.com/users/fangchenli/orgs",
"received_events_url": "https://api.github.com/users/fangchenli/received_events",
"repos_url": "https://api.github.com/users/fangchenli/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/fangchenli/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/fangchenli/subscriptions",
"type": "User",
"url": "https://api.github.com/users/fangchenli"
} | [
{
"color": "d93f0b",
"default": false,
"description": "Required and optional dependencies",
"id": 527603109,
"name": "Dependencies",
"node_id": "MDU6TGFiZWw1Mjc2MDMxMDk=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Dependencies"
}
] | closed | false | null | [] | null | 6 | 2021-02-27T04:14:08Z | 2021-03-30T13:14:14Z | 2021-03-30T13:14:14Z | MEMBER | null | - [x] closes #39834
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40101/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40101/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40101.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40101",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/40101.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40101"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/40102 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40102/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40102/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40102/events | https://github.com/pandas-dev/pandas/issues/40102 | 817,866,706 | MDU6SXNzdWU4MTc4NjY3MDY= | 40,102 | BUG: groupby().tranforms return ValueError | {
"avatar_url": "https://avatars.githubusercontent.com/u/23625282?v=4",
"events_url": "https://api.github.com/users/yllgl/events{/privacy}",
"followers_url": "https://api.github.com/users/yllgl/followers",
"following_url": "https://api.github.com/users/yllgl/following{/other_user}",
"gists_url": "https://api.github.com/users/yllgl/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/yllgl",
"id": 23625282,
"login": "yllgl",
"node_id": "MDQ6VXNlcjIzNjI1Mjgy",
"organizations_url": "https://api.github.com/users/yllgl/orgs",
"received_events_url": "https://api.github.com/users/yllgl/received_events",
"repos_url": "https://api.github.com/users/yllgl/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/yllgl/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/yllgl/subscriptions",
"type": "User",
"url": "https://api.github.com/users/yllgl"
} | [
{
"color": "be21f2",
"default": false,
"description": "May be closeable, needs more eyeballs",
"id": 2365504893,
"name": "Closing Candidate",
"node_id": "MDU6TGFiZWwyMzY1NTA0ODkz",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Closing%20Candidate"
}
] | closed | false | null | [] | null | 4 | 2021-02-27T08:25:49Z | 2021-02-27T10:24:54Z | 2021-02-27T10:24:23Z | NONE | null | - [ ] I have checked that this issue has not already been reported.
- [x] I have confirmed this bug exists on the latest version of pandas.
- [ ] (optional) I have confirmed this bug exists on the master branch of pandas.
---
Here's the code:
```python
In [9]:
s = pd.Series([1, 3, 5, np.nan, 6, 8])
df = pd.DataFrame({'A': s,'F': 'foo'})
df.loc[1,'F']=np.nan
df
Out[9]:
A F
0 1.0 foo
1 3.0 NaN
2 5.0 foo
3 NaN foo
4 6.0 foo
5 8.0 foo
In [10]:
df['A']=df.groupby(['F'])['A'].transform(lambda x: x.fillna(x.mean()))
Out[10]:
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-111-5c30febb854f> in <module>
----> 1 df['A']=df.groupby(['F'])['A'].transform(lambda x: x.fillna(x.mean()))
d:\python36\lib\site-packages\pandas\core\groupby\generic.py in transform(self, func, engine, engine_kwargs, *args, **kwargs)
492 if not isinstance(func, str):
493 return self._transform_general(
--> 494 func, *args, engine=engine, engine_kwargs=engine_kwargs, **kwargs
495 )
496
d:\python36\lib\site-packages\pandas\core\groupby\generic.py in _transform_general(self, func, engine, engine_kwargs, *args, **kwargs)
560
561 result.name = self._selected_obj.name
--> 562 result.index = self._selected_obj.index
563 return result
564
d:\python36\lib\site-packages\pandas\core\generic.py in __setattr__(self, name, value)
5152 try:
5153 object.__getattribute__(self, name)
-> 5154 return object.__setattr__(self, name, value)
5155 except AttributeError:
5156 pass
pandas\_libs\properties.pyx in pandas._libs.properties.AxisProperty.__set__()
d:\python36\lib\site-packages\pandas\core\series.py in _set_axis(self, axis, labels, fastpath)
422 if not fastpath:
423 # The ensure_index call above ensures we have an Index object
--> 424 self._mgr.set_axis(axis, labels)
425
426 # ndarray compatibility
d:\python36\lib\site-packages\pandas\core\internals\managers.py in set_axis(self, axis, new_labels)
225 if new_len != old_len:
226 raise ValueError(
--> 227 f"Length mismatch: Expected axis has {old_len} elements, new "
228 f"values have {new_len} elements"
229 )
ValueError: Length mismatch: Expected axis has 5 elements, new values have 6 elements
```
#### Problem description
If I change column F's type to 'str' , everything goes well.
```python
In [11]:
df['F'] = df['F'].astype('str')
df['A']=df.groupby(['F'])['A'].transform(lambda x: x.fillna(x.mean()))
df
Out[11]:
A F
0 1.0 foo
1 3.0 nan
2 5.0 foo
3 5.0 foo
4 6.0 foo
5 8.0 foo
```
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit : b5958ee1999e9aead1938c0bba2b674378807b3d
python : 3.6.8.final.0
python-bits : 64
OS : Windows
OS-release : 10
Version : 10.0.19041
machine : AMD64
processor : Intel64 Family 6 Model 94 Stepping 3, GenuineIntel
byteorder : little
LC_ALL : None
LANG : None
LOCALE : None.None
pandas : 1.1.5
numpy : 1.17.2
pytz : 2018.9
dateutil : 2.7.5
pip : 19.3.1
setuptools : 41.4.0
Cython : 0.29.3
pytest : None
hypothesis : None
sphinx : 2.4.4
blosc : None
feather : None
xlsxwriter : None
lxml.etree : 4.3.4
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 2.11.3
IPython : 7.2.0
pandas_datareader: None
bs4 : 4.9.0
bottleneck : None
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : 3.0.2
numexpr : 2.6.9
odfpy : None
openpyxl : 2.6.2
pandas_gbq : None
pyarrow : None
pytables : None
pyxlsb : None
s3fs : None
scipy : 1.5.4
sqlalchemy : None
tables : None
tabulate : None
xarray : 0.11.2
xlrd : None
xlwt : None
numba : 0.42.0
[paste the output of ``pd.show_versions()`` here leaving a blank line after the details tag]
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40102/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40102/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/40103 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40103/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40103/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40103/events | https://github.com/pandas-dev/pandas/issues/40103 | 817,869,537 | MDU6SXNzdWU4MTc4Njk1Mzc= | 40,103 | API: make CachedAccessor public in addition to register_dataframe_accessor | {
"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": "4E9A06",
"default": false,
"description": null,
"id": 76812,
"name": "Enhancement",
"node_id": "MDU6TGFiZWw3NjgxMg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Enhancement"
},
{
"color": "AD7FA8",
"default": false,
"description": null,
"id": 35818298,
"name": "API Design",
"node_id": "MDU6TGFiZWwzNTgxODI5OA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/API%20Design"
}
] | open | false | null | [] | null | 0 | 2021-02-27T08:43:27Z | 2021-08-19T01:29:31Z | null | MEMBER | null | In GeoPandas we added a `plot` accessor similar to the pandas one (so you can still access all the pandas plotting kinds, also from a GeoDataFrame where the default plot is a spatial map), see https://github.com/geopandas/geopandas/pull/1465.
But, in that PR, we made use of `pandas.core.accessor.CachedAccessor`, which is how we add accessors in pandas under the hood:
https://github.com/pandas-dev/pandas/blob/ffa6e20d7dadd262d9035a647dffed9903fc5929/pandas/core/frame.py#L9730-L9731
So in GeoPandas we basically copied the above code, but with our adapted GeoPlotAccessor.
The reason that we can't use the public way to add accessors with `pd.api.extensions.register_dataframe_accessor` is that we are overriding an existing accessor of pandas (intentionally).
So can we consider `CachedAccessor` to be "public"-like so it is fine for GeoPandas to use it? Or do we want to explicitly expose the class in the `pandas.api.extensions` namespace? Or can we change `register_dataframe_accessor` to allow it to override existing methods? (not sure we want to make that too easy) | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40103/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40103/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/40104 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40104/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40104/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40104/events | https://github.com/pandas-dev/pandas/pull/40104 | 817,877,081 | MDExOlB1bGxSZXF1ZXN0NTgxMjk1NDIw | 40,104 | STYLE exclude io from inconsistent namespace check | {
"avatar_url": "https://avatars.githubusercontent.com/u/33491632?v=4",
"events_url": "https://api.github.com/users/MarcoGorelli/events{/privacy}",
"followers_url": "https://api.github.com/users/MarcoGorelli/followers",
"following_url": "https://api.github.com/users/MarcoGorelli/following{/other_user}",
"gists_url": "https://api.github.com/users/MarcoGorelli/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/MarcoGorelli",
"id": 33491632,
"login": "MarcoGorelli",
"node_id": "MDQ6VXNlcjMzNDkxNjMy",
"organizations_url": "https://api.github.com/users/MarcoGorelli/orgs",
"received_events_url": "https://api.github.com/users/MarcoGorelli/received_events",
"repos_url": "https://api.github.com/users/MarcoGorelli/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/MarcoGorelli/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/MarcoGorelli/subscriptions",
"type": "User",
"url": "https://api.github.com/users/MarcoGorelli"
} | [
{
"color": "eb6420",
"default": false,
"description": "Code style, linting, code_checks",
"id": 106935113,
"name": "Code Style",
"node_id": "MDU6TGFiZWwxMDY5MzUxMTM=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Code%20Style"
}
] | closed | false | null | [] | null | 2 | 2021-02-27T09:25:32Z | 2021-02-27T18:37:30Z | 2021-02-27T18:37:24Z | MEMBER | null | xref https://github.com/pandas-dev/pandas/pull/40069#issuecomment-786931356
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40104/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40104/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40104.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40104",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/40104.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40104"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/40105 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40105/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40105/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40105/events | https://github.com/pandas-dev/pandas/pull/40105 | 817,884,880 | MDExOlB1bGxSZXF1ZXN0NTgxMzAxOTY3 | 40,105 | REF: don't call libalgos.groupsort_indexer directly for simple argsort usage | {
"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": "729FCF",
"default": false,
"description": null,
"id": 233160,
"name": "Groupby",
"node_id": "MDU6TGFiZWwyMzMxNjA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Groupby"
},
{
"color": "eb6420",
"default": false,
"description": "Non-arithmetic algos: value_counts, factorize, sorting, isin, clip, shift, diff",
"id": 57296398,
"name": "Algos",
"node_id": "MDU6TGFiZWw1NzI5NjM5OA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Algos"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 1 | 2021-02-27T09:55:57Z | 2021-02-28T08:41:31Z | 2021-02-27T18:28:05Z | 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/40105/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40105/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40105.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40105",
"merged_at": "2021-02-27T18:28:05Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/40105.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40105"
} |
|
https://api.github.com/repos/pandas-dev/pandas/issues/40106 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40106/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40106/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40106/events | https://github.com/pandas-dev/pandas/issues/40106 | 817,907,081 | MDU6SXNzdWU4MTc5MDcwODE= | 40,106 | CI update mypy pin | {
"avatar_url": "https://avatars.githubusercontent.com/u/33491632?v=4",
"events_url": "https://api.github.com/users/MarcoGorelli/events{/privacy}",
"followers_url": "https://api.github.com/users/MarcoGorelli/followers",
"following_url": "https://api.github.com/users/MarcoGorelli/following{/other_user}",
"gists_url": "https://api.github.com/users/MarcoGorelli/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/MarcoGorelli",
"id": 33491632,
"login": "MarcoGorelli",
"node_id": "MDQ6VXNlcjMzNDkxNjMy",
"organizations_url": "https://api.github.com/users/MarcoGorelli/orgs",
"received_events_url": "https://api.github.com/users/MarcoGorelli/received_events",
"repos_url": "https://api.github.com/users/MarcoGorelli/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/MarcoGorelli/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/MarcoGorelli/subscriptions",
"type": "User",
"url": "https://api.github.com/users/MarcoGorelli"
} | [
{
"color": "a2bca7",
"default": false,
"description": "Continuous Integration",
"id": 48070600,
"name": "CI",
"node_id": "MDU6TGFiZWw0ODA3MDYwMA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/CI"
},
{
"color": "0e8a16",
"default": true,
"description": null,
"id": 717120670,
"name": "good first issue",
"node_id": "MDU6TGFiZWw3MTcxMjA2NzA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/good%20first%20issue"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 0 | 2021-02-27T12:02:05Z | 2021-02-27T18:31:25Z | 2021-02-27T18:31:25Z | MEMBER | null | There's a new `mypy` version out https://mypy-lang.blogspot.com/2021/02/mypy-0812-released.html - it doesn't look like the changes should affect type checking in pandas, but it's probably a good idea to stay up-to-date
Task is to update the mypy pin in environment.yml and requirements-dev.txt, run `mypy pandas`, and then open a PR if it all passes (if it doesn't, please report back) | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40106/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40106/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/40107 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40107/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40107/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40107/events | https://github.com/pandas-dev/pandas/pull/40107 | 817,926,913 | MDExOlB1bGxSZXF1ZXN0NTgxMzMzMDQ3 | 40,107 | BLD: updated mypy version to 0.812 | {
"avatar_url": "https://avatars.githubusercontent.com/u/31338369?v=4",
"events_url": "https://api.github.com/users/Muktan/events{/privacy}",
"followers_url": "https://api.github.com/users/Muktan/followers",
"following_url": "https://api.github.com/users/Muktan/following{/other_user}",
"gists_url": "https://api.github.com/users/Muktan/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Muktan",
"id": 31338369,
"login": "Muktan",
"node_id": "MDQ6VXNlcjMxMzM4MzY5",
"organizations_url": "https://api.github.com/users/Muktan/orgs",
"received_events_url": "https://api.github.com/users/Muktan/received_events",
"repos_url": "https://api.github.com/users/Muktan/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Muktan/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Muktan/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Muktan"
} | [
{
"color": "ea91a4",
"default": false,
"description": "type annotations, mypy/pyright type checking",
"id": 1280988427,
"name": "Typing",
"node_id": "MDU6TGFiZWwxMjgwOTg4NDI3",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Typing"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 2 | 2021-02-27T13:54:11Z | 2021-02-27T18:31:47Z | 2021-02-27T18:31:25Z | CONTRIBUTOR | null | - [x] closes #40106
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
After making necessary changes
```bash
mypy pandas
```
O/P
```
Success: no issues found in 1237 source 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/40107/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40107/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40107.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40107",
"merged_at": "2021-02-27T18:31:25Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/40107.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40107"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/40108 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40108/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40108/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40108/events | https://github.com/pandas-dev/pandas/pull/40108 | 817,935,216 | MDExOlB1bGxSZXF1ZXN0NTgxMzM5Mjg2 | 40,108 | REF: Remove series_apply | {
"avatar_url": "https://avatars.githubusercontent.com/u/45562402?v=4",
"events_url": "https://api.github.com/users/rhshadrach/events{/privacy}",
"followers_url": "https://api.github.com/users/rhshadrach/followers",
"following_url": "https://api.github.com/users/rhshadrach/following{/other_user}",
"gists_url": "https://api.github.com/users/rhshadrach/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/rhshadrach",
"id": 45562402,
"login": "rhshadrach",
"node_id": "MDQ6VXNlcjQ1NTYyNDAy",
"organizations_url": "https://api.github.com/users/rhshadrach/orgs",
"received_events_url": "https://api.github.com/users/rhshadrach/received_events",
"repos_url": "https://api.github.com/users/rhshadrach/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/rhshadrach/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rhshadrach/subscriptions",
"type": "User",
"url": "https://api.github.com/users/rhshadrach"
} | [
{
"color": "FCE94F",
"default": false,
"description": "Internal refactoring of code",
"id": 127681,
"name": "Refactor",
"node_id": "MDU6TGFiZWwxMjc2ODE=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Refactor"
},
{
"color": "fbca04",
"default": false,
"description": "Apply, Aggregate, Transform",
"id": 697792067,
"name": "Apply",
"node_id": "MDU6TGFiZWw2OTc3OTIwNjc=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Apply"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 1 | 2021-02-27T14:35:28Z | 2021-02-27T20:08:28Z | 2021-02-27T18:14:21Z | MEMBER | null | - [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40108/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40108/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40108.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40108",
"merged_at": "2021-02-27T18:14:21Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/40108.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40108"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/40109 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40109/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40109/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40109/events | https://github.com/pandas-dev/pandas/pull/40109 | 817,958,399 | MDExOlB1bGxSZXF1ZXN0NTgxMzU4MjYy | 40,109 | CLN: remove never-hit branch from maybe_infer_to_datetimelike | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [
{
"color": "ea91a4",
"default": false,
"description": "type annotations, mypy/pyright type checking",
"id": 1280988427,
"name": "Typing",
"node_id": "MDU6TGFiZWwxMjgwOTg4NDI3",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Typing"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 0 | 2021-02-27T16:00:55Z | 2021-11-20T23:23:32Z | 2021-02-27T18:33:53Z | MEMBER | null | Also some annotations and "pragma: no cover" for cases that are also checked by mypy | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40109/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40109/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40109.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40109",
"merged_at": "2021-02-27T18:33:53Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/40109.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40109"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/40110 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40110/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40110/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40110/events | https://github.com/pandas-dev/pandas/issues/40110 | 817,965,989 | MDU6SXNzdWU4MTc5NjU5ODk= | 40,110 | API/BUG: Series(floating, dtype=intlike) ignores dtype, DataFrame casts | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "e102d8",
"default": false,
"description": "Unexpected or buggy dtype conversions",
"id": 31404521,
"name": "Dtype Conversions",
"node_id": "MDU6TGFiZWwzMTQwNDUyMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Dtype%20Conversions"
},
{
"color": "5319e7",
"default": false,
"description": "Functionality to remove in pandas",
"id": 87485152,
"name": "Deprecate",
"node_id": "MDU6TGFiZWw4NzQ4NTE1Mg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Deprecate"
},
{
"color": "207de5",
"default": false,
"description": "Requires discussion from core team before further action",
"id": 219960758,
"name": "Needs Discussion",
"node_id": "MDU6TGFiZWwyMTk5NjA3NTg=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Needs%20Discussion"
},
{
"color": "d4c5f9",
"default": false,
"description": "Series/DataFrame/Index/pd.array Constructors",
"id": 1465286368,
"name": "Constructors",
"node_id": "MDU6TGFiZWwxNDY1Mjg2MzY4",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Constructors"
}
] | open | false | null | [] | null | 19 | 2021-02-27T16:37:31Z | 2021-08-19T01:31:46Z | null | MEMBER | null | In most contexts, Series is strict about dtype, so will always either return the given dtype or raise. DataFrame is the opposite, often silently ignoring dtype (xref #24435) (i think on the theory that dtype may be intended to apply to some columns but not others).
With floating data and integer dtypes, its the opposite:
```
arr = np.random.randn(5)
>>> pd.Series(arr, dtype="int16")
0 1.002695
1 0.259332
2 -1.111468
3 -0.680714
4 -0.008943
>>> pd.DataFrame(arr, dtype="int16")
0
0 1
1 0
2 -1
3 0
4 0
```
We have exactly one test that is broken if we change the latter behavior, and that is mostly by coincidence. There are other bugs (e.g. `Series(bigints, dtype="int8")` silently overflowing) that would be easier to fix if maintaining this behavior weren't a consideration.
Is this intentional? cc @jreback @jorisvandenbossche @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/40110/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40110/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/40111 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40111/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40111/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40111/events | https://github.com/pandas-dev/pandas/issues/40111 | 817,968,831 | MDU6SXNzdWU4MTc5Njg4MzE= | 40,111 | API/BUG: partially-inferring datetimes | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "e102d8",
"default": false,
"description": "Unexpected or buggy dtype conversions",
"id": 31404521,
"name": "Dtype Conversions",
"node_id": "MDU6TGFiZWwzMTQwNDUyMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Dtype%20Conversions"
},
{
"color": "d4c5f9",
"default": false,
"description": "Series/DataFrame/Index/pd.array Constructors",
"id": 1465286368,
"name": "Constructors",
"node_id": "MDU6TGFiZWwxNDY1Mjg2MzY4",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Constructors"
},
{
"color": "b60205",
"default": false,
"description": "Internal Consistency of API/Behavior",
"id": 1741841389,
"name": "API - Consistency",
"node_id": "MDU6TGFiZWwxNzQxODQxMzg5",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/API%20-%20Consistency"
}
] | open | false | null | [] | null | 2 | 2021-02-27T16:52:12Z | 2021-11-06T01:56:43Z | null | MEMBER | null | from `test_mixed_offsets_with_native_datetime_raises`
```
vals = [
"nan",
pd.Timestamp("1990-01-01"),
"2015-03-14T16:15:14.123-08:00",
"2019-03-04T21:56:32.620-07:00",
None,
]
ser = pd.Series(vals)
```
As expected, this comes back as object-dtype, but it also does some casting:
```
>>> ser
0 NaT
1 1990-01-01 00:00:00
2 2015-03-14 16:15:14.123000-08:00
3 2019-03-04 21:56:32.620000-07:00
4 None
dtype: object
```
`ser[0]` is a _str_ "NaT" and `ser[[2, 3]]` are stdlib datetime objects. ser[1] and ser[4] are unchanged.
This casting is done inside a call to `to_datetime`, but has the surprising effect of not being idempotent:
```
>>> pd.to_datetime(ser)
ValueError: Tz-aware datetime.datetime cannot be converted to datetime64 unless utc=True
```
I'd expect `ser` to be constructed without doing any casting. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40111/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40111/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/40112 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40112/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40112/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40112/events | https://github.com/pandas-dev/pandas/issues/40112 | 817,972,644 | MDU6SXNzdWU4MTc5NzI2NDQ= | 40,112 | API: Signature of UDF methods | {
"avatar_url": "https://avatars.githubusercontent.com/u/45562402?v=4",
"events_url": "https://api.github.com/users/rhshadrach/events{/privacy}",
"followers_url": "https://api.github.com/users/rhshadrach/followers",
"following_url": "https://api.github.com/users/rhshadrach/following{/other_user}",
"gists_url": "https://api.github.com/users/rhshadrach/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/rhshadrach",
"id": 45562402,
"login": "rhshadrach",
"node_id": "MDQ6VXNlcjQ1NTYyNDAy",
"organizations_url": "https://api.github.com/users/rhshadrach/orgs",
"received_events_url": "https://api.github.com/users/rhshadrach/received_events",
"repos_url": "https://api.github.com/users/rhshadrach/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/rhshadrach/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rhshadrach/subscriptions",
"type": "User",
"url": "https://api.github.com/users/rhshadrach"
} | [
{
"color": "4E9A06",
"default": false,
"description": null,
"id": 76812,
"name": "Enhancement",
"node_id": "MDU6TGFiZWw3NjgxMg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Enhancement"
},
{
"color": "AD7FA8",
"default": false,
"description": null,
"id": 35818298,
"name": "API Design",
"node_id": "MDU6TGFiZWwzNTgxODI5OA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/API%20Design"
},
{
"color": "207de5",
"default": false,
"description": "Requires discussion from core team before further action",
"id": 219960758,
"name": "Needs Discussion",
"node_id": "MDU6TGFiZWwyMTk5NjA3NTg=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Needs%20Discussion"
},
{
"color": "fbca04",
"default": false,
"description": "Apply, Aggregate, Transform",
"id": 697792067,
"name": "Apply",
"node_id": "MDU6TGFiZWw2OTc3OTIwNjc=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Apply"
},
{
"color": "b60205",
"default": false,
"description": "Internal Consistency of API/Behavior",
"id": 1741841389,
"name": "API - Consistency",
"node_id": "MDU6TGFiZWwxNzQxODQxMzg5",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/API%20-%20Consistency"
}
] | open | false | null | [] | null | 2 | 2021-02-27T17:09:39Z | 2021-08-19T01:33:02Z | null | MEMBER | null | There are many signatures of pandas methods that take a UDF. If I've missed methods, please let me know and will update.
Below, `other_arg` is a placeholder for 1 or more keyword arguments, and `value` is a placeholder for the default value.
Signature: `func, other_arg=value, args=value, **kwargs`
- [Series.apply](https://pandas.pydata.org/pandas-docs/dev/reference/api/pandas.Series.apply.html)
- [DataFrame.apply](https://pandas.pydata.org/pandas-docs/dev/reference/api/pandas.DataFrame.apply.html)
- [Expanding.apply](https://pandas.pydata.org/pandas-docs/dev/reference/api/pandas.core.window.expanding.Expanding.apply.html)
- [Rolling.apply](https://pandas.pydata.org/pandas-docs/dev/reference/api/pandas.core.window.rolling.Rolling.apply.html)
Signature: `func=None, other_arg=value, *args, **kwargs`
- [Series.agg](https://pandas.pydata.org/pandas-docs/dev/reference/api/pandas.Series.agg.html#pandas.Series.agg)
- [DataFrame.agg](https://pandas.pydata.org/pandas-docs/dev/reference/api/pandas.DataFrame.aggregate.html#pandas.DataFrame.aggregate)
Signature: `func, other_arg=value, *args, **kwargs`
- [Series.transform](https://pandas.pydata.org/pandas-docs/dev/reference/api/pandas.Series.transform.html#pandas.Series.transform)
- [DataFrame.transform](https://pandas.pydata.org/pandas-docs/dev/reference/api/pandas.DataFrame.transform.html#pandas.DataFrame.transform)
- [DataFrameGroupBy.filter](https://pandas.pydata.org/pandas-docs/dev/reference/api/pandas.core.groupby.DataFrameGroupBy.filter.html)
Signature: `func, *args, other_arg=Value, **kwargs`
- [DataFrameGroupBy.transform](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.core.groupby.DataFrameGroupBy.transform.html)
- [SeriesGroupBy.transform](https://pandas.pydata.org/docs/dev/reference/api/pandas.core.groupby.SeriesGroupBy.transform.html)
Signature: `func=None, *args, other_arg=Value, **kwargs`
- [SeriesGroupBy.agg](https://pandas.pydata.org/pandas-docs/dev/reference/api/pandas.core.groupby.SeriesGroupBy.aggregate.html)
- [DataFrameGroupBy.agg](https://pandas.pydata.org/pandas-docs/dev/reference/api/pandas.core.groupby.DataFrameGroupBy.aggregate.html)
Signature: `func, *args, **kwargs`
- [GroupBy.apply](https://pandas.pydata.org/pandas-docs/dev/reference/api/pandas.core.groupby.GroupBy.apply.html)
- [Resampler.aggregate](https://pandas.pydata.org/pandas-docs/dev/reference/api/pandas.core.resample.Resampler.aggregate.html)
- [Expanding.aggregate](https://pandas.pydata.org/pandas-docs/dev/reference/api/pandas.core.window.expanding.Expanding.aggregate.html)
- [Resampler.apply](https://pandas.pydata.org/pandas-docs/dev/reference/api/pandas.core.resample.Resampler.apply.html)
Signature: `arg, *args, **kwargs`
- [Resampler.transform](https://pandas.pydata.org/pandas-docs/dev/reference/api/pandas.core.resample.Resampler.transform.html) | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40112/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40112/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/40113 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40113/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40113/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40113/events | https://github.com/pandas-dev/pandas/pull/40113 | 817,980,592 | MDExOlB1bGxSZXF1ZXN0NTgxMzc0NzU1 | 40,113 | CLN/TST: normalize test_frame_apply | {
"avatar_url": "https://avatars.githubusercontent.com/u/45562402?v=4",
"events_url": "https://api.github.com/users/rhshadrach/events{/privacy}",
"followers_url": "https://api.github.com/users/rhshadrach/followers",
"following_url": "https://api.github.com/users/rhshadrach/following{/other_user}",
"gists_url": "https://api.github.com/users/rhshadrach/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/rhshadrach",
"id": 45562402,
"login": "rhshadrach",
"node_id": "MDQ6VXNlcjQ1NTYyNDAy",
"organizations_url": "https://api.github.com/users/rhshadrach/orgs",
"received_events_url": "https://api.github.com/users/rhshadrach/received_events",
"repos_url": "https://api.github.com/users/rhshadrach/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/rhshadrach/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rhshadrach/subscriptions",
"type": "User",
"url": "https://api.github.com/users/rhshadrach"
} | [
{
"color": "C4A000",
"default": false,
"description": "pandas testing functions or related to the test suite",
"id": 127685,
"name": "Testing",
"node_id": "MDU6TGFiZWwxMjc2ODU=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Testing"
},
{
"color": "207de5",
"default": false,
"description": null,
"id": 211029535,
"name": "Clean",
"node_id": "MDU6TGFiZWwyMTEwMjk1MzU=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Clean"
},
{
"color": "fbca04",
"default": false,
"description": "Apply, Aggregate, Transform",
"id": 697792067,
"name": "Apply",
"node_id": "MDU6TGFiZWw2OTc3OTIwNjc=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Apply"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 3 | 2021-02-27T17:49:11Z | 2021-03-03T03:11:13Z | 2021-03-03T03:06:36Z | MEMBER | null | - [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
Some minor normalizations before breaking up or parametrizing these 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/40113/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40113/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40113.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40113",
"merged_at": "2021-03-03T03:06:36Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/40113.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40113"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/40114 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40114/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40114/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40114/events | https://github.com/pandas-dev/pandas/pull/40114 | 818,005,526 | MDExOlB1bGxSZXF1ZXN0NTgxMzkzMTE5 | 40,114 | API: silent overflow in Series(bigints, dtype="int8") | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [
{
"color": "e102d8",
"default": false,
"description": "Unexpected or buggy dtype conversions",
"id": 31404521,
"name": "Dtype Conversions",
"node_id": "MDU6TGFiZWwzMTQwNDUyMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Dtype%20Conversions"
}
] | closed | false | null | [] | null | 3 | 2021-02-27T19:54:30Z | 2021-05-30T16:37:59Z | 2021-03-23T15:07:56Z | MEMBER | null | - [ ] closes #xxxx
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
This is made complicated by a) #40110 and b) MaskedArray behavior, which i need to check but may be changeable. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40114/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40114/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40114.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40114",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/40114.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40114"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/40115 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40115/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40115/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40115/events | https://github.com/pandas-dev/pandas/issues/40115 | 818,005,751 | MDU6SXNzdWU4MTgwMDU3NTE= | 40,115 | BUG: index map leading to ValueError: Reindexing only valid with uniquely valued Index objects | {
"avatar_url": "https://avatars.githubusercontent.com/u/4385408?v=4",
"events_url": "https://api.github.com/users/bravegag/events{/privacy}",
"followers_url": "https://api.github.com/users/bravegag/followers",
"following_url": "https://api.github.com/users/bravegag/following{/other_user}",
"gists_url": "https://api.github.com/users/bravegag/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/bravegag",
"id": 4385408,
"login": "bravegag",
"node_id": "MDQ6VXNlcjQzODU0MDg=",
"organizations_url": "https://api.github.com/users/bravegag/orgs",
"received_events_url": "https://api.github.com/users/bravegag/received_events",
"repos_url": "https://api.github.com/users/bravegag/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/bravegag/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bravegag/subscriptions",
"type": "User",
"url": "https://api.github.com/users/bravegag"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "e99695",
"default": false,
"description": "Related to the Index class or subclasses",
"id": 1218227310,
"name": "Index",
"node_id": "MDU6TGFiZWwxMjE4MjI3MzEw",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Index"
}
] | open | false | null | [] | null | 4 | 2021-02-27T19:55:33Z | 2021-08-19T01:33:39Z | null | NONE | null | I am using Pandas 1.1.5 and get to the error `ValueError: Reindexing only valid with uniquely valued Index objects`.
Here is a self contained MRE:
```
import pandas as pd
from pandas import Timestamp
my_dict = my_dict = {('a',): 'x1', ('b',): 'x1', ('c', 'c1'): 'x1', ('c', 'c2'): 'x1', ('c', 'c3'): 'x1', ('c', 'c4'): 'x1', ('c', 'c5'): 'x1', ('c', 'c6'): 'x1', ('c', 'c7'): 'x1', ('c', 'c8'): 'x1', ('c', 'c9'): 'x1', ('c', 'c10'): 'x1', ('c', 'c11'): 'x1', ('c', 'c12'): 'x1', ('c', 'c13'): 'x1', ('c', 'c14'): 'x1', ('c', 'c15'): 'x1', ('c', 'c16'): 'x1', ('c', 'c17'): 'x1', ('c', 'c18'): 'x1', ('c', 'c19'): 'x1', ('c', 'c20'): 'x1', ('c', 'c21'): 'x1', ('c', 'c22'): 'x2', ('c', 'c23'): 'x2', ('c', 'c24'): 'x2', ('c', 'c25'): 'x2', ('c', 'c26'): 'x2', ('c', 'c27'): 'x2', ('c', 'c28'): 'x2', ('c', 'c29'): 'x2', ('c', 'c30'): 'x2', ('c', 'c31'): 'x2', ('c', 'c32'): 'x2', ('c', 'c33'): 'x2', ('c', 'c34'): 'x2', ('c', 'c35'): 'x2', ('c', 'c36'): 'x2', ('c', 'c37'): 'x2', ('c', 'c38'): 'x2', ('c', 'c39'): 'x2', ('c', 'c40'): 'x2', ('c', 'c41'): 'x2', ('c', 'c42'): 'x2', ('c', 'c43'): 'x2', ('c', 'c44'): 'x2', ('c', 'c45'): 'x3', ('c', 'c46'): 'x3', ('c', 'c47'): 'x3', ('c', 'c48'): 'x3', ('c', 'c49'): 'x3', ('c', 'c50'): 'x3', ('c', 'c51'): 'x3', ('c', 'c52'): 'x3', ('c', 'c53'): 'x3', ('c', 'c54'): 'x3', ('c', 'c55'): 'x3', ('c', 'c56'): 'x3', ('c', 'c57'): 'x3', ('c', 'c58'): 'x4', ('c', 'c59'): 'x4', ('c', 'c60'): 'x4', ('c', 'c61'): 'x4', ('c', 'c62'): 'x4', ('c', 'c63'): 'x4', ('c', 'c64'): 'x4', ('c', 'c65'): 'x4', ('c', 'c66'): 'x4', ('c', 'c67'): 'x4', ('c', 'c68'): 'x3', ('c', 'c69'): 'x3', ('c', 'c70'): 'x3', ('d', 'd1'): 'x1', ('d', 'd2'): 'x1', ('d', 'd3'): 'x2', ('d', 'd4'): 'x2', ('d', 'd5'): 'x2', ('d', 'd6'): 'x2', ('d', 'd7'): 'x4', ('d', 'd8'): 'x4', ('d', 'd9'): 'x4', ('d', 'd10'): 'x4', ('f',): 'x1', ('g',): 'x3'}
print(my_dict)
df = pd.DataFrame.from_dict({'date': {('a', 'a1'): Timestamp('2021-02-28'), ('a', 'a2'): Timestamp('2021-02-28'), ('a', 'a3'): Timestamp('2021-02-28'), ('a', 'a4'): Timestamp('2021-02-28'), ('a', 'a5'): Timestamp('2021-02-28'), ('a', 'a6'): Timestamp('2021-02-28'), ('a', 'a7'): Timestamp('2021-02-28'), ('a', 'a8'): Timestamp('2021-02-28'), ('a', 'a9'): Timestamp('2021-02-28'), ('a', 'a10'): Timestamp('2021-02-28'), ('a', 'a11'): Timestamp('2021-02-28'), ('a', 'a12'): Timestamp('2021-02-28'), ('a', 'a13'): Timestamp('2021-02-28'), ('a', 'a14'): Timestamp('2021-02-28'), ('a', 'a15'): Timestamp('2021-02-28'), ('a', 'a16'): Timestamp('2021-02-28'), ('a', 'a17'): Timestamp('2021-02-28'), ('a', 'a18'): Timestamp('2021-02-28'), ('a', 'a19'): Timestamp('2021-02-28'), ('a', 'a20'): Timestamp('2021-02-28'), ('a', 'a21'): Timestamp('2021-02-28'), ('a', 'a22'): Timestamp('2021-02-28'), ('a', 'a23'): Timestamp('2021-02-28'), ('a', 'a24'): Timestamp('2021-02-28'), ('a', 'a25'): Timestamp('2021-02-28'), ('a', 'a26'): Timestamp('2021-02-28'), ('a', 'a27'): Timestamp('2021-02-28'), ('a', 'a28'): Timestamp('2021-02-28'), ('a', 'a29'): Timestamp('2021-02-28'), ('a', 'a30'): Timestamp('2021-02-28'), ('b', 'b1'): Timestamp('2021-02-14'), ('b', 'b2'): Timestamp('2021-02-14'), ('b', 'b3'): Timestamp('2021-02-14'), ('b', 'b4'): Timestamp('2021-02-14'), ('b', 'b5'): Timestamp('2021-02-14'), ('b', 'b6'): Timestamp('2021-02-14'), ('b', 'b7'): Timestamp('2021-02-14'), ('b', 'b8'): Timestamp('2021-02-14'), ('b', 'b9'): Timestamp('2021-02-14'), ('b', 'b10'): Timestamp('2021-02-14'), ('c', 'c1'): Timestamp('2021-02-17'), ('c', 'c2'): Timestamp('2021-02-17'), ('c', 'c3'): Timestamp('2021-02-17'), ('c', 'c4'): Timestamp('2021-02-17'), ('c', 'c5'): Timestamp('2021-02-17'), ('c', 'c6'): Timestamp('2021-02-17'), ('c', 'c7'): Timestamp('2021-02-17'), ('c', 'c8'): Timestamp('2021-02-17'), ('c', 'c9'): Timestamp('2021-02-17'), ('c', 'c10'): Timestamp('2021-02-17'), ('c', 'c11'): Timestamp('2021-02-17'), ('c', 'c12'): Timestamp('2021-02-17'), ('c', 'c13'): Timestamp('2021-02-17'), ('c', 'c14'): Timestamp('2021-02-17'), ('c', 'c15'): Timestamp('2021-02-17'), ('c', 'c16'): Timestamp('2021-02-17'), ('c', 'c17'): Timestamp('2021-02-17'), ('c', 'c18'): Timestamp('2021-02-17'), ('c', 'c19'): Timestamp('2021-02-17'), ('c', 'c20'): Timestamp('2021-02-17'), ('c', 'c21'): Timestamp('2021-02-17'), ('c', 'c22'): Timestamp('2021-02-17'), ('c', 'c23'): Timestamp('2021-02-17'), ('c', 'c24'): Timestamp('2021-02-17'), ('c', 'c25'): Timestamp('2021-02-17'), ('c', 'c26'): Timestamp('2021-02-17'), ('c', 'c27'): Timestamp('2021-02-17'), ('c', 'c28'): Timestamp('2021-02-17'), ('c', 'c29'): Timestamp('2021-02-17'), ('c', 'c30'): Timestamp('2021-02-17'), ('c', 'c31'): Timestamp('2021-02-17'), ('c', 'c32'): Timestamp('2021-02-17'), ('c', 'c33'): Timestamp('2021-02-17'), ('c', 'c34'): Timestamp('2021-02-17'), ('c', 'c35'): Timestamp('2021-02-17'), ('c', 'c36'): Timestamp('2021-02-17'), ('c', 'c37'): Timestamp('2021-02-17'), ('c', 'c38'): Timestamp('2021-02-17'), ('c', 'c39'): Timestamp('2021-02-17'), ('c', 'c40'): Timestamp('2021-02-17'), ('c', 'c41'): Timestamp('2021-02-17'), ('c', 'c42'): Timestamp('2021-02-17'), ('c', 'c43'): Timestamp('2021-02-17'), ('c', 'c44'): Timestamp('2021-02-17'), ('c', 'c45'): Timestamp('2021-02-17'), ('c', 'c46'): Timestamp('2021-02-17'), ('c', 'c47'): Timestamp('2021-02-17'), ('c', 'c48'): Timestamp('2021-02-17'), ('c', 'c49'): Timestamp('2021-02-17'), ('c', 'c50'): Timestamp('2021-02-17'), ('c', 'c51'): Timestamp('2021-02-17'), ('c', 'c52'): Timestamp('2021-02-17'), ('c', 'c53'): Timestamp('2021-02-17'), ('c', 'c54'): Timestamp('2021-02-17'), ('c', 'c55'): Timestamp('2021-02-17'), ('c', 'c56'): Timestamp('2021-02-17'), ('c', 'c57'): Timestamp('2021-02-17'), ('c', 'c58'): Timestamp('2021-02-17'), ('c', 'c59'): Timestamp('2021-02-17'), ('c', 'c60'): Timestamp('2021-02-17'), ('c', 'c61'): Timestamp('2021-02-17'), ('c', 'c62'): Timestamp('2021-02-17'), ('c', 'c63'): Timestamp('2021-02-17'), ('c', 'c64'): Timestamp('2021-02-17'), ('c', 'c65'): Timestamp('2021-02-17'), ('c', 'c66'): Timestamp('2021-02-17'), ('c', 'c67'): Timestamp('2021-02-17'), ('c', 'c68'): Timestamp('2021-02-17'), ('c', 'c69'): Timestamp('2021-02-17'), ('c', 'c70'): Timestamp('2021-02-17'), ('d', 'd1'): Timestamp('2021-02-17'), ('d', 'd2'): Timestamp('2021-02-17'), ('d', 'd3'): Timestamp('2021-02-17'), ('d', 'd4'): Timestamp('2021-02-17'), ('d', 'd5'): Timestamp('2021-02-17'), ('d', 'd6'): Timestamp('2021-02-17'), ('d', 'd7'): Timestamp('2021-02-17'), ('d', 'd8'): Timestamp('2021-02-17'), ('d', 'd9'): Timestamp('2021-02-17'), ('d', 'd10'): Timestamp('2021-02-17'), ('f', 'f1'): Timestamp('2021-02-28'), ('i', 'i1'): Timestamp('2021-02-12'), ('g', 'g1'): Timestamp('2021-02-12')}, 'change': {('a', 'a1'): 0, ('a', 'a2'): 0, ('a', 'a3'): 0, ('a', 'a4'): 0, ('a', 'a5'): 0, ('a', 'a6'): 0, ('a', 'a7'): 1, ('a', 'a8'): 0, ('a', 'a9'): 0, ('a', 'a10'): 0, ('a', 'a11'): 0, ('a', 'a12'): 0, ('a', 'a13'): 0, ('a', 'a14'): 0, ('a', 'a15'): 0, ('a', 'a16'): 1, ('a', 'a17'): 0, ('a', 'a18'): 0, ('a', 'a19'): -1, ('a', 'a20'): 0, ('a', 'a21'): 0, ('a', 'a22'): -1, ('a', 'a23'): 0, ('a', 'a24'): 0, ('a', 'a25'): 0, ('a', 'a26'): -1, ('a', 'a27'): 0, ('a', 'a28'): 1, ('a', 'a29'): -1, ('a', 'a30'): 0, ('b', 'b1'): 0, ('b', 'b2'): 0, ('b', 'b3'): 0, ('b', 'b4'): 0, ('b', 'b5'): 0, ('b', 'b6'): 0, ('b', 'b7'): 0, ('b', 'b8'): 0, ('b', 'b9'): 0, ('b', 'b10'): -1, ('c', 'c1'): 0, ('c', 'c2'): 0, ('c', 'c3'): 0, ('c', 'c4'): 0, ('c', 'c5'): 0, ('c', 'c6'): 0, ('c', 'c7'): 0, ('c', 'c8'): 0, ('c', 'c9'): 0, ('c', 'c10'): 0, ('c', 'c11'): 0, ('c', 'c12'): 0, ('c', 'c13'): 0, ('c', 'c14'): 0, ('c', 'c15'): 0, ('c', 'c16'): 0, ('c', 'c17'): 0, ('c', 'c18'): 0, ('c', 'c19'): 0, ('c', 'c20'): 0, ('c', 'c21'): 0, ('c', 'c22'): 0, ('c', 'c23'): 0, ('c', 'c24'): 0, ('c', 'c25'): 0, ('c', 'c26'): 0, ('c', 'c27'): 0, ('c', 'c28'): 0, ('c', 'c29'): 0, ('c', 'c30'): 0, ('c', 'c31'): 0, ('c', 'c32'): 0, ('c', 'c33'): 0, ('c', 'c34'): 0, ('c', 'c35'): 0, ('c', 'c36'): 0, ('c', 'c37'): 0, ('c', 'c38'): 0, ('c', 'c39'): 0, ('c', 'c40'): 0, ('c', 'c41'): 0, ('c', 'c42'): 0, ('c', 'c43'): 0, ('c', 'c44'): 0, ('c', 'c45'): 0, ('c', 'c46'): 0, ('c', 'c47'): 0, ('c', 'c48'): 0, ('c', 'c49'): 0, ('c', 'c50'): 0, ('c', 'c51'): 0, ('c', 'c52'): 0, ('c', 'c53'): 0, ('c', 'c54'): 0, ('c', 'c55'): 0, ('c', 'c56'): 0, ('c', 'c57'): 0, ('c', 'c58'): 0, ('c', 'c59'): 0, ('c', 'c60'): 0, ('c', 'c61'): 0, ('c', 'c62'): 0, ('c', 'c63'): 0, ('c', 'c64'): 0, ('c', 'c65'): 0, ('c', 'c66'): 0, ('c', 'c67'): 0, ('c', 'c68'): 0, ('c', 'c69'): 0, ('c', 'c70'): 0, ('d', 'd1'): 0, ('d', 'd2'): 0, ('d', 'd3'): 0, ('d', 'd4'): 0, ('d', 'd5'): 0, ('d', 'd6'): 0, ('d', 'd7'): 0, ('d', 'd8'): 0, ('d', 'd9'): 0, ('d', 'd10'): 0, ('f', 'f1'): 0, ('i', 'i1'): 0, ('g', 'g1'): 0}, 'signal': {('a', 'a1'): 0.03970536568342733, ('a', 'a2'): -0.06374209195546844, ('a', 'a3'): 0.04887447925300424, ('a', 'a4'): 0.01575039305035544, ('a', 'a5'): -0.09999999999999999, ('a', 'a6'): 0.05279941816002801, ('a', 'a7'): 0.010016176472915, ('a', 'a8'): -0.02449470412243375, ('a', 'a9'): 0.04869502067932577, ('a', 'a10'): 0.1, ('a', 'a11'): -0.1, ('a', 'a12'): 0.03027685639088534, ('a', 'a13'): -0.008406707578779347, ('a', 'a14'): 0.02331562618579834, ('a', 'a15'): -0.01895572953805233, ('a', 'a16'): 0.01321303262280628, ('a', 'a17'): 0.0471840306086552, ('a', 'a18'): 0.01764134675438401, ('a', 'a19'): -0.02975575175382789, ('a', 'a20'): 0.02540156637807194, ('a', 'a21'): 0.01049801497612664, ('a', 'a22'): -0.00768798591193653, ('a', 'a23'): -0.04651808810661669, ('a', 'a24'): -0.07975382397869742, ('a', 'a25'): 0.02774313999684366, ('a', 'a26'): -0.07628252363662207, ('a', 'a27'): -0.0246802445961122, ('a', 'a28'): 0.002526683431417061, ('a', 'a29'): -0.011475219734499, ('a', 'a30'): 0.07811172026900139, ('b', 'b1'): 0.05806278953704978, ('b', 'b2'): -0.02730772877790196, ('b', 'b3'): -0.01511648025231574, ('b', 'b4'): -0.1408331932235801, ('b', 'b5'): 0.06066688412750731, ('b', 'b6'): -0.001756125774471374, ('b', 'b7'): 0.09485626882296667, ('b', 'b8'): -0.05420268550526035, ('b', 'b9'): 0.0347802085337365, ('b', 'b10'): -0.009149937487730684, ('c', 'c1'): 0.2892069022181903, ('c', 'c2'): 0.3967565277356959, ('c', 'c3'): 0.2953936103710862, ('c', 'c4'): 0.8367722498665394, ('c', 'c5'): 0.9476463410530558, ('c', 'c6'): 0.7569778483880074, ('c', 'c7'): 0.9418729618853355, ('c', 'c8'): 0.5823731910502483, ('c', 'c9'): 0.3801380958841796, ('c', 'c10'): 0.840417572988295, ('c', 'c11'): 0.2709598829828612, ('c', 'c12'): 0.5418651708249795, ('c', 'c13'): 0.5910838658612337, ('c', 'c14'): 0.1642799495954194, ('c', 'c15'): 0.9098912617035192, ('c', 'c16'): 0.9054002286961012, ('c', 'c17'): 0.8825237896195792, ('c', 'c18'): 0.5484869743549324, ('c', 'c19'): 0.416185567918982, ('c', 'c20'): 0.9749498131497896, ('c', 'c21'): 0.9904332845725732, ('c', 'c22'): 0.7088811098573771, ('c', 'c23'): 0.5292993064129955, ('c', 'c24'): 0.2860870616937747, ('c', 'c25'): 0.338840895561976, ('c', 'c26'): 0.7459350017031432, ('c', 'c27'): -0.1511324692149147, ('c', 'c28'): 0.4693308821188915, ('c', 'c29'): 0.6659249271244383, ('c', 'c30'): 0.4807458505455962, ('c', 'c31'): -0.221358206035012, ('c', 'c32'): 0.6180445315988707, ('c', 'c33'): 0.1885337838551052, ('c', 'c34'): 0.7429931202376518, ('c', 'c35'): 0.8002078957742668, ('c', 'c36'): 0.3493342914079488, ('c', 'c37'): 0.3309638545936928, ('c', 'c38'): 0.2642847334995485, ('c', 'c39'): 0.05840480039086733, ('c', 'c40'): 0.6066163228881758, ('c', 'c41'): 0.6695966826754965, ('c', 'c42'): 0.4552511138794135, ('c', 'c43'): 0.7953107225709156, ('c', 'c44'): 0.684872567978258, ('c', 'c45'): -0.7056780042421102, ('c', 'c46'): -0.2132570428066563, ('c', 'c47'): -0.2982245804786927, ('c', 'c48'): -0.2930812855008404, ('c', 'c49'): -0.007322632308963899, ('c', 'c50'): -0.3378424058391866, ('c', 'c51'): -0.2597598493973547, ('c', 'c52'): 0.5701700950598918, ('c', 'c53'): -0.5385984977127748, ('c', 'c54'): -0.5862066330785679, ('c', 'c55'): 0.4089415907519486, ('c', 'c56'): -0.2178839109516601, ('c', 'c57'): 0.2018031189699861, ('c', 'c58'): 0.6566150449109974, ('c', 'c59'): 0.7277468383550132, ('c', 'c60'): 0.8123662929227967, ('c', 'c61'): -0.2122649654736288, ('c', 'c62'): 0.7163285570784564, ('c', 'c63'): 0.8784305049299558, ('c', 'c64'): 0.7505753404952612, ('c', 'c65'): 0.5033400950735804, ('c', 'c66'): -0.1082662590377242, ('c', 'c67'): 0.521848866588884, ('c', 'c68'): 0.1339926134218392, ('c', 'c69'): 0.2327903872639628, ('c', 'c70'): 0.5341954937532732, ('d', 'd1'): 0.5596960121932234, ('d', 'd2'): 0.8039815600022109, ('d', 'd3'): 0.4526569517559198, ('d', 'd4'): 0.4530754439510857, ('d', 'd5'): -0.2669800836305256, ('d', 'd6'): 0.1309535995900915, ('d', 'd7'): 0.540158353558727, ('d', 'd8'): 0.300326164813025, ('d', 'd9'): 0.7107819801662658, ('d', 'd10'): 0.2067913037755799, ('f', 'f1'): 0.05812634537324268, ('i', 'i1'): 0.8326445687250644, ('g', 'g1'): 1.0} } )
print(df.index.duplicated())
# why does this work and ...
for key, value in my_dict.items():
df.loc[key, 'desc1'] = value
print(df)
# this doesn't?
print(df.index.map(my_dict))
```
traceback:
```python-traceback
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/marco/pandas-marco/pandas/core/indexes/base.py", line 5366, in map
new_values = super()._map_values(mapper, na_action=na_action)
File "/home/marco/pandas-marco/pandas/core/base.py", line 930, in _map_values
indexer = mapper.index.get_indexer(values)
File "/home/marco/pandas-marco/pandas/core/indexes/base.py", line 3369, in get_indexer
raise InvalidIndexError(self._requires_unique_msg)
pandas.errors.InvalidIndexError: Reindexing only valid with uniquely valued Index objects
``` | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40115/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40115/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/40116 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40116/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40116/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40116/events | https://github.com/pandas-dev/pandas/pull/40116 | 818,005,817 | MDExOlB1bGxSZXF1ZXN0NTgxMzkzMzM5 | 40,116 | PERF: DTA/TDA _simple_new disallow i8 values | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [
{
"color": "AFEEEE",
"default": false,
"description": null,
"id": 211840,
"name": "Timeseries",
"node_id": "MDU6TGFiZWwyMTE4NDA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Timeseries"
},
{
"color": "a10c02",
"default": false,
"description": "Memory or execution speed performance",
"id": 8935311,
"name": "Performance",
"node_id": "MDU6TGFiZWw4OTM1MzEx",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Performance"
},
{
"color": "fbca04",
"default": false,
"description": "Related to non-user accessible pandas implementation",
"id": 49094459,
"name": "Internals",
"node_id": "MDU6TGFiZWw0OTA5NDQ1OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Internals"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 2 | 2021-02-27T19:55:51Z | 2021-03-11T13:02:16Z | 2021-03-01T15:42:01Z | MEMBER | null | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40116/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40116/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40116.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40116",
"merged_at": "2021-03-01T15:42:01Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/40116.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40116"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/40117 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40117/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40117/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40117/events | https://github.com/pandas-dev/pandas/pull/40117 | 818,015,306 | MDExOlB1bGxSZXF1ZXN0NTgxNDAwMTg1 | 40,117 | Backport PR #40090 on branch 1.2.x | {
"avatar_url": "https://avatars.githubusercontent.com/u/45562402?v=4",
"events_url": "https://api.github.com/users/rhshadrach/events{/privacy}",
"followers_url": "https://api.github.com/users/rhshadrach/followers",
"following_url": "https://api.github.com/users/rhshadrach/following{/other_user}",
"gists_url": "https://api.github.com/users/rhshadrach/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/rhshadrach",
"id": 45562402,
"login": "rhshadrach",
"node_id": "MDQ6VXNlcjQ1NTYyNDAy",
"organizations_url": "https://api.github.com/users/rhshadrach/orgs",
"received_events_url": "https://api.github.com/users/rhshadrach/received_events",
"repos_url": "https://api.github.com/users/rhshadrach/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/rhshadrach/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rhshadrach/subscriptions",
"type": "User",
"url": "https://api.github.com/users/rhshadrach"
} | [
{
"color": "fbca04",
"default": false,
"description": "Apply, Aggregate, Transform",
"id": 697792067,
"name": "Apply",
"node_id": "MDU6TGFiZWw2OTc3OTIwNjc=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Apply"
}
] | closed | false | null | [] | {
"closed_at": "2021-03-02T08:40:51Z",
"closed_issues": 49,
"created_at": "2021-02-07T13:58:05Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/13159005?v=4",
"events_url": "https://api.github.com/users/simonjayhawkins/events{/privacy}",
"followers_url": "https://api.github.com/users/simonjayhawkins/followers",
"following_url": "https://api.github.com/users/simonjayhawkins/following{/other_user}",
"gists_url": "https://api.github.com/users/simonjayhawkins/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/simonjayhawkins",
"id": 13159005,
"login": "simonjayhawkins",
"node_id": "MDQ6VXNlcjEzMTU5MDA1",
"organizations_url": "https://api.github.com/users/simonjayhawkins/orgs",
"received_events_url": "https://api.github.com/users/simonjayhawkins/received_events",
"repos_url": "https://api.github.com/users/simonjayhawkins/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/simonjayhawkins/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/simonjayhawkins/subscriptions",
"type": "User",
"url": "https://api.github.com/users/simonjayhawkins"
},
"description": "on-merge: backport to 1.2.x\r\n\r\n",
"due_on": "2021-03-01T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/83",
"id": 6402340,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/83/labels",
"node_id": "MDk6TWlsZXN0b25lNjQwMjM0MA==",
"number": 83,
"open_issues": 0,
"state": "closed",
"title": "1.2.3",
"updated_at": "2021-03-02T17:15:27Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/83"
} | 1 | 2021-02-27T20:47:43Z | 2021-02-28T14:08:19Z | 2021-02-28T14:07:08Z | MEMBER | null | Backport PR #40090 | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40117/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40117/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40117.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40117",
"merged_at": "2021-02-28T14:07:08Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/40117.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40117"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/40118 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/40118/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/40118/comments | https://api.github.com/repos/pandas-dev/pandas/issues/40118/events | https://github.com/pandas-dev/pandas/pull/40118 | 818,063,511 | MDExOlB1bGxSZXF1ZXN0NTgxNDI2NjQ4 | 40,118 | CI: skip array-manager test | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [
{
"color": "C4A000",
"default": false,
"description": "pandas testing functions or related to the test suite",
"id": 127685,
"name": "Testing",
"node_id": "MDU6TGFiZWwxMjc2ODU=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Testing"
},
{
"color": "729FCF",
"default": false,
"description": null,
"id": 233160,
"name": "Groupby",
"node_id": "MDU6TGFiZWwyMzMxNjA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Groupby"
},
{
"color": "fbca04",
"default": false,
"description": "Related to non-user accessible pandas implementation",
"id": 49094459,
"name": "Internals",
"node_id": "MDU6TGFiZWw0OTA5NDQ1OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Internals"
}
] | closed | false | null | [] | {
"closed_at": "2021-07-02T07:59:17Z",
"closed_issues": 2396,
"created_at": "2020-11-11T19:05:43Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-06-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/80",
"id": 6095818,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels",
"node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==",
"number": 80,
"open_issues": 1,
"state": "closed",
"title": "1.3",
"updated_at": "2021-08-25T20:34:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80"
} | 2 | 2021-02-28T00:23:48Z | 2021-03-01T09:28:37Z | 2021-02-28T02:02:56Z | MEMBER | null | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
should get the CI back to green | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/40118/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/40118/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/40118.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/40118",
"merged_at": "2021-02-28T02:02:56Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/40118.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/40118"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.