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/28213
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28213/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28213/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28213/events
https://github.com/pandas-dev/pandas/pull/28213
486,725,731
MDExOlB1bGxSZXF1ZXN0MzEyMTMwNjM5
28,213
BUG: Fix issue with apply on empty DataFrame
{ "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": "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": "2020-01-30T12:18:05Z", "closed_issues": 2207, "created_at": "2012-09-13T02:13:00Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/329591?v=4", "events_url": "https://api.github.com/users/wesm/events{/privacy}", "followers_url": "https://api.github.com/users/wesm/followers", "following_url": "https://api.github.com/users/wesm/following{/other_user}", "gists_url": "https://api.github.com/users/wesm/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/wesm", "id": 329591, "login": "wesm", "node_id": "MDQ6VXNlcjMyOTU5MQ==", "organizations_url": "https://api.github.com/users/wesm/orgs", "received_events_url": "https://api.github.com/users/wesm/received_events", "repos_url": "https://api.github.com/users/wesm/repos", "site_admin": false, "starred_url": "https://api.github.com/users/wesm/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/wesm/subscriptions", "type": "User", "url": "https://api.github.com/users/wesm" }, "description": "on-merge: backport to 1.0.x", "due_on": "2020-02-01T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/16", "id": 174211, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16/labels", "node_id": "MDk6TWlsZXN0b25lMTc0MjEx", "number": 16, "open_issues": 0, "state": "closed", "title": "1.0.0", "updated_at": "2020-01-30T12:18:05Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16" }
12
2019-08-29T04:09:10Z
2020-04-09T02:37:34Z
2019-09-20T03:36:07Z
MEMBER
null
Fixes a bug where the return value for certain functions was hard-coded as `np.nan` when operating on an empty `DataFrame`. Before ```python >>> import numpy as np >>> import pandas as pd >>> df = pd.DataFrame(columns=["a", "b", "c"]) >>> df.apply(np.sum) a NaN b NaN c NaN dtype: float64 >>> df.apply(np.prod) a NaN b NaN c NaN dtype: float64 ``` After ```python >>> import numpy as np >>> import pandas as pd >>> df = pd.DataFrame(columns=["a", "b", "c"]) >>> df.apply(np.sum) a 0.0 b 0.0 c 0.0 dtype: float64 >>> df.apply(np.prod) a 1.0 b 1.0 c 1.0 dtype: float64 ``` **Edit**: Closes #28202 and closes #21959 after https://github.com/pandas-dev/pandas/pull/28213/commits/cb68153f4b6fca19440ec6b79a0d1128c002ec11. The issue was that the arguments of `self.f` were already unpacked here: https://github.com/pandas-dev/pandas/blob/cb68153f4b6fca19440ec6b79a0d1128c002ec11/pandas/core/apply.py#L112 and then we tried to do this again inside `apply_empty_result` which was raising an error and causing the unusual output.
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28213/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28213/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/28213.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/28213", "merged_at": "2019-09-20T03:36:06Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/28213.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/28213" }
https://api.github.com/repos/pandas-dev/pandas/issues/28214
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28214/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28214/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28214/events
https://github.com/pandas-dev/pandas/issues/28214
486,728,143
MDU6SXNzdWU0ODY3MjgxNDM=
28,214
I have a problem about upgrading my packages in pycharm
{ "avatar_url": "https://avatars.githubusercontent.com/u/50924713?v=4", "events_url": "https://api.github.com/users/antarctiqueN/events{/privacy}", "followers_url": "https://api.github.com/users/antarctiqueN/followers", "following_url": "https://api.github.com/users/antarctiqueN/following{/other_user}", "gists_url": "https://api.github.com/users/antarctiqueN/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/antarctiqueN", "id": 50924713, "login": "antarctiqueN", "node_id": "MDQ6VXNlcjUwOTI0NzEz", "organizations_url": "https://api.github.com/users/antarctiqueN/orgs", "received_events_url": "https://api.github.com/users/antarctiqueN/received_events", "repos_url": "https://api.github.com/users/antarctiqueN/repos", "site_admin": false, "starred_url": "https://api.github.com/users/antarctiqueN/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/antarctiqueN/subscriptions", "type": "User", "url": "https://api.github.com/users/antarctiqueN" }
[]
closed
false
null
[]
null
1
2019-08-29T04:18:35Z
2019-08-29T06:07:29Z
2019-08-29T06:07:28Z
NONE
null
I am trying to upgrade the versus of BeautifulSoup4 from 4.6.0 to 4.8.0 and pip from 18.0 to 19.2.3 which are newest versions. So via the terminal, I used `python -m pip install -U bs4` and `pip install --upgrade pip`. The thing is these two packages are actually installed successfully, but the upgrading is failed. As the terminal showed, the old version is already installed in the specific location and cannot be simply uninstalled: >Found existing installation: pip 18.0 Not uninstalling pip at /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6, as it is in the standard library. Can't uninstall 'pip'. No files were found to uninstall. >Found existing installation: beautifulsoup4 4.6.0 Not uninstalling beautifulsoup4 at /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6, outside environment /Users/niejiaqi/PycharmProjects/URLDemo2/venv Can't uninstall 'beautifulsoup4'. No files were found to uninstall. How can I update those packages?
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28214/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28214/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/28215
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28215/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28215/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28215/events
https://github.com/pandas-dev/pandas/pull/28215
486,873,547
MDExOlB1bGxSZXF1ZXN0MzEyMjQ4NTc0
28,215
Add function to clean up column names with special characters
{ "avatar_url": "https://avatars.githubusercontent.com/u/13176356?v=4", "events_url": "https://api.github.com/users/hwalinga/events{/privacy}", "followers_url": "https://api.github.com/users/hwalinga/followers", "following_url": "https://api.github.com/users/hwalinga/following{/other_user}", "gists_url": "https://api.github.com/users/hwalinga/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/hwalinga", "id": 13176356, "login": "hwalinga", "node_id": "MDQ6VXNlcjEzMTc2MzU2", "organizations_url": "https://api.github.com/users/hwalinga/orgs", "received_events_url": "https://api.github.com/users/hwalinga/received_events", "repos_url": "https://api.github.com/users/hwalinga/repos", "site_admin": false, "starred_url": "https://api.github.com/users/hwalinga/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/hwalinga/subscriptions", "type": "User", "url": "https://api.github.com/users/hwalinga" }
[ { "color": "370f77", "default": false, "description": "DataFrame data structure", "id": 1049312478, "name": "DataFrame", "node_id": "MDU6TGFiZWwxMDQ5MzEyNDc4", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/DataFrame" } ]
closed
false
null
[]
{ "closed_at": "2020-01-30T12:18:05Z", "closed_issues": 2207, "created_at": "2012-09-13T02:13:00Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/329591?v=4", "events_url": "https://api.github.com/users/wesm/events{/privacy}", "followers_url": "https://api.github.com/users/wesm/followers", "following_url": "https://api.github.com/users/wesm/following{/other_user}", "gists_url": "https://api.github.com/users/wesm/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/wesm", "id": 329591, "login": "wesm", "node_id": "MDQ6VXNlcjMyOTU5MQ==", "organizations_url": "https://api.github.com/users/wesm/orgs", "received_events_url": "https://api.github.com/users/wesm/received_events", "repos_url": "https://api.github.com/users/wesm/repos", "site_admin": false, "starred_url": "https://api.github.com/users/wesm/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/wesm/subscriptions", "type": "User", "url": "https://api.github.com/users/wesm" }, "description": "on-merge: backport to 1.0.x", "due_on": "2020-02-01T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/16", "id": 174211, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16/labels", "node_id": "MDk6TWlsZXN0b25lMTc0MjEx", "number": 16, "open_issues": 0, "state": "closed", "title": "1.0.0", "updated_at": "2020-01-30T12:18:05Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16" }
40
2019-08-29T10:25:38Z
2020-01-05T13:32:27Z
2020-01-04T19:07:05Z
CONTRIBUTOR
null
Changed the backtick quoting functions so that you can also use backtick quoting to use invalid Python identifiers like ones that start with a digit, start with a number, or are separated by operators instead of spaces. - [x] closes #27017 - [x] tests added / passed - [x] passes `black pandas` - [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff` - [x] whatsnew entry As this builds upon #24955 I think @jreback would be again the right person for the code review.
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28215/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28215/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/28215.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/28215", "merged_at": "2020-01-04T19:07:05Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/28215.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/28215" }
https://api.github.com/repos/pandas-dev/pandas/issues/28216
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28216/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28216/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28216/events
https://github.com/pandas-dev/pandas/pull/28216
486,891,260
MDExOlB1bGxSZXF1ZXN0MzEyMjYzMjkx
28,216
REGR: <th> tags for notebook display closes #28204
{ "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": "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": ...
closed
false
null
[]
{ "closed_at": "2019-10-19T17:01:24Z", "closed_issues": 52, "created_at": "2019-08-23T11:48:40Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/1312546?v=4", "events_url": "https://api.github.com/users/TomAugspurger/events{/privacy}", "followers_url": "https://api.github.com/users/TomAugspurger/followers", "following_url": "https://api.github.com/users/TomAugspurger/following{/other_user}", "gists_url": "https://api.github.com/users/TomAugspurger/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/TomAugspurger", "id": 1312546, "login": "TomAugspurger", "node_id": "MDQ6VXNlcjEzMTI1NDY=", "organizations_url": "https://api.github.com/users/TomAugspurger/orgs", "received_events_url": "https://api.github.com/users/TomAugspurger/received_events", "repos_url": "https://api.github.com/users/TomAugspurger/repos", "site_admin": false, "starred_url": "https://api.github.com/users/TomAugspurger/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/TomAugspurger/subscriptions", "type": "User", "url": "https://api.github.com/users/TomAugspurger" }, "description": "on-merge: backport to 0.25.x", "due_on": "2019-10-15T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/66", "id": 4597769, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/66/labels", "node_id": "MDk6TWlsZXN0b25lNDU5Nzc2OQ==", "number": 66, "open_issues": 0, "state": "closed", "title": "0.25.2", "updated_at": "2019-10-19T17:01:24Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/66" }
5
2019-08-29T11:04:53Z
2019-08-30T23:40:27Z
2019-08-30T17:06:50Z
MEMBER
null
- [ ] closes #28204 - [ ] tests added / passed - [ ] passes `black pandas` - [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff` - [ ] whatsnew entry
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28216/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28216/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/28216.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/28216", "merged_at": "2019-08-30T17:06:50Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/28216.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/28216" }
https://api.github.com/repos/pandas-dev/pandas/issues/28217
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28217/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28217/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28217/events
https://github.com/pandas-dev/pandas/pull/28217
486,939,361
MDExOlB1bGxSZXF1ZXN0MzEyMzAyODM4
28,217
DOC: Update index parameter in pandas to_parquet
{ "avatar_url": "https://avatars.githubusercontent.com/u/10180442?v=4", "events_url": "https://api.github.com/users/galuhsahid/events{/privacy}", "followers_url": "https://api.github.com/users/galuhsahid/followers", "following_url": "https://api.github.com/users/galuhsahid/following{/other_user}", "gists_url": "https://api.github.com/users/galuhsahid/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/galuhsahid", "id": 10180442, "login": "galuhsahid", "node_id": "MDQ6VXNlcjEwMTgwNDQy", "organizations_url": "https://api.github.com/users/galuhsahid/orgs", "received_events_url": "https://api.github.com/users/galuhsahid/received_events", "repos_url": "https://api.github.com/users/galuhsahid/repos", "site_admin": false, "starred_url": "https://api.github.com/users/galuhsahid/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/galuhsahid/subscriptions", "type": "User", "url": "https://api.github.com/users/galuhsahid" }
[ { "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": "5319e7", "default": false, "description": "parquet, fea...
closed
false
null
[]
null
11
2019-08-29T12:52:00Z
2019-09-16T12:45:17Z
2019-09-16T11:50:20Z
CONTRIBUTOR
null
- [ ] closes #xxxx (reference: https://github.com/python-sprints/pandas-mentoring/issues/156) - [ ] tests added / passed - [x] passes `black pandas` - [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff` - [ ] whatsnew entry The documentation ([https://dev.pandas.io/reference/api/pandas.DataFrame.to_parquet.html#pandas.DataFrame.to_parquet](https://dev.pandas.io/reference/api/pandas.DataFrame.to_parquet.html#pandas.DataFrame.to_parquet)) says that for `DataFrame.to_parquet` when the value for the index parameter is `None`, the behavior will depend on the engine. However if we try this both engines, `pyarrow` and `fastparquet`, will keep the index. This PR proposes to set the default value of the index parameter as `index=True` instead of `index=None` since both engines keep the index anyway. Would appreciate any discussion/feedback :) Sample code to demonstrate how both engines treat the index: ``` import pandas as pd data = {'name':['a', 'b', 'c', 'd']} df = pd.DataFrame(data, index =['rank_1', 'rank_2', 'rank_3', 'rank_4']) df.info() ``` Output: ``` <class 'pandas.core.frame.DataFrame'> Index: 4 entries, rank_1 to rank_4 Data columns (total 1 columns): name 4 non-null object dtypes: object(1) memory usage: 64.0+ bytes ``` ``` # pyarrow df.to_parquet("test_pyarrow.parquet", engine="pyarrow") df_read_pyarrow = pd.read_parquet("test_pyarrow.parquet", engine="pyarrow") df_read_pyarrow.info() ``` Output: ``` <class 'pandas.core.frame.DataFrame'> Index: 4 entries, rank_1 to rank_4 Data columns (total 1 columns): name 4 non-null object dtypes: object(1) memory usage: 64.0+ bytes ``` ``` # fastparquet df.to_parquet("test_fastparquet.parquet", engine="fastparquet") df_read_fastparquet = pd.read_parquet("test_fastparquet.parquet", engine="fastparquet") df_read_fastparquet.info() ``` Output: ``` <class 'pandas.core.frame.DataFrame'> Index: 4 entries, rank_1 to rank_4 Data columns (total 1 columns): name 4 non-null object dtypes: object(1) memory usage: 64.0+ bytes ```
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28217/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28217/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/28217.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/28217", "merged_at": "2019-09-16T11:50:20Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/28217.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/28217" }
https://api.github.com/repos/pandas-dev/pandas/issues/28218
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28218/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28218/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28218/events
https://github.com/pandas-dev/pandas/issues/28218
486,965,021
MDU6SXNzdWU0ODY5NjUwMjE=
28,218
df.to_html display full output when using option to set display.max_colwidth
{ "avatar_url": "https://avatars.githubusercontent.com/u/18487422?v=4", "events_url": "https://api.github.com/users/Leostayner/events{/privacy}", "followers_url": "https://api.github.com/users/Leostayner/followers", "following_url": "https://api.github.com/users/Leostayner/following{/other_user}", "gists_url": "https://api.github.com/users/Leostayner/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Leostayner", "id": 18487422, "login": "Leostayner", "node_id": "MDQ6VXNlcjE4NDg3NDIy", "organizations_url": "https://api.github.com/users/Leostayner/orgs", "received_events_url": "https://api.github.com/users/Leostayner/received_events", "repos_url": "https://api.github.com/users/Leostayner/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Leostayner/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Leostayner/subscriptions", "type": "User", "url": "https://api.github.com/users/Leostayner" }
[ { "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": "006b75", "default": false, "description": "read_html, to_html, S...
open
false
null
[]
null
3
2019-08-29T13:39:24Z
2021-09-09T14:05:43Z
null
NONE
null
#### Code Sample ```python import pandas as pd df = pd.DataFrame(data={ 'test': ['abcdefghijklmnopqrstuvwxyz', 'aaaabbbbbbccccccddddddeeeeefffff'], }) pd.set_option('display.max_colwidth', 10) df.to_html(escape=False, notebook=False) ``` #### Problem description While we are working on issue https://github.com/pandas-dev/pandas/issues/9690 and trying to reproduce the bug we found what could be a possible bug, when using `pd.set_option('display.max_colwidth', 10)`, we expect `df.to_html(escape=False, notebook=False)` to show truncated values, but this does not occurs. We already know that when using `notebook=True` the truncating occurs, but in our mind that to should working too when `notebook=False`. Should this be this way? #### Output ``` '<table border="1" class="dataframe">\n <thead>\n <tr style="text-align: right;">\n <th></th>\n <th>test</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <th>0</th>\n <td>abcdefghijklmnopqrstuvwxyz</td>\n </tr>\n <tr>\n <th>1</th>\n <td>aaaabbbbbbccccccddddddeeeeefffff</td>\n </tr>\n </tbody>\n</table>' ``` #### Expected Output ``` '<table border="1" class="dataframe">\n <thead>\n <tr style="text-align: right;">\n <th></th>\n <th>test</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <th>0</th>\n <td>abcdef...</td>\n </tr>\n <tr>\n <th>1</th>\n <td>aaaabb... </td>\n </tr>\n </tbody>\n</table>' ``` #### Output of ``pd.show_versions()`` <details> INSTALLED VERSIONS ------------------ commit : 5f34933848d7daa129651a53158cb94367bacbcd python : 3.6.8.final.0 python-bits : 64 OS : Linux OS-release : 4.15.0-58-generic machine : x86_64 processor : x86_64 byteorder : little LC_ALL : None LANG : pt_BR.UTF-8 LOCALE : pt_BR.UTF-8 pandas : 0.25.0+258.g5f3493384 numpy : 1.16.2 pytz : 2018.3 dateutil : 2.8.0 pip : 9.0.1 setuptools : 40.8.0 Cython : 0.29.13 pytest : None hypothesis : None sphinx : None blosc : None feather : None xlsxwriter : None lxml.etree : 4.2.1 html5lib : 0.999999999 pymysql : None psycopg2 : None jinja2 : 2.10.1 IPython : 7.3.0 pandas_datareader: None bs4 : 4.6.0 bottleneck : None fastparquet : None gcsfs : None lxml.etree : 4.2.1 matplotlib : 3.0.2 numexpr : 2.6.4 odfpy : None openpyxl : None pandas_gbq : None pyarrow : None pytables : None s3fs : None scipy : 1.2.1 sqlalchemy : None tables : 3.4.2 xarray : None xlrd : None xlwt : None xlsxwriter : None </details> @elisamalzoni
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28218/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28218/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/28219
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28219/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28219/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28219/events
https://github.com/pandas-dev/pandas/issues/28219
486,965,406
MDU6SXNzdWU0ODY5NjU0MDY=
28,219
Problem with lzma module
{ "avatar_url": "https://avatars.githubusercontent.com/u/50227010?v=4", "events_url": "https://api.github.com/users/Anatras/events{/privacy}", "followers_url": "https://api.github.com/users/Anatras/followers", "following_url": "https://api.github.com/users/Anatras/following{/other_user}", "gists_url": "https://api.github.com/users/Anatras/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Anatras", "id": 50227010, "login": "Anatras", "node_id": "MDQ6VXNlcjUwMjI3MDEw", "organizations_url": "https://api.github.com/users/Anatras/orgs", "received_events_url": "https://api.github.com/users/Anatras/received_events", "repos_url": "https://api.github.com/users/Anatras/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Anatras/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Anatras/subscriptions", "type": "User", "url": "https://api.github.com/users/Anatras" }
[]
closed
false
null
[]
null
12
2019-08-29T13:40:07Z
2021-11-20T07:43:47Z
2019-08-29T20:18:54Z
NONE
null
`/usr/local/lib/python3.7/site-packages/pandas/compat/__init__.py:84: UserWarning: Could not import the lzma module. Your installed Python is incomplete. Attempting to use lzma compression will result in a RuntimeError.` I get this error when I run the code and I don't know how to fix 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/28219/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28219/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/28220
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28220/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28220/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28220/events
https://github.com/pandas-dev/pandas/issues/28220
486,992,480
MDU6SXNzdWU0ODY5OTI0ODA=
28,220
pd.merge regression when doing a left-join with missing data on the right. Result has a Float64Index
{ "avatar_url": "https://avatars.githubusercontent.com/u/14890988?v=4", "events_url": "https://api.github.com/users/dworvos/events{/privacy}", "followers_url": "https://api.github.com/users/dworvos/followers", "following_url": "https://api.github.com/users/dworvos/following{/other_user}", "gists_url": "https://api.github.com/users/dworvos/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/dworvos", "id": 14890988, "login": "dworvos", "node_id": "MDQ6VXNlcjE0ODkwOTg4", "organizations_url": "https://api.github.com/users/dworvos/orgs", "received_events_url": "https://api.github.com/users/dworvos/received_events", "repos_url": "https://api.github.com/users/dworvos/repos", "site_admin": false, "starred_url": "https://api.github.com/users/dworvos/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/dworvos/subscriptions", "type": "User", "url": "https://api.github.com/users/dworvos" }
[ { "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, Stac...
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" }
8
2019-08-29T14:26:55Z
2019-09-28T21:13:23Z
null
CONTRIBUTOR
null
#### Code Sample, a copy-pastable example if possible ```python import pandas as pd X = pd.DataFrame({ "count": [1, 2] }, index=["A", "B"]) Y = pd.DataFrame({"name": ["A", "C"], "value": [100, 200]}) Z = pd.merge(X, Y, left_index=True, right_on="name", how='left') print(Z.to_string()) # in 0.23.4 # count name value # 0 1 A 100.0 # 1 2 B NaN # in 0.24.2 # count name value # 0 1 A 100.0 # 1 2 B NaN # in 0.25.1 # count name value # 0.0 1 A 100.0 # NaN 2 B NaN assert isinstance(Z.index, pd.Int64Index) ``` #### Problem description I looked on the GitHub tracker for similar issues but the closest I found was #24897. In previous versions of pandas it would return a Int64Index but now returns a Float64Index. I didn't see this behaviour documented in the release notes of 0.25, but please let me know if I've missed it. This bug is easy to reproduce in a virtualenv. #### Expected Output ``` count name value 0 1 A 100.0 1 2 B NaN ``` #### Output of ``pd.show_versions()`` <details> INSTALLED VERSIONS ------------------ commit : None python : 3.6.3.final.0 python-bits : 64 OS : Linux OS-release : 3.10.0-957.el7.x86_64 machine : x86_64 processor : x86_64 byteorder : little LC_ALL : en_US.utf-8 LANG : en_US.utf-8 LOCALE : en_US.UTF-8 pandas : 0.25.1 numpy : 1.17.1 pytz : 2019.2 dateutil : 2.8.0 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 fastparquet : None gcsfs : None lxml.etree : None matplotlib : None numexpr : None odfpy : None openpyxl : None pandas_gbq : None pyarrow : None pytables : None s3fs : None scipy : None sqlalchemy : None tables : None xarray : None xlrd : None xlwt : None xlsxwriter : 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/28220/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28220/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/28221
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28221/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28221/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28221/events
https://github.com/pandas-dev/pandas/pull/28221
487,006,785
MDExOlB1bGxSZXF1ZXN0MzEyMzU3NDI3
28,221
Fix read of py27 pytables tz attribute, gh#26443
{ "avatar_url": "https://avatars.githubusercontent.com/u/2761822?v=4", "events_url": "https://api.github.com/users/quintusdias/events{/privacy}", "followers_url": "https://api.github.com/users/quintusdias/followers", "following_url": "https://api.github.com/users/quintusdias/following{/other_user}", "gists_url": "https://api.github.com/users/quintusdias/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/quintusdias", "id": 2761822, "login": "quintusdias", "node_id": "MDQ6VXNlcjI3NjE4MjI=", "organizations_url": "https://api.github.com/users/quintusdias/orgs", "received_events_url": "https://api.github.com/users/quintusdias/received_events", "repos_url": "https://api.github.com/users/quintusdias/repos", "site_admin": false, "starred_url": "https://api.github.com/users/quintusdias/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/quintusdias/subscriptions", "type": "User", "url": "https://api.github.com/users/quintusdias" }
[ { "color": "5319e7", "default": false, "description": "read_hdf, HDFStore", "id": 47229190, "name": "IO HDF5", "node_id": "MDU6TGFiZWw0NzIyOTE5MA==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20HDF5" } ]
closed
false
null
[]
{ "closed_at": "2020-01-30T12:18:05Z", "closed_issues": 2207, "created_at": "2012-09-13T02:13:00Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/329591?v=4", "events_url": "https://api.github.com/users/wesm/events{/privacy}", "followers_url": "https://api.github.com/users/wesm/followers", "following_url": "https://api.github.com/users/wesm/following{/other_user}", "gists_url": "https://api.github.com/users/wesm/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/wesm", "id": 329591, "login": "wesm", "node_id": "MDQ6VXNlcjMyOTU5MQ==", "organizations_url": "https://api.github.com/users/wesm/orgs", "received_events_url": "https://api.github.com/users/wesm/received_events", "repos_url": "https://api.github.com/users/wesm/repos", "site_admin": false, "starred_url": "https://api.github.com/users/wesm/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/wesm/subscriptions", "type": "User", "url": "https://api.github.com/users/wesm" }, "description": "on-merge: backport to 1.0.x", "due_on": "2020-02-01T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/16", "id": 174211, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16/labels", "node_id": "MDk6TWlsZXN0b25lMTc0MjEx", "number": 16, "open_issues": 0, "state": "closed", "title": "1.0.0", "updated_at": "2020-01-30T12:18:05Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16" }
2
2019-08-29T14:50:35Z
2019-08-30T17:08:34Z
2019-08-30T17:08:33Z
CONTRIBUTOR
null
When created by python 2.7, the "tz" attribute will be created with CSET H5T_CSET_ASCII instead of H5T_CSET_UTF8, therefore it is read as bytes when string is expected. - [ X] closes #26443 - [ X] tests added / passed - [ X] passes `black pandas` - [ X] passes `git diff upstream/master -u -- "*.py" | flake8 --diff` - [ X] whatsnew entry
{ "+1": 1, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 1, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28221/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28221/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/28221.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/28221", "merged_at": "2019-08-30T17:08:33Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/28221.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/28221" }
https://api.github.com/repos/pandas-dev/pandas/issues/28222
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28222/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28222/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28222/events
https://github.com/pandas-dev/pandas/issues/28222
487,062,989
MDU6SXNzdWU0ODcwNjI5ODk=
28,222
Implement str.contains for Dataframes so it can be used on multiple columns at once
{ "avatar_url": "https://avatars.githubusercontent.com/u/39884422?v=4", "events_url": "https://api.github.com/users/masangster/events{/privacy}", "followers_url": "https://api.github.com/users/masangster/followers", "following_url": "https://api.github.com/users/masangster/following{/other_user}", "gists_url": "https://api.github.com/users/masangster/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/masangster", "id": 39884422, "login": "masangster", "node_id": "MDQ6VXNlcjM5ODg0NDIy", "organizations_url": "https://api.github.com/users/masangster/orgs", "received_events_url": "https://api.github.com/users/masangster/received_events", "repos_url": "https://api.github.com/users/masangster/repos", "site_admin": false, "starred_url": "https://api.github.com/users/masangster/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/masangster/subscriptions", "type": "User", "url": "https://api.github.com/users/masangster" }
[]
closed
false
null
[]
null
3
2019-08-29T16:33:19Z
2019-08-30T07:46:22Z
2019-08-30T07:43:41Z
NONE
null
Hi all, I would like to be able to utilise str.contains to return a boolean of all of the cells in a DataFrame that at least partially match a certain string. Currently this can only be applied for a single column at a time as it is only implemented for Series, and my searching has not found an elegant solution for this over multiple columns simultaneously. Thanks!
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28222/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28222/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/28223
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28223/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28223/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28223/events
https://github.com/pandas-dev/pandas/pull/28223
487,116,771
MDExOlB1bGxSZXF1ZXN0MzEyNDQ1Mzcw
28,223
CLN: minor typos MutliIndex -> MultiIndex
{ "avatar_url": "https://avatars.githubusercontent.com/u/13159005?v=4", "events_url": "https://api.github.com/users/simonjayhawkins/events{/privacy}", "followers_url": "https://api.github.com/users/simonjayhawkins/followers", "following_url": "https://api.github.com/users/simonjayhawkins/following{/other_user}", "gists_url": "https://api.github.com/users/simonjayhawkins/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/simonjayhawkins", "id": 13159005, "login": "simonjayhawkins", "node_id": "MDQ6VXNlcjEzMTU5MDA1", "organizations_url": "https://api.github.com/users/simonjayhawkins/orgs", "received_events_url": "https://api.github.com/users/simonjayhawkins/received_events", "repos_url": "https://api.github.com/users/simonjayhawkins/repos", "site_admin": false, "starred_url": "https://api.github.com/users/simonjayhawkins/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/simonjayhawkins/subscriptions", "type": "User", "url": "https://api.github.com/users/simonjayhawkins" }
[ { "color": "207de5", "default": false, "description": null, "id": 211029535, "name": "Clean", "node_id": "MDU6TGFiZWwyMTEwMjk1MzU=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Clean" } ]
closed
false
null
[]
null
1
2019-08-29T18:42:15Z
2019-08-30T10:34:59Z
2019-08-29T19:28:55Z
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/28223/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28223/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/28223.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/28223", "merged_at": "2019-08-29T19:28:55Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/28223.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/28223" }
https://api.github.com/repos/pandas-dev/pandas/issues/28224
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28224/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28224/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28224/events
https://github.com/pandas-dev/pandas/pull/28224
487,147,119
MDExOlB1bGxSZXF1ZXN0MzEyNDcwMTk3
28,224
TYPING: add index and columns attributes to DataFrame
{ "avatar_url": "https://avatars.githubusercontent.com/u/13159005?v=4", "events_url": "https://api.github.com/users/simonjayhawkins/events{/privacy}", "followers_url": "https://api.github.com/users/simonjayhawkins/followers", "following_url": "https://api.github.com/users/simonjayhawkins/following{/other_user}", "gists_url": "https://api.github.com/users/simonjayhawkins/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/simonjayhawkins", "id": 13159005, "login": "simonjayhawkins", "node_id": "MDQ6VXNlcjEzMTU5MDA1", "organizations_url": "https://api.github.com/users/simonjayhawkins/orgs", "received_events_url": "https://api.github.com/users/simonjayhawkins/received_events", "repos_url": "https://api.github.com/users/simonjayhawkins/repos", "site_admin": false, "starred_url": "https://api.github.com/users/simonjayhawkins/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/simonjayhawkins/subscriptions", "type": "User", "url": "https://api.github.com/users/simonjayhawkins" }
[ { "color": "ea91a4", "default": false, "description": "type annotations, mypy/pyright type checking", "id": 1280988427, "name": "Typing", "node_id": "MDU6TGFiZWwxMjgwOTg4NDI3", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Typing" } ]
closed
false
null
[]
null
0
2019-08-29T19:54:52Z
2019-08-30T15:26:04Z
2019-08-30T15:26:04Z
MEMBER
null
diff for `mypy pandas --disallow-any-expr` ``` 2887,2888d2886 < pandas\io\formats\format.py:626: error: Expression has type "Any" < pandas\io\formats\format.py:651: error: Expression has type "Any" 2907,2909d2904 < pandas\io\formats\format.py:786: error: Expression has type "Any" < pandas\io\formats\format.py:789: error: Expression has type "Any" < pandas\io\formats\format.py:790: error: Expression has type "Any" 2922d2916 < pandas\io\formats\format.py:838: error: Expression has type "Any" 2944d2937 < pandas\io\formats\format.py:948: error: Expression has type "Any" 2970a2964,2979 > pandas\io\formats\format.py:976: error: Expression has type "Any" > pandas\io\formats\format.py:978: error: Expression type contains "Any" (has type "Iterator[Tuple[Any, Any]]") > pandas\io\formats\format.py:978: error: Expression has type "Any" > pandas\io\formats\format.py:978: error: Expression type contains "Any" (has type "Iterator[Any]") > pandas\io\formats\format.py:978: error: Expression type contains "Any" (has type "Callable[[Any], Any]") > pandas\io\formats\format.py:980: error: Expression type contains "Any" (has type "Tuple[int, Tuple[Any, Any]]") > pandas\io\formats\format.py:980: error: Expression type contains "Any" (has type "List[Any]") > pandas\io\formats\format.py:980: error: List comprehension has incompatible type List[List[Any]]; expected List[Tuple[Any, ...]] > pandas\io\formats\format.py:980: error: Expression has type "Any" > pandas\io\formats\format.py:980: error: Expression type contains "Any" (has type "Union[bool, Any]") > pandas\io\formats\format.py:980: error: Expression type contains "Any" (has type "Optional[Callable[..., Any]]") > pandas\io\formats\format.py:980: error: Expression type contains "Any" (has type "Dict[Any, Any]") > pandas\io\formats\format.py:981: error: Expression type contains "Any" (has type "Tuple[Any, Any]") > pandas\io\formats\format.py:981: error: Expression has type "Any" > pandas\io\formats\format.py:981: error: Expression type contains "Any" (has type "enumerate[Tuple[Any, Any]]") > pandas\io\formats\format.py:981: error: Expression type contains "Any" (has type "Iterator[Tuple[Any, Any]]") 2973,2976d2981 < pandas\io\formats\format.py:988: error: Expression has type "Any" < pandas\io\formats\format.py:992: error: Expression has type "Any" < pandas\io\formats\format.py:1006: error: Expression has type "Any" < pandas\io\formats\format.py:1007: error: Expression has type "Any" 2981a2987,2989 > pandas\io\formats\format.py:1018: error: Expression type contains "Any" (has type "List[Any]") > pandas\io\formats\format.py:1018: error: Expression has type "Any" > pandas\io\formats\format.py:1018: error: Expression type contains "Any" (has type "Optional[Callable[..., Any]]") 2989d2996 < pandas\io\formats\format.py:1044: error: Expression has type "Any" 3875d3881 < pandas\core\frame.py:2792: error: Expression has type "Any" 3929d3934 < pandas\core\frame.py:6255: error: Expression has type "Any" 4655,4657d4659 < pandas\io\formats\latex.py:56: error: Expression has type "Any" < pandas\io\formats\latex.py:59: error: Expression has type "Any" < pandas\io\formats\latex.py:60: error: Expression has type "Any" 4719d4720 < pandas\io\formats\html.py:93: error: Expression has type "Any" 4732d4732 < pandas\io\formats\html.py:201: error: Expression has type "Any" 5059d5058 < pandas\util\_doctools.py:184: error: Expression has type "Any" ```
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28224/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28224/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/28224.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/28224", "merged_at": null, "patch_url": "https://github.com/pandas-dev/pandas/pull/28224.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/28224" }
https://api.github.com/repos/pandas-dev/pandas/issues/28225
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28225/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28225/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28225/events
https://github.com/pandas-dev/pandas/pull/28225
487,172,601
MDExOlB1bGxSZXF1ZXN0MzEyNDkxNDM4
28,225
PERF: data = np.nan to speed up empty dataframe creation
{ "avatar_url": "https://avatars.githubusercontent.com/u/10552313?v=4", "events_url": "https://api.github.com/users/astyonax/events{/privacy}", "followers_url": "https://api.github.com/users/astyonax/followers", "following_url": "https://api.github.com/users/astyonax/following{/other_user}", "gists_url": "https://api.github.com/users/astyonax/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/astyonax", "id": 10552313, "login": "astyonax", "node_id": "MDQ6VXNlcjEwNTUyMzEz", "organizations_url": "https://api.github.com/users/astyonax/orgs", "received_events_url": "https://api.github.com/users/astyonax/received_events", "repos_url": "https://api.github.com/users/astyonax/repos", "site_admin": false, "starred_url": "https://api.github.com/users/astyonax/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/astyonax/subscriptions", "type": "User", "url": "https://api.github.com/users/astyonax" }
[ { "color": "a10c02", "default": false, "description": "Memory or execution speed performance", "id": 8935311, "name": "Performance", "node_id": "MDU6TGFiZWw4OTM1MzEx", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Performance" } ]
closed
false
null
[]
null
3
2019-08-29T20:57:08Z
2019-09-02T21:34:28Z
2019-09-02T21:34:28Z
NONE
null
- [x] closes #28188 - Short summary If we have enough information to know the shape of the final dataframe, we set the value of data to np.nan if not set. - Longer explanation If I understand correctly the `__init__` of DataFrame, with this change when the first if evaluates True then all following ifs evaluate False until we enter the else in [frame.py:459](https://github.com/pandas-dev/pandas/blob/03b3c8fc82b3a18a3ddcad1b3b26d601467fc74c/pandas/core/frame.py#L459), and we are done because now the dataframe is initialized with a ndarray. With the former behavior `data` defaults always to None, hence the output dataframe has all dtypes object and its creation is slow. With the proposed code the output dataframe has all dtypes float and is faster to create than before, but only when columns and index are given. I don't know how to loose the current restriction of `dtype=None`. It would be nice to have a function that verifies that a type is compatible with nan.
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28225/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28225/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/28225.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/28225", "merged_at": null, "patch_url": "https://github.com/pandas-dev/pandas/pull/28225.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/28225" }
https://api.github.com/repos/pandas-dev/pandas/issues/28226
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28226/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28226/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28226/events
https://github.com/pandas-dev/pandas/pull/28226
487,196,267
MDExOlB1bGxSZXF1ZXN0MzEyNTExMDU0
28,226
Don't fail when plotting Series/DataFrame with no row
{ "avatar_url": "https://avatars.githubusercontent.com/u/946727?v=4", "events_url": "https://api.github.com/users/randomstuff/events{/privacy}", "followers_url": "https://api.github.com/users/randomstuff/followers", "following_url": "https://api.github.com/users/randomstuff/following{/other_user}", "gists_url": "https://api.github.com/users/randomstuff/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/randomstuff", "id": 946727, "login": "randomstuff", "node_id": "MDQ6VXNlcjk0NjcyNw==", "organizations_url": "https://api.github.com/users/randomstuff/orgs", "received_events_url": "https://api.github.com/users/randomstuff/received_events", "repos_url": "https://api.github.com/users/randomstuff/repos", "site_admin": false, "starred_url": "https://api.github.com/users/randomstuff/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/randomstuff/subscriptions", "type": "User", "url": "https://api.github.com/users/randomstuff" }
[ { "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": "2020-01-30T12:18:05Z", "closed_issues": 2207, "created_at": "2012-09-13T02:13:00Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/329591?v=4", "events_url": "https://api.github.com/users/wesm/events{/privacy}", "followers_url": "https://api.github.com/users/wesm/followers", "following_url": "https://api.github.com/users/wesm/following{/other_user}", "gists_url": "https://api.github.com/users/wesm/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/wesm", "id": 329591, "login": "wesm", "node_id": "MDQ6VXNlcjMyOTU5MQ==", "organizations_url": "https://api.github.com/users/wesm/orgs", "received_events_url": "https://api.github.com/users/wesm/received_events", "repos_url": "https://api.github.com/users/wesm/repos", "site_admin": false, "starred_url": "https://api.github.com/users/wesm/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/wesm/subscriptions", "type": "User", "url": "https://api.github.com/users/wesm" }, "description": "on-merge: backport to 1.0.x", "due_on": "2020-02-01T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/16", "id": 174211, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16/labels", "node_id": "MDk6TWlsZXN0b25lMTc0MjEx", "number": 16, "open_issues": 0, "state": "closed", "title": "1.0.0", "updated_at": "2020-01-30T12:18:05Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16" }
4
2019-08-29T22:03:24Z
2020-04-29T23:16:03Z
2019-09-11T19:26:20Z
CONTRIBUTOR
null
When Series or DataFrames was empty (no cells) after removing columns without a suitable type (.select_dtypes), pandas was throwing a "no numeric data to plot" exception. This can happen: 1) either because there is no column with a suitable type; 2) or if there is no row. Raising an exception in the first case makes sense but we should probably avoid throwing an exception in the second case. - [X] closes #27758 - [x] tests added / passed - [X] passes `black pandas` - [X] passes `git diff upstream/master -u -- "*.py" | flake8 --diff` - [x] whatsnew entry
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28226/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28226/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/28226.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/28226", "merged_at": "2019-09-11T19:26:19Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/28226.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/28226" }
https://api.github.com/repos/pandas-dev/pandas/issues/28227
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28227/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28227/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28227/events
https://github.com/pandas-dev/pandas/pull/28227
487,215,351
MDExOlB1bGxSZXF1ZXN0MzEyNTI2NjU5
28,227
PERF: trim import time ~5%
{ "avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4", "events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}", "followers_url": "https://api.github.com/users/jbrockmendel/followers", "following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}", "gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jbrockmendel", "id": 8078968, "login": "jbrockmendel", "node_id": "MDQ6VXNlcjgwNzg5Njg=", "organizations_url": "https://api.github.com/users/jbrockmendel/orgs", "received_events_url": "https://api.github.com/users/jbrockmendel/received_events", "repos_url": "https://api.github.com/users/jbrockmendel/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions", "type": "User", "url": "https://api.github.com/users/jbrockmendel" }
[ { "color": "a10c02", "default": false, "description": "Memory or execution speed performance", "id": 8935311, "name": "Performance", "node_id": "MDU6TGFiZWw4OTM1MzEx", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Performance" } ]
closed
false
null
[]
{ "closed_at": "2020-01-30T12:18:05Z", "closed_issues": 2207, "created_at": "2012-09-13T02:13:00Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/329591?v=4", "events_url": "https://api.github.com/users/wesm/events{/privacy}", "followers_url": "https://api.github.com/users/wesm/followers", "following_url": "https://api.github.com/users/wesm/following{/other_user}", "gists_url": "https://api.github.com/users/wesm/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/wesm", "id": 329591, "login": "wesm", "node_id": "MDQ6VXNlcjMyOTU5MQ==", "organizations_url": "https://api.github.com/users/wesm/orgs", "received_events_url": "https://api.github.com/users/wesm/received_events", "repos_url": "https://api.github.com/users/wesm/repos", "site_admin": false, "starred_url": "https://api.github.com/users/wesm/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/wesm/subscriptions", "type": "User", "url": "https://api.github.com/users/wesm" }, "description": "on-merge: backport to 1.0.x", "due_on": "2020-02-01T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/16", "id": 174211, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16/labels", "node_id": "MDk6TWlsZXN0b25lMTc0MjEx", "number": 16, "open_issues": 0, "state": "closed", "title": "1.0.0", "updated_at": "2020-01-30T12:18:05Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16" }
16
2019-08-29T23:16:02Z
2019-09-05T16:02:56Z
2019-09-05T15:52:22Z
MEMBER
null
by avoiding/lazifying expensive stdlib imports. Exact timings are tough because repeated runs of `python3 -X importtime -c "import pandas as pd"` are really high variance, but my general read is that this trims about 35 ms out of about 650 ms.
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28227/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28227/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/28227.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/28227", "merged_at": "2019-09-05T15:52:22Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/28227.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/28227" }
https://api.github.com/repos/pandas-dev/pandas/issues/28228
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28228/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28228/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28228/events
https://github.com/pandas-dev/pandas/pull/28228
487,219,767
MDExOlB1bGxSZXF1ZXN0MzEyNTMwMjA5
28,228
PERF: lazify pytz seqToRE call, trims 35ms from import
{ "avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4", "events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}", "followers_url": "https://api.github.com/users/jbrockmendel/followers", "following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}", "gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jbrockmendel", "id": 8078968, "login": "jbrockmendel", "node_id": "MDQ6VXNlcjgwNzg5Njg=", "organizations_url": "https://api.github.com/users/jbrockmendel/orgs", "received_events_url": "https://api.github.com/users/jbrockmendel/received_events", "repos_url": "https://api.github.com/users/jbrockmendel/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions", "type": "User", "url": "https://api.github.com/users/jbrockmendel" }
[ { "color": "a10c02", "default": false, "description": "Memory or execution speed performance", "id": 8935311, "name": "Performance", "node_id": "MDU6TGFiZWw4OTM1MzEx", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Performance" }, { "color": "5319e7", "default"...
closed
false
null
[]
{ "closed_at": "2020-01-30T12:18:05Z", "closed_issues": 2207, "created_at": "2012-09-13T02:13:00Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/329591?v=4", "events_url": "https://api.github.com/users/wesm/events{/privacy}", "followers_url": "https://api.github.com/users/wesm/followers", "following_url": "https://api.github.com/users/wesm/following{/other_user}", "gists_url": "https://api.github.com/users/wesm/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/wesm", "id": 329591, "login": "wesm", "node_id": "MDQ6VXNlcjMyOTU5MQ==", "organizations_url": "https://api.github.com/users/wesm/orgs", "received_events_url": "https://api.github.com/users/wesm/received_events", "repos_url": "https://api.github.com/users/wesm/repos", "site_admin": false, "starred_url": "https://api.github.com/users/wesm/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/wesm/subscriptions", "type": "User", "url": "https://api.github.com/users/wesm" }, "description": "on-merge: backport to 1.0.x", "due_on": "2020-02-01T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/16", "id": 174211, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16/labels", "node_id": "MDk6TWlsZXN0b25lMTc0MjEx", "number": 16, "open_issues": 0, "state": "closed", "title": "1.0.0", "updated_at": "2020-01-30T12:18:05Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16" }
6
2019-08-29T23:35:37Z
2019-08-30T17:10:07Z
2019-08-30T16:38:40Z
MEMBER
null
Shaves on the order of 5% off of import time. Unrelated docstring fixups, improve typing on parse_timezone_directive and _calc_julian_from_V. The important thing here is setting the "Z" key dynamically in `__getitem__` instead of in `__init__` (since an instance is created in the module namespace at importt)
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28228/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28228/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/28228.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/28228", "merged_at": "2019-08-30T16:38:40Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/28228.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/28228" }
https://api.github.com/repos/pandas-dev/pandas/issues/28229
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28229/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28229/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28229/events
https://github.com/pandas-dev/pandas/pull/28229
487,230,008
MDExOlB1bGxSZXF1ZXN0MzEyNTM4NDU5
28,229
REGR: Fix to_csv with IntervalIndex
{ "avatar_url": "https://avatars.githubusercontent.com/u/5332445?v=4", "events_url": "https://api.github.com/users/jschendel/events{/privacy}", "followers_url": "https://api.github.com/users/jschendel/followers", "following_url": "https://api.github.com/users/jschendel/following{/other_user}", "gists_url": "https://api.github.com/users/jschendel/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jschendel", "id": 5332445, "login": "jschendel", "node_id": "MDQ6VXNlcjUzMzI0NDU=", "organizations_url": "https://api.github.com/users/jschendel/orgs", "received_events_url": "https://api.github.com/users/jschendel/received_events", "repos_url": "https://api.github.com/users/jschendel/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jschendel/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jschendel/subscriptions", "type": "User", "url": "https://api.github.com/users/jschendel" }
[ { "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": ...
closed
false
null
[]
{ "closed_at": "2019-10-19T17:01:24Z", "closed_issues": 52, "created_at": "2019-08-23T11:48:40Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/1312546?v=4", "events_url": "https://api.github.com/users/TomAugspurger/events{/privacy}", "followers_url": "https://api.github.com/users/TomAugspurger/followers", "following_url": "https://api.github.com/users/TomAugspurger/following{/other_user}", "gists_url": "https://api.github.com/users/TomAugspurger/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/TomAugspurger", "id": 1312546, "login": "TomAugspurger", "node_id": "MDQ6VXNlcjEzMTI1NDY=", "organizations_url": "https://api.github.com/users/TomAugspurger/orgs", "received_events_url": "https://api.github.com/users/TomAugspurger/received_events", "repos_url": "https://api.github.com/users/TomAugspurger/repos", "site_admin": false, "starred_url": "https://api.github.com/users/TomAugspurger/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/TomAugspurger/subscriptions", "type": "User", "url": "https://api.github.com/users/TomAugspurger" }, "description": "on-merge: backport to 0.25.x", "due_on": "2019-10-15T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/66", "id": 4597769, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/66/labels", "node_id": "MDk6TWlsZXN0b25lNDU5Nzc2OQ==", "number": 66, "open_issues": 0, "state": "closed", "title": "0.25.2", "updated_at": "2019-10-19T17:01:24Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/66" }
1
2019-08-30T00:25:14Z
2019-08-30T17:15:32Z
2019-08-30T14:32:28Z
MEMBER
null
- [X] closes #28210 - [X] tests added / passed - [X] passes `black pandas` - [X] passes `git diff upstream/master -u -- "*.py" | flake8 --diff` - [X] whatsnew entry
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28229/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28229/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/28229.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/28229", "merged_at": "2019-08-30T14:32:27Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/28229.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/28229" }
https://api.github.com/repos/pandas-dev/pandas/issues/28230
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28230/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28230/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28230/events
https://github.com/pandas-dev/pandas/pull/28230
487,416,090
MDExOlB1bGxSZXF1ZXN0MzEyNjg0NDcx
28,230
Improved benchmark coverage for reading spreadsheets
{ "avatar_url": "https://avatars.githubusercontent.com/u/13019221?v=4", "events_url": "https://api.github.com/users/f6v/events{/privacy}", "followers_url": "https://api.github.com/users/f6v/followers", "following_url": "https://api.github.com/users/f6v/following{/other_user}", "gists_url": "https://api.github.com/users/f6v/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/f6v", "id": 13019221, "login": "f6v", "node_id": "MDQ6VXNlcjEzMDE5MjIx", "organizations_url": "https://api.github.com/users/f6v/orgs", "received_events_url": "https://api.github.com/users/f6v/received_events", "repos_url": "https://api.github.com/users/f6v/repos", "site_admin": false, "starred_url": "https://api.github.com/users/f6v/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/f6v/subscriptions", "type": "User", "url": "https://api.github.com/users/f6v" }
[ { "color": "bfe5bf", "default": false, "description": "read_excel, to_excel", "id": 49254273, "name": "IO Excel", "node_id": "MDU6TGFiZWw0OTI1NDI3Mw==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20Excel" }, { "color": "ae68cc", "default": false, "de...
closed
false
null
[]
{ "closed_at": "2020-01-30T12:18:05Z", "closed_issues": 2207, "created_at": "2012-09-13T02:13:00Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/329591?v=4", "events_url": "https://api.github.com/users/wesm/events{/privacy}", "followers_url": "https://api.github.com/users/wesm/followers", "following_url": "https://api.github.com/users/wesm/following{/other_user}", "gists_url": "https://api.github.com/users/wesm/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/wesm", "id": 329591, "login": "wesm", "node_id": "MDQ6VXNlcjMyOTU5MQ==", "organizations_url": "https://api.github.com/users/wesm/orgs", "received_events_url": "https://api.github.com/users/wesm/received_events", "repos_url": "https://api.github.com/users/wesm/repos", "site_admin": false, "starred_url": "https://api.github.com/users/wesm/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/wesm/subscriptions", "type": "User", "url": "https://api.github.com/users/wesm" }, "description": "on-merge: backport to 1.0.x", "due_on": "2020-02-01T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/16", "id": 174211, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16/labels", "node_id": "MDk6TWlsZXN0b25lMTc0MjEx", "number": 16, "open_issues": 0, "state": "closed", "title": "1.0.0", "updated_at": "2020-01-30T12:18:05Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16" }
6
2019-08-30T10:40:51Z
2019-09-05T17:11:04Z
2019-09-05T17:10:54Z
CONTRIBUTOR
null
- [x] closes #27485 - [x] tests added / passed - [x] passes `black pandas` - [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff` AFAIK there's no writer for OpenDocument spreadsheet, so I came up with the minimal amount of code to generate the spreadsheet `odf` engine can read.
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28230/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28230/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/28230.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/28230", "merged_at": "2019-09-05T17:10:54Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/28230.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/28230" }
https://api.github.com/repos/pandas-dev/pandas/issues/28231
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28231/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28231/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28231/events
https://github.com/pandas-dev/pandas/issues/28231
487,467,243
MDU6SXNzdWU0ODc0NjcyNDM=
28,231
Update documentation on pd.read_excel, to reflect the fact that support for OpenDocument files is available
{ "avatar_url": "https://avatars.githubusercontent.com/u/28743936?v=4", "events_url": "https://api.github.com/users/marcelonp/events{/privacy}", "followers_url": "https://api.github.com/users/marcelonp/followers", "following_url": "https://api.github.com/users/marcelonp/following{/other_user}", "gists_url": "https://api.github.com/users/marcelonp/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/marcelonp", "id": 28743936, "login": "marcelonp", "node_id": "MDQ6VXNlcjI4NzQzOTM2", "organizations_url": "https://api.github.com/users/marcelonp/orgs", "received_events_url": "https://api.github.com/users/marcelonp/received_events", "repos_url": "https://api.github.com/users/marcelonp/repos", "site_admin": false, "starred_url": "https://api.github.com/users/marcelonp/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/marcelonp/subscriptions", "type": "User", "url": "https://api.github.com/users/marcelonp" }
[ { "color": "3465A4", "default": false, "description": null, "id": 134699, "name": "Docs", "node_id": "MDU6TGFiZWwxMzQ2OTk=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Docs" }, { "color": "bfe5bf", "default": false, "description": "read_excel, to_excel"...
closed
false
null
[]
{ "closed_at": null, "closed_issues": 786, "created_at": "2015-01-13T10:53:19Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4", "events_url": "https://api.github.com/users/jreback/events{/privacy}", "followers_url": "https://api.github.com/users/jreback/followers", "following_url": "https://api.github.com/users/jreback/following{/other_user}", "gists_url": "https://api.github.com/users/jreback/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jreback", "id": 953992, "login": "jreback", "node_id": "MDQ6VXNlcjk1Mzk5Mg==", "organizations_url": "https://api.github.com/users/jreback/orgs", "received_events_url": "https://api.github.com/users/jreback/received_events", "repos_url": "https://api.github.com/users/jreback/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jreback/subscriptions", "type": "User", "url": "https://api.github.com/users/jreback" }, "description": "Changes that would be nice to have in the next release. These issues are not blocking. They will be pushed to the next release if no one has time to fix them.", "due_on": null, "html_url": "https://github.com/pandas-dev/pandas/milestone/32", "id": 933188, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/32/labels", "node_id": "MDk6TWlsZXN0b25lOTMzMTg4", "number": 32, "open_issues": 1053, "state": "open", "title": "Contributions Welcome", "updated_at": "2021-11-21T00:50:06Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/32" }
1
2019-08-30T12:51:23Z
2019-09-05T18:03:57Z
2019-09-05T18:03:57Z
NONE
null
```python class ExcelFile: """ Class for parsing tabular excel sheets into DataFrame objects. Uses xlrd. See read_excel for more documentation Parameters ---------- io : string, path object (pathlib.Path or py._path.local.LocalPath), file-like object or xlrd workbook If a string or path object, expected to be a path to xls or xlsx file. engine : string, default None If io is not a buffer or path, this must be set to identify io. Acceptable values are None or ``xlrd``. """ from pandas.io.excel._odfreader import _ODFReader from pandas.io.excel._openpyxl import _OpenpyxlReader from pandas.io.excel._xlrd import _XlrdReader _engines = {"xlrd": _XlrdReader, "openpyxl": _OpenpyxlReader, "odf": _ODFReader} ``` #### Problem description I was searching for support for reading _.ods_ files, and upon reading the documentation for _read_excel_ and IO related functions, I found nothing. When I was about to search for another library, I discovered that support had already been added to the _read_excel_ function (as of #2311), but the docs weren't updated, either in _ExcelFile_, or in the _read_excel_ function, and as suggested when creating the issue https://pandas-docs.github.io/pandas-docs-travis/ also wasn't. I also didn't find any related issue regarding this. I might be missing something, since it is my first issue, sorry about that if it's the case. I'd suggest even something along the lines of: ``` Parameters ---------- io : string, path object (pathlib.Path or py._path.local.LocalPath), file-like object or xlrd workbook If a string or path object, expected to be a path to xls or xlsx file. engine : string, default None If io is not a buffer or path, this must be set to identify io. Acceptable values are None, ``xlrd``, ``openpyxl`` or ``odf``. Note that ``odf`` reads tables out of OpenDocument formatted files. """ ``` for both _ExcelFile_ and _read_excel_. That would make visible that support for other engines is available. Thanks.
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28231/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28231/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/28232
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28232/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28232/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28232/events
https://github.com/pandas-dev/pandas/pull/28232
487,515,752
MDExOlB1bGxSZXF1ZXN0MzEyNzY1OTE5
28,232
Backport PR #28229 on branch 0.25.x (REGR: Fix to_csv with IntervalIndex)
{ "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" }
[]
closed
false
null
[]
{ "closed_at": "2019-10-19T17:01:24Z", "closed_issues": 52, "created_at": "2019-08-23T11:48:40Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/1312546?v=4", "events_url": "https://api.github.com/users/TomAugspurger/events{/privacy}", "followers_url": "https://api.github.com/users/TomAugspurger/followers", "following_url": "https://api.github.com/users/TomAugspurger/following{/other_user}", "gists_url": "https://api.github.com/users/TomAugspurger/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/TomAugspurger", "id": 1312546, "login": "TomAugspurger", "node_id": "MDQ6VXNlcjEzMTI1NDY=", "organizations_url": "https://api.github.com/users/TomAugspurger/orgs", "received_events_url": "https://api.github.com/users/TomAugspurger/received_events", "repos_url": "https://api.github.com/users/TomAugspurger/repos", "site_admin": false, "starred_url": "https://api.github.com/users/TomAugspurger/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/TomAugspurger/subscriptions", "type": "User", "url": "https://api.github.com/users/TomAugspurger" }, "description": "on-merge: backport to 0.25.x", "due_on": "2019-10-15T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/66", "id": 4597769, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/66/labels", "node_id": "MDk6TWlsZXN0b25lNDU5Nzc2OQ==", "number": 66, "open_issues": 0, "state": "closed", "title": "0.25.2", "updated_at": "2019-10-19T17:01:24Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/66" }
0
2019-08-30T14:32:57Z
2019-08-30T16:55:06Z
2019-08-30T16:55:06Z
NONE
null
Backport PR #28229: REGR: Fix to_csv with IntervalIndex
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28232/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28232/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/28232.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/28232", "merged_at": "2019-08-30T16:55:06Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/28232.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/28232" }
https://api.github.com/repos/pandas-dev/pandas/issues/28233
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28233/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28233/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28233/events
https://github.com/pandas-dev/pandas/pull/28233
487,585,514
MDExOlB1bGxSZXF1ZXN0MzEyODE4Nzg2
28,233
Backport PR #28216 on branch 0.25.x (REGR: <th> tags for notebook display closes #28204)
{ "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" }
[]
closed
false
null
[]
{ "closed_at": "2019-10-19T17:01:24Z", "closed_issues": 52, "created_at": "2019-08-23T11:48:40Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/1312546?v=4", "events_url": "https://api.github.com/users/TomAugspurger/events{/privacy}", "followers_url": "https://api.github.com/users/TomAugspurger/followers", "following_url": "https://api.github.com/users/TomAugspurger/following{/other_user}", "gists_url": "https://api.github.com/users/TomAugspurger/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/TomAugspurger", "id": 1312546, "login": "TomAugspurger", "node_id": "MDQ6VXNlcjEzMTI1NDY=", "organizations_url": "https://api.github.com/users/TomAugspurger/orgs", "received_events_url": "https://api.github.com/users/TomAugspurger/received_events", "repos_url": "https://api.github.com/users/TomAugspurger/repos", "site_admin": false, "starred_url": "https://api.github.com/users/TomAugspurger/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/TomAugspurger/subscriptions", "type": "User", "url": "https://api.github.com/users/TomAugspurger" }, "description": "on-merge: backport to 0.25.x", "due_on": "2019-10-15T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/66", "id": 4597769, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/66/labels", "node_id": "MDk6TWlsZXN0b25lNDU5Nzc2OQ==", "number": 66, "open_issues": 0, "state": "closed", "title": "0.25.2", "updated_at": "2019-10-19T17:01:24Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/66" }
0
2019-08-30T17:07:00Z
2019-08-30T18:34:44Z
2019-08-30T18:34:44Z
NONE
null
Backport PR #28216: REGR: <th> tags for notebook display closes #28204
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28233/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28233/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/28233.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/28233", "merged_at": "2019-08-30T18:34:44Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/28233.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/28233" }
https://api.github.com/repos/pandas-dev/pandas/issues/28234
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28234/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28234/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28234/events
https://github.com/pandas-dev/pandas/issues/28234
487,593,387
MDU6SXNzdWU0ODc1OTMzODc=
28,234
.to_csv in jupyter notebook giving "unexpected keyword argument 'tupleize_cols' " error
{ "avatar_url": "https://avatars.githubusercontent.com/u/31568751?v=4", "events_url": "https://api.github.com/users/YvesJacquot/events{/privacy}", "followers_url": "https://api.github.com/users/YvesJacquot/followers", "following_url": "https://api.github.com/users/YvesJacquot/following{/other_user}", "gists_url": "https://api.github.com/users/YvesJacquot/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/YvesJacquot", "id": 31568751, "login": "YvesJacquot", "node_id": "MDQ6VXNlcjMxNTY4NzUx", "organizations_url": "https://api.github.com/users/YvesJacquot/orgs", "received_events_url": "https://api.github.com/users/YvesJacquot/received_events", "repos_url": "https://api.github.com/users/YvesJacquot/repos", "site_admin": false, "starred_url": "https://api.github.com/users/YvesJacquot/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/YvesJacquot/subscriptions", "type": "User", "url": "https://api.github.com/users/YvesJacquot" }
[]
closed
false
null
[]
null
9
2019-08-30T17:27:45Z
2019-09-02T09:57:38Z
2019-08-30T17:33:53Z
NONE
null
#### Code Sample ``` # df.to_csv('output_file.csv') ``` #### Problem description In Jupyter notebook, the to_csv method does not work anymore since I upgraded pandas to version 0.25.1 It gives the following error message: > TypeError: __init__() got an unexpected keyword argument 'tupleize_cols' #### Output of ``pd.show_versions()`` <details> commit : None python : 3.6.3.final.0 python-bits : 64 OS : Darwin OS-release : 17.7.0 machine : x86_64 processor : i386 byteorder : little LC_ALL : None LANG : en_GB.UTF-8 LOCALE : en_GB.UTF-8 pandas : 0.25.1 numpy : 1.17.1 pytz : 2018.9 dateutil : 2.6.1 pip : 19.2.3 setuptools : 41.1.0 Cython : None pytest : 3.3.1 hypothesis : None sphinx : None blosc : None feather : None xlsxwriter : None lxml.etree : 4.3.3 html5lib : 1.0.1 pymysql : None psycopg2 : None jinja2 : 2.10 IPython : 6.2.1 pandas_datareader: None bs4 : 4.7.1 bottleneck : 1.2.1 fastparquet : None gcsfs : None lxml.etree : 4.3.3 matplotlib : 3.0.2 numexpr : None odfpy : None openpyxl : None pandas_gbq : 0.11.0 pyarrow : None pytables : None s3fs : None scipy : 1.2.1 sqlalchemy : None tables : None xarray : None xlrd : 1.2.0 xlwt : None xlsxwriter : 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/28234/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28234/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/28235
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28235/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28235/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28235/events
https://github.com/pandas-dev/pandas/issues/28235
487,633,330
MDU6SXNzdWU0ODc2MzMzMzA=
28,235
pandas._lib.testing.assert_almost_equal seem to not use approximate equality for Series with complex doubles
{ "avatar_url": "https://avatars.githubusercontent.com/u/21087696?v=4", "events_url": "https://api.github.com/users/oleksandr-pavlyk/events{/privacy}", "followers_url": "https://api.github.com/users/oleksandr-pavlyk/followers", "following_url": "https://api.github.com/users/oleksandr-pavlyk/following{/other_user}", "gists_url": "https://api.github.com/users/oleksandr-pavlyk/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/oleksandr-pavlyk", "id": 21087696, "login": "oleksandr-pavlyk", "node_id": "MDQ6VXNlcjIxMDg3Njk2", "organizations_url": "https://api.github.com/users/oleksandr-pavlyk/orgs", "received_events_url": "https://api.github.com/users/oleksandr-pavlyk/received_events", "repos_url": "https://api.github.com/users/oleksandr-pavlyk/repos", "site_admin": false, "starred_url": "https://api.github.com/users/oleksandr-pavlyk/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/oleksandr-pavlyk/subscriptions", "type": "User", "url": "https://api.github.com/users/oleksandr-pavlyk" }
[ { "color": "C4A000", "default": false, "description": "pandas testing functions or related to the test suite", "id": 127685, "name": "Testing", "node_id": "MDU6TGFiZWwxMjc2ODU=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Testing" }, { "color": "009800", "d...
closed
false
null
[]
{ "closed_at": "2020-12-26T13:57:50Z", "closed_issues": 1768, "created_at": "2020-05-29T23:47:32Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4", "events_url": "https://api.github.com/users/jreback/events{/privacy}", "followers_url": "https://api.github.com/users/jreback/followers", "following_url": "https://api.github.com/users/jreback/following{/other_user}", "gists_url": "https://api.github.com/users/jreback/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jreback", "id": 953992, "login": "jreback", "node_id": "MDQ6VXNlcjk1Mzk5Mg==", "organizations_url": "https://api.github.com/users/jreback/orgs", "received_events_url": "https://api.github.com/users/jreback/received_events", "repos_url": "https://api.github.com/users/jreback/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jreback/subscriptions", "type": "User", "url": "https://api.github.com/users/jreback" }, "description": "on-merge: backport to 1.2.x", "due_on": "2020-12-15T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/73", "id": 5479819, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/73/labels", "node_id": "MDk6TWlsZXN0b25lNTQ3OTgxOQ==", "number": 73, "open_issues": 0, "state": "closed", "title": "1.2", "updated_at": "2021-04-13T15:46:43Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/73" }
4
2019-08-30T19:14:39Z
2020-10-01T17:52:14Z
2020-10-01T17:52:14Z
NONE
null
#### Code Sample, a copy-pastable example if possible ```python import numpy as np import pandas as pd from pandas.util.testing import assert_almost_equal e1 = np.array([0.5831076580182805, -0.9083518696779991], 'd') e2 = np.array([0.5831076580182805, -0.9083518696779992], 'd') e1z = np.asanyarray(e1, np.complex128) e2z = np.asanyarray(e2, np.complex128) assert_almost_equal(pd.Series(e1), pd.Series(e2)) # gives True as expected assert_almost_equal(pd.Series(e1z), pd.Series(e2z)) # unexpectedly fails # both of equivalent tests on NumPy side pass np.testing.assert_almost_equal(e1, e2) np.testing.assert_almost_equal(e1z, e2z) ``` #### Problem description When running tests on MacOSX with Pandas 0.25.1, the test `pandas.tests.computation.test_eval.TestMathNumExprPandas::test_result_complex128` fails because of this issue. #### Expected Output It is expected that `pandas._lib.testing.assert_almost_equal` would use `np.testing.assert_almost_equal` for all `np.floating` and `np.complexfloating` dtypes. #### Output of ``pd.show_versions()`` <details> ``` In [4]: pd.show_versions() INSTALLED VERSIONS ------------------ commit : None python : 3.6.9.final.0 python-bits : 64 OS : Darwin OS-release : 15.4.0 machine : x86_64 processor : i386 byteorder : little LC_ALL : en_US.UTF-8 LANG : en_US.UTF-8 LOCALE : en_US.UTF-8 pandas : 0.25.1 numpy : 1.17.1 pytz : 2019.1 dateutil : 2.8.0 pip : 19.1.1 setuptools : 41.0.1.post20190716 Cython : None pytest : 3.8.1 hypothesis : 3.68.0 sphinx : None blosc : None feather : None xlsxwriter : None lxml.etree : None html5lib : None pymysql : None psycopg2 : None jinja2 : None IPython : 6.3.1 pandas_datareader: None bs4 : None bottleneck : None fastparquet : None gcsfs : None lxml.etree : None matplotlib : 3.1.1 numexpr : 2.7.0 odfpy : None openpyxl : None pandas_gbq : None pyarrow : None pytables : None s3fs : None scipy : None sqlalchemy : None tables : None xarray : None xlrd : None xlwt : None xlsxwriter : 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/28235/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28235/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/28236
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28236/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28236/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28236/events
https://github.com/pandas-dev/pandas/issues/28236
487,642,971
MDU6SXNzdWU0ODc2NDI5NzE=
28,236
seed isort known_third_party pre-commit hook
{ "avatar_url": "https://avatars.githubusercontent.com/u/1312546?v=4", "events_url": "https://api.github.com/users/TomAugspurger/events{/privacy}", "followers_url": "https://api.github.com/users/TomAugspurger/followers", "following_url": "https://api.github.com/users/TomAugspurger/following{/other_user}", "gists_url": "https://api.github.com/users/TomAugspurger/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/TomAugspurger", "id": 1312546, "login": "TomAugspurger", "node_id": "MDQ6VXNlcjEzMTI1NDY=", "organizations_url": "https://api.github.com/users/TomAugspurger/orgs", "received_events_url": "https://api.github.com/users/TomAugspurger/received_events", "repos_url": "https://api.github.com/users/TomAugspurger/repos", "site_admin": false, "starred_url": "https://api.github.com/users/TomAugspurger/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/TomAugspurger/subscriptions", "type": "User", "url": "https://api.github.com/users/TomAugspurger" }
[ { "color": "a2bca7", "default": false, "description": "Continuous Integration", "id": 48070600, "name": "CI", "node_id": "MDU6TGFiZWw0ODA3MDYwMA==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/CI" } ]
closed
false
null
[]
{ "closed_at": "2020-01-30T12:18:05Z", "closed_issues": 2207, "created_at": "2012-09-13T02:13:00Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/329591?v=4", "events_url": "https://api.github.com/users/wesm/events{/privacy}", "followers_url": "https://api.github.com/users/wesm/followers", "following_url": "https://api.github.com/users/wesm/following{/other_user}", "gists_url": "https://api.github.com/users/wesm/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/wesm", "id": 329591, "login": "wesm", "node_id": "MDQ6VXNlcjMyOTU5MQ==", "organizations_url": "https://api.github.com/users/wesm/orgs", "received_events_url": "https://api.github.com/users/wesm/received_events", "repos_url": "https://api.github.com/users/wesm/repos", "site_admin": false, "starred_url": "https://api.github.com/users/wesm/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/wesm/subscriptions", "type": "User", "url": "https://api.github.com/users/wesm" }, "description": "on-merge: backport to 1.0.x", "due_on": "2020-02-01T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/16", "id": 174211, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16/labels", "node_id": "MDk6TWlsZXN0b25lMTc0MjEx", "number": 16, "open_issues": 0, "state": "closed", "title": "1.0.0", "updated_at": "2020-01-30T12:18:05Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16" }
0
2019-08-30T19:42:38Z
2019-09-04T11:26:12Z
2019-09-04T11:26:12Z
CONTRIBUTOR
null
@basnijholt question on this. When making changes in https://github.com/pandas-dev/pandas/pull/28164, seed_isort_known_third_party wants to make the following changes. ``` diff --git a/setup.cfg b/setup.cfg index 43dbac15f5..227defcfe8 100644 --- a/setup.cfg +++ b/setup.cfg @@ -116,7 +116,7 @@ known_dtypes = pandas.core.dtypes known_post_core = pandas.tseries,pandas.io,pandas.plotting sections = FUTURE,STDLIB,THIRDPARTY,PRE_LIBS,PRE_CORE,DTYPES,FIRSTPARTY,POST_CORE,LOCALFOLDER known_first_party = pandas -known_third_party = _pytest,announce,dateutil,docutils,flake8,git,hypothesis,jinja2,lxml,matplotlib,numpy,numpydoc,pkg_resources,pyarrow,pytest,pytz,requests,scipy,setuptools,sphinx,sqlalchemy,validate_docstrings,yaml +known_third_party = announce,dateutil,docutils,flake8,git,hypothesis,jinja2,lxml,matplotlib,numpy,numpydoc,pkg_resources,pyarrow,pytest,pytz,requests,scipy,setuptools,sphinx,sqlalchemy,validate_docstrings,yaml multi_line_output = 3 include_trailing_comma = True force_grid_wrap = 0 ``` Is that expected? It also takes quite a while to run (5ish seconds). Is that expected?
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28236/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28236/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/28237
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28237/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28237/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28237/events
https://github.com/pandas-dev/pandas/pull/28237
487,647,396
MDExOlB1bGxSZXF1ZXN0MzEyODY1MzM0
28,237
fix DatetimeIndex.tz_localize examples docstring
{ "avatar_url": "https://avatars.githubusercontent.com/u/4383303?v=4", "events_url": "https://api.github.com/users/wholmgren/events{/privacy}", "followers_url": "https://api.github.com/users/wholmgren/followers", "following_url": "https://api.github.com/users/wholmgren/following{/other_user}", "gists_url": "https://api.github.com/users/wholmgren/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/wholmgren", "id": 4383303, "login": "wholmgren", "node_id": "MDQ6VXNlcjQzODMzMDM=", "organizations_url": "https://api.github.com/users/wholmgren/orgs", "received_events_url": "https://api.github.com/users/wholmgren/received_events", "repos_url": "https://api.github.com/users/wholmgren/repos", "site_admin": false, "starred_url": "https://api.github.com/users/wholmgren/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/wholmgren/subscriptions", "type": "User", "url": "https://api.github.com/users/wholmgren" }
[ { "color": "3465A4", "default": false, "description": null, "id": 134699, "name": "Docs", "node_id": "MDU6TGFiZWwxMzQ2OTk=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Docs" } ]
closed
false
null
[]
{ "closed_at": "2020-01-30T12:18:05Z", "closed_issues": 2207, "created_at": "2012-09-13T02:13:00Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/329591?v=4", "events_url": "https://api.github.com/users/wesm/events{/privacy}", "followers_url": "https://api.github.com/users/wesm/followers", "following_url": "https://api.github.com/users/wesm/following{/other_user}", "gists_url": "https://api.github.com/users/wesm/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/wesm", "id": 329591, "login": "wesm", "node_id": "MDQ6VXNlcjMyOTU5MQ==", "organizations_url": "https://api.github.com/users/wesm/orgs", "received_events_url": "https://api.github.com/users/wesm/received_events", "repos_url": "https://api.github.com/users/wesm/repos", "site_admin": false, "starred_url": "https://api.github.com/users/wesm/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/wesm/subscriptions", "type": "User", "url": "https://api.github.com/users/wesm" }, "description": "on-merge: backport to 1.0.x", "due_on": "2020-02-01T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/16", "id": 174211, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16/labels", "node_id": "MDk6TWlsZXN0b25lMTc0MjEx", "number": 16, "open_issues": 0, "state": "closed", "title": "1.0.0", "updated_at": "2020-01-30T12:18:05Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16" }
1
2019-08-30T19:56:23Z
2019-08-30T21:04:20Z
2019-08-30T20:54:02Z
CONTRIBUTOR
null
[DatetimeIndex.tz_localize](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DatetimeIndex.tz_localize.html#pandas.DatetimeIndex.tz_localize) doc string has improperly formatted examples near the bottom. Trivial fix, so didn't think it needed an issue or whatsnew entry, but happy to add if needed. Now looks like: <img width="765" alt="Screen Shot 2019-08-30 at 12 55 16 PM" src="https://user-images.githubusercontent.com/4383303/64048047-73e31080-cb25-11e9-9266-ef721bc2600b.png"> - [ ] closes #xxxx - [ ] tests added / passed - [ ] passes `black pandas` - [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff` - [ ] whatsnew entry
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28237/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28237/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/28237.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/28237", "merged_at": "2019-08-30T20:54:02Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/28237.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/28237" }
https://api.github.com/repos/pandas-dev/pandas/issues/28238
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28238/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28238/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28238/events
https://github.com/pandas-dev/pandas/issues/28238
487,691,194
MDU6SXNzdWU0ODc2OTExOTQ=
28,238
pd.to_datetime() fails for KeyError when raising monotonic increasing index ValueError
{ "avatar_url": "https://avatars.githubusercontent.com/u/2701562?v=4", "events_url": "https://api.github.com/users/dragoljub/events{/privacy}", "followers_url": "https://api.github.com/users/dragoljub/followers", "following_url": "https://api.github.com/users/dragoljub/following{/other_user}", "gists_url": "https://api.github.com/users/dragoljub/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/dragoljub", "id": 2701562, "login": "dragoljub", "node_id": "MDQ6VXNlcjI3MDE1NjI=", "organizations_url": "https://api.github.com/users/dragoljub/orgs", "received_events_url": "https://api.github.com/users/dragoljub/received_events", "repos_url": "https://api.github.com/users/dragoljub/repos", "site_admin": false, "starred_url": "https://api.github.com/users/dragoljub/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/dragoljub/subscriptions", "type": "User", "url": "https://api.github.com/users/dragoljub" }
[ { "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": "0e8a16", "default": true, "description": null, "...
closed
false
{ "avatar_url": "https://avatars.githubusercontent.com/u/12675558?v=4", "events_url": "https://api.github.com/users/usersblock/events{/privacy}", "followers_url": "https://api.github.com/users/usersblock/followers", "following_url": "https://api.github.com/users/usersblock/following{/other_user}", "gists_url": "https://api.github.com/users/usersblock/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/usersblock", "id": 12675558, "login": "usersblock", "node_id": "MDQ6VXNlcjEyNjc1NTU4", "organizations_url": "https://api.github.com/users/usersblock/orgs", "received_events_url": "https://api.github.com/users/usersblock/received_events", "repos_url": "https://api.github.com/users/usersblock/repos", "site_admin": false, "starred_url": "https://api.github.com/users/usersblock/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/usersblock/subscriptions", "type": "User", "url": "https://api.github.com/users/usersblock" }
[ { "avatar_url": "https://avatars.githubusercontent.com/u/12675558?v=4", "events_url": "https://api.github.com/users/usersblock/events{/privacy}", "followers_url": "https://api.github.com/users/usersblock/followers", "following_url": "https://api.github.com/users/usersblock/following{/other_user}", ...
{ "closed_at": null, "closed_issues": 1203, "created_at": "2021-06-09T18:28:42Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4", "events_url": "https://api.github.com/users/jreback/events{/privacy}", "followers_url": "https://api.github.com/users/jreback/followers", "following_url": "https://api.github.com/users/jreback/following{/other_user}", "gists_url": "https://api.github.com/users/jreback/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jreback", "id": 953992, "login": "jreback", "node_id": "MDQ6VXNlcjk1Mzk5Mg==", "organizations_url": "https://api.github.com/users/jreback/orgs", "received_events_url": "https://api.github.com/users/jreback/received_events", "repos_url": "https://api.github.com/users/jreback/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jreback/subscriptions", "type": "User", "url": "https://api.github.com/users/jreback" }, "description": "", "due_on": "2021-12-31T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/86", "id": 6840253, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels", "node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==", "number": 86, "open_issues": 77, "state": "open", "title": "1.4", "updated_at": "2021-11-21T02:34:31Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86" }
8
2019-08-30T22:24:55Z
2021-07-25T14:07:02Z
2021-07-25T14:07:02Z
NONE
null
#### Code Sample, a copy-pastable example if possible ```python import pandas as pd import numpy as np from datetime import datetime times = pd.date_range(datetime.now(), periods=1000, freq='h') times = times.to_frame(index=False, name='DT').sample(1000) times.index = times.index.to_series().astype(float)/1000 pd.to_datetime(times.iloc[:, 0]) # <-- Fails pd.to_datetime(times.reset_index(drop=True).iloc[:, 0]) # <-- Reset index to sorted int works ``` #### Problem description Sometimes during data processing after pivoting or sampling data you may end up with a float index that is not sorted. When you try to convert a series which happens to have an unsorted float index to a DateTime, a ValueError followed by KeyError occurs. Also, this only happens for a series with 60 elements or more. There may be differences in code path for larger frames. ```python --------------------------------------------------------------------------- ValueError Traceback (most recent call last) D:\Python37\lib\site-packages\pandas\core\indexes\base.py in get_slice_bound(self, label, side, kind) 5159 try: -> 5160 return self._searchsorted_monotonic(label, side) 5161 except ValueError: D:\Python37\lib\site-packages\pandas\core\indexes\base.py in _searchsorted_monotonic(self, label, side) 5120 -> 5121 raise ValueError("index must be monotonic increasing or decreasing") 5122 ValueError: index must be monotonic increasing or decreasing During handling of the above exception, another exception occurred: KeyError Traceback (most recent call last) <ipython-input-67-ffc7a0542f03> in <module> ----> 1 pd.to_datetime(times.iloc[:, 0]) D:\Python37\lib\site-packages\pandas\util\_decorators.py in wrapper(*args, **kwargs) 206 else: 207 kwargs[new_arg_name] = new_arg_value --> 208 return func(*args, **kwargs) 209 210 return wrapper D:\Python37\lib\site-packages\pandas\core\tools\datetimes.py in to_datetime(arg, errors, dayfirst, yearfirst, utc, box, format, exact, unit, infer_datetime_format, origin, cache) 769 result = result.tz_localize(tz) 770 elif isinstance(arg, ABCSeries): --> 771 cache_array = _maybe_cache(arg, format, cache, convert_listlike) 772 if not cache_array.empty: 773 result = arg.map(cache_array) D:\Python37\lib\site-packages\pandas\core\tools\datetimes.py in _maybe_cache(arg, format, cache, convert_listlike) 149 if cache: 150 # Perform a quicker unique check --> 151 if not should_cache(arg): 152 return cache_array 153 D:\Python37\lib\site-packages\pandas\core\tools\datetimes.py in should_cache(arg, unique_share, check_count) 119 assert 0 < unique_share < 1, "unique_share must be in next bounds: (0; 1)" 120 --> 121 unique_elements = unique(arg[:check_count]) 122 if len(unique_elements) > check_count * unique_share: 123 do_caching = False D:\Python37\lib\site-packages\pandas\core\series.py in __getitem__(self, key) 1104 key = check_bool_indexer(self.index, key) 1105 -> 1106 return self._get_with(key) 1107 1108 def _get_with(self, key): D:\Python37\lib\site-packages\pandas\core\series.py in _get_with(self, key) 1109 # other: fancy integer or otherwise 1110 if isinstance(key, slice): -> 1111 indexer = self.index._convert_slice_indexer(key, kind="getitem") 1112 return self._get_values(indexer) 1113 elif isinstance(key, ABCDataFrame): D:\Python37\lib\site-packages\pandas\core\indexes\numeric.py in _convert_slice_indexer(self, key, kind) 395 396 # translate to locations --> 397 return self.slice_indexer(key.start, key.stop, key.step, kind=kind) 398 399 def _format_native_types( D:\Python37\lib\site-packages\pandas\core\indexes\base.py in slice_indexer(self, start, end, step, kind) 5025 slice(1, 3) 5026 """ -> 5027 start_slice, end_slice = self.slice_locs(start, end, step=step, kind=kind) 5028 5029 # return a slice D:\Python37\lib\site-packages\pandas\core\indexes\base.py in slice_locs(self, start, end, step, kind) 5245 end_slice = None 5246 if end is not None: -> 5247 end_slice = self.get_slice_bound(end, "right", kind) 5248 if end_slice is None: 5249 end_slice = len(self) D:\Python37\lib\site-packages\pandas\core\indexes\base.py in get_slice_bound(self, label, side, kind) 5161 except ValueError: 5162 # raise the original KeyError -> 5163 raise err 5164 5165 if isinstance(slc, np.ndarray): D:\Python37\lib\site-packages\pandas\core\indexes\base.py in get_slice_bound(self, label, side, kind) 5155 # we need to look up the label 5156 try: -> 5157 slc = self.get_loc(label) 5158 except KeyError as err: 5159 try: D:\Python37\lib\site-packages\pandas\core\indexes\numeric.py in get_loc(self, key, method, tolerance) 477 except (TypeError, NotImplementedError): 478 pass --> 479 return super().get_loc(key, method=method, tolerance=tolerance) 480 481 @cache_readonly D:\Python37\lib\site-packages\pandas\core\indexes\base.py in get_loc(self, key, method, tolerance) 2890 return self._engine.get_loc(key) 2891 except KeyError: -> 2892 return self._engine.get_loc(self._maybe_cast_indexer(key)) 2893 indexer = self.get_indexer([key], method=method, tolerance=tolerance) 2894 if indexer.ndim > 1 or indexer.size > 1: pandas\_libs\index.pyx in pandas._libs.index.IndexEngine.get_loc() pandas\_libs\index.pyx in pandas._libs.index.IndexEngine.get_loc() pandas\_libs\hashtable_class_helper.pxi in pandas._libs.hashtable.Float64HashTable.get_item() pandas\_libs\hashtable_class_helper.pxi in pandas._libs.hashtable.Float64HashTable.get_item() KeyError: 100.0 ``` #### Expected Output Ideally it could create the DateTime series regardless of the state of the index. Perhaps users want to keep an unsorted float index and just want to cast to DateTime. #### Output of ``pd.show_versions()`` <details> INSTALLED VERSIONS ------------------ commit : None python : 3.7.1.final.0 python-bits : 64 OS : Windows OS-release : 2008ServerR2 machine : AMD64 processor : Intel64 Family 6 Model 45 Stepping 7, GenuineIntel byteorder : little LC_ALL : None LANG : None LOCALE : None.None pandas : 0.25.0 numpy : 1.17.0 pytz : 2019.2 dateutil : 2.8.0 pip : 19.2.2 setuptools : 41.1.0 Cython : 0.29.13 pytest : 5.0.1 hypothesis : None sphinx : 2.1.2 blosc : 1.8.1 feather : None xlsxwriter : None lxml.etree : 4.4.1 html5lib : 1.0.1 pymysql : None psycopg2 : None jinja2 : 2.10.1 IPython : 7.7.0 pandas_datareader: None bs4 : 4.8.0 bottleneck : 1.2.1 fastparquet : 0.3.2 gcsfs : None lxml.etree : 4.4.1 matplotlib : 3.1.1 numexpr : 2.7.0 odfpy : None openpyxl : 2.6.2 pandas_gbq : None pyarrow : 0.14.0 pytables : None s3fs : None scipy : 1.3.1 sqlalchemy : 1.3.6 tables : 3.5.2 xarray : 0.12.3 xlrd : 1.2.0 xlwt : 1.3.0 xlsxwriter : 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/28238/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28238/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/28239
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28239/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28239/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28239/events
https://github.com/pandas-dev/pandas/pull/28239
487,714,995
MDExOlB1bGxSZXF1ZXN0MzEyOTE5MTIz
28,239
PERF: asv for import
{ "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
[]
{ "closed_at": "2020-01-30T12:18:05Z", "closed_issues": 2207, "created_at": "2012-09-13T02:13:00Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/329591?v=4", "events_url": "https://api.github.com/users/wesm/events{/privacy}", "followers_url": "https://api.github.com/users/wesm/followers", "following_url": "https://api.github.com/users/wesm/following{/other_user}", "gists_url": "https://api.github.com/users/wesm/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/wesm", "id": 329591, "login": "wesm", "node_id": "MDQ6VXNlcjMyOTU5MQ==", "organizations_url": "https://api.github.com/users/wesm/orgs", "received_events_url": "https://api.github.com/users/wesm/received_events", "repos_url": "https://api.github.com/users/wesm/repos", "site_admin": false, "starred_url": "https://api.github.com/users/wesm/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/wesm/subscriptions", "type": "User", "url": "https://api.github.com/users/wesm" }, "description": "on-merge: backport to 1.0.x", "due_on": "2020-02-01T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/16", "id": 174211, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16/labels", "node_id": "MDk6TWlsZXN0b25lMTc0MjEx", "number": 16, "open_issues": 0, "state": "closed", "title": "1.0.0", "updated_at": "2020-01-30T12:18:05Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16" }
1
2019-08-31T01:15:12Z
2019-09-05T15:45:44Z
2019-09-05T15:34:44Z
MEMBER
null
- [x] closes #26663 for py37 this uses `-X importtime` to get a more precise number without subprocess overhead. Doesn't actually do anything with it, but what the heck. Couple of unrelated cleanups.
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28239/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28239/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/28239.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/28239", "merged_at": "2019-09-05T15:34:44Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/28239.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/28239" }
https://api.github.com/repos/pandas-dev/pandas/issues/28240
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28240/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28240/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28240/events
https://github.com/pandas-dev/pandas/issues/28240
487,751,302
MDU6SXNzdWU0ODc3NTEzMDI=
28,240
Missing <th> for index in notebook display of pd.DataFrame in 0.25.1
{ "avatar_url": "https://avatars.githubusercontent.com/u/6342379?v=4", "events_url": "https://api.github.com/users/xflr6/events{/privacy}", "followers_url": "https://api.github.com/users/xflr6/followers", "following_url": "https://api.github.com/users/xflr6/following{/other_user}", "gists_url": "https://api.github.com/users/xflr6/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/xflr6", "id": 6342379, "login": "xflr6", "node_id": "MDQ6VXNlcjYzNDIzNzk=", "organizations_url": "https://api.github.com/users/xflr6/orgs", "received_events_url": "https://api.github.com/users/xflr6/received_events", "repos_url": "https://api.github.com/users/xflr6/repos", "site_admin": false, "starred_url": "https://api.github.com/users/xflr6/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/xflr6/subscriptions", "type": "User", "url": "https://api.github.com/users/xflr6" }
[ { "color": "009800", "default": false, "description": "Duplicate issue or pull request", "id": 40153326, "name": "Duplicate Report", "node_id": "MDU6TGFiZWw0MDE1MzMyNg==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Duplicate%20Report" } ]
closed
false
null
[]
null
1
2019-08-31T09:30:32Z
2019-08-31T10:48:58Z
2019-08-31T10:48:41Z
CONTRIBUTOR
null
#### Code Sample, a copy-pastable example if possible ![screen](https://user-images.githubusercontent.com/6342379/64061988-c6820280-cbe1-11e9-8ae7-7bedd4828489.png) #### Problem description Since `0.25.1`, the row index ("A" and "B" in [2]) is not shown in boldface any more. #### Expected Output Same as in [3] (pre `0.25.1` output) #### Output of ``pd.show_versions()`` <details> INSTALLED VERSIONS ------------------ commit : None python : 3.7.4.final.0 python-bits : 64 OS : Windows OS-release : 7 machine : AMD64 processor : Intel64 Family 6 Model 42 Stepping 7, GenuineIntel byteorder : little LC_ALL : None LANG : None LOCALE : None.None pandas : 0.25.1 numpy : 1.17.1 pytz : 2019.2 dateutil : 2.8.0 pip : 19.2.3 setuptools : 41.2.0 Cython : 0.29.13 pytest : 5.1.2 hypothesis : None sphinx : 2.2.0 blosc : None feather : None xlsxwriter : None lxml.etree : 4.4.1 html5lib : 1.0.1 pymysql : None psycopg2 : 2.8.3 (dt dec pq3 ext lo64) jinja2 : 2.10.1 IPython : 7.8.0 pandas_datareader: None bs4 : 4.8.0 bottleneck : 1.2.1 fastparquet : None gcsfs : None lxml.etree : 4.4.1 matplotlib : 3.1.1 numexpr : 2.7.0 odfpy : None openpyxl : None pandas_gbq : 0.11.0 pyarrow : None pytables : None s3fs : None scipy : 1.3.1 sqlalchemy : 1.3.8 tables : 3.5.2 xarray : None xlrd : None xlwt : None xlsxwriter : 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/28240/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28240/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/28241
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28241/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28241/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28241/events
https://github.com/pandas-dev/pandas/pull/28241
487,772,255
MDExOlB1bGxSZXF1ZXN0MzEyOTU3MzU1
28,241
Datetime mergeasof tolerance
{ "avatar_url": "https://avatars.githubusercontent.com/u/33916505?v=4", "events_url": "https://api.github.com/users/ianzur/events{/privacy}", "followers_url": "https://api.github.com/users/ianzur/followers", "following_url": "https://api.github.com/users/ianzur/following{/other_user}", "gists_url": "https://api.github.com/users/ianzur/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/ianzur", "id": 33916505, "login": "ianzur", "node_id": "MDQ6VXNlcjMzOTE2NTA1", "organizations_url": "https://api.github.com/users/ianzur/orgs", "received_events_url": "https://api.github.com/users/ianzur/received_events", "repos_url": "https://api.github.com/users/ianzur/repos", "site_admin": false, "starred_url": "https://api.github.com/users/ianzur/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ianzur/subscriptions", "type": "User", "url": "https://api.github.com/users/ianzur" }
[ { "color": "02d7e1", "default": false, "description": "Concat, Merge/Join, Stack/Unstack, Explode", "id": 13098779, "name": "Reshaping", "node_id": "MDU6TGFiZWwxMzA5ODc3OQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Reshaping" }, { "color": "5319e7", "de...
closed
false
null
[]
{ "closed_at": "2020-01-30T12:18:05Z", "closed_issues": 2207, "created_at": "2012-09-13T02:13:00Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/329591?v=4", "events_url": "https://api.github.com/users/wesm/events{/privacy}", "followers_url": "https://api.github.com/users/wesm/followers", "following_url": "https://api.github.com/users/wesm/following{/other_user}", "gists_url": "https://api.github.com/users/wesm/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/wesm", "id": 329591, "login": "wesm", "node_id": "MDQ6VXNlcjMyOTU5MQ==", "organizations_url": "https://api.github.com/users/wesm/orgs", "received_events_url": "https://api.github.com/users/wesm/received_events", "repos_url": "https://api.github.com/users/wesm/repos", "site_admin": false, "starred_url": "https://api.github.com/users/wesm/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/wesm/subscriptions", "type": "User", "url": "https://api.github.com/users/wesm" }, "description": "on-merge: backport to 1.0.x", "due_on": "2020-02-01T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/16", "id": 174211, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16/labels", "node_id": "MDk6TWlsZXN0b25lMTc0MjEx", "number": 16, "open_issues": 0, "state": "closed", "title": "1.0.0", "updated_at": "2020-01-30T12:18:05Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16" }
6
2019-08-31T13:51:23Z
2021-06-27T18:50:43Z
2019-09-25T15:50:32Z
CONTRIBUTOR
null
- [x] closes #28098 - [x] tests 1 / 1 - [x] passes `black pandas` - [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff` - [x] whatsnew entry
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28241/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28241/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/28241.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/28241", "merged_at": "2019-09-25T15:50:32Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/28241.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/28241" }
https://api.github.com/repos/pandas-dev/pandas/issues/28242
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28242/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28242/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28242/events
https://github.com/pandas-dev/pandas/issues/28242
487,774,702
MDU6SXNzdWU0ODc3NzQ3MDI=
28,242
to_record fails on aggregate DataFrame
{ "avatar_url": "https://avatars.githubusercontent.com/u/4113784?v=4", "events_url": "https://api.github.com/users/liquidscorpio/events{/privacy}", "followers_url": "https://api.github.com/users/liquidscorpio/followers", "following_url": "https://api.github.com/users/liquidscorpio/following{/other_user}", "gists_url": "https://api.github.com/users/liquidscorpio/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/liquidscorpio", "id": 4113784, "login": "liquidscorpio", "node_id": "MDQ6VXNlcjQxMTM3ODQ=", "organizations_url": "https://api.github.com/users/liquidscorpio/orgs", "received_events_url": "https://api.github.com/users/liquidscorpio/received_events", "repos_url": "https://api.github.com/users/liquidscorpio/repos", "site_admin": false, "starred_url": "https://api.github.com/users/liquidscorpio/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/liquidscorpio/subscriptions", "type": "User", "url": "https://api.github.com/users/liquidscorpio" }
[]
closed
false
null
[]
null
2
2019-08-31T14:17:52Z
2019-08-31T15:36:17Z
2019-08-31T15:36:17Z
NONE
null
#### Code Sample, a copy-pastable example if possible ```python # Your code here import pandas as pd import numpy as np df = pd.DataFrame([{ 'uid': '1345a', 'category': 'Automobile', 'amount': 40050.12 }, { 'uid': 'b7345', 'category': 'Hovercraft', 'amount':279215.00 }, { 'uid': '0u1325', 'category': 'Automobile', 'amount': 124895.12 }]) agg_df = df.groupby(['category', 'uid']).agg({ 'category': 'first', 'uid': 'first', 'amount': np.sum }) agg_df.to_records() ``` #### Problem description The `to_records` call should output a proper data structure. Instead, it fails with the following stacktrace: ```python ValueError Traceback (most recent call last) <ipython-input-8-39fc977374b6> in <module> 22 }) 23 ---> 24 agg_df.to_records() ~/Studio/Local/myapp/venv/lib/python3.7/site-packages/pandas/core/frame.py in to_records(self, index, convert_datetime64, column_dtypes, index_dtypes) 1822 raise ValueError(msg) 1823 -> 1824 return np.rec.fromarrays(arrays, dtype={"names": names, "formats": formats}) 1825 1826 @classmethod ~/Studio/Local/myapp/venv/lib/python3.7/site-packages/numpy/core/records.py in fromarrays(arrayList, dtype, shape, formats, names, titles, aligned, byteorder) 616 617 if dtype is not None: --> 618 descr = sb.dtype(dtype) 619 _names = descr.names 620 else: ValueError: name already used as a name or title ``` However, `agg_df.to_dict(orient='records')` works returning a list of dicts. **Note**: Also fails on (along with the version in the details section below): - pandas 0.24.2 - numpy 1.16.2 #### Expected Output A python list of dict with aggregated data. #### Output of ``pd.show_versions()`` <details> INSTALLED VERSIONS ------------------ commit : None python : 3.7.3.final.0 python-bits : 64 OS : Linux OS-release : 4.15.0-58-generic machine : x86_64 processor : x86_64 byteorder : little LC_ALL : None LANG : en_GB LOCALE : en_GB.utf8 pandas : 0.25.1 numpy : 1.17.1 pytz : 2018.9 dateutil : 2.8.0 pip : 19.2.3 setuptools : 41.2.0 Cython : 0.29.7 pytest : None hypothesis : None sphinx : 1.8.4 blosc : None feather : None xlsxwriter : None lxml.etree : 4.3.2 html5lib : 1.0.1 pymysql : None psycopg2 : 2.7.7 (dt dec pq3 ext lo64) jinja2 : 2.10 IPython : 7.3.0 pandas_datareader: None bs4 : 4.7.1 bottleneck : None fastparquet : None gcsfs : None lxml.etree : 4.3.2 matplotlib : 3.0.3 numexpr : None odfpy : None openpyxl : 2.5.2 pandas_gbq : None pyarrow : None pytables : None s3fs : None scipy : 1.3.1 sqlalchemy : None tables : None xarray : None xlrd : None xlwt : None xlsxwriter : 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/28242/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28242/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/28243
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28243/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28243/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28243/events
https://github.com/pandas-dev/pandas/issues/28243
487,785,450
MDU6SXNzdWU0ODc3ODU0NTA=
28,243
BUG: Left join on index and column gives incorrect output
{ "avatar_url": "https://avatars.githubusercontent.com/u/2658661?v=4", "events_url": "https://api.github.com/users/dsaxton/events{/privacy}", "followers_url": "https://api.github.com/users/dsaxton/followers", "following_url": "https://api.github.com/users/dsaxton/following{/other_user}", "gists_url": "https://api.github.com/users/dsaxton/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/dsaxton", "id": 2658661, "login": "dsaxton", "node_id": "MDQ6VXNlcjI2NTg2NjE=", "organizations_url": "https://api.github.com/users/dsaxton/orgs", "received_events_url": "https://api.github.com/users/dsaxton/received_events", "repos_url": "https://api.github.com/users/dsaxton/repos", "site_admin": false, "starred_url": "https://api.github.com/users/dsaxton/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/dsaxton/subscriptions", "type": "User", "url": "https://api.github.com/users/dsaxton" }
[ { "color": "e10c02", "default": false, "description": null, "id": 76811, "name": "Bug", "node_id": "MDU6TGFiZWw3NjgxMQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug" }, { "color": "02d7e1", "default": false, "description": "Concat, Merge/Join, Stac...
open
false
null
[]
null
3
2019-08-31T16:14:16Z
2020-05-29T21:45:31Z
null
MEMBER
null
```python import numpy as np import pandas as pd df_left = pd.DataFrame(index=["a", "b"]) df_right = pd.DataFrame({"x": ["a", "c"]}) pd.merge(df_left, df_right, left_index=True, right_on="x", how="left") # x # 0.0 a # NaN b ``` #### Problem description This is closely related to https://github.com/pandas-dev/pandas/issues/28220 but deals with the values of the `DataFrame` rather than the index itself. When left joining on an index and a column it looks like the value `"b"` from the index of `df_left` is somehow getting carried over to the column `x`, but `"a"` should be the only value in this column since it's the only one that matches the index from `df_left`. This is happening on 0.25.1 and master, and has been a bug for some time according to https://github.com/pandas-dev/pandas/issues/28220. #### Expected Output ```python x a a b NaN ``` #### Output of ``pd.show_versions()`` <details> INSTALLED VERSIONS ------------------ commit : None python : 3.7.3.final.0 python-bits : 64 OS : Darwin OS-release : 18.7.0 machine : x86_64 processor : i386 byteorder : little LC_ALL : None LANG : en_US.UTF-8 LOCALE : en_US.UTF-8 pandas : 0.25.1 numpy : 1.16.4 pytz : 2019.2 dateutil : 2.8.0 pip : 19.1.1 setuptools : 41.0.1 Cython : None pytest : 5.0.1 hypothesis : None sphinx : None blosc : None feather : None xlsxwriter : None lxml.etree : None html5lib : None pymysql : None psycopg2 : None jinja2 : None IPython : 7.7.0 pandas_datareader: None bs4 : None bottleneck : None fastparquet : None gcsfs : None lxml.etree : None matplotlib : None numexpr : None odfpy : None openpyxl : None pandas_gbq : None pyarrow : None pytables : None s3fs : None scipy : None sqlalchemy : None tables : None xarray : None xlrd : None xlwt : None xlsxwriter : None </details> Seems related to this issue: https://github.com/pandas-dev/pandas/issues/17257
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28243/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28243/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/28244
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28244/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28244/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28244/events
https://github.com/pandas-dev/pandas/issues/28244
487,789,368
MDU6SXNzdWU0ODc3ODkzNjg=
28,244
data frame rolling std return wrong result with large elements
{ "avatar_url": "https://avatars.githubusercontent.com/u/15785591?v=4", "events_url": "https://api.github.com/users/KaneFu/events{/privacy}", "followers_url": "https://api.github.com/users/KaneFu/followers", "following_url": "https://api.github.com/users/KaneFu/following{/other_user}", "gists_url": "https://api.github.com/users/KaneFu/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/KaneFu", "id": 15785591, "login": "KaneFu", "node_id": "MDQ6VXNlcjE1Nzg1NTkx", "organizations_url": "https://api.github.com/users/KaneFu/orgs", "received_events_url": "https://api.github.com/users/KaneFu/received_events", "repos_url": "https://api.github.com/users/KaneFu/repos", "site_admin": false, "starred_url": "https://api.github.com/users/KaneFu/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/KaneFu/subscriptions", "type": "User", "url": "https://api.github.com/users/KaneFu" }
[ { "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...
closed
false
null
[]
{ "closed_at": "2020-12-26T13:57:50Z", "closed_issues": 1768, "created_at": "2020-05-29T23:47:32Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4", "events_url": "https://api.github.com/users/jreback/events{/privacy}", "followers_url": "https://api.github.com/users/jreback/followers", "following_url": "https://api.github.com/users/jreback/following{/other_user}", "gists_url": "https://api.github.com/users/jreback/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jreback", "id": 953992, "login": "jreback", "node_id": "MDQ6VXNlcjk1Mzk5Mg==", "organizations_url": "https://api.github.com/users/jreback/orgs", "received_events_url": "https://api.github.com/users/jreback/received_events", "repos_url": "https://api.github.com/users/jreback/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jreback/subscriptions", "type": "User", "url": "https://api.github.com/users/jreback" }, "description": "on-merge: backport to 1.2.x", "due_on": "2020-12-15T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/73", "id": 5479819, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/73/labels", "node_id": "MDk6TWlsZXN0b25lNTQ3OTgxOQ==", "number": 73, "open_issues": 0, "state": "closed", "title": "1.2", "updated_at": "2021-04-13T15:46:43Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/73" }
3
2019-08-31T16:53:21Z
2020-09-18T21:59:52Z
2020-09-18T21:59:24Z
NONE
null
#### Code Sample, a copy-pastable example if possible ```python arr = [9.54e+08, 6.225e-01, np.nan, 0, 1.14, 0] arr = pd.DataFrame(arr) print(arr.rolling(5,3).std()) ###output 0 0 NaN 1 NaN 2 NaN 3 5.507922e+08 4 4.770000e+08 5 0.000000e+00 #### Problem description Expected output.iloc[5,0] = 0.551, as we can see the standeviation of last five elements shouldn't be zero. <br> But if i change the first element from 9.54e+08 to 9.45e+07, the last standeviation is 0.816 which is still wrong. If i change the first element to 9.45e+5, everything is okay. <br> The first element should not affect the result since the window=5, but there seems to be a bug with large elements, and a magnitude of e+08 definitely will not overflow. <br> There must be some bugs. #### Output of ``pd.show_versions()`` <details> INSTALLED VERSIONS ------------------ commit: None python: 3.6.1.final.0 python-bits: 64 OS: Darwin OS-release: 18.6.0 machine: x86_64 processor: i386 byteorder: little LC_ALL: en_US.UTF-8 LANG: en_US.UTF-8 LOCALE: en_US.UTF-8 pandas: 0.24.2 pytest: 3.0.7 pip: 19.2.1 setuptools: 36.4.0 Cython: 0.25.2 numpy: 1.13.1 scipy: 0.19.1 pyarrow: None xarray: 0.12.3 IPython: 5.3.0 sphinx: 1.5.6 patsy: 0.4.1 dateutil: 2.6.0 pytz: 2017.2 blosc: None bottleneck: 1.2.1 tables: 3.4.2 numexpr: 2.6.2 feather: None matplotlib: 2.0.2 openpyxl: 2.4.7 xlrd: 1.0.0 xlwt: 1.2.0 xlsxwriter: 0.9.6 lxml.etree: 3.7.3 bs4: 4.6.0 </details>
{ "+1": 1, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 1, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28244/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28244/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/28245
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28245/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28245/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28245/events
https://github.com/pandas-dev/pandas/pull/28245
487,815,093
MDExOlB1bGxSZXF1ZXN0MzEyOTg0NjY4
28,245
DOC: fix read_excel and ExcelFile engine parameter description (#28231)
{ "avatar_url": "https://avatars.githubusercontent.com/u/20485445?v=4", "events_url": "https://api.github.com/users/zys5945/events{/privacy}", "followers_url": "https://api.github.com/users/zys5945/followers", "following_url": "https://api.github.com/users/zys5945/following{/other_user}", "gists_url": "https://api.github.com/users/zys5945/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/zys5945", "id": 20485445, "login": "zys5945", "node_id": "MDQ6VXNlcjIwNDg1NDQ1", "organizations_url": "https://api.github.com/users/zys5945/orgs", "received_events_url": "https://api.github.com/users/zys5945/received_events", "repos_url": "https://api.github.com/users/zys5945/repos", "site_admin": false, "starred_url": "https://api.github.com/users/zys5945/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/zys5945/subscriptions", "type": "User", "url": "https://api.github.com/users/zys5945" }
[ { "color": "3465A4", "default": false, "description": null, "id": 134699, "name": "Docs", "node_id": "MDU6TGFiZWwxMzQ2OTk=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Docs" }, { "color": "bfe5bf", "default": false, "description": "read_excel, to_excel"...
closed
false
null
[]
{ "closed_at": "2020-01-30T12:18:05Z", "closed_issues": 2207, "created_at": "2012-09-13T02:13:00Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/329591?v=4", "events_url": "https://api.github.com/users/wesm/events{/privacy}", "followers_url": "https://api.github.com/users/wesm/followers", "following_url": "https://api.github.com/users/wesm/following{/other_user}", "gists_url": "https://api.github.com/users/wesm/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/wesm", "id": 329591, "login": "wesm", "node_id": "MDQ6VXNlcjMyOTU5MQ==", "organizations_url": "https://api.github.com/users/wesm/orgs", "received_events_url": "https://api.github.com/users/wesm/received_events", "repos_url": "https://api.github.com/users/wesm/repos", "site_admin": false, "starred_url": "https://api.github.com/users/wesm/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/wesm/subscriptions", "type": "User", "url": "https://api.github.com/users/wesm" }, "description": "on-merge: backport to 1.0.x", "due_on": "2020-02-01T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/16", "id": 174211, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16/labels", "node_id": "MDk6TWlsZXN0b25lMTc0MjEx", "number": 16, "open_issues": 0, "state": "closed", "title": "1.0.0", "updated_at": "2020-01-30T12:18:05Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16" }
2
2019-08-31T21:57:19Z
2019-09-05T18:04:03Z
2019-09-05T18:03:57Z
CONTRIBUTOR
null
Closes #28231. First PR. Not sure if I'm doing anything wrong.
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28245/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28245/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/28245.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/28245", "merged_at": "2019-09-05T18:03:57Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/28245.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/28245" }
https://api.github.com/repos/pandas-dev/pandas/issues/28246
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28246/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28246/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28246/events
https://github.com/pandas-dev/pandas/issues/28246
487,859,359
MDU6SXNzdWU0ODc4NTkzNTk=
28,246
.transform inconsistent / error-prone behavior for list
{ "avatar_url": "https://avatars.githubusercontent.com/u/6077538?v=4", "events_url": "https://api.github.com/users/mglowacki100/events{/privacy}", "followers_url": "https://api.github.com/users/mglowacki100/followers", "following_url": "https://api.github.com/users/mglowacki100/following{/other_user}", "gists_url": "https://api.github.com/users/mglowacki100/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mglowacki100", "id": 6077538, "login": "mglowacki100", "node_id": "MDQ6VXNlcjYwNzc1Mzg=", "organizations_url": "https://api.github.com/users/mglowacki100/orgs", "received_events_url": "https://api.github.com/users/mglowacki100/received_events", "repos_url": "https://api.github.com/users/mglowacki100/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mglowacki100/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mglowacki100/subscriptions", "type": "User", "url": "https://api.github.com/users/mglowacki100" }
[ { "color": "e10c02", "default": false, "description": null, "id": 76811, "name": "Bug", "node_id": "MDU6TGFiZWw3NjgxMQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug" }, { "color": "729FCF", "default": false, "description": null, "id": 233160, ...
open
false
null
[]
null
0
2019-09-01T08:51:57Z
2020-09-22T01:33:43Z
null
NONE
null
#### Code Sample, a copy-pastable example if possible ```python import pandas as pd df = pd.DataFrame(data={'label': ['a', 'b', 'b', 'c'], 'wave': [1, 2, 3, 4], 'y': [0,0,0,0]}) ###problem 1 df['n_tuple'] = df.groupby(['label'])[['wave']].transform(tuple) df['n_set'] = df.groupby(['label'])[['wave']].transform(set) df['n_frozenset'] = df.groupby(['label'])[['wave']].transform(frozenset) df['n_dict'] = df.groupby(['label'])[['wave']].transform(dict) df['n_list_problem'] = df.groupby(['label'])[['wave']].transform(list) df['n_list_expected'] = df.groupby(['label'])[['wave']].transform(tuple)['wave'].apply(list) ###problem 2 df['n_sum'] = df.groupby(['label'])['wave'].transform(sum) df['n_tuple_problem'] = df.groupby(['label'])['wave'].transform(tuple) df['n_tuple'] = df.groupby(['label'])[['wave']].transform(tuple) ``` #### Problem description I was hinted that it could be a bug: https://stackoverflow.com/questions/57743798/pandas-transform-inconsistent-behavior-for-list There are two things, but let focus on **1** first: Result of `df['n_list_problem'] = df.groupby(['label'])[['wave']].transform(list) `is not consistent with similar operations like `df['n_tuple'], df['n_set']` etc. On stackoverflow I was pointed to issues regarding series lenght for rationale, but consensus was that, this behavior is confusing and error-prone. The **2** problem: `df['n_sum'] = df.groupby(['label'])['wave'].transform(sum)` works as expected, but `df['n_tuple_problem'] = df.groupby(['label'])['wave'].transform(tuple)` gives unexpected result. To get proper one, you need to coerce series into dataframe by `[[]]` instead of `[]` for `wave`. `df['n_tuple'] = df.groupby(['label'])[['wave']].transform(tuple) ` #### Expected Output `df['n_list_expected'] = df.groupby(['label'])[['wave']].transform(tuple)['wave'].apply(list) ` ``` label wave y n_tuple n_list_problem n_list_expected n_tuple_problem 0 a 1 0 (1,) 1 [1] 1 1 b 2 0 (2, 3) 2 [2, 3] 2 2 b 3 0 (2, 3) 3 [2, 3] 3 3 c 4 0 (4,) 4 [4] 4 ``` #### Output of ``pd.show_versions()`` <details> INSTALLED VERSIONS ------------------ commit : None python : 3.7.4.final.0 python-bits : 64 OS : Linux OS-release : 4.4.0-141-generic machine : x86_64 processor : x86_64 byteorder : little LC_ALL : None LANG : en_US.UTF-8 LOCALE : en_US.UTF-8 pandas : 0.25.1 numpy : 1.17.0 pytz : 2019.2 dateutil : 2.8.0 pip : 19.1.1 setuptools : 41.0.1 Cython : 0.29.13 pytest : None hypothesis : None sphinx : 2.1.2 blosc : None feather : None xlsxwriter : None lxml.etree : None html5lib : None pymysql : None psycopg2 : None jinja2 : 2.10.1 IPython : 7.7.0 pandas_datareader: None bs4 : None bottleneck : None fastparquet : None gcsfs : None lxml.etree : None matplotlib : None numexpr : None odfpy : None openpyxl : None pandas_gbq : None pyarrow : None pytables : None s3fs : None scipy : 1.3.1 sqlalchemy : None tables : None xarray : None xlrd : None xlwt : None xlsxwriter : None </details>
{ "+1": 4, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 4, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28246/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28246/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/28247
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28247/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28247/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28247/events
https://github.com/pandas-dev/pandas/issues/28247
487,877,933
MDU6SXNzdWU0ODc4Nzc5MzM=
28,247
[Bug][Regression] df.groupby.apply fails under specific conditions
{ "avatar_url": "https://avatars.githubusercontent.com/u/7702207?v=4", "events_url": "https://api.github.com/users/harmbuisman/events{/privacy}", "followers_url": "https://api.github.com/users/harmbuisman/followers", "following_url": "https://api.github.com/users/harmbuisman/following{/other_user}", "gists_url": "https://api.github.com/users/harmbuisman/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/harmbuisman", "id": 7702207, "login": "harmbuisman", "node_id": "MDQ6VXNlcjc3MDIyMDc=", "organizations_url": "https://api.github.com/users/harmbuisman/orgs", "received_events_url": "https://api.github.com/users/harmbuisman/received_events", "repos_url": "https://api.github.com/users/harmbuisman/repos", "site_admin": false, "starred_url": "https://api.github.com/users/harmbuisman/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/harmbuisman/subscriptions", "type": "User", "url": "https://api.github.com/users/harmbuisman" }
[ { "color": "e10c02", "default": false, "description": null, "id": 76811, "name": "Bug", "node_id": "MDU6TGFiZWw3NjgxMQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug" }, { "color": "729FCF", "default": false, "description": null, "id": 233160, ...
closed
false
null
[]
{ "closed_at": "2020-01-30T12:18:05Z", "closed_issues": 2207, "created_at": "2012-09-13T02:13:00Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/329591?v=4", "events_url": "https://api.github.com/users/wesm/events{/privacy}", "followers_url": "https://api.github.com/users/wesm/followers", "following_url": "https://api.github.com/users/wesm/following{/other_user}", "gists_url": "https://api.github.com/users/wesm/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/wesm", "id": 329591, "login": "wesm", "node_id": "MDQ6VXNlcjMyOTU5MQ==", "organizations_url": "https://api.github.com/users/wesm/orgs", "received_events_url": "https://api.github.com/users/wesm/received_events", "repos_url": "https://api.github.com/users/wesm/repos", "site_admin": false, "starred_url": "https://api.github.com/users/wesm/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/wesm/subscriptions", "type": "User", "url": "https://api.github.com/users/wesm" }, "description": "on-merge: backport to 1.0.x", "due_on": "2020-02-01T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/16", "id": 174211, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16/labels", "node_id": "MDk6TWlsZXN0b25lMTc0MjEx", "number": 16, "open_issues": 0, "state": "closed", "title": "1.0.0", "updated_at": "2020-01-30T12:18:05Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16" }
2
2019-09-01T12:06:20Z
2019-10-03T17:25:04Z
2019-10-03T17:25:04Z
NONE
null
#### Code Sample, a copy-pastable example if possible ```python import pandas as pd import datetime def get_vals(x): return pd.Series([0,1,2], index=[2000, 2001, 2002]) b = list(range(0,3))*2 y = list(range(2000,2003))*2 df = pd.DataFrame({'b':b,'y':y}) df['date'] = pd.to_datetime(df['y'].apply(lambda x: datetime.date(x, 1, 1))) print(pd.__version__) print(df) df.groupby(['b']).apply(lambda x: get_vals(x)) ``` #### Problem description The above code gives an error (KeyError: 0) in pandas 0.25.1, while it runs as expected in pandas 0.24.2 The apply function returns a timeseries. I found that triggering the error is related to having a datetime column in the dataframe. Without that column it does not throw an error. #### Expected Output No error and the following output, as can be verified with pandas version 0.24.2: ![image](https://user-images.githubusercontent.com/7702207/64076125-f6ec9e00-ccc0-11e9-9f6f-53e88a1ee980.png) #### Output of ``pd.show_versions()`` <details> [paste the output of ``pd.show_versions()`` here below this line] Environment of 0.25.1 that I tested on: INSTALLED VERSIONS ------------------ commit : None python : 3.7.4.final.0 python-bits : 64 OS : Windows OS-release : 10 machine : AMD64 processor : Intel64 Family 6 Model 142 Stepping 10, GenuineIntel byteorder : little LC_ALL : None LANG : None LOCALE : None.None pandas : 0.25.1 numpy : 1.16.4 pytz : 2019.2 dateutil : 2.8.0 pip : 19.2.2 setuptools : 41.0.1 Cython : None pytest : None hypothesis : None sphinx : None blosc : None feather : None xlsxwriter : None lxml.etree : None html5lib : None pymysql : None psycopg2 : 2.7.6.1 (dt dec pq3 ext lo64) jinja2 : 2.10.1 IPython : 7.7.0 pandas_datareader: None bs4 : None bottleneck : 1.2.1 fastparquet : None gcsfs : None lxml.etree : None matplotlib : 3.1.1 numexpr : None odfpy : None openpyxl : None pandas_gbq : None pyarrow : None pytables : None s3fs : None scipy : 1.3.1 sqlalchemy : 1.3.7 tables : None xarray : None xlrd : None xlwt : None xlsxwriter : None Environment of 0.24.2 that I tested on: INSTALLED VERSIONS ------------------ commit: None python: 3.7.3.final.0 python-bits: 64 OS: Windows OS-release: 10 machine: AMD64 processor: Intel64 Family 6 Model 142 Stepping 10, GenuineIntel byteorder: little LC_ALL: None LANG: None LOCALE: None.None pandas: 0.24.2 pytest: 5.1.1 pip: 19.2.3 setuptools: 41.2.0 Cython: 0.29.13 numpy: 1.16.4 scipy: 1.3.1 pyarrow: None xarray: None IPython: 7.7.0 sphinx: 2.2.0 patsy: 0.5.1 dateutil: 2.8.0 pytz: 2019.2 blosc: None bottleneck: 1.2.1 tables: 3.5.2 numexpr: 2.7.0 feather: None matplotlib: 3.1.1 openpyxl: 2.6.3 xlrd: 1.2.0 xlwt: 1.3.0 xlsxwriter: 1.2.0 lxml.etree: 4.4.1 bs4: 4.8.0 html5lib: 1.0.1 sqlalchemy: 1.3.7 pymysql: None psycopg2: None jinja2: 2.10.1 s3fs: None fastparquet: None pandas_gbq: None pandas_datareader: 0.7.0 gcsfs: None </details>
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28247/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28247/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/28248
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28248/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28248/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28248/events
https://github.com/pandas-dev/pandas/pull/28248
487,909,575
MDExOlB1bGxSZXF1ZXN0MzEzMDUwMTc1
28,248
BUG: pivot_table not returning correct type when margin=True and aggfunc='mean'
{ "avatar_url": "https://avatars.githubusercontent.com/u/15342068?v=4", "events_url": "https://api.github.com/users/mabelvj/events{/privacy}", "followers_url": "https://api.github.com/users/mabelvj/followers", "following_url": "https://api.github.com/users/mabelvj/following{/other_user}", "gists_url": "https://api.github.com/users/mabelvj/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mabelvj", "id": 15342068, "login": "mabelvj", "node_id": "MDQ6VXNlcjE1MzQyMDY4", "organizations_url": "https://api.github.com/users/mabelvj/orgs", "received_events_url": "https://api.github.com/users/mabelvj/received_events", "repos_url": "https://api.github.com/users/mabelvj/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mabelvj/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mabelvj/subscriptions", "type": "User", "url": "https://api.github.com/users/mabelvj" }
[ { "color": "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", "de...
closed
false
null
[]
{ "closed_at": "2020-01-30T12:18:05Z", "closed_issues": 2207, "created_at": "2012-09-13T02:13:00Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/329591?v=4", "events_url": "https://api.github.com/users/wesm/events{/privacy}", "followers_url": "https://api.github.com/users/wesm/followers", "following_url": "https://api.github.com/users/wesm/following{/other_user}", "gists_url": "https://api.github.com/users/wesm/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/wesm", "id": 329591, "login": "wesm", "node_id": "MDQ6VXNlcjMyOTU5MQ==", "organizations_url": "https://api.github.com/users/wesm/orgs", "received_events_url": "https://api.github.com/users/wesm/received_events", "repos_url": "https://api.github.com/users/wesm/repos", "site_admin": false, "starred_url": "https://api.github.com/users/wesm/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/wesm/subscriptions", "type": "User", "url": "https://api.github.com/users/wesm" }, "description": "on-merge: backport to 1.0.x", "due_on": "2020-02-01T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/16", "id": 174211, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16/labels", "node_id": "MDk6TWlsZXN0b25lMTc0MjEx", "number": 16, "open_issues": 0, "state": "closed", "title": "1.0.0", "updated_at": "2020-01-30T12:18:05Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16" }
11
2019-09-01T17:11:13Z
2019-11-23T22:44:03Z
2019-11-23T22:43:53Z
CONTRIBUTOR
null
- [x] closes #24893 - [x] tests added / passed - [x] passes `black pandas` - [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff` # What's new Use of `maybe_downcast_to_dtype` in `_add_margins` so it can resolve the dtype conversion, avoiding floats being converted to integers when the result of the `aggfunc` is a float. For the new case, if after applying the aggfunc, if the margin result is not an integer, the whole column is converted to float: Example: ``` _df A B C D 0 2 1 1 X 1 4 4 3 X 2 6 5 4 Y 3 8 8 6 Y ``` Currently pandas does this: ``` print(pd.pivot_table(_df, index="D", margins=True)) A B C D X 3 2.5 2 Y 7 6.5 5 All 5 4.5 3 ``` with the fix the result is: ``` print(pd.pivot_table(_df, index="D", margins=True)) A B C D X 3 2.5 2.0 Y 7 6.5 5.0 All 5 4.5 3.5 ``` # Issues There are test referencing that np.means of ints are casted back into ints. However, giving that for the aggregations in the rows, floats are kept when the np.mean of integers is a float, it does not make sense that this behavior does not hold for the margins.
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28248/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28248/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/28248.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/28248", "merged_at": "2019-11-23T22:43:53Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/28248.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/28248" }
https://api.github.com/repos/pandas-dev/pandas/issues/28249
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28249/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28249/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28249/events
https://github.com/pandas-dev/pandas/issues/28249
488,084,639
MDU6SXNzdWU0ODgwODQ2Mzk=
28,249
Misbehavior for Dataframe updates on unexisting DateTime index
{ "avatar_url": "https://avatars.githubusercontent.com/u/30111494?v=4", "events_url": "https://api.github.com/users/floriancartuta/events{/privacy}", "followers_url": "https://api.github.com/users/floriancartuta/followers", "following_url": "https://api.github.com/users/floriancartuta/following{/other_user}", "gists_url": "https://api.github.com/users/floriancartuta/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/floriancartuta", "id": 30111494, "login": "floriancartuta", "node_id": "MDQ6VXNlcjMwMTExNDk0", "organizations_url": "https://api.github.com/users/floriancartuta/orgs", "received_events_url": "https://api.github.com/users/floriancartuta/received_events", "repos_url": "https://api.github.com/users/floriancartuta/repos", "site_admin": false, "starred_url": "https://api.github.com/users/floriancartuta/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/floriancartuta/subscriptions", "type": "User", "url": "https://api.github.com/users/floriancartuta" }
[ { "color": "AFEEEE", "default": false, "description": null, "id": 211840, "name": "Timeseries", "node_id": "MDU6TGFiZWwyMTE4NDA=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Timeseries" }, { "color": "0b02e1", "default": false, "description": "Related t...
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" }
7
2019-09-02T09:10:58Z
2021-07-11T17:22:16Z
null
NONE
null
#### Code Sample, a copy-pastable example if possible ``` import pandas as pd import datetime as dt df = pd.DataFrame({'Date': ['2017-01-02', '2017-01-03','2017-01-04'], 'T': [10, 11,12], 'RM': [28, 29,30]}) df['Date'] = pd.to_datetime(df.Date,infer_datetime_format=True) df.set_index('Date', inplace=True) df = df.asfreq('D') print(df) print('Dataframe index of dtype: {} and freq: {}'.format(df.index.dtype_str, df.index.freq)) print("Droping one row") df = df.drop(df.index[1]) print(df) print('The new index is of dtype: {} and freq: {}'.format(df.index.dtype_str, df.index.freq)) print('''Let's change in place the unexisting index: 2017-01-03''') df.loc['2017-01-03', 'RM']=290 print(df) print('''The dataframe has shape: {} and it's new index is of dtype: {}'''.format(df.shape, df.index.dtype_str)) ``` #### Problem description [this should explain **why** the current behaviour is a problem and why the expected output is a better solution.] According to Pandas documentation, the updates of a cell value based on index lookup (df.loc and df.at) should work correctly only when the index is existing within dataframe. The problem I encountered happens when I try to update some cells accessed by DateTime index, in case the index (which is actually a date) does not exist in the dataframe. According to the documentation, an exception should be raised in this case. What actually happens, is that without raising any exception: 1) Pandas transforms the DateTime index into an object index (thus making it unusable for timeseries processing), 2) insert new rows in the dataframe with the specified new object index and set all columns to Nan, except the updated one. I solved the above problem, wrapping the update commands in conditional 'If' rules but according to the documentation it seems to be a misbehavior of Pandas. #### Expected Output #### Output of ``pd.show_versions()`` <details> [paste the output of ``pd.show_versions()`` here below this line] INSTALLED VERSIONS ------------------ commit: None python: 3.6.8.final.0 python-bits: 64 OS: Linux OS-release: 4.15.0-60-generic machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: en_US.UTF-8 LOCALE: en_US.UTF-8 pandas: 0.23.4 pytest: 4.5.0 pip: 19.1.1 setuptools: 41.0.1 Cython: 0.29.7 numpy: 1.17.0 scipy: 1.2.1 pyarrow: None xarray: None IPython: 7.5.0 sphinx: 2.0.1 patsy: 0.5.1 dateutil: 2.8.0 pytz: 2019.1 blosc: None bottleneck: 1.2.1 tables: 3.5.1 numexpr: 2.6.8 feather: None matplotlib: 3.1.0 openpyxl: 2.6.1 xlrd: 1.2.0 xlwt: 1.3.0 xlsxwriter: 1.1.8 lxml: 4.3.0 bs4: 4.7.1 html5lib: 0.9999999 sqlalchemy: 1.3.3 pymysql: None psycopg2: None jinja2: 2.10 s3fs: None fastparquet: None pandas_gbq: None pandas_datareader: 0.7.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/28249/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28249/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/28250
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28250/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28250/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28250/events
https://github.com/pandas-dev/pandas/issues/28250
488,168,161
MDU6SXNzdWU0ODgxNjgxNjE=
28,250
Add support for reading Stata .dta file format 119
{ "avatar_url": "https://avatars.githubusercontent.com/u/7686641?v=4", "events_url": "https://api.github.com/users/chrisyeh96/events{/privacy}", "followers_url": "https://api.github.com/users/chrisyeh96/followers", "following_url": "https://api.github.com/users/chrisyeh96/following{/other_user}", "gists_url": "https://api.github.com/users/chrisyeh96/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/chrisyeh96", "id": 7686641, "login": "chrisyeh96", "node_id": "MDQ6VXNlcjc2ODY2NDE=", "organizations_url": "https://api.github.com/users/chrisyeh96/orgs", "received_events_url": "https://api.github.com/users/chrisyeh96/received_events", "repos_url": "https://api.github.com/users/chrisyeh96/repos", "site_admin": false, "starred_url": "https://api.github.com/users/chrisyeh96/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/chrisyeh96/subscriptions", "type": "User", "url": "https://api.github.com/users/chrisyeh96" }
[ { "color": "5319e7", "default": false, "description": "read_stata, to_stata", "id": 104865385, "name": "IO Stata", "node_id": "MDU6TGFiZWwxMDQ4NjUzODU=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20Stata" } ]
closed
false
null
[]
{ "closed_at": "2020-01-30T12:18:05Z", "closed_issues": 2207, "created_at": "2012-09-13T02:13:00Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/329591?v=4", "events_url": "https://api.github.com/users/wesm/events{/privacy}", "followers_url": "https://api.github.com/users/wesm/followers", "following_url": "https://api.github.com/users/wesm/following{/other_user}", "gists_url": "https://api.github.com/users/wesm/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/wesm", "id": 329591, "login": "wesm", "node_id": "MDQ6VXNlcjMyOTU5MQ==", "organizations_url": "https://api.github.com/users/wesm/orgs", "received_events_url": "https://api.github.com/users/wesm/received_events", "repos_url": "https://api.github.com/users/wesm/repos", "site_admin": false, "starred_url": "https://api.github.com/users/wesm/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/wesm/subscriptions", "type": "User", "url": "https://api.github.com/users/wesm" }, "description": "on-merge: backport to 1.0.x", "due_on": "2020-02-01T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/16", "id": 174211, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16/labels", "node_id": "MDk6TWlsZXN0b25lMTc0MjEx", "number": 16, "open_issues": 0, "state": "closed", "title": "1.0.0", "updated_at": "2020-01-30T12:18:05Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16" }
7
2019-09-02T12:33:59Z
2019-09-20T12:40:12Z
2019-09-20T12:40:12Z
CONTRIBUTOR
null
Please add functionality to read format 119 `.dta` Stata files! See file format here: https://www.stata.com/help.cgi?dta#versions Currently, even though Pandas can _write_ format 119 files (https://github.com/pandas-dev/pandas/blob/612d3b23da5b99f6c5642be574fb08713a45d7d1/pandas/io/stata.py#L2663), it seems unable to _read_ format 119 files (https://github.com/pandas-dev/pandas/blob/612d3b23da5b99f6c5642be574fb08713a45d7d1/pandas/io/stata.py#L49-L53).
{ "+1": 1, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 1, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28250/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28250/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/28251
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28251/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28251/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28251/events
https://github.com/pandas-dev/pandas/pull/28251
488,226,597
MDExOlB1bGxSZXF1ZXN0MzEzMjk0OTk2
28,251
BUG: Fix numpy boolean subtraction error in Series.diff
{ "avatar_url": "https://avatars.githubusercontent.com/u/7977855?v=4", "events_url": "https://api.github.com/users/Unprocessable/events{/privacy}", "followers_url": "https://api.github.com/users/Unprocessable/followers", "following_url": "https://api.github.com/users/Unprocessable/following{/other_user}", "gists_url": "https://api.github.com/users/Unprocessable/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Unprocessable", "id": 7977855, "login": "Unprocessable", "node_id": "MDQ6VXNlcjc5Nzc4NTU=", "organizations_url": "https://api.github.com/users/Unprocessable/orgs", "received_events_url": "https://api.github.com/users/Unprocessable/received_events", "repos_url": "https://api.github.com/users/Unprocessable/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Unprocessable/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Unprocessable/subscriptions", "type": "User", "url": "https://api.github.com/users/Unprocessable" }
[ { "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, Stac...
closed
false
null
[]
{ "closed_at": "2020-01-30T12:18:05Z", "closed_issues": 2207, "created_at": "2012-09-13T02:13:00Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/329591?v=4", "events_url": "https://api.github.com/users/wesm/events{/privacy}", "followers_url": "https://api.github.com/users/wesm/followers", "following_url": "https://api.github.com/users/wesm/following{/other_user}", "gists_url": "https://api.github.com/users/wesm/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/wesm", "id": 329591, "login": "wesm", "node_id": "MDQ6VXNlcjMyOTU5MQ==", "organizations_url": "https://api.github.com/users/wesm/orgs", "received_events_url": "https://api.github.com/users/wesm/received_events", "repos_url": "https://api.github.com/users/wesm/repos", "site_admin": false, "starred_url": "https://api.github.com/users/wesm/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/wesm/subscriptions", "type": "User", "url": "https://api.github.com/users/wesm" }, "description": "on-merge: backport to 1.0.x", "due_on": "2020-02-01T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/16", "id": 174211, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16/labels", "node_id": "MDk6TWlsZXN0b25lMTc0MjEx", "number": 16, "open_issues": 0, "state": "closed", "title": "1.0.0", "updated_at": "2020-01-30T12:18:05Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16" }
24
2019-09-02T14:49:53Z
2019-10-01T21:06:20Z
2019-10-01T16:38:46Z
CONTRIBUTOR
null
A new version of the pull request (#27755), the other one was a bit behind. Original text below. This fixes #17294, for more than three years now NumPy has not allowed the subtraction of boolean series. TypeError Traceback (most recent call last) <ipython-input-46-3da3b949c6bd> in <module> 1 data = pd.Series([0,-1,-2,-3,-4,-3,-2,-1,0,-1,-1,0,-1,-2,-3,-2,0]) 2 filtered = data.between(-2,0, inclusive = True) ----> 3 filtered.diff() 4 print(filtered) ~\AppData\Local\Continuum\anaconda3\lib\site-packages\pandas\core\series.py in diff(self, periods) 2191 dtype: float64 2192 """ -> 2193 result = algorithms.diff(com.values_from_object(self), periods) 2194 return self._constructor(result, index=self.index).__finalize__(self) 2195 ~\AppData\Local\Continuum\anaconda3\lib\site-packages\pandas\core\algorithms.py in diff(arr, n, axis) 1817 out_arr[res_indexer] = result 1818 else: -> 1819 out_arr[res_indexer] = arr[res_indexer] - arr[lag_indexer] 1820 1821 if is_timedelta: TypeError: numpy boolean subtract, the `-` operator, is deprecated, use the bitwise_xor, the `^` operator, or the logical_xor function instead. - [x] closes #17294 - [x] tests added / passed - [x] passes `black pandas` - [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff` - [x] whatsnew entry
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28251/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28251/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/28251.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/28251", "merged_at": "2019-10-01T16:38:46Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/28251.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/28251" }
https://api.github.com/repos/pandas-dev/pandas/issues/28252
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28252/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28252/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28252/events
https://github.com/pandas-dev/pandas/issues/28252
488,250,518
MDU6SXNzdWU0ODgyNTA1MTg=
28,252
Parquet file written with fastparquet backend cannot be read with pyarrow backend
{ "avatar_url": "https://avatars.githubusercontent.com/u/1336287?v=4", "events_url": "https://api.github.com/users/languitar/events{/privacy}", "followers_url": "https://api.github.com/users/languitar/followers", "following_url": "https://api.github.com/users/languitar/following{/other_user}", "gists_url": "https://api.github.com/users/languitar/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/languitar", "id": 1336287, "login": "languitar", "node_id": "MDQ6VXNlcjEzMzYyODc=", "organizations_url": "https://api.github.com/users/languitar/orgs", "received_events_url": "https://api.github.com/users/languitar/received_events", "repos_url": "https://api.github.com/users/languitar/repos", "site_admin": false, "starred_url": "https://api.github.com/users/languitar/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/languitar/subscriptions", "type": "User", "url": "https://api.github.com/users/languitar" }
[ { "color": "5319e7", "default": false, "description": "parquet, feather", "id": 685114413, "name": "IO Parquet", "node_id": "MDU6TGFiZWw2ODUxMTQ0MTM=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20Parquet" } ]
closed
false
null
[]
{ "closed_at": 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" }
10
2019-09-02T15:52:59Z
2019-09-09T13:56:28Z
2019-09-09T13:56:20Z
NONE
null
#### Code Sample, a copy-pastable example if possible ```python In [63]: pd.DataFrame({'foo': [datetime(2019, 10, 1)], 'bar': ['test']}).to_parquet('/tmp/minimal.parquet', engine='fastparquet') In [64]: pd.read_parquet('/tmp/minimal.parquet', engine='pyarrow') --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-64-d866d1c8df39> in <module> ----> 1 pd.read_parquet('/tmp/minimal.parquet', engine='pyarrow') ~/.pyenv/versions/analytics-3.7/lib/python3.7/site-packages/pandas/io/parquet.py in read_parquet(path, engine, columns, **kwargs) 294 295 impl = get_engine(engine) --> 296 return impl.read(path, columns=columns, **kwargs) ~/.pyenv/versions/analytics-3.7/lib/python3.7/site-packages/pandas/io/parquet.py in read(self, path, columns, **kwargs) 123 kwargs["use_pandas_metadata"] = True 124 result = self.api.parquet.read_table( --> 125 path, columns=columns, **kwargs 126 ).to_pandas() 127 if should_close: ~/.pyenv/versions/analytics-3.7/lib/python3.7/site-packages/pyarrow/array.pxi in pyarrow.lib._PandasConvertible.to_pandas() ~/.pyenv/versions/analytics-3.7/lib/python3.7/site-packages/pyarrow/table.pxi in pyarrow.lib.Table._to_pandas() ~/.pyenv/versions/analytics-3.7/lib/python3.7/site-packages/pyarrow/pandas_compat.py in table_to_blockmanager(options, table, categories, ignore_metadata) 642 column_indexes = pandas_metadata.get('column_indexes', []) 643 index_descriptors = pandas_metadata['index_columns'] --> 644 table = _add_any_metadata(table, pandas_metadata) 645 table, index = _reconstruct_index(table, index_descriptors, 646 all_columns) ~/.pyenv/versions/analytics-3.7/lib/python3.7/site-packages/pyarrow/pandas_compat.py in _add_any_metadata(table, pandas_metadata) 965 raw_name = 'None' 966 --> 967 idx = schema.get_field_index(raw_name) 968 if idx != -1: 969 if col_meta['pandas_type'] == 'datetimetz': ~/.pyenv/versions/analytics-3.7/lib/python3.7/site-packages/pyarrow/types.pxi in pyarrow.lib.Schema.get_field_index() ~/.pyenv/versions/analytics-3.7/lib/python3.7/site-packages/pyarrow/lib.cpython-37m-x86_64-linux-gnu.so in string.from_py.__pyx_convert_string_from_py_std__in_string() TypeError: expected bytes, dict found ``` #### Problem description A parquet file written with the `fastparquet` backend cannot be converted back to a pandas data frame when read with the `pyarrow` implementation. Conversion fails with the shown Exception, which seems to be part of applying the pandas meta data. #### Expected Output Successful conversion. #### Output of ``pd.show_versions()`` <details> INSTALLED VERSIONS ------------------ commit : None python : 3.7.4.final.0 python-bits : 64 OS : Linux OS-release : 4.19.69-1-lts machine : x86_64 processor : byteorder : little LC_ALL : None LANG : en_US.UTF-8 LOCALE : en_US.UTF-8 pandas : 0.25.1 numpy : 1.17.0 pytz : 2019.1 dateutil : 2.8.0 pip : 19.2.1 setuptools : 41.0.1 Cython : None pytest : 5.0.1 hypothesis : 4.32.2 sphinx : None blosc : None feather : None xlsxwriter : 1.1.8 lxml.etree : 4.4.0 html5lib : None pymysql : None psycopg2 : 2.8.3 (dt dec pq3 ext lo64) jinja2 : 2.10.1 IPython : 7.7.0 pandas_datareader: None bs4 : None bottleneck : None fastparquet : 0.3.2 gcsfs : None lxml.etree : 4.4.0 matplotlib : None numexpr : 2.6.9 odfpy : None openpyxl : None pandas_gbq : None pyarrow : 0.14.1 pytables : None s3fs : 0.3.1 scipy : None sqlalchemy : 1.2.19 tables : 3.5.2 xarray : None xlrd : None xlwt : None xlsxwriter : 1.1.8 </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/28252/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28252/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/28253
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28253/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28253/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28253/events
https://github.com/pandas-dev/pandas/issues/28253
488,256,580
MDU6SXNzdWU0ODgyNTY1ODA=
28,253
Fix PR06 errors in docstrings ('Parameter "{param_name}" type should use "{right_type}" instead of "{wrong_type}"')
{ "avatar_url": "https://avatars.githubusercontent.com/u/8767088?v=4", "events_url": "https://api.github.com/users/danielplawrence/events{/privacy}", "followers_url": "https://api.github.com/users/danielplawrence/followers", "following_url": "https://api.github.com/users/danielplawrence/following{/other_user}", "gists_url": "https://api.github.com/users/danielplawrence/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/danielplawrence", "id": 8767088, "login": "danielplawrence", "node_id": "MDQ6VXNlcjg3NjcwODg=", "organizations_url": "https://api.github.com/users/danielplawrence/orgs", "received_events_url": "https://api.github.com/users/danielplawrence/received_events", "repos_url": "https://api.github.com/users/danielplawrence/repos", "site_admin": false, "starred_url": "https://api.github.com/users/danielplawrence/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/danielplawrence/subscriptions", "type": "User", "url": "https://api.github.com/users/danielplawrence" }
[ { "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
{ "avatar_url": "https://avatars.githubusercontent.com/u/26743548?v=4", "events_url": "https://api.github.com/users/willpeppo/events{/privacy}", "followers_url": "https://api.github.com/users/willpeppo/followers", "following_url": "https://api.github.com/users/willpeppo/following{/other_user}", "gists_url": "https://api.github.com/users/willpeppo/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/willpeppo", "id": 26743548, "login": "willpeppo", "node_id": "MDQ6VXNlcjI2NzQzNTQ4", "organizations_url": "https://api.github.com/users/willpeppo/orgs", "received_events_url": "https://api.github.com/users/willpeppo/received_events", "repos_url": "https://api.github.com/users/willpeppo/repos", "site_admin": false, "starred_url": "https://api.github.com/users/willpeppo/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/willpeppo/subscriptions", "type": "User", "url": "https://api.github.com/users/willpeppo" }
[ { "avatar_url": "https://avatars.githubusercontent.com/u/26743548?v=4", "events_url": "https://api.github.com/users/willpeppo/events{/privacy}", "followers_url": "https://api.github.com/users/willpeppo/followers", "following_url": "https://api.github.com/users/willpeppo/following{/other_user}", ...
{ "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" }
7
2019-09-02T16:11:02Z
2021-11-20T05:51:53Z
2021-11-20T05:51:53Z
CONTRIBUTOR
null
[link to original issue](https://github.com/pandas-dev/pandas/issues/27977 (27977)) The output of `python scripts/validate_docstrings.py --errors=PR06` returns 257 instances of 'Parameter "{param_name}" type should use "{right_type}" instead of "{wrong_type}' Given the large number of cases, it probably makes sense to break them out by class: - [x] pandas.Series - [ ] pandas.Timestamp - [ ] pandas.Timedelta - [ ] pandas.Period - [ ] pandas.arrays - [ ] pandas.Categorical - [ ] pandas.SparseArray - [ ] pandas.read* (inc. all 'read' methods e.g. read_sql, read spss etc.) - [ ] pandas.HDFStore - [ ] pandas.io.stata - [ ] pandas.core.resample - [ ] pandas.testing - [ ] pandas.api - [ ] pandas.melt - [ ] pandas.pivot - [ ] pandas.pivot_table - [ ] pandas.qcut - [ ] pandas.merge_asof - [ ] pandas.to_numeric - [ ] pandas.to_datetime - [ ] pandas.date_range - [ ] pandas.bdate_range - [ ] pandas.period_range - [ ] pandas.timedelta_range - [ ] pandas.infer_freq - [ ] pandas.interval_range - [ ] pandas.eval - [ ] pandas.util - [ ] pandas.Index - [ ] pandas.CategoricalIndex - [ ] pandas.IntervalIndex - [ ] pandas.MultiIndex - [ ] pandas.DatetimeIndex - [ ] pandas.TimedeltaIndex - [ ] pandas.PeriodIndex - [ ] pandas.Grouper - [ ] pandas.core - [ ] pandas.io - [ ] pandas.DataFrame
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28253/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28253/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/28254
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28254/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28254/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28254/events
https://github.com/pandas-dev/pandas/issues/28254
488,259,045
MDU6SXNzdWU0ODgyNTkwNDU=
28,254
ENH: .pipe to subset of columns
{ "avatar_url": "https://avatars.githubusercontent.com/u/7443941?v=4", "events_url": "https://api.github.com/users/broesler/events{/privacy}", "followers_url": "https://api.github.com/users/broesler/followers", "following_url": "https://api.github.com/users/broesler/following{/other_user}", "gists_url": "https://api.github.com/users/broesler/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/broesler", "id": 7443941, "login": "broesler", "node_id": "MDQ6VXNlcjc0NDM5NDE=", "organizations_url": "https://api.github.com/users/broesler/orgs", "received_events_url": "https://api.github.com/users/broesler/received_events", "repos_url": "https://api.github.com/users/broesler/repos", "site_admin": false, "starred_url": "https://api.github.com/users/broesler/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/broesler/subscriptions", "type": "User", "url": "https://api.github.com/users/broesler" }
[ { "color": "4E9A06", "default": false, "description": null, "id": 76812, "name": "Enhancement", "node_id": "MDU6TGFiZWw3NjgxMg==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Enhancement" } ]
closed
false
null
[]
null
4
2019-09-02T16:18:53Z
2021-07-11T17:24:38Z
2021-07-11T17:24:38Z
NONE
null
#### Feature Request I often find myself writing code like the following to create a pipeline: ```python # specific function def astype_int(df, cols): """Convert columns to integer.""" df = df.copy() df[cols] = df[cols].astype('int') return df # more general def myfun(df, cols): """Custom transformation function.""" df = df.copy() def my_transform(col): """Do something.""" return 100 * col df[cols] = df[cols].apply(my_transform) return df # the pipeline df = (pd.read_csv(my_csv) .rename(columns=column_names) .pipe(astype_int, cols=['a', 'b']) .pipe(myfun, cols=['c', 'd', 'e']) ) ``` where I end up applying a function to a subset of columns. It is cumbersome to write an additional function that ends up in the pipeline, or to write separate lines outside of the pipeline such as: ```python df[cols] = df[cols].apply(my_transform) ``` It would be much more convenient if `df.pipe` accepted a `columns` keyword argument that effectively does behind the scenes what we currently have to write explicitly. Other functions, such as `astype` would need to support this capability as well. The above code would then become: ```python def my_transform(col): """Do something.""" return 100 * col # the pipeline df = (pd.read_csv(my_file) .rename(columns=column_names) .astype('int', columns=['a', 'b']) .pipe(my_transform, columns=['c', 'd', 'e']) ) ``` which is much cleaner. I have started digging into the source code myself, but figured I would put this request out there in case there are any fundamental issues or someone beats me to it.
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28254/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28254/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/28255
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28255/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28255/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28255/events
https://github.com/pandas-dev/pandas/pull/28255
488,300,292
MDExOlB1bGxSZXF1ZXN0MzEzMzUyODY3
28,255
BENCH: Add peakmem benchmarks for rolling
{ "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": "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" }, { "color": "d4c5f9", "default": false...
closed
false
null
[]
{ "closed_at": "2020-01-30T12:18:05Z", "closed_issues": 2207, "created_at": "2012-09-13T02:13:00Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/329591?v=4", "events_url": "https://api.github.com/users/wesm/events{/privacy}", "followers_url": "https://api.github.com/users/wesm/followers", "following_url": "https://api.github.com/users/wesm/following{/other_user}", "gists_url": "https://api.github.com/users/wesm/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/wesm", "id": 329591, "login": "wesm", "node_id": "MDQ6VXNlcjMyOTU5MQ==", "organizations_url": "https://api.github.com/users/wesm/orgs", "received_events_url": "https://api.github.com/users/wesm/received_events", "repos_url": "https://api.github.com/users/wesm/repos", "site_admin": false, "starred_url": "https://api.github.com/users/wesm/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/wesm/subscriptions", "type": "User", "url": "https://api.github.com/users/wesm" }, "description": "on-merge: backport to 1.0.x", "due_on": "2020-02-01T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/16", "id": 174211, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16/labels", "node_id": "MDk6TWlsZXN0b25lMTc0MjEx", "number": 16, "open_issues": 0, "state": "closed", "title": "1.0.0", "updated_at": "2020-01-30T12:18:05Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16" }
2
2019-09-02T19:31:29Z
2019-09-03T05:04:49Z
2019-09-03T05:04:46Z
MEMBER
null
``` $ asv dev -b rolling [ 20.00%] ··· rolling.Methods.peakmem_rolling ok [ 20.00%] ··· ============ ======== ======= ======== ======= ======= ======= ======= ======= ======= ======= ======= -- method ----------------------------- ------------------------------------------------------------------------ contructor window dtype median mean max min std count skew kurt sum ============ ======== ======= ======== ======= ======= ======= ======= ======= ======= ======= ======= DataFrame 10 int 69.4M 67.7M 67.8M 67.7M 68.5M 68.6M 67.8M 67.7M 67.7M DataFrame 10 float 69.4M 67.8M 67.9M 67.7M 68.5M 68.6M 67.8M 67.8M 67.7M DataFrame 1000 int 69.6M 67.8M 67.9M 67.7M 68.6M 68.7M 67.8M 67.8M 67.7M DataFrame 1000 float 70.4M 67.7M 67.8M 67.8M 68.6M 68.5M 67.8M 67.8M 67.7M Series 10 int 72.5M 70.1M 70M 70.1M 71.7M 73.4M 70M 70.1M 70M Series 10 float 72.5M 70.1M 70.1M 70M 71.7M 73.4M 70M 70M 70.1M Series 1000 int 72.6M 70M 70.2M 70.1M 71.7M 73.4M 70M 70.1M 70M Series 1000 float 72.6M 70.1M 70M 70.1M 71.6M 73.3M 70M 70M 70.1M ============ ======== ======= ======== ======= ======= ======= ======= ======= ======= ======= ======= [ 45.00%] ··· rolling.VariableWindowMethods.peakmem_rolling ok [ 45.00%] ··· ============ ======== ======= ======== ======= ======= ======= ======= ======= ======= ======= ======= -- method ----------------------------- ------------------------------------------------------------------------ contructor window dtype median mean max min std count skew kurt sum ============ ======== ======= ======== ======= ======= ======= ======= ======= ======= ======= ======= DataFrame 50s int 69.5M 69.6M 69.6M 69.6M 70.3M 69.5M 69.6M 69.5M 69.6M DataFrame 50s float 69.6M 69.6M 69.6M 69.6M 70.3M 69.5M 69.5M 69.6M 69.5M DataFrame 1h int 69.7M 69.5M 69.6M 69.6M 70.4M 69.5M 69.6M 69.6M 69.6M DataFrame 1h float 69.6M 69.5M 69.6M 69.5M 70.3M 69.6M 69.5M 69.6M 69.6M DataFrame 1d int 74.4M 69.5M 69.7M 69.7M 70.4M 69.5M 69.6M 69.6M 69.6M DataFrame 1d float 73.7M 69.6M 69.7M 69.8M 70.4M 69.5M 69.6M 69.5M 69.5M Series 50s int 71.1M 71.2M 71.1M 71.1M 71.9M 71M 71M 71.1M 71.1M Series 50s float 71.1M 71.1M 71.1M 71.1M 71.8M 71M 71.1M 71M 71.1M Series 1h int 71.1M 71.1M 71.1M 71.1M 71.9M 71.1M 71.1M 71.1M 71.1M Series 1h float 71.2M 71M 71.1M 71.1M 71.9M 71M 71.1M 71.1M 71.1M Series 1d int 73.9M 71.1M 71.2M 71.2M 71.8M 71.1M 71.2M 71M 71M Series 1d float 73M 71M 71.2M 71.2M 71.9M 71M 71M 71M 71.1M ============ ======== ======= ======== ======= ======= ======= ======= ======= ======= ======= ======= ```
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28255/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28255/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/28255.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/28255", "merged_at": "2019-09-03T05:04:46Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/28255.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/28255" }
https://api.github.com/repos/pandas-dev/pandas/issues/28256
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28256/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28256/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28256/events
https://github.com/pandas-dev/pandas/issues/28256
488,317,421
MDU6SXNzdWU0ODgzMTc0MjE=
28,256
Timedelta in to_json object array and ISO dates not handled properly
{ "avatar_url": "https://avatars.githubusercontent.com/u/609873?v=4", "events_url": "https://api.github.com/users/WillAyd/events{/privacy}", "followers_url": "https://api.github.com/users/WillAyd/followers", "following_url": "https://api.github.com/users/WillAyd/following{/other_user}", "gists_url": "https://api.github.com/users/WillAyd/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/WillAyd", "id": 609873, "login": "WillAyd", "node_id": "MDQ6VXNlcjYwOTg3Mw==", "organizations_url": "https://api.github.com/users/WillAyd/orgs", "received_events_url": "https://api.github.com/users/WillAyd/received_events", "repos_url": "https://api.github.com/users/WillAyd/repos", "site_admin": false, "starred_url": "https://api.github.com/users/WillAyd/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/WillAyd/subscriptions", "type": "User", "url": "https://api.github.com/users/WillAyd" }
[ { "color": "207de5", "default": false, "description": "read_json, to_json, json_normalize", "id": 49379259, "name": "IO JSON", "node_id": "MDU6TGFiZWw0OTM3OTI1OQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20JSON" }, { "color": "5319e7", "default": fa...
closed
false
null
[]
{ "closed_at": "2020-07-28T18:13:47Z", "closed_issues": 2378, "created_at": "2019-12-02T12:52:48Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4", "events_url": "https://api.github.com/users/jreback/events{/privacy}", "followers_url": "https://api.github.com/users/jreback/followers", "following_url": "https://api.github.com/users/jreback/following{/other_user}", "gists_url": "https://api.github.com/users/jreback/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jreback", "id": 953992, "login": "jreback", "node_id": "MDQ6VXNlcjk1Mzk5Mg==", "organizations_url": "https://api.github.com/users/jreback/orgs", "received_events_url": "https://api.github.com/users/jreback/received_events", "repos_url": "https://api.github.com/users/jreback/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jreback/subscriptions", "type": "User", "url": "https://api.github.com/users/jreback" }, "description": "", "due_on": "2020-08-01T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/68", "id": 4894670, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68/labels", "node_id": "MDk6TWlsZXN0b25lNDg5NDY3MA==", "number": 68, "open_issues": 0, "state": "closed", "title": "1.1", "updated_at": "2021-07-17T17:25:28Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68" }
7
2019-09-02T21:04:56Z
2020-03-19T00:57:22Z
2020-03-19T00:57:22Z
MEMBER
null
Intertwined with #15137 though a slight different issue. `date_format="iso"` has different behavior for Timedeltas depending on whether or not the Timedelta is in a DTA or an object array. To illustrate: ```python # Wrong format ref 15137, but at least tries to do some formatting >>> pd.DataFrame([[pd.Timedelta("1D")]]).to_json(date_format="iso") '{"0":{"0":"1970-01-02T00:00:00.000Z"}}' # Object array has no formatting >>> pd.DataFrame([[pd.Timedelta("1D")]]).astype(object).to_json(date_format="iso") '{"0":{"0":86400000}}' ``` By contrast the same issue does not appear with datetimes ```python >>> pd.DataFrame([[pd.Timestamp(1)]]).to_json(date_format="iso") '{"0":{"0":"1970-01-01T00:00:00.000Z"}}' # Below still formats as iso in spite of being object array >>> pd.DataFrame([[pd.Timestamp(1)]]).astype(object).to_json(date_format="iso") '{"0":{"0":"1970-01-01T00:00:00.000Z"}}' ```
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28256/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28256/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/28257
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28257/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28257/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28257/events
https://github.com/pandas-dev/pandas/pull/28257
488,327,814
MDExOlB1bGxSZXF1ZXN0MzEzMzczMzkx
28,257
BUG: CategoricalIndex allowed reindexing duplicate sources
{ "avatar_url": "https://avatars.githubusercontent.com/u/18488?v=4", "events_url": "https://api.github.com/users/batterseapower/events{/privacy}", "followers_url": "https://api.github.com/users/batterseapower/followers", "following_url": "https://api.github.com/users/batterseapower/following{/other_user}", "gists_url": "https://api.github.com/users/batterseapower/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/batterseapower", "id": 18488, "login": "batterseapower", "node_id": "MDQ6VXNlcjE4NDg4", "organizations_url": "https://api.github.com/users/batterseapower/orgs", "received_events_url": "https://api.github.com/users/batterseapower/received_events", "repos_url": "https://api.github.com/users/batterseapower/repos", "site_admin": false, "starred_url": "https://api.github.com/users/batterseapower/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/batterseapower/subscriptions", "type": "User", "url": "https://api.github.com/users/batterseapower" }
[ { "color": "0b02e1", "default": false, "description": "Related to indexing on series/frames, not to indexes themselves", "id": 2822098, "name": "Indexing", "node_id": "MDU6TGFiZWwyODIyMDk4", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Indexing" }, { "color": "e1...
closed
false
null
[]
{ "closed_at": "2020-01-30T12:18:05Z", "closed_issues": 2207, "created_at": "2012-09-13T02:13:00Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/329591?v=4", "events_url": "https://api.github.com/users/wesm/events{/privacy}", "followers_url": "https://api.github.com/users/wesm/followers", "following_url": "https://api.github.com/users/wesm/following{/other_user}", "gists_url": "https://api.github.com/users/wesm/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/wesm", "id": 329591, "login": "wesm", "node_id": "MDQ6VXNlcjMyOTU5MQ==", "organizations_url": "https://api.github.com/users/wesm/orgs", "received_events_url": "https://api.github.com/users/wesm/received_events", "repos_url": "https://api.github.com/users/wesm/repos", "site_admin": false, "starred_url": "https://api.github.com/users/wesm/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/wesm/subscriptions", "type": "User", "url": "https://api.github.com/users/wesm" }, "description": "on-merge: backport to 1.0.x", "due_on": "2020-02-01T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/16", "id": 174211, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16/labels", "node_id": "MDk6TWlsZXN0b25lMTc0MjEx", "number": 16, "open_issues": 0, "state": "closed", "title": "1.0.0", "updated_at": "2020-01-30T12:18:05Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16" }
6
2019-09-02T22:12:25Z
2019-10-16T12:52:58Z
2019-10-16T12:52:55Z
CONTRIBUTOR
null
For consistency with normal indexes, `CategoricalIndex.reindex` should allow targets to be duplicated but not the sources. However, currently in allows the source to be duplicated but not the targets, which is exactly the wrong behaviour. Most of the work here is fixing the tests, which in many cases explicitly check for the incorrect behaviour. Fixes #25459 (I can't run the full testsuite on my machine but the relevant categorical tests do seem to pass. Hoping that the GitHub CI infrastructure will pick up any other failures.)
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28257/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28257/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/28257.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/28257", "merged_at": "2019-10-16T12:52:55Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/28257.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/28257" }
https://api.github.com/repos/pandas-dev/pandas/issues/28258
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28258/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28258/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28258/events
https://github.com/pandas-dev/pandas/pull/28258
488,337,114
MDExOlB1bGxSZXF1ZXN0MzEzMzgwNTI0
28,258
Revert #27959
{ "avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4", "events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}", "followers_url": "https://api.github.com/users/jbrockmendel/followers", "following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}", "gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jbrockmendel", "id": 8078968, "login": "jbrockmendel", "node_id": "MDQ6VXNlcjgwNzg5Njg=", "organizations_url": "https://api.github.com/users/jbrockmendel/orgs", "received_events_url": "https://api.github.com/users/jbrockmendel/received_events", "repos_url": "https://api.github.com/users/jbrockmendel/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions", "type": "User", "url": "https://api.github.com/users/jbrockmendel" }
[ { "color": "02d7e1", "default": false, "description": "Concat, Merge/Join, Stack/Unstack, Explode", "id": 13098779, "name": "Reshaping", "node_id": "MDU6TGFiZWwxMzA5ODc3OQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Reshaping" }, { "color": "a2bca7", "de...
closed
false
null
[]
{ "closed_at": "2020-01-30T12:18:05Z", "closed_issues": 2207, "created_at": "2012-09-13T02:13:00Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/329591?v=4", "events_url": "https://api.github.com/users/wesm/events{/privacy}", "followers_url": "https://api.github.com/users/wesm/followers", "following_url": "https://api.github.com/users/wesm/following{/other_user}", "gists_url": "https://api.github.com/users/wesm/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/wesm", "id": 329591, "login": "wesm", "node_id": "MDQ6VXNlcjMyOTU5MQ==", "organizations_url": "https://api.github.com/users/wesm/orgs", "received_events_url": "https://api.github.com/users/wesm/received_events", "repos_url": "https://api.github.com/users/wesm/repos", "site_admin": false, "starred_url": "https://api.github.com/users/wesm/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/wesm/subscriptions", "type": "User", "url": "https://api.github.com/users/wesm" }, "description": "on-merge: backport to 1.0.x", "due_on": "2020-02-01T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/16", "id": 174211, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16/labels", "node_id": "MDk6TWlsZXN0b25lMTc0MjEx", "number": 16, "open_issues": 0, "state": "closed", "title": "1.0.0", "updated_at": "2020-01-30T12:18:05Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16" }
2
2019-09-02T23:31:09Z
2019-09-03T01:31:07Z
2019-09-03T00:07:27Z
MEMBER
null
On Sparse tests it is causing recursion errors. Revert and I'll revisit
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28258/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28258/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/28258.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/28258", "merged_at": "2019-09-03T00:07:27Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/28258.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/28258" }
https://api.github.com/repos/pandas-dev/pandas/issues/28259
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28259/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28259/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28259/events
https://github.com/pandas-dev/pandas/pull/28259
488,341,035
MDExOlB1bGxSZXF1ZXN0MzEzMzgzMzI0
28,259
Fix to_json Memory Tests
{ "avatar_url": "https://avatars.githubusercontent.com/u/609873?v=4", "events_url": "https://api.github.com/users/WillAyd/events{/privacy}", "followers_url": "https://api.github.com/users/WillAyd/followers", "following_url": "https://api.github.com/users/WillAyd/following{/other_user}", "gists_url": "https://api.github.com/users/WillAyd/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/WillAyd", "id": 609873, "login": "WillAyd", "node_id": "MDQ6VXNlcjYwOTg3Mw==", "organizations_url": "https://api.github.com/users/WillAyd/orgs", "received_events_url": "https://api.github.com/users/WillAyd/received_events", "repos_url": "https://api.github.com/users/WillAyd/repos", "site_admin": false, "starred_url": "https://api.github.com/users/WillAyd/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/WillAyd/subscriptions", "type": "User", "url": "https://api.github.com/users/WillAyd" }
[ { "color": "207de5", "default": false, "description": "read_json, to_json, json_normalize", "id": 49379259, "name": "IO JSON", "node_id": "MDU6TGFiZWw0OTM3OTI1OQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20JSON" }, { "color": "ae68cc", "default": fa...
closed
false
null
[]
{ "closed_at": "2020-01-30T12:18:05Z", "closed_issues": 2207, "created_at": "2012-09-13T02:13:00Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/329591?v=4", "events_url": "https://api.github.com/users/wesm/events{/privacy}", "followers_url": "https://api.github.com/users/wesm/followers", "following_url": "https://api.github.com/users/wesm/following{/other_user}", "gists_url": "https://api.github.com/users/wesm/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/wesm", "id": 329591, "login": "wesm", "node_id": "MDQ6VXNlcjMyOTU5MQ==", "organizations_url": "https://api.github.com/users/wesm/orgs", "received_events_url": "https://api.github.com/users/wesm/received_events", "repos_url": "https://api.github.com/users/wesm/repos", "site_admin": false, "starred_url": "https://api.github.com/users/wesm/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/wesm/subscriptions", "type": "User", "url": "https://api.github.com/users/wesm" }, "description": "on-merge: backport to 1.0.x", "due_on": "2020-02-01T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/16", "id": 174211, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16/labels", "node_id": "MDk6TWlsZXN0b25lMTc0MjEx", "number": 16, "open_issues": 0, "state": "closed", "title": "1.0.0", "updated_at": "2020-01-30T12:18:05Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16" }
3
2019-09-03T00:04:39Z
2020-01-16T00:35:11Z
2019-09-04T11:56:26Z
MEMBER
null
Inspired by @mroeschke I noticed the JSON tests weren't actually measuring anything because you need to return something for the `mem_` tests which these weren't. In any case probably better served as `peakmem_`
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28259/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28259/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/28259.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/28259", "merged_at": "2019-09-04T11:56:26Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/28259.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/28259" }
https://api.github.com/repos/pandas-dev/pandas/issues/28260
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28260/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28260/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28260/events
https://github.com/pandas-dev/pandas/pull/28260
488,354,174
MDExOlB1bGxSZXF1ZXN0MzEzMzkyNjQ3
28,260
re-implement #27959
{ "avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4", "events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}", "followers_url": "https://api.github.com/users/jbrockmendel/followers", "following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}", "gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jbrockmendel", "id": 8078968, "login": "jbrockmendel", "node_id": "MDQ6VXNlcjgwNzg5Njg=", "organizations_url": "https://api.github.com/users/jbrockmendel/orgs", "received_events_url": "https://api.github.com/users/jbrockmendel/received_events", "repos_url": "https://api.github.com/users/jbrockmendel/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions", "type": "User", "url": "https://api.github.com/users/jbrockmendel" }
[ { "color": "6138b5", "default": false, "description": "Extending pandas with custom dtypes or arrays.", "id": 849023693, "name": "ExtensionArray", "node_id": "MDU6TGFiZWw4NDkwMjM2OTM=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/ExtensionArray" } ]
closed
false
null
[]
{ "closed_at": "2020-01-30T12:18:05Z", "closed_issues": 2207, "created_at": "2012-09-13T02:13:00Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/329591?v=4", "events_url": "https://api.github.com/users/wesm/events{/privacy}", "followers_url": "https://api.github.com/users/wesm/followers", "following_url": "https://api.github.com/users/wesm/following{/other_user}", "gists_url": "https://api.github.com/users/wesm/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/wesm", "id": 329591, "login": "wesm", "node_id": "MDQ6VXNlcjMyOTU5MQ==", "organizations_url": "https://api.github.com/users/wesm/orgs", "received_events_url": "https://api.github.com/users/wesm/received_events", "repos_url": "https://api.github.com/users/wesm/repos", "site_admin": false, "starred_url": "https://api.github.com/users/wesm/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/wesm/subscriptions", "type": "User", "url": "https://api.github.com/users/wesm" }, "description": "on-merge: backport to 1.0.x", "due_on": "2020-02-01T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/16", "id": 174211, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16/labels", "node_id": "MDk6TWlsZXN0b25lMTc0MjEx", "number": 16, "open_issues": 0, "state": "closed", "title": "1.0.0", "updated_at": "2020-01-30T12:18:05Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16" }
2
2019-09-03T01:39:37Z
2019-09-03T19:04:23Z
2019-09-03T18:53:53Z
MEMBER
null
Previous version broke because a different branch changed the behavior of when extract_array is called.
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28260/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28260/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/28260.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/28260", "merged_at": "2019-09-03T18:53:53Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/28260.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/28260" }
https://api.github.com/repos/pandas-dev/pandas/issues/28261
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28261/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28261/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28261/events
https://github.com/pandas-dev/pandas/issues/28261
488,423,322
MDU6SXNzdWU0ODg0MjMzMjI=
28,261
TypeError: can only concatenate list (not "int") to list
{ "avatar_url": "https://avatars.githubusercontent.com/u/26242648?v=4", "events_url": "https://api.github.com/users/Jasonsey/events{/privacy}", "followers_url": "https://api.github.com/users/Jasonsey/followers", "following_url": "https://api.github.com/users/Jasonsey/following{/other_user}", "gists_url": "https://api.github.com/users/Jasonsey/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Jasonsey", "id": 26242648, "login": "Jasonsey", "node_id": "MDQ6VXNlcjI2MjQyNjQ4", "organizations_url": "https://api.github.com/users/Jasonsey/orgs", "received_events_url": "https://api.github.com/users/Jasonsey/received_events", "repos_url": "https://api.github.com/users/Jasonsey/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Jasonsey/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Jasonsey/subscriptions", "type": "User", "url": "https://api.github.com/users/Jasonsey" }
[ { "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": "Arithmetic, Comparison, ...
open
false
null
[]
null
4
2019-09-03T06:51:14Z
2021-07-11T17:25:42Z
null
NONE
null
#### Code Sample, a copy-pastable example if possible ```python import pandas as pd a = pd.Series([[12]]) b = a + [222] ``` #### Problem description 1. in pandas version 0.24, the code went well 2. in pandas version 0.25.1, the code raise TypeError can only concatenate list (not "int") to list ```shell ~\AppData\Local\Continuum\anaconda3\envs\test\lib\site-packages\pandas\core\ops\__init__.py in na_op(x, y) 967 try: --> 968 result = expressions.evaluate(op, str_rep, x, y, **eval_kwargs) 969 except TypeError: ~\AppData\Local\Continuum\anaconda3\envs\test\lib\site-packages\pandas\core\computation\expressions.py in evaluate(op, op_str, a, b, use_numexpr, **eval_kwargs) 220 if use_numexpr: --> 221 return _evaluate(op, op_str, a, b, **eval_kwargs) 222 return _evaluate_standard(op, op_str, a, b) ~\AppData\Local\Continuum\anaconda3\envs\test\lib\site-packages\pandas\core\computation\expressions.py in _evaluate_standard(op, op_str, a, b, **eval_kwargs) 69 with np.errstate(all="ignore"): ---> 70 return op(a, b) 71 TypeError: can only concatenate list (not "int") to list ``` #### Expected Output no error should be raised #### Output of ``pd.show_versions()`` <details> INSTALLED VERSIONS ------------------ commit : None python : 3.6.8.final.0 python-bits : 64 OS : Windows OS-release : 10 machine : AMD64 processor : Intel64 Family 6 Model 142 Stepping 10, GenuineIntel byteorder : little LC_ALL : None LANG : None LOCALE : None.None pandas : 0.25.1 numpy : 1.16.3 pytz : 2019.1 dateutil : 2.8.0 pip : 19.0.3 setuptools : 41.0.0 Cython : None pytest : None hypothesis : None sphinx : None blosc : None feather : None xlsxwriter : None lxml.etree : 4.3.3 html5lib : None pymysql : None psycopg2 : None jinja2 : 2.10.1 IPython : 7.8.0 pandas_datareader: None bs4 : None bottleneck : None fastparquet : None gcsfs : None lxml.etree : 4.3.3 matplotlib : 3.1.0 numexpr : None odfpy : None openpyxl : None pandas_gbq : None pyarrow : None pytables : None s3fs : None scipy : 1.2.1 sqlalchemy : None tables : None xarray : None xlrd : None xlwt : None xlsxwriter : 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/28261/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28261/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/28262
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28262/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28262/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28262/events
https://github.com/pandas-dev/pandas/issues/28262
488,456,795
MDU6SXNzdWU0ODg0NTY3OTU=
28,262
Non-silently handle duplicate column names
{ "avatar_url": "https://avatars.githubusercontent.com/u/3750140?v=4", "events_url": "https://api.github.com/users/twolodzko/events{/privacy}", "followers_url": "https://api.github.com/users/twolodzko/followers", "following_url": "https://api.github.com/users/twolodzko/following{/other_user}", "gists_url": "https://api.github.com/users/twolodzko/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/twolodzko", "id": 3750140, "login": "twolodzko", "node_id": "MDQ6VXNlcjM3NTAxNDA=", "organizations_url": "https://api.github.com/users/twolodzko/orgs", "received_events_url": "https://api.github.com/users/twolodzko/received_events", "repos_url": "https://api.github.com/users/twolodzko/repos", "site_admin": false, "starred_url": "https://api.github.com/users/twolodzko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/twolodzko/subscriptions", "type": "User", "url": "https://api.github.com/users/twolodzko" }
[]
closed
false
null
[]
null
1
2019-09-03T08:14:12Z
2019-09-03T11:33:37Z
2019-09-03T11:33:37Z
NONE
null
#### Code Sample, a copy-pastable example if possible ```python >>> df = pd.DataFrame([[1, 2, 3]], columns=["x", "y", "x"]) >>> df['x'] x x 0 1 3 >>> df.loc[:, 'x'] x x 0 1 3 >>> df['x'].between(1,2) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "[...]/python3.7/site-packages/pandas/core/generic.py", line 5179, in __getattr__ return object.__getattribute__(self, name) AttributeError: 'DataFrame' object has no attribute 'between' ``` Hopefully: ```python >>> df.join(pd.DataFrame([[4]], columns=["x"])) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "[...]/python3.7/site-packages/pandas/core/frame.py", line 7246, in join other, on=on, how=how, lsuffix=lsuffix, rsuffix=rsuffix, sort=sort File "[...]/python3.7/site-packages/pandas/core/frame.py", line 7269, in _join_compat sort=sort, File "[...]/python3.7/site-packages/pandas/core/reshape/merge.py", line 83, in merge return op.get_result() File "[...]/python3.7/site-packages/pandas/core/reshape/merge.py", line 648, in get_result ldata.items, lsuf, rdata.items, rsuf File "[...]/python3.7/site-packages/pandas/core/reshape/merge.py", line 2011, in _items_overlap_with_suffix "{rename}".format(rename=to_rename) ValueError: columns overlap but no suffix specified: Index(['x', 'x'], dtype='object') ``` But... ```python >>> pd.concat([df, pd.DataFrame([[4]], columns=["x"])], axis=1) x y x x 0 1 2 3 4 ``` #### Problem description At this moment, Pandas allows duplicate column names. This can potentially lead to problems, when user expects to receive `pd.Series` when asking for a single column, if they are not aware that the column names are duplicated. This is especially problematic with automatic processing, where column duplication can easily appear as a consequence of some bug. #### Expected Output **Better solution:** at the time of creating the `pd.DataFrame` _or_ adding new column to `pd.DataFrame`, when the column name is duplicated, the code fails with an error message informing about the duplicated name. This is easy to implement and failing fast is usually a good practice. **Worse solutions:** 1. Similar as above, but instead of crashing, the warning message is displayed _both_: (a) when initializing duplicated column, and (b) during _any_ operation that calls the duplicated column. In such case user would be aware that the behaviour of Pandas may give different results then if he was calling by the non-duplicated column name. 2. Silently add suffixes to duplicated column names when they appear, as for example, R does. Best to be done with some warning or info message. _Examples:_ * Python's [DataTable](https://datatable.readthedocs.io/en/latest/quick-start.html) by default silently overwrites the duplicated column (bad): ```python >>> dt.Frame({"x" : [1], "y": [2], "x": [3]}) x y -- -- -- 0 3 2 ``` * R by default renames the duplicated column (little better): ```R > data.frame(x=1, y=2, x=3) x y x.1 1 1 2 3 ``` * R's dplyr fails fast with error: ```R > tibble(x=1, y=2, x=3) Error: Column name `x` must not be duplicated. Use .name_repair to specify repair. Call `rlang::last_error()` to see a backtrace ``` #### Output of ``pd.show_versions()`` <details> INSTALLED VERSIONS ------------------ commit : None python : 3.7.3.final.0 python-bits : 64 OS : Linux OS-release : 5.0.0-25-generic machine : x86_64 processor : x86_64 byteorder : little LC_ALL : None LANG : en_US.UTF-8 LOCALE : en_US.UTF-8 pandas : 0.25.1 numpy : 1.17.1 pytz : 2019.2 dateutil : 2.8.0 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 fastparquet : None gcsfs : None lxml.etree : None matplotlib : None numexpr : None odfpy : None openpyxl : None pandas_gbq : None pyarrow : None pytables : None s3fs : None scipy : None sqlalchemy : None tables : None xarray : None xlrd : None xlwt : None xlsxwriter : 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/28262/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28262/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/28263
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28263/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28263/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28263/events
https://github.com/pandas-dev/pandas/issues/28263
488,500,002
MDU6SXNzdWU0ODg1MDAwMDI=
28,263
pandas.read_parquet cause OOM in a 16GB machine, it's a 200MB parquet file, 6M rows.
{ "avatar_url": "https://avatars.githubusercontent.com/u/1221615?v=4", "events_url": "https://api.github.com/users/cupen/events{/privacy}", "followers_url": "https://api.github.com/users/cupen/followers", "following_url": "https://api.github.com/users/cupen/following{/other_user}", "gists_url": "https://api.github.com/users/cupen/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/cupen", "id": 1221615, "login": "cupen", "node_id": "MDQ6VXNlcjEyMjE2MTU=", "organizations_url": "https://api.github.com/users/cupen/orgs", "received_events_url": "https://api.github.com/users/cupen/received_events", "repos_url": "https://api.github.com/users/cupen/repos", "site_admin": false, "starred_url": "https://api.github.com/users/cupen/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/cupen/subscriptions", "type": "User", "url": "https://api.github.com/users/cupen" }
[ { "color": "207de5", "default": false, "description": "Clarification about behavior needed to assess issue", "id": 307649777, "name": "Needs Info", "node_id": "MDU6TGFiZWwzMDc2NDk3Nzc=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Needs%20Info" } ]
closed
false
null
[]
null
6
2019-09-03T09:41:57Z
2019-09-03T15:44:18Z
2019-09-03T15:28:28Z
NONE
null
#### Code Sample, a copy-pastable example if possible ```python import pandas as pd # query from db datalist = ... # 6M rows, 4 fields(string string string datetime) every row. df = pd.from_dict(datalist) df.to_parquet("test.pq") df = pd.read_parquet("test.pq") # OOM ``` #### Problem description > df.info() <class 'pandas.core.frame.DataFrame'> RangeIndex: 6741512 entries, 0 to 6741511 Data columns (total 5 columns): index int64 _id object wxOpenID object channel object createdAt datetime64[ns] dtypes: datetime64[ns](1), int64(1), object(3) memory usage: 257.2+ MB It have 6M rows writed to disk(a parquet file), and the file size was 200MB. then, I read it from the parquet file, it causes a OOM. #### Expected Output do not make OOM. #### Output of ``pd.show_versions()`` <details> pd.show_versions() INSTALLED VERSIONS ------------------ commit : None python : 3.6.8.final.0 python-bits : 64 OS : Linux OS-release : 3.10.0-957.5.1.el7.x86_64 machine : x86_64 processor : x86_64 byteorder : little LC_ALL : None LANG : en_US.UTF-8 LOCALE : en_US.UTF-8 pandas : 0.25.1 numpy : 1.17.1 pytz : 2019.2 dateutil : 2.8.0 pip : 19.2.3 setuptools : 40.6.2 Cython : None pytest : None hypothesis : None sphinx : None blosc : None feather : None xlsxwriter : None lxml.etree : None html5lib : None pymysql : None psycopg2 : None jinja2 : 2.10.1 IPython : 7.8.0 pandas_datareader: None bs4 : None bottleneck : None fastparquet : None gcsfs : None lxml.etree : None matplotlib : None numexpr : None odfpy : None openpyxl : 2.6.3 pandas_gbq : None pyarrow : 0.14.1 pytables : None s3fs : None scipy : None sqlalchemy : None tables : None xarray : None xlrd : None xlwt : None xlsxwriter : None
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28263/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28263/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/28264
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28264/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28264/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28264/events
https://github.com/pandas-dev/pandas/pull/28264
488,576,189
MDExOlB1bGxSZXF1ZXN0MzEzNTY4Nzg5
28,264
Contribute to issue #15580
{ "avatar_url": "https://avatars.githubusercontent.com/u/11521474?v=4", "events_url": "https://api.github.com/users/GabrielValeRios/events{/privacy}", "followers_url": "https://api.github.com/users/GabrielValeRios/followers", "following_url": "https://api.github.com/users/GabrielValeRios/following{/other_user}", "gists_url": "https://api.github.com/users/GabrielValeRios/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/GabrielValeRios", "id": 11521474, "login": "GabrielValeRios", "node_id": "MDQ6VXNlcjExNTIxNDc0", "organizations_url": "https://api.github.com/users/GabrielValeRios/orgs", "received_events_url": "https://api.github.com/users/GabrielValeRios/received_events", "repos_url": "https://api.github.com/users/GabrielValeRios/repos", "site_admin": false, "starred_url": "https://api.github.com/users/GabrielValeRios/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/GabrielValeRios/subscriptions", "type": "User", "url": "https://api.github.com/users/GabrielValeRios" }
[]
closed
false
null
[]
null
1
2019-09-03T12:29:47Z
2019-09-05T15:34:03Z
2019-09-05T15:34:03Z
NONE
null
- [ ] closes #15580 - [ ] tests added / passed - [ ] passes `black pandas` - [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff` - [ ] whatsnew entry I'm new at contributing on Pandas and any project at all, and saw this generic "fix docs" issue. I made some very small changes that i think it helps users to understand better the `groupBy` usage. Please, feel free to judge my changes and request modifications. Thanks!
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28264/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28264/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/28264.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/28264", "merged_at": null, "patch_url": "https://github.com/pandas-dev/pandas/pull/28264.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/28264" }
https://api.github.com/repos/pandas-dev/pandas/issues/28265
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28265/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28265/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28265/events
https://github.com/pandas-dev/pandas/pull/28265
488,591,395
MDExOlB1bGxSZXF1ZXN0MzEzNTgwNzU2
28,265
BUG: pd.to_datetime fixed (#28238)
{ "avatar_url": "https://avatars.githubusercontent.com/u/13368721?v=4", "events_url": "https://api.github.com/users/Samuelgranato/events{/privacy}", "followers_url": "https://api.github.com/users/Samuelgranato/followers", "following_url": "https://api.github.com/users/Samuelgranato/following{/other_user}", "gists_url": "https://api.github.com/users/Samuelgranato/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Samuelgranato", "id": 13368721, "login": "Samuelgranato", "node_id": "MDQ6VXNlcjEzMzY4NzIx", "organizations_url": "https://api.github.com/users/Samuelgranato/orgs", "received_events_url": "https://api.github.com/users/Samuelgranato/received_events", "repos_url": "https://api.github.com/users/Samuelgranato/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Samuelgranato/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Samuelgranato/subscriptions", "type": "User", "url": "https://api.github.com/users/Samuelgranato" }
[]
closed
false
null
[]
null
3
2019-09-03T12:59:35Z
2019-09-07T17:48:56Z
2019-09-07T17:48:56Z
NONE
null
- [ ] closes #28238 - [ ] tests added / passed - [x] passes `black pandas` - [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff` - [ ] whatsnew entry Fix for KeyError when trying to convert a series with unsorted float index to a DateTime @AntonioAndraues @Vinigl
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28265/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28265/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/28265.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/28265", "merged_at": null, "patch_url": "https://github.com/pandas-dev/pandas/pull/28265.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/28265" }
https://api.github.com/repos/pandas-dev/pandas/issues/28266
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28266/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28266/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28266/events
https://github.com/pandas-dev/pandas/issues/28266
488,641,718
MDU6SXNzdWU0ODg2NDE3MTg=
28,266
set timeoffset as the window parameter doesn't work for rolling corr function
{ "avatar_url": "https://avatars.githubusercontent.com/u/53201505?v=4", "events_url": "https://api.github.com/users/TusakaRin/events{/privacy}", "followers_url": "https://api.github.com/users/TusakaRin/followers", "following_url": "https://api.github.com/users/TusakaRin/following{/other_user}", "gists_url": "https://api.github.com/users/TusakaRin/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/TusakaRin", "id": 53201505, "login": "TusakaRin", "node_id": "MDQ6VXNlcjUzMjAxNTA1", "organizations_url": "https://api.github.com/users/TusakaRin/orgs", "received_events_url": "https://api.github.com/users/TusakaRin/received_events", "repos_url": "https://api.github.com/users/TusakaRin/repos", "site_admin": false, "starred_url": "https://api.github.com/users/TusakaRin/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/TusakaRin/subscriptions", "type": "User", "url": "https://api.github.com/users/TusakaRin" }
[ { "color": "0e8a16", "default": true, "description": null, "id": 717120670, "name": "good first issue", "node_id": "MDU6TGFiZWw3MTcxMjA2NzA=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/good%20first%20issue" }, { "color": "cdea3c", "default": false, "de...
closed
false
null
[]
{ "closed_at": null, "closed_issues": 786, "created_at": "2015-01-13T10:53:19Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4", "events_url": "https://api.github.com/users/jreback/events{/privacy}", "followers_url": "https://api.github.com/users/jreback/followers", "following_url": "https://api.github.com/users/jreback/following{/other_user}", "gists_url": "https://api.github.com/users/jreback/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jreback", "id": 953992, "login": "jreback", "node_id": "MDQ6VXNlcjk1Mzk5Mg==", "organizations_url": "https://api.github.com/users/jreback/orgs", "received_events_url": "https://api.github.com/users/jreback/received_events", "repos_url": "https://api.github.com/users/jreback/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jreback/subscriptions", "type": "User", "url": "https://api.github.com/users/jreback" }, "description": "Changes that would be nice to have in the next release. These issues are not blocking. They will be pushed to the next release if no one has time to fix them.", "due_on": null, "html_url": "https://github.com/pandas-dev/pandas/milestone/32", "id": 933188, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/32/labels", "node_id": "MDk6TWlsZXN0b25lOTMzMTg4", "number": 32, "open_issues": 1053, "state": "open", "title": "Contributions Welcome", "updated_at": "2021-11-21T00:50:06Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/32" }
5
2019-09-03T14:30:54Z
2020-10-26T03:18:18Z
2020-10-26T03:18:18Z
NONE
null
#### Code Sample, a copy-pastable example if possible ```python import pandas as pd df = pd.DataFrame({'B': [0, 1, 2, 4,3],'A':[7,4,6,9,3]}, index = [pd.Timestamp('20130101 09:00:00'), pd.Timestamp('20130102 09:00:02'), pd.Timestamp('20130103 09:00:03'), pd.Timestamp('20130105 09:00:05'), pd.Timestamp('20130106 09:00:06')]) print(df.corr()) ''' df.corr() Out[53]: B A B 1.00000 0.19868 A 0.19868 1.00000 ''' df.rolling(window='3d').corr() ''' B A 2013-01-01 09:00:00 B NaN NaN A NaN NaN 2013-01-02 09:00:02 B 1.000000 -1.000000 A -1.000000 1.000000 2013-01-03 09:00:03 B 1.000000 -0.327327 A -0.327327 1.000000 2013-01-05 09:00:05 B 1.000000 0.609449 A 0.609449 1.000000 2013-01-06 09:00:06 B 1.000000 0.198680 A 0.198680 1.000000 ''' ``` #### Problem description Due to some conflicts I'm not able to test it on pandas 0.25, so I'm not sure whether the problem is solved. You may find that the last coorelation value 0.198680 is exactly the same as perform corr() on the total dataframe. No matter how I change the timeoffset, namely the window parameter, the rolling(window='timeoffset string').corr() method returns cummulative correlation instead of correlation inside the window. The reason why the expected output contains so many 'ones' is that rows which not fall in the time window should not be included into the calculation. For example, the 'ones' at the last row is calculated by the fourth row and the fifth row(the last row), because the indices is between 2013-01-03 09:00:06 and 2013-01-06 09:00:06 (the window parameter is 3d) and the correlation of these two point pairs is 1. #### Expected Output ```pyhon B A 2013-01-01 09:00:00 B NaN NaN A NaN NaN 2013-01-02 09:00:02 B 1.000000 -1.000000 A -1.000000 1.000000 2013-01-03 09:00:03 B 1.000000 -0.327327 A -0.327327 1.000000 2013-01-05 09:00:05 B 1.000000 1.000000 A 1.000000 1.000000 2013-01-06 09:00:06 B 1.000000 1.000000 A 1.000000 1.000000 ``` #### Output of ``pd.show_versions()`` <details> ------------------ commit: None python: 3.7.3.final.0 python-bits: 64 OS: Windows OS-release: 10 machine: AMD64 processor: Intel64 Family 6 Model 142 Stepping 10, GenuineIntel byteorder: little LC_ALL: None LANG: zh_CN LOCALE: None.None pandas: 0.24.2 pytest: 4.3.1 pip: 19.0.3 setuptools: 40.8.0 Cython: 0.29.6 numpy: 1.16.2 scipy: 1.2.1 pyarrow: None xarray: None IPython: 7.4.0 sphinx: 1.8.5 patsy: 0.5.1 dateutil: 2.8.0 pytz: 2018.9 blosc: None bottleneck: 1.2.1 tables: 3.5.1 numexpr: 2.6.9 feather: None matplotlib: 3.0.3 openpyxl: 2.6.1 xlrd: 1.2.0 xlwt: 1.3.0 xlsxwriter: 1.1.5 lxml.etree: 4.3.2 bs4: 4.7.1 html5lib: 1.0.1 sqlalchemy: 1.3.1 pymysql: None psycopg2: None jinja2: 2.10 s3fs: None fastparquet: None pandas_gbq: None pandas_datareader: None gcsfs: None </details>
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28266/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28266/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/28267
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28267/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28267/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28267/events
https://github.com/pandas-dev/pandas/pull/28267
488,729,451
MDExOlB1bGxSZXF1ZXN0MzEzNjkxNDY0
28,267
BUG: Make sure correct values are passed to Rolling._on when axis=1
{ "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": "AFEEEE", "default": false, "description": null, "id": 211840, ...
closed
false
null
[]
{ "closed_at": "2020-01-30T12:18:05Z", "closed_issues": 2207, "created_at": "2012-09-13T02:13:00Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/329591?v=4", "events_url": "https://api.github.com/users/wesm/events{/privacy}", "followers_url": "https://api.github.com/users/wesm/followers", "following_url": "https://api.github.com/users/wesm/following{/other_user}", "gists_url": "https://api.github.com/users/wesm/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/wesm", "id": 329591, "login": "wesm", "node_id": "MDQ6VXNlcjMyOTU5MQ==", "organizations_url": "https://api.github.com/users/wesm/orgs", "received_events_url": "https://api.github.com/users/wesm/received_events", "repos_url": "https://api.github.com/users/wesm/repos", "site_admin": false, "starred_url": "https://api.github.com/users/wesm/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/wesm/subscriptions", "type": "User", "url": "https://api.github.com/users/wesm" }, "description": "on-merge: backport to 1.0.x", "due_on": "2020-02-01T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/16", "id": 174211, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16/labels", "node_id": "MDk6TWlsZXN0b25lMTc0MjEx", "number": 16, "open_issues": 0, "state": "closed", "title": "1.0.0", "updated_at": "2020-01-30T12:18:05Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16" }
3
2019-09-03T17:24:19Z
2019-09-04T17:10:19Z
2019-09-04T17:07:17Z
MEMBER
null
- [x] closes #28192 - [x] tests added / passed - [x] passes `black pandas` - [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff` - [x] whatsnew entry
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28267/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28267/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/28267.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/28267", "merged_at": "2019-09-04T17:07:17Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/28267.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/28267" }
https://api.github.com/repos/pandas-dev/pandas/issues/28268
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28268/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28268/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28268/events
https://github.com/pandas-dev/pandas/pull/28268
488,741,692
MDExOlB1bGxSZXF1ZXN0MzEzNzAwOTIy
28,268
BUG: Timestamp+int should raise NullFrequencyError, not ValueError
{ "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": "0052cc", "default": false, "description": "DateOffsets", "id": ...
closed
false
null
[]
{ "closed_at": "2020-01-30T12:18:05Z", "closed_issues": 2207, "created_at": "2012-09-13T02:13:00Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/329591?v=4", "events_url": "https://api.github.com/users/wesm/events{/privacy}", "followers_url": "https://api.github.com/users/wesm/followers", "following_url": "https://api.github.com/users/wesm/following{/other_user}", "gists_url": "https://api.github.com/users/wesm/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/wesm", "id": 329591, "login": "wesm", "node_id": "MDQ6VXNlcjMyOTU5MQ==", "organizations_url": "https://api.github.com/users/wesm/orgs", "received_events_url": "https://api.github.com/users/wesm/received_events", "repos_url": "https://api.github.com/users/wesm/repos", "site_admin": false, "starred_url": "https://api.github.com/users/wesm/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/wesm/subscriptions", "type": "User", "url": "https://api.github.com/users/wesm" }, "description": "on-merge: backport to 1.0.x", "due_on": "2020-02-01T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/16", "id": 174211, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16/labels", "node_id": "MDk6TWlsZXN0b25lMTc0MjEx", "number": 16, "open_issues": 0, "state": "closed", "title": "1.0.0", "updated_at": "2020-01-30T12:18:05Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16" }
8
2019-09-03T17:53:21Z
2019-09-08T17:12:39Z
2019-09-08T17:09:55Z
MEMBER
null
Last prerequisite before we can fix #28080.
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28268/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28268/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/28268.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/28268", "merged_at": "2019-09-08T17:09:55Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/28268.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/28268" }
https://api.github.com/repos/pandas-dev/pandas/issues/28269
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28269/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28269/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28269/events
https://github.com/pandas-dev/pandas/issues/28269
488,742,837
MDU6SXNzdWU0ODg3NDI4Mzc=
28,269
Casting bool to object during join
{ "avatar_url": "https://avatars.githubusercontent.com/u/1337103?v=4", "events_url": "https://api.github.com/users/kjschiroo/events{/privacy}", "followers_url": "https://api.github.com/users/kjschiroo/followers", "following_url": "https://api.github.com/users/kjschiroo/following{/other_user}", "gists_url": "https://api.github.com/users/kjschiroo/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kjschiroo", "id": 1337103, "login": "kjschiroo", "node_id": "MDQ6VXNlcjEzMzcxMDM=", "organizations_url": "https://api.github.com/users/kjschiroo/orgs", "received_events_url": "https://api.github.com/users/kjschiroo/received_events", "repos_url": "https://api.github.com/users/kjschiroo/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kjschiroo/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kjschiroo/subscriptions", "type": "User", "url": "https://api.github.com/users/kjschiroo" }
[ { "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, Stac...
open
false
null
[]
null
2
2019-09-03T17:56:06Z
2021-07-11T17:26:21Z
null
NONE
null
```python import pandas as pd core_df = pd.DataFrame([ {'id': 1}, {'id': 2}, ]).set_index('id') df1 = pd.DataFrame([ {'id': 1, 'foo': True}, {'id': 2, 'foo': False}, ]).set_index('id') df2 = pd.DataFrame([ {'id': 1, 'bar': 3}, {'id': 2, 'bar': 4}, {'id': 3, 'bar': 4}, # Adding a new row in df2 is required to create the issue ]).set_index('id') result = core_df.join([df1, df2]) print(result.dtypes) # With pandas 0.24.2 # foo bool <- stays a bool # bar int64 # dtype: object # # With pandas 0.25.1 # foo object <- Changed to object # bar int64 # dtype: object ``` #### Problem description This is a kind of subtle issue when upgrading from `0.24` to `0.25`. When joining dataframes onto an initial dataframe, if one of the dataframes being joined in has an extra row compared to the other it will cause any boolean columns to be cast to object columns. This is a change in behavior from 0.24 which would leave them as bools. #### Expected Output In the example above I would expect the `foo` column to remain of dtype `bool`. #### Output of ``pd.show_versions()`` <details> INSTALLED VERSIONS ------------------ commit : None python : 3.7.3.final.0 python-bits : 64 OS : Darwin OS-release : 18.6.0 machine : x86_64 processor : i386 byteorder : little LC_ALL : None LANG : en_US.UTF-8 LOCALE : en_US.UTF-8 pandas : 0.25.1 numpy : 1.16.3 pytz : 2019.1 dateutil : 2.8.0 pip : 19.0.3 setuptools : 41.1.0 Cython : None pytest : 4.4.1 hypothesis : None sphinx : 2.0.1 blosc : None feather : None xlsxwriter : None lxml.etree : None html5lib : None pymysql : 0.9.3 psycopg2 : None jinja2 : 2.10.1 IPython : None pandas_datareader: None bs4 : 4.7.1 bottleneck : None fastparquet : None gcsfs : None lxml.etree : None matplotlib : 3.1.1 numexpr : 2.6.9 odfpy : None openpyxl : None pandas_gbq : None pyarrow : 0.13.0 pytables : None s3fs : None scipy : 1.2.1 sqlalchemy : 1.3.3 tables : 3.5.2 xarray : None xlrd : None xlwt : None xlsxwriter : 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/28269/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28269/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/28270
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28270/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28270/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28270/events
https://github.com/pandas-dev/pandas/issues/28270
488,757,915
MDU6SXNzdWU0ODg3NTc5MTU=
28,270
Issue with pandas delimiter
{ "avatar_url": "https://avatars.githubusercontent.com/u/44502617?v=4", "events_url": "https://api.github.com/users/melissabarnett/events{/privacy}", "followers_url": "https://api.github.com/users/melissabarnett/followers", "following_url": "https://api.github.com/users/melissabarnett/following{/other_user}", "gists_url": "https://api.github.com/users/melissabarnett/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/melissabarnett", "id": 44502617, "login": "melissabarnett", "node_id": "MDQ6VXNlcjQ0NTAyNjE3", "organizations_url": "https://api.github.com/users/melissabarnett/orgs", "received_events_url": "https://api.github.com/users/melissabarnett/received_events", "repos_url": "https://api.github.com/users/melissabarnett/repos", "site_admin": false, "starred_url": "https://api.github.com/users/melissabarnett/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/melissabarnett/subscriptions", "type": "User", "url": "https://api.github.com/users/melissabarnett" }
[]
closed
false
null
[]
null
7
2019-09-03T18:32:20Z
2019-11-03T00:48:56Z
2019-11-03T00:48:55Z
NONE
null
#### Code Sample, a copy-pastable example if possible ```python from census import Census import pandas as pd from sqlalchemy import create_engine import csv import sys filename = 'C:/Users/APIlist2.csv' with open(filename) as f: reader = csv.reader(f) try: for row in reader: print(row) except csv.Error as e: sys.exit('file {}, line {}: {}'.format(filename, reader.line_num, e)) def getdata(mylist, tablename, schema): # Create db engine# # engine = create_engine('postgresql://blahblah/melissa', convert_unicode=True) # Census parameters # state_fips = '*' state_fips = [str(i).zfill(2) for i in range(1, 56)] county_fips = '*' tract = '*' c = Census('key', year=2017, session=None) # replace ca.... with your api key from census # print(state_fips) # Extract data for s in state_fips: x = c.acs5.state_county_tract(mylist, s, county_fips, tract) # mylist is a list of census variable names df = pd.DataFrame(x) # convert data to data frame df.to_sql(tablename, engine, schema=schema, if_exists='append') def main(): # mylist = ['B01001_001E'] # above B01001 is the table is required by the Python census library;001 is the variable in the table; and E =estimate. # two lines below will read from a CSV file. variable names must be stored in a column called Code df = pd.read_csv('C:/Users/APIlist2.csv', header=0, encoding='unicode_escape', delimiter=',', lineterminator='\n') mylist = df['Code'].values.tolist() tablename = '2017acs5b' getdata(mylist, tablename, 'census') main() ``` #### Problem description I am reading from column 'Code' and the line with more than one variable is not returning a delimiter with ',' instead each line is one variable therefore the variable is """"census.core.CensusException: error: error: unknown variable ''"""" [['Code', 'Description'] [**'C24060_003E'**, 'Administrative n emergency services'] [**'B99171_003E, B01003_001E'**, 'Percent living in poverty'] [**'B26103_005E, B01003_001E'**, 'Per capita residents in nursing homes,'] [**'B26103_005E**', 'Number of people living in group quarters'] [**'B26001_001E, B09001_001E'**, 'Percent population living group quarters'] ['B25121_077E, B25122_001E', 'Percent of households earning more than 75000, '] ['B25032_013E, B00002_001E', 'Percent renter-occupied housing units'] ['B25024_010E, B00002_001E', 'Percent of housing units that are mobile homes, '] ['B25024_007E, B25024_008E, B25024_009E, B25001_001E', 'Percent of housing units with 10 or more units'] ['B25024_007E, B25024_008E, B25024_009E', 'Number of housing units with 10 or more units'] ['B25003_003E, B00002_001E', 'Percent of renter-occupied housing units']] If the issue has not been resolved there, go ahead and file it in the issue tracker. #### Expected Output ['Code', 'Description'] ['C24060_003E', 'Administrative n emergency services'] ['B99171_003E', 'B01003_001E', 'Percent living in poverty'] ['B26103_005E', 'B01003_001E', 'Per capita residents in nursing homes,'] ['B26103_005E', 'Number of people living in group quarters'] ['B26001_001E', 'B09001_001E', 'Percent population living group quarters'] ['B25121_077E', 'B25122_001E', 'Percent of households earning more than 75000, '] ['B25032_013E', 'B00002_001E', 'Percent renter-occupied housing units'] ['B25024_010E', 'B00002_001E', 'Percent of housing units that are mobile homes, '] ['B25024_007E', 'B25024_008E', 'B25024_009E', 'B25001_001E', 'Percent of housing units with 10 or more units'] ['B25024_007E', 'B25024_008E', 'B25024_009E', 'Number of housing units with 10 or more units'] ['B25003_003E', 'B00002_001E', 'Percent of renter-occupied housing units'] #######I need to have a delimiter after every comma #### Output of ``pd.show_versions()`` INSTALLED VERSIONS ------------------ commit : None python : 3.7.4.final.0 python-bits : 64 OS : Windows OS-release : 10 machine : AMD64 processor : Intel64 Family 6 Model 94 Stepping 3, GenuineIntel byteorder : little LC_ALL : None LANG : None LOCALE : None.None pandas : 0.25.1 numpy : 1.17.1 pytz : 2019.2 dateutil : 2.8.0 pip : 19.0.3 setuptools : 40.8.0 [paste the output of ``pd.show_versions()`` here below this line] INSTALLED VERSIONS ------------------ commit : None python : 3.7.4.final.0 python-bits : 64 OS : Windows OS-release : 10 machine : AMD64 processor : Intel64 Family 6 Model 94 Stepping 3, GenuineIntel byteorder : little LC_ALL : None LANG : None LOCALE : None.None pandas : 0.25.1 numpy : 1.17.1 pytz : 2019.2 dateutil : 2.8.0 pip : 19.0.3 setuptools : 40.8.0
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28270/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28270/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/28271
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28271/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28271/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28271/events
https://github.com/pandas-dev/pandas/issues/28271
488,772,339
MDU6SXNzdWU0ODg3NzIzMzk=
28,271
to_numeric(errors='ignore') doesn't work with leading zeros
{ "avatar_url": "https://avatars.githubusercontent.com/u/10762127?v=4", "events_url": "https://api.github.com/users/amarvin/events{/privacy}", "followers_url": "https://api.github.com/users/amarvin/followers", "following_url": "https://api.github.com/users/amarvin/following{/other_user}", "gists_url": "https://api.github.com/users/amarvin/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/amarvin", "id": 10762127, "login": "amarvin", "node_id": "MDQ6VXNlcjEwNzYyMTI3", "organizations_url": "https://api.github.com/users/amarvin/orgs", "received_events_url": "https://api.github.com/users/amarvin/received_events", "repos_url": "https://api.github.com/users/amarvin/repos", "site_admin": false, "starred_url": "https://api.github.com/users/amarvin/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/amarvin/subscriptions", "type": "User", "url": "https://api.github.com/users/amarvin" }
[]
closed
false
null
[]
null
2
2019-09-03T19:05:44Z
2019-09-26T19:49:32Z
2019-09-26T19:49:32Z
NONE
null
#### Code Sample, a copy-pastable example if possible ```python s = pd.Series([1, 1.0, '1', '1.0', ' 1', ' 1.0', '01', '01.0']) pd.to_numeric(s, errors='ignore') # returns [1, 1, 1, 1.0, 1, 1.0, '01', '01.0'] # but expected [1, 1, 1, 1.0, 1, 1.0, 1, 1.0] ``` #### Problem description The `to_numeric` function doesn't work as expected if the string contains leading zeros. #### Expected Output I would expect that `'01'` gets converted to `1`, just like in the leading whitespace case of `' 1'` converting to `1`. #### Output of ``pd.show_versions()`` <details> INSTALLED VERSIONS ------------------ commit : None python : 3.7.0.final.0 python-bits : 64 OS : Windows OS-release : 10 machine : AMD64 processor : Intel64 Family 6 Model 78 Stepping 3, GenuineIntel byteorder : little LC_ALL : None LANG : None LOCALE : None.None pandas : 0.25.1 numpy : 1.17.0 pytz : 2018.5 dateutil : 2.7.3 pip : 18.1 setuptools : 40.2.0 Cython : 0.28.5 pytest : 3.8.0 hypothesis : None sphinx : 1.7.9 blosc : None feather : None xlsxwriter : 1.1.0 lxml.etree : 4.2.5 html5lib : 1.0.1 pymysql : None psycopg2 : 2.8.2 (dt dec pq3 ext lo64) jinja2 : 2.10 IPython : 6.5.0 pandas_datareader: None bs4 : 4.6.3 bottleneck : 1.2.1 fastparquet : None gcsfs : None lxml.etree : 4.2.5 matplotlib : 2.2.3 numexpr : 2.6.8 odfpy : None openpyxl : 2.5.6 pandas_gbq : None pyarrow : None pytables : None s3fs : None scipy : 1.3.1 sqlalchemy : 1.2.11 tables : 3.4.4 xarray : None xlrd : 1.1.0 xlwt : 1.3.0 xlsxwriter : 1.1.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/28271/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28271/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/28272
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28272/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28272/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28272/events
https://github.com/pandas-dev/pandas/pull/28272
488,776,912
MDExOlB1bGxSZXF1ZXN0MzEzNzI5MDA3
28,272
DEV: remove seed isort config
{ "avatar_url": "https://avatars.githubusercontent.com/u/1312546?v=4", "events_url": "https://api.github.com/users/TomAugspurger/events{/privacy}", "followers_url": "https://api.github.com/users/TomAugspurger/followers", "following_url": "https://api.github.com/users/TomAugspurger/following{/other_user}", "gists_url": "https://api.github.com/users/TomAugspurger/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/TomAugspurger", "id": 1312546, "login": "TomAugspurger", "node_id": "MDQ6VXNlcjEzMTI1NDY=", "organizations_url": "https://api.github.com/users/TomAugspurger/orgs", "received_events_url": "https://api.github.com/users/TomAugspurger/received_events", "repos_url": "https://api.github.com/users/TomAugspurger/repos", "site_admin": false, "starred_url": "https://api.github.com/users/TomAugspurger/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/TomAugspurger/subscriptions", "type": "User", "url": "https://api.github.com/users/TomAugspurger" }
[ { "color": "a2bca7", "default": false, "description": "Continuous Integration", "id": 48070600, "name": "CI", "node_id": "MDU6TGFiZWw0ODA3MDYwMA==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/CI" } ]
closed
false
null
[]
{ "closed_at": "2020-01-30T12:18:05Z", "closed_issues": 2207, "created_at": "2012-09-13T02:13:00Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/329591?v=4", "events_url": "https://api.github.com/users/wesm/events{/privacy}", "followers_url": "https://api.github.com/users/wesm/followers", "following_url": "https://api.github.com/users/wesm/following{/other_user}", "gists_url": "https://api.github.com/users/wesm/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/wesm", "id": 329591, "login": "wesm", "node_id": "MDQ6VXNlcjMyOTU5MQ==", "organizations_url": "https://api.github.com/users/wesm/orgs", "received_events_url": "https://api.github.com/users/wesm/received_events", "repos_url": "https://api.github.com/users/wesm/repos", "site_admin": false, "starred_url": "https://api.github.com/users/wesm/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/wesm/subscriptions", "type": "User", "url": "https://api.github.com/users/wesm" }, "description": "on-merge: backport to 1.0.x", "due_on": "2020-02-01T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/16", "id": 174211, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16/labels", "node_id": "MDk6TWlsZXN0b25lMTc0MjEx", "number": 16, "open_issues": 0, "state": "closed", "title": "1.0.0", "updated_at": "2020-01-30T12:18:05Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16" }
2
2019-09-03T19:16:44Z
2019-09-04T11:26:12Z
2019-09-04T11:26:12Z
CONTRIBUTOR
null
This was causing issues for me locally. Anyone else? It took a while to run, and didn't seem to give the same output as others (depends on something peculiar to my environment) which doesn't seem to be great for a pre-commit hook. Closes https://github.com/pandas-dev/pandas/issues/28236
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28272/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28272/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/28272.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/28272", "merged_at": "2019-09-04T11:26:12Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/28272.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/28272" }
https://api.github.com/repos/pandas-dev/pandas/issues/28273
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28273/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28273/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28273/events
https://github.com/pandas-dev/pandas/issues/28273
488,838,931
MDU6SXNzdWU0ODg4Mzg5MzE=
28,273
Address Untested to_json Extension Module Code
{ "avatar_url": "https://avatars.githubusercontent.com/u/609873?v=4", "events_url": "https://api.github.com/users/WillAyd/events{/privacy}", "followers_url": "https://api.github.com/users/WillAyd/followers", "following_url": "https://api.github.com/users/WillAyd/following{/other_user}", "gists_url": "https://api.github.com/users/WillAyd/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/WillAyd", "id": 609873, "login": "WillAyd", "node_id": "MDQ6VXNlcjYwOTg3Mw==", "organizations_url": "https://api.github.com/users/WillAyd/orgs", "received_events_url": "https://api.github.com/users/WillAyd/received_events", "repos_url": "https://api.github.com/users/WillAyd/repos", "site_admin": false, "starred_url": "https://api.github.com/users/WillAyd/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/WillAyd/subscriptions", "type": "User", "url": "https://api.github.com/users/WillAyd" }
[ { "color": "C4A000", "default": false, "description": "pandas testing functions or related to the test suite", "id": 127685, "name": "Testing", "node_id": "MDU6TGFiZWwxMjc2ODU=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Testing" }, { "color": "207de5", "d...
open
false
null
[]
null
2
2019-09-03T21:43:23Z
2020-05-08T21:13:14Z
null
MEMBER
null
There's an old TODO note about untested code in the extension module hanging around in objToJSON.c: https://github.com/pandas-dev/pandas/blob/bfff080275b4456b28d71f0c7b4ec9e678d4270c/pandas/_libs/src/ujson/python/objToJSON.c#L504 Interestingly enough, this is actually tested by the `np.datetime64` parameter in `test_encode_as_null` as part of the `test_ujson.py` module: https://github.com/pandas-dev/pandas/blob/bfff080275b4456b28d71f0c7b4ec9e678d4270c/pandas/tests/io/json/test_ujson.py#L388 The intent here is somewhat blurry. I think the `test_ujson.py` module was created when it was up for discussion if we wanted the JSON serializers to be publicly exposed at the top level (see #9147) which I don't believe is still something we want to do. At that time it would make sense to explicitly support the `np.datetime64` type. The remaining question then is whether `np.datetime64` should be represented within a pandas container. It seems that this can be held in a Series with an object dtype but not a DataFrame, as shown below: ```python >>> ser = pd.Series([np.datetime64("2000-01-01")], dtype=object) >>> type(ser.iloc[0]) numpy.datetime64 >>> type(ser.to_frame().iloc[0, 0]) pandas._libs.tslibs.timestamps.Timestamp ``` If we don't want `np.datetime64` objects to be contained then we can delete this code altogether. If we do we should add test coverage for it, but then also address the inconsistency across container types above
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28273/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28273/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/28274
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28274/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28274/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28274/events
https://github.com/pandas-dev/pandas/issues/28274
488,874,233
MDU6SXNzdWU0ODg4NzQyMzM=
28,274
NDFrame.sum ignores min_count for object dtype
{ "avatar_url": "https://avatars.githubusercontent.com/u/6313008?v=4", "events_url": "https://api.github.com/users/mbkupfer/events{/privacy}", "followers_url": "https://api.github.com/users/mbkupfer/followers", "following_url": "https://api.github.com/users/mbkupfer/following{/other_user}", "gists_url": "https://api.github.com/users/mbkupfer/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mbkupfer", "id": 6313008, "login": "mbkupfer", "node_id": "MDQ6VXNlcjYzMTMwMDg=", "organizations_url": "https://api.github.com/users/mbkupfer/orgs", "received_events_url": "https://api.github.com/users/mbkupfer/received_events", "repos_url": "https://api.github.com/users/mbkupfer/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mbkupfer/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mbkupfer/subscriptions", "type": "User", "url": "https://api.github.com/users/mbkupfer" }
[ { "color": "d7e102", "default": false, "description": "np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate", "id": 2822342, "name": "Missing-data", "node_id": "MDU6TGFiZWwyODIyMzQy", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Missing-data" }, { "color": "006b75"...
closed
false
null
[]
null
7
2019-09-03T23:52:37Z
2021-07-11T17:31:00Z
2021-07-11T17:31:00Z
CONTRIBUTOR
null
#### Code Sample, a copy-pastable example if possible ```python >>> index = pd.MultiIndex.from_product([['a'], ['foo', 'bar']]) >>> s = pd.Series([np.nan] * 2, index=index) >>> s.astype('O').sum(level=1, min_count=1) foo 0 bar 0 dtype: int64 ``` #### Problem description Using sum with a multiindex and dtype set to object will force all answers to 0, and not `nan` as is expected. This is confusing, since pandas automatically coerces np.nan when this isn't the case, see below. ```python >>> s = pd.Series([np.nan]) >>> s.astype('O').sum(min_count=1) nan ``` <details> [paste the output of ``pd.show_versions()`` here below this line] INSTALLED VERSIONS ------------------ commit : None python : 3.7.3.final.0 python-bits : 64 OS : Darwin OS-release : 18.7.0 machine : x86_64 processor : i386 byteorder : little LC_ALL : None LANG : en_US.UTF-8 LOCALE : en_US.UTF-8 pandas : 0.25.1 numpy : 1.16.3 pytz : 2019.1 dateutil : 2.8.0 pip : 19.2.1 setuptools : 41.0.1 Cython : None pytest : 5.0.1 hypothesis : None sphinx : 2.1.2 blosc : None feather : None xlsxwriter : None lxml.etree : 4.4.0 html5lib : None pymysql : None psycopg2 : None jinja2 : 2.10.1 IPython : 7.5.0 pandas_datareader: None bs4 : 4.8.0 bottleneck : None fastparquet : None gcsfs : None lxml.etree : 4.4.0 matplotlib : None numexpr : None odfpy : None openpyxl : 2.6.2 pandas_gbq : None pyarrow : None pytables : None s3fs : None scipy : None sqlalchemy : 1.3.6 tables : None xarray : None xlrd : 1.2.0 xlwt : None xlsxwriter : 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/28274/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28274/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/28275
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28275/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28275/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28275/events
https://github.com/pandas-dev/pandas/pull/28275
488,877,832
MDExOlB1bGxSZXF1ZXN0MzEzODEwMDkz
28,275
BUG: passing DataFrame to make_block silently raises
{ "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
3
2019-09-04T00:09:06Z
2020-04-05T17:35:48Z
2019-09-16T21:04:22Z
MEMBER
null
ATM in the `except NotImplementedError:` branch of `_cython_agg_blocks`, we take a difference approach to the operation. if that approach succeeds, we end up passing a DataFrame to `make_block` on L189, which will raise `ValueError`. As a result, we'll end up falling back to python-space for the entire operation, which presumably entails a performance hit. This fixes the incorrect passing of DataFrame, but the fix is kind of kludgy. Suggestions welcome on how to improve 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/28275/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28275/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/28275.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/28275", "merged_at": null, "patch_url": "https://github.com/pandas-dev/pandas/pull/28275.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/28275" }
https://api.github.com/repos/pandas-dev/pandas/issues/28276
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28276/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28276/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28276/events
https://github.com/pandas-dev/pandas/pull/28276
488,911,873
MDExOlB1bGxSZXF1ZXN0MzEzODM2MDQ2
28,276
CLN: catch Exception in fewer places, assorted cleanups
{ "avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4", "events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}", "followers_url": "https://api.github.com/users/jbrockmendel/followers", "following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}", "gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jbrockmendel", "id": 8078968, "login": "jbrockmendel", "node_id": "MDQ6VXNlcjgwNzg5Njg=", "organizations_url": "https://api.github.com/users/jbrockmendel/orgs", "received_events_url": "https://api.github.com/users/jbrockmendel/received_events", "repos_url": "https://api.github.com/users/jbrockmendel/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions", "type": "User", "url": "https://api.github.com/users/jbrockmendel" }
[ { "color": "207de5", "default": false, "description": null, "id": 211029535, "name": "Clean", "node_id": "MDU6TGFiZWwyMTEwMjk1MzU=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Clean" } ]
closed
false
null
[]
{ "closed_at": "2020-01-30T12:18:05Z", "closed_issues": 2207, "created_at": "2012-09-13T02:13:00Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/329591?v=4", "events_url": "https://api.github.com/users/wesm/events{/privacy}", "followers_url": "https://api.github.com/users/wesm/followers", "following_url": "https://api.github.com/users/wesm/following{/other_user}", "gists_url": "https://api.github.com/users/wesm/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/wesm", "id": 329591, "login": "wesm", "node_id": "MDQ6VXNlcjMyOTU5MQ==", "organizations_url": "https://api.github.com/users/wesm/orgs", "received_events_url": "https://api.github.com/users/wesm/received_events", "repos_url": "https://api.github.com/users/wesm/repos", "site_admin": false, "starred_url": "https://api.github.com/users/wesm/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/wesm/subscriptions", "type": "User", "url": "https://api.github.com/users/wesm" }, "description": "on-merge: backport to 1.0.x", "due_on": "2020-02-01T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/16", "id": 174211, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16/labels", "node_id": "MDk6TWlsZXN0b25lMTc0MjEx", "number": 16, "open_issues": 0, "state": "closed", "title": "1.0.0", "updated_at": "2020-01-30T12:18:05Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16" }
1
2019-09-04T02:51:26Z
2019-09-04T15:30:21Z
2019-09-04T11:23: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/28276/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28276/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/28276.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/28276", "merged_at": "2019-09-04T11:23:12Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/28276.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/28276" }
https://api.github.com/repos/pandas-dev/pandas/issues/28277
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28277/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28277/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28277/events
https://github.com/pandas-dev/pandas/issues/28277
488,943,918
MDU6SXNzdWU0ODg5NDM5MTg=
28,277
`series.str.cat(series.str)` is concatenating only the largest string
{ "avatar_url": "https://avatars.githubusercontent.com/u/11587734?v=4", "events_url": "https://api.github.com/users/AK-ayush/events{/privacy}", "followers_url": "https://api.github.com/users/AK-ayush/followers", "following_url": "https://api.github.com/users/AK-ayush/following{/other_user}", "gists_url": "https://api.github.com/users/AK-ayush/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/AK-ayush", "id": 11587734, "login": "AK-ayush", "node_id": "MDQ6VXNlcjExNTg3NzM0", "organizations_url": "https://api.github.com/users/AK-ayush/orgs", "received_events_url": "https://api.github.com/users/AK-ayush/received_events", "repos_url": "https://api.github.com/users/AK-ayush/repos", "site_admin": false, "starred_url": "https://api.github.com/users/AK-ayush/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/AK-ayush/subscriptions", "type": "User", "url": "https://api.github.com/users/AK-ayush" }
[ { "color": "e10c02", "default": false, "description": null, "id": 76811, "name": "Bug", "node_id": "MDU6TGFiZWw3NjgxMQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug" }, { "color": "ffa0ff", "default": false, "description": "Incorrect or improved er...
open
false
null
[]
{ "closed_at": null, "closed_issues": 786, "created_at": "2015-01-13T10:53:19Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4", "events_url": "https://api.github.com/users/jreback/events{/privacy}", "followers_url": "https://api.github.com/users/jreback/followers", "following_url": "https://api.github.com/users/jreback/following{/other_user}", "gists_url": "https://api.github.com/users/jreback/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jreback", "id": 953992, "login": "jreback", "node_id": "MDQ6VXNlcjk1Mzk5Mg==", "organizations_url": "https://api.github.com/users/jreback/orgs", "received_events_url": "https://api.github.com/users/jreback/received_events", "repos_url": "https://api.github.com/users/jreback/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jreback/subscriptions", "type": "User", "url": "https://api.github.com/users/jreback" }, "description": "Changes that would be nice to have in the next release. These issues are not blocking. They will be pushed to the next release if no one has time to fix them.", "due_on": null, "html_url": "https://github.com/pandas-dev/pandas/milestone/32", "id": 933188, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/32/labels", "node_id": "MDk6TWlsZXN0b25lOTMzMTg4", "number": 32, "open_issues": 1053, "state": "open", "title": "Contributions Welcome", "updated_at": "2021-11-21T00:50:06Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/32" }
8
2019-09-04T05:11:59Z
2021-07-11T17:32:09Z
null
NONE
null
#### Code Sample, a copy-pastable example if possible ```python import pandas as pd arr = ["AbC", "de", "FGHI", "j", "kLLLm"] ps = pd.Series(arr) expect = ps.str.cat(others=ps.str) print(expect) Out[16]: 0 NaN 1 NaN 2 NaN 3 NaN 4 kLLLmkLLLm dtype: object ``` #### Problem description `series.str.cat(series.str)` is concatenating only the largest string in the series but it should concatenate all the strings element wise. #### Expected Output ```python Out[18]: 0 AbCAbC 1 dede 2 FGHIFGHI 3 jj 4 kLLLmkLLLm dtype: object ``` #### Output of ``pd.show_versions()`` <details> In [2]: pandas.show_versions() INSTALLED VERSIONS ------------------ commit: None python: 3.7.3.final.0 python-bits: 64 OS: Linux OS-release: 3.10.0-862.14.4.el7.x86_64 machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: None LOCALE: en_US.UTF-8 pandas: 0.24.2 pytest: 5.1.2 pip: 19.2.3 setuptools: 41.2.0 Cython: 0.29.13 numpy: 1.17.1 scipy: None pyarrow: 0.14.1 xarray: None IPython: 7.8.0 sphinx: 2.2.0 patsy: None dateutil: 2.8.0 pytz: 2019.2 blosc: None bottleneck: None tables: None numexpr: None feather: None matplotlib: None openpyxl: None xlrd: None xlwt: None xlsxwriter: None lxml.etree: None bs4: None html5lib: None sqlalchemy: None pymysql: None psycopg2: None jinja2: 2.10.1 s3fs: 0.3.4 fastparquet: None pandas_gbq: None pandas_datareader: None gcsfs: None </details>
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28277/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28277/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/28278
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28278/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28278/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28278/events
https://github.com/pandas-dev/pandas/issues/28278
488,964,971
MDU6SXNzdWU0ODg5NjQ5NzE=
28,278
pivot_table(..., values='a') and pivot_talbe(...)['a'] yield different output
{ "avatar_url": "https://avatars.githubusercontent.com/u/19483573?v=4", "events_url": "https://api.github.com/users/xwhuaduo/events{/privacy}", "followers_url": "https://api.github.com/users/xwhuaduo/followers", "following_url": "https://api.github.com/users/xwhuaduo/following{/other_user}", "gists_url": "https://api.github.com/users/xwhuaduo/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/xwhuaduo", "id": 19483573, "login": "xwhuaduo", "node_id": "MDQ6VXNlcjE5NDgzNTcz", "organizations_url": "https://api.github.com/users/xwhuaduo/orgs", "received_events_url": "https://api.github.com/users/xwhuaduo/received_events", "repos_url": "https://api.github.com/users/xwhuaduo/repos", "site_admin": false, "starred_url": "https://api.github.com/users/xwhuaduo/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/xwhuaduo/subscriptions", "type": "User", "url": "https://api.github.com/users/xwhuaduo" }
[]
closed
false
null
[]
null
2
2019-09-04T06:21:27Z
2019-11-03T00:49:47Z
2019-11-03T00:49:46Z
NONE
null
#### Code Sample ```python aaa = pd.pivot_table(data=human, index='patient_ID', columns='Hugo_Symbol', fill_value=0, values='RNA.alt.fra') bbb = pd.pivot_table(data=human, index='patient_ID', columns='Hugo_Symbol', fill_value=0)['RNA.alt.fra'] print(aaa.shape) >>> (39, 4553) print(bbb.shape) >>> (39, 4556) ``` #### Problem description `pivot_table` with `values='a'` assigned works faster, but in my case, it drop off three columns. Any ideas why this is happenning? Thanks!
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28278/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28278/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/28279
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28279/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28279/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28279/events
https://github.com/pandas-dev/pandas/issues/28279
488,967,105
MDU6SXNzdWU0ODg5NjcxMDU=
28,279
Series.loc[list] with uint64 keys returns a dataframe with Float64Index
{ "avatar_url": "https://avatars.githubusercontent.com/u/7797029?v=4", "events_url": "https://api.github.com/users/oguzhanogreden/events{/privacy}", "followers_url": "https://api.github.com/users/oguzhanogreden/followers", "following_url": "https://api.github.com/users/oguzhanogreden/following{/other_user}", "gists_url": "https://api.github.com/users/oguzhanogreden/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/oguzhanogreden", "id": 7797029, "login": "oguzhanogreden", "node_id": "MDQ6VXNlcjc3OTcwMjk=", "organizations_url": "https://api.github.com/users/oguzhanogreden/orgs", "received_events_url": "https://api.github.com/users/oguzhanogreden/received_events", "repos_url": "https://api.github.com/users/oguzhanogreden/repos", "site_admin": false, "starred_url": "https://api.github.com/users/oguzhanogreden/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/oguzhanogreden/subscriptions", "type": "User", "url": "https://api.github.com/users/oguzhanogreden" }
[ { "color": "0b02e1", "default": false, "description": "Related to indexing on series/frames, not to indexes themselves", "id": 2822098, "name": "Indexing", "node_id": "MDU6TGFiZWwyODIyMDk4", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Indexing" } ]
closed
false
null
[]
{ "closed_at": "2020-01-30T12:18:05Z", "closed_issues": 2207, "created_at": "2012-09-13T02:13:00Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/329591?v=4", "events_url": "https://api.github.com/users/wesm/events{/privacy}", "followers_url": "https://api.github.com/users/wesm/followers", "following_url": "https://api.github.com/users/wesm/following{/other_user}", "gists_url": "https://api.github.com/users/wesm/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/wesm", "id": 329591, "login": "wesm", "node_id": "MDQ6VXNlcjMyOTU5MQ==", "organizations_url": "https://api.github.com/users/wesm/orgs", "received_events_url": "https://api.github.com/users/wesm/received_events", "repos_url": "https://api.github.com/users/wesm/repos", "site_admin": false, "starred_url": "https://api.github.com/users/wesm/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/wesm/subscriptions", "type": "User", "url": "https://api.github.com/users/wesm" }, "description": "on-merge: backport to 1.0.x", "due_on": "2020-02-01T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/16", "id": 174211, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16/labels", "node_id": "MDk6TWlsZXN0b25lMTc0MjEx", "number": 16, "open_issues": 0, "state": "closed", "title": "1.0.0", "updated_at": "2020-01-30T12:18:05Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16" }
1
2019-09-04T06:27:51Z
2019-11-27T20:47:44Z
2019-11-27T20:47:44Z
CONTRIBUTOR
null
#### Code Sample, a copy-pastable example if possible ```python bug = pd.Series([0, 1, 2, 3, 4], index=[7606741985629028552, 17876870360202815256, 13106359306506049338, 8991270399732411471, 8991270399732411472]) assert bug.loc[7606741985629028552]==0 assert bug.loc[17876870360202815256]==1 bug.loc[[7606741985629028552, 17876870360202815256]].index ``` #### Problem description The above selection should not have the side effect of modifying data types. I noticed this while looking at #28023 but I think this is a separate issue, so I'm documenting it separately. #### Output of ``pd.show_versions()`` [Same with #28023, I'll update this when I have my laptop at hand.]
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28279/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28279/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/28280
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28280/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28280/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28280/events
https://github.com/pandas-dev/pandas/issues/28280
489,068,200
MDU6SXNzdWU0ODkwNjgyMDA=
28,280
Documentation DataFrame.plot() not available
{ "avatar_url": "https://avatars.githubusercontent.com/u/24390473?v=4", "events_url": "https://api.github.com/users/fgotzens/events{/privacy}", "followers_url": "https://api.github.com/users/fgotzens/followers", "following_url": "https://api.github.com/users/fgotzens/following{/other_user}", "gists_url": "https://api.github.com/users/fgotzens/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/fgotzens", "id": 24390473, "login": "fgotzens", "node_id": "MDQ6VXNlcjI0MzkwNDcz", "organizations_url": "https://api.github.com/users/fgotzens/orgs", "received_events_url": "https://api.github.com/users/fgotzens/received_events", "repos_url": "https://api.github.com/users/fgotzens/repos", "site_admin": false, "starred_url": "https://api.github.com/users/fgotzens/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/fgotzens/subscriptions", "type": "User", "url": "https://api.github.com/users/fgotzens" }
[ { "color": "009800", "default": false, "description": "Duplicate issue or pull request", "id": 40153326, "name": "Duplicate Report", "node_id": "MDU6TGFiZWw0MDE1MzMyNg==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Duplicate%20Report" } ]
closed
false
null
[]
null
1
2019-09-04T10:11:58Z
2019-09-04T10:55:22Z
2019-09-04T10:55:22Z
NONE
null
#### Problem description In the current stable pandas documentation both [DataFrame.plot()](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.plot.html#pandas.DataFrame.plot) and [Series.plot()](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.plot.html?highlight=plot#pandas.Series.plot) pages are broken, i.e. there is no content showing up. Therefore, currently, one has to go back to an older version (e.g. [this](https://pandas.pydata.org/pandas-docs/version/0.17.0/generated/pandas.DataFrame.plot.html?highlight=plot#pandas.DataFrame.plot)) or a the latest [beta version](https://pandas-docs.github.io/pandas-docs-travis/reference/api/pandas.DataFrame.plot.html?highlight=plot#pandas.DataFrame.plot) .
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28280/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28280/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/28281
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28281/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28281/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28281/events
https://github.com/pandas-dev/pandas/pull/28281
489,101,422
MDExOlB1bGxSZXF1ZXN0MzEzOTg3MzU5
28,281
DOC: Fix typo in min_rows / max_rows option example
{ "avatar_url": "https://avatars.githubusercontent.com/u/25571700?v=4", "events_url": "https://api.github.com/users/tobycheese/events{/privacy}", "followers_url": "https://api.github.com/users/tobycheese/followers", "following_url": "https://api.github.com/users/tobycheese/following{/other_user}", "gists_url": "https://api.github.com/users/tobycheese/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/tobycheese", "id": 25571700, "login": "tobycheese", "node_id": "MDQ6VXNlcjI1NTcxNzAw", "organizations_url": "https://api.github.com/users/tobycheese/orgs", "received_events_url": "https://api.github.com/users/tobycheese/received_events", "repos_url": "https://api.github.com/users/tobycheese/repos", "site_admin": false, "starred_url": "https://api.github.com/users/tobycheese/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/tobycheese/subscriptions", "type": "User", "url": "https://api.github.com/users/tobycheese" }
[ { "color": "3465A4", "default": false, "description": null, "id": 134699, "name": "Docs", "node_id": "MDU6TGFiZWwxMzQ2OTk=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Docs" } ]
closed
false
null
[]
{ "closed_at": "2020-01-30T12:18:05Z", "closed_issues": 2207, "created_at": "2012-09-13T02:13:00Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/329591?v=4", "events_url": "https://api.github.com/users/wesm/events{/privacy}", "followers_url": "https://api.github.com/users/wesm/followers", "following_url": "https://api.github.com/users/wesm/following{/other_user}", "gists_url": "https://api.github.com/users/wesm/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/wesm", "id": 329591, "login": "wesm", "node_id": "MDQ6VXNlcjMyOTU5MQ==", "organizations_url": "https://api.github.com/users/wesm/orgs", "received_events_url": "https://api.github.com/users/wesm/received_events", "repos_url": "https://api.github.com/users/wesm/repos", "site_admin": false, "starred_url": "https://api.github.com/users/wesm/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/wesm/subscriptions", "type": "User", "url": "https://api.github.com/users/wesm" }, "description": "on-merge: backport to 1.0.x", "due_on": "2020-02-01T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/16", "id": 174211, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16/labels", "node_id": "MDk6TWlsZXN0b25lMTc0MjEx", "number": 16, "open_issues": 0, "state": "closed", "title": "1.0.0", "updated_at": "2020-01-30T12:18:05Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16" }
3
2019-09-04T11:25:42Z
2019-09-05T07:49:56Z
2019-09-04T16:13:12Z
CONTRIBUTOR
null
- Fix typo in example - Regenerated output also seems to fix a bad output in the next line (out 32 in current online documentation) where df is truncated, when it shouldn't by according to the code
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28281/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28281/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/28281.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/28281", "merged_at": "2019-09-04T16:13:12Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/28281.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/28281" }
https://api.github.com/repos/pandas-dev/pandas/issues/28282
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28282/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28282/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28282/events
https://github.com/pandas-dev/pandas/issues/28282
489,109,007
MDU6SXNzdWU0ODkxMDkwMDc=
28,282
DataFrame.itertuples() incorrectly determines when plain tuples should be used
{ "avatar_url": "https://avatars.githubusercontent.com/u/1235663?v=4", "events_url": "https://api.github.com/users/plamut/events{/privacy}", "followers_url": "https://api.github.com/users/plamut/followers", "following_url": "https://api.github.com/users/plamut/following{/other_user}", "gists_url": "https://api.github.com/users/plamut/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/plamut", "id": 1235663, "login": "plamut", "node_id": "MDQ6VXNlcjEyMzU2NjM=", "organizations_url": "https://api.github.com/users/plamut/orgs", "received_events_url": "https://api.github.com/users/plamut/received_events", "repos_url": "https://api.github.com/users/plamut/repos", "site_admin": false, "starred_url": "https://api.github.com/users/plamut/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/plamut/subscriptions", "type": "User", "url": "https://api.github.com/users/plamut" }
[ { "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": "e11d21", "de...
closed
false
null
[]
{ "closed_at": "2020-01-30T12:18:05Z", "closed_issues": 2207, "created_at": "2012-09-13T02:13:00Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/329591?v=4", "events_url": "https://api.github.com/users/wesm/events{/privacy}", "followers_url": "https://api.github.com/users/wesm/followers", "following_url": "https://api.github.com/users/wesm/following{/other_user}", "gists_url": "https://api.github.com/users/wesm/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/wesm", "id": 329591, "login": "wesm", "node_id": "MDQ6VXNlcjMyOTU5MQ==", "organizations_url": "https://api.github.com/users/wesm/orgs", "received_events_url": "https://api.github.com/users/wesm/received_events", "repos_url": "https://api.github.com/users/wesm/repos", "site_admin": false, "starred_url": "https://api.github.com/users/wesm/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/wesm/subscriptions", "type": "User", "url": "https://api.github.com/users/wesm" }, "description": "on-merge: backport to 1.0.x", "due_on": "2020-02-01T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/16", "id": 174211, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16/labels", "node_id": "MDk6TWlsZXN0b25lMTc0MjEx", "number": 16, "open_issues": 0, "state": "closed", "title": "1.0.0", "updated_at": "2020-01-30T12:18:05Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16" }
1
2019-09-04T11:43:15Z
2020-01-02T00:58:16Z
2020-01-02T00:58:16Z
NONE
null
#### Code Sample, a copy-pastable example if possible ```python >>> import pandas, sys >>> sys.version '3.6.7 (default, Oct 25 2018, 09:16:13) \n[GCC 5.4.0 20160609]' >>> pandas.__version__ '0.25.1' >>> df = pandas.DataFrame([{f"foo_{i}": f"bar_{i}" for i in range(255)}]) >>> df.itertuples(index=False) ... SyntaxError: more than 255 arguments ``` The issue seems to have been caused/revealed by [this commit](https://github.com/pandas-dev/pandas/commit/81f5c0164e6cb26cc8fea00ebc22f4fe93771ff6#diff-1e79abbbdd150d4771b91ea60a4e1cc7R903) that removed the try-catch block around the namedtuple class creation. FWIW, this issue is _not_ reproducible in version `0.24.2`, and is also not a problem in Python 3.7+, as the limit of the max number of arguments that can be passed to a function has been removed (AFAIK). #### Problem description The [condition](https://github.com/pandas-dev/pandas/blob/v0.25.1/pandas/core/frame.py#L970) in `itertuples()` method does not correctly determine when plain tuples should be used instead of named tuples. This how the named tuple [class template](https://github.com/python/cpython/blob/3.6/Lib/collections/__init__.py#L301-L349) defines the `__new__()` method (in Python 3.6 at least): ```py """ ... def __new__(_cls, {arg_list}): ... """ ``` If there are 255 column names given, the total number of arguments to `__new__()` will be 256, because of that extra `cls`, causing a syntax error.
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28282/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28282/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/28283
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28283/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28283/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28283/events
https://github.com/pandas-dev/pandas/issues/28283
489,121,239
MDU6SXNzdWU0ODkxMjEyMzk=
28,283
Various methods don't call call __finalize__
{ "avatar_url": "https://avatars.githubusercontent.com/u/1312546?v=4", "events_url": "https://api.github.com/users/TomAugspurger/events{/privacy}", "followers_url": "https://api.github.com/users/TomAugspurger/followers", "following_url": "https://api.github.com/users/TomAugspurger/following{/other_user}", "gists_url": "https://api.github.com/users/TomAugspurger/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/TomAugspurger", "id": 1312546, "login": "TomAugspurger", "node_id": "MDQ6VXNlcjEzMTI1NDY=", "organizations_url": "https://api.github.com/users/TomAugspurger/orgs", "received_events_url": "https://api.github.com/users/TomAugspurger/received_events", "repos_url": "https://api.github.com/users/TomAugspurger/repos", "site_admin": false, "starred_url": "https://api.github.com/users/TomAugspurger/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/TomAugspurger/subscriptions", "type": "User", "url": "https://api.github.com/users/TomAugspurger" }
[ { "color": "e10c02", "default": false, "description": null, "id": 76811, "name": "Bug", "node_id": "MDU6TGFiZWw3NjgxMQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug" }, { "color": "0e8a16", "default": true, "description": null, "id": 717120670,...
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" }
34
2019-09-04T12:10:47Z
2021-10-23T21:46:31Z
null
CONTRIBUTOR
null
Improve coverage of NDFrame.__finalize__ Pandas uses `NDFrame.__finalize__` to propagate metadata from one NDFrame to another. This ensures that things like `self.attrs` and `self.flags` are not lost. In general we would like that any operation that accepts one or more NDFrames and returns an NDFrame should propagate metadata by calling `__finalize__`. The test file at https://github.com/pandas-dev/pandas/blob/master/pandas/tests/generic/test_finalize.py attempts to be an exhaustive suite of tests for all these cases. However there are many tests currently xfailing, and there are likely many APIs not covered. This is a meta-issue to improve the use of `__finalize__`. Here's a hopefully accurate list of methods that don't currently call finalize. Some general comments around finalize 1. We don't have a good sense for what should happen to `attrs` when there are multiple NDFrames involved with differing attrs (e.g. in concat). The safest approach is to probably drop the attrs when they don't match, but this will need some thought. 2. We need to be mindful of performance. `__finalize__` can be somewhat expensive so we'd like to call it exactly once per *user-facing* method. This can be tricky for things like `DataFrame.apply` which is sometimes used internally. We may need to refactor some methods to have a user-facing `DataFrame.apply` that calls an internal `DataFrame._apply`. The internal method would *not* call `__finalize__`, just the user-facing `DataFrame.apply` would. If you're interested in working on this please post a comment indicating which method you're working on. Un-xfail the test, then update the method to pass the test. Some of these will be much more difficult to work on than others (e.g. groupby is going to be difficult). If you're unsure whether a particular method is likely to be difficult, ask first. - [x] `DataFrame.__getitem__` with a scalar - [ ] `DataFrame.eval` with `engine="numexpr"` - [x] `DataFrame.duplicated` - [ ] `DataFrame.add`, `mul`, etc. - [ ] `DataFrame.combine`, `DataFrame.combine_first` - [x] `DataFrame.update` - [x] `DataFrame.pivot`, `pivot_table` - [x] `DataFrame.stack` - [x] `DataFrame.unstack` - [ ] `DataFrame.explode` - [ ] `DataFrame.melt` - [x] `DataFrame.diff` - [x] `DataFrame.applymap` - [x] `DataFrame.append` - [ ] `DataFrame.merge` - [ ] `DataFrame.cov` - [ ] `DataFrame.corrwith` - [ ] `DataFrame.count` - [ ] `DataFrame.nunique` - [ ] `DataFrame.idxmax`, `idxmin` - [ ] `DataFrame.mode` - [ ] `DataFrame.quantile` (scalar and list of quantiles) - [ ] `DataFrame.isin` - [ ] `DataFrame.pop` - [ ] `DataFrame.squeeze` - [ ] `Series.abs` - [ ] `DataFrame.get` - [ ] `DataFrame.round` - [ ] `DataFrame.convert_dtypes` - [ ] `DataFrame.pct_change` - [ ] `DataFrame.transform` - [ ] `DataFrame.apply` - [ ] `DataFrame.any`, `sum`, `std`, `mean`, etdc. - [x] `Series.str.` operations returning a Series / DataFrame - [x] `Series.dt.` operations returning a Series / DataFrame - [x] `Series.cat.` operations returning a Series / DataFrame - [ ] All groupby operations
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28283/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28283/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/28284
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28284/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28284/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28284/events
https://github.com/pandas-dev/pandas/issues/28284
489,206,094
MDU6SXNzdWU0ODkyMDYwOTQ=
28,284
Index.drop - add inplace option
{ "avatar_url": "https://avatars.githubusercontent.com/u/46277574?v=4", "events_url": "https://api.github.com/users/eladtann/events{/privacy}", "followers_url": "https://api.github.com/users/eladtann/followers", "following_url": "https://api.github.com/users/eladtann/following{/other_user}", "gists_url": "https://api.github.com/users/eladtann/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/eladtann", "id": 46277574, "login": "eladtann", "node_id": "MDQ6VXNlcjQ2Mjc3NTc0", "organizations_url": "https://api.github.com/users/eladtann/orgs", "received_events_url": "https://api.github.com/users/eladtann/received_events", "repos_url": "https://api.github.com/users/eladtann/repos", "site_admin": false, "starred_url": "https://api.github.com/users/eladtann/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/eladtann/subscriptions", "type": "User", "url": "https://api.github.com/users/eladtann" }
[]
closed
false
null
[]
null
2
2019-09-04T14:43:56Z
2019-09-04T15:13:04Z
2019-09-04T15:13:04Z
NONE
null
I have a Pandas.Index object which i want to delete some of the indices stored in it. Since currently inplace=True is not available, i am forced to declare a new variable to hold the result which seems cumbersome. currently i need to write: #drop all columns with only 1 unique value. nunique=df.apply(pd.Series.nunique) cols_to_delete=nunique[nunique == 1].index #do not delete column named 'label' even if it has only 1 unique value cols_to_delete=cols_to_delete.drop('label') df.drop(cols_to_delete, axis=1,inplace=True) desired syntax: cols_to_delete.drop('label', inplace=True) instead of: cols_to_delete=cols_to_delete.drop('label') </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/28284/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28284/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/28285
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28285/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28285/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28285/events
https://github.com/pandas-dev/pandas/issues/28285
489,228,914
MDU6SXNzdWU0ODkyMjg5MTQ=
28,285
Dataframe Groupby with Quantile Can't handle q=tuple
{ "avatar_url": "https://avatars.githubusercontent.com/u/18550216?v=4", "events_url": "https://api.github.com/users/ahowe42/events{/privacy}", "followers_url": "https://api.github.com/users/ahowe42/followers", "following_url": "https://api.github.com/users/ahowe42/following{/other_user}", "gists_url": "https://api.github.com/users/ahowe42/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/ahowe42", "id": 18550216, "login": "ahowe42", "node_id": "MDQ6VXNlcjE4NTUwMjE2", "organizations_url": "https://api.github.com/users/ahowe42/orgs", "received_events_url": "https://api.github.com/users/ahowe42/received_events", "repos_url": "https://api.github.com/users/ahowe42/repos", "site_admin": false, "starred_url": "https://api.github.com/users/ahowe42/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ahowe42/subscriptions", "type": "User", "url": "https://api.github.com/users/ahowe42" }
[]
closed
false
null
[]
null
3
2019-09-04T15:19:57Z
2019-09-04T19:06:58Z
2019-09-04T19:06:57Z
NONE
null
In version 0.24.1, a groupby with `quantile(q)`, where `q` is a tuple works. However, with 0.25, a `TypeErr` exception is thrown. This works as expected: `pd.DataFrame([[0,1,2,3],[0,4,5,6],[1,7,8,9],[1,10,11,12]],columns=['a','b','c','d']).quantile((0.01,0.99))` but this does not: `pd.DataFrame([[0,1,2,3],[0,4,5,6],[1,7,8,9],[1,10,11,12]],columns=['a','b','c','d']).groupby(by=['a']).b.quantile((0.01,0.99))` #### Output of ``pd.show_versions()`` <details> INSTALLED VERSIONS ------------------ commit : None python : 3.7.3.final.0 python-bits : 64 OS : Windows OS-release : 10 machine : AMD64 processor : Intel64 Family 6 Model 142 Stepping 10, GenuineIntel byteorder : little LC_ALL : None LANG : None LOCALE : None.None pandas : 0.25.0 numpy : 1.16.4 pytz : 2019.1 dateutil : 2.8.0 pip : 19.1.1 setuptools : 41.0.1 Cython : 0.29.12 pytest : 5.0.1 hypothesis : None sphinx : 2.1.2 blosc : None feather : None xlsxwriter : 1.1.8 lxml.etree : 4.3.4 html5lib : 1.0.1 pymysql : None psycopg2 : 2.7.6.1 (dt dec pq3 ext lo64) jinja2 : 2.10.1 IPython : 7.7.0 pandas_datareader: None bs4 : 4.7.1 bottleneck : 1.2.1 fastparquet : None gcsfs : None lxml.etree : 4.3.4 matplotlib : 3.1.0 numexpr : 2.6.9 odfpy : None openpyxl : 2.6.2 pandas_gbq : None pyarrow : None pytables : None s3fs : None scipy : 1.3.0 sqlalchemy : 1.3.5 tables : 3.5.2 xarray : None xlrd : 1.2.0 xlwt : 1.3.0 xlsxwriter : 1.1.8 </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/28285/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28285/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/28286
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28286/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28286/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28286/events
https://github.com/pandas-dev/pandas/pull/28286
489,277,026
MDExOlB1bGxSZXF1ZXN0MzE0MTMwODY4
28,286
BUG: datetime64 - Timestamp incorrectly raising TypeError
{ "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": "2020-01-30T12:18:05Z", "closed_issues": 2207, "created_at": "2012-09-13T02:13:00Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/329591?v=4", "events_url": "https://api.github.com/users/wesm/events{/privacy}", "followers_url": "https://api.github.com/users/wesm/followers", "following_url": "https://api.github.com/users/wesm/following{/other_user}", "gists_url": "https://api.github.com/users/wesm/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/wesm", "id": 329591, "login": "wesm", "node_id": "MDQ6VXNlcjMyOTU5MQ==", "organizations_url": "https://api.github.com/users/wesm/orgs", "received_events_url": "https://api.github.com/users/wesm/received_events", "repos_url": "https://api.github.com/users/wesm/repos", "site_admin": false, "starred_url": "https://api.github.com/users/wesm/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/wesm/subscriptions", "type": "User", "url": "https://api.github.com/users/wesm" }, "description": "on-merge: backport to 1.0.x", "due_on": "2020-02-01T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/16", "id": 174211, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16/labels", "node_id": "MDk6TWlsZXN0b25lMTc0MjEx", "number": 16, "open_issues": 0, "state": "closed", "title": "1.0.0", "updated_at": "2020-01-30T12:18:05Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16" }
4
2019-09-04T16:51:55Z
2019-09-07T19:26:36Z
2019-09-07T19:21:09Z
MEMBER
null
- [ ] closes #xxxx - [x] tests added / passed - [x] passes `black pandas` - [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff` - [x] whatsnew entry
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28286/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28286/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/28286.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/28286", "merged_at": "2019-09-07T19:21:09Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/28286.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/28286" }
https://api.github.com/repos/pandas-dev/pandas/issues/28287
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28287/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28287/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28287/events
https://github.com/pandas-dev/pandas/issues/28287
489,362,379
MDU6SXNzdWU0ODkzNjIzNzk=
28,287
DataFrame.dropna() not working with sparse columns
{ "avatar_url": "https://avatars.githubusercontent.com/u/7197136?v=4", "events_url": "https://api.github.com/users/rjboczar/events{/privacy}", "followers_url": "https://api.github.com/users/rjboczar/followers", "following_url": "https://api.github.com/users/rjboczar/following{/other_user}", "gists_url": "https://api.github.com/users/rjboczar/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/rjboczar", "id": 7197136, "login": "rjboczar", "node_id": "MDQ6VXNlcjcxOTcxMzY=", "organizations_url": "https://api.github.com/users/rjboczar/orgs", "received_events_url": "https://api.github.com/users/rjboczar/received_events", "repos_url": "https://api.github.com/users/rjboczar/repos", "site_admin": false, "starred_url": "https://api.github.com/users/rjboczar/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/rjboczar/subscriptions", "type": "User", "url": "https://api.github.com/users/rjboczar" }
[ { "color": "0e8a16", "default": true, "description": null, "id": 717120670, "name": "good first issue", "node_id": "MDU6TGFiZWw3MTcxMjA2NzA=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/good%20first%20issue" }, { "color": "cdea3c", "default": false, "de...
closed
false
{ "avatar_url": "https://avatars.githubusercontent.com/u/3510863?v=4", "events_url": "https://api.github.com/users/MBrouns/events{/privacy}", "followers_url": "https://api.github.com/users/MBrouns/followers", "following_url": "https://api.github.com/users/MBrouns/following{/other_user}", "gists_url": "https://api.github.com/users/MBrouns/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/MBrouns", "id": 3510863, "login": "MBrouns", "node_id": "MDQ6VXNlcjM1MTA4NjM=", "organizations_url": "https://api.github.com/users/MBrouns/orgs", "received_events_url": "https://api.github.com/users/MBrouns/received_events", "repos_url": "https://api.github.com/users/MBrouns/repos", "site_admin": false, "starred_url": "https://api.github.com/users/MBrouns/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/MBrouns/subscriptions", "type": "User", "url": "https://api.github.com/users/MBrouns" }
[ { "avatar_url": "https://avatars.githubusercontent.com/u/3510863?v=4", "events_url": "https://api.github.com/users/MBrouns/events{/privacy}", "followers_url": "https://api.github.com/users/MBrouns/followers", "following_url": "https://api.github.com/users/MBrouns/following{/other_user}", "gists_...
{ "closed_at": "2020-07-28T18:13:47Z", "closed_issues": 2378, "created_at": "2019-12-02T12:52:48Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4", "events_url": "https://api.github.com/users/jreback/events{/privacy}", "followers_url": "https://api.github.com/users/jreback/followers", "following_url": "https://api.github.com/users/jreback/following{/other_user}", "gists_url": "https://api.github.com/users/jreback/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jreback", "id": 953992, "login": "jreback", "node_id": "MDQ6VXNlcjk1Mzk5Mg==", "organizations_url": "https://api.github.com/users/jreback/orgs", "received_events_url": "https://api.github.com/users/jreback/received_events", "repos_url": "https://api.github.com/users/jreback/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jreback/subscriptions", "type": "User", "url": "https://api.github.com/users/jreback" }, "description": "", "due_on": "2020-08-01T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/68", "id": 4894670, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68/labels", "node_id": "MDk6TWlsZXN0b25lNDg5NDY3MA==", "number": 68, "open_issues": 0, "state": "closed", "title": "1.1", "updated_at": "2021-07-17T17:25:28Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68" }
4
2019-09-04T19:50:41Z
2020-06-20T13:46:25Z
2020-06-20T13:35:18Z
NONE
null
```python import numpy as np import pandas as pd A = pd.DataFrame({'a': [0,1], 'b': pd.SparseArray([np.nan, 1])}) # Prints empty DataFrame A.dropna() ``` Not sure if I'm using this correctly, but I'd expect only the first row to be dropped. #### Output of ``pd.show_versions()`` <details> INSTALLED VERSIONS ------------------ commit : None python : 3.6.9.final.0 python-bits : 64 OS : Darwin OS-release : 18.7.0 machine : x86_64 processor : i386 byteorder : little LC_ALL : None LANG : en_US.UTF-8 LOCALE : en_US.UTF-8 pandas : 0.25.1 numpy : 1.16.4 pytz : 2019.2 dateutil : 2.8.0 pip : 19.2.2 setuptools : 41.0.1 Cython : None pytest : None hypothesis : None sphinx : None blosc : None feather : None xlsxwriter : None lxml.etree : None html5lib : None pymysql : None psycopg2 : None jinja2 : 2.10.1 IPython : 7.7.0 pandas_datareader: None bs4 : None bottleneck : None fastparquet : None gcsfs : None lxml.etree : None matplotlib : 3.1.1 numexpr : None odfpy : None openpyxl : None pandas_gbq : None pyarrow : None pytables : None s3fs : None scipy : 1.3.1 sqlalchemy : None tables : None xarray : None xlrd : None xlwt : None xlsxwriter : 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/28287/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28287/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/28288
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28288/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28288/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28288/events
https://github.com/pandas-dev/pandas/pull/28288
489,409,389
MDExOlB1bGxSZXF1ZXN0MzE0MjM3NTE2
28,288
DOC: Fix PR06 errors in Series docstrings (#28253)
{ "avatar_url": "https://avatars.githubusercontent.com/u/8767088?v=4", "events_url": "https://api.github.com/users/danielplawrence/events{/privacy}", "followers_url": "https://api.github.com/users/danielplawrence/followers", "following_url": "https://api.github.com/users/danielplawrence/following{/other_user}", "gists_url": "https://api.github.com/users/danielplawrence/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/danielplawrence", "id": 8767088, "login": "danielplawrence", "node_id": "MDQ6VXNlcjg3NjcwODg=", "organizations_url": "https://api.github.com/users/danielplawrence/orgs", "received_events_url": "https://api.github.com/users/danielplawrence/received_events", "repos_url": "https://api.github.com/users/danielplawrence/repos", "site_admin": false, "starred_url": "https://api.github.com/users/danielplawrence/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/danielplawrence/subscriptions", "type": "User", "url": "https://api.github.com/users/danielplawrence" }
[ { "color": "3465A4", "default": false, "description": null, "id": 134699, "name": "Docs", "node_id": "MDU6TGFiZWwxMzQ2OTk=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Docs" } ]
closed
false
null
[]
{ "closed_at": "2020-01-30T12:18:05Z", "closed_issues": 2207, "created_at": "2012-09-13T02:13:00Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/329591?v=4", "events_url": "https://api.github.com/users/wesm/events{/privacy}", "followers_url": "https://api.github.com/users/wesm/followers", "following_url": "https://api.github.com/users/wesm/following{/other_user}", "gists_url": "https://api.github.com/users/wesm/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/wesm", "id": 329591, "login": "wesm", "node_id": "MDQ6VXNlcjMyOTU5MQ==", "organizations_url": "https://api.github.com/users/wesm/orgs", "received_events_url": "https://api.github.com/users/wesm/received_events", "repos_url": "https://api.github.com/users/wesm/repos", "site_admin": false, "starred_url": "https://api.github.com/users/wesm/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/wesm/subscriptions", "type": "User", "url": "https://api.github.com/users/wesm" }, "description": "on-merge: backport to 1.0.x", "due_on": "2020-02-01T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/16", "id": 174211, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16/labels", "node_id": "MDk6TWlsZXN0b25lMTc0MjEx", "number": 16, "open_issues": 0, "state": "closed", "title": "1.0.0", "updated_at": "2020-01-30T12:18:05Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16" }
1
2019-09-04T21:33:19Z
2019-09-16T02:39:38Z
2019-09-16T02:39:31Z
CONTRIBUTOR
null
First bit of work on #28253, fixes PR06 validation errors in Series docstrings. Mostly just converting boolean -> bool, string -> str, integer -> ; re-worded a little where necessary. - [x] passes `black pandas` - [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff` Ran validate_docstrings.py and confirmed all PR06 issues for Series are removed, and that no additional validation errors are added by this change.
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28288/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28288/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/28288.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/28288", "merged_at": "2019-09-16T02:39:31Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/28288.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/28288" }
https://api.github.com/repos/pandas-dev/pandas/issues/28289
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28289/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28289/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28289/events
https://github.com/pandas-dev/pandas/pull/28289
489,437,704
MDExOlB1bGxSZXF1ZXN0MzE0MjU2Mjgx
28,289
BUG: Series[timdelta64].var() should _not_ work
{ "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": "2020-01-30T12:18:05Z", "closed_issues": 2207, "created_at": "2012-09-13T02:13:00Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/329591?v=4", "events_url": "https://api.github.com/users/wesm/events{/privacy}", "followers_url": "https://api.github.com/users/wesm/followers", "following_url": "https://api.github.com/users/wesm/following{/other_user}", "gists_url": "https://api.github.com/users/wesm/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/wesm", "id": 329591, "login": "wesm", "node_id": "MDQ6VXNlcjMyOTU5MQ==", "organizations_url": "https://api.github.com/users/wesm/orgs", "received_events_url": "https://api.github.com/users/wesm/received_events", "repos_url": "https://api.github.com/users/wesm/repos", "site_admin": false, "starred_url": "https://api.github.com/users/wesm/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/wesm/subscriptions", "type": "User", "url": "https://api.github.com/users/wesm" }, "description": "on-merge: backport to 1.0.x", "due_on": "2020-02-01T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/16", "id": 174211, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16/labels", "node_id": "MDk6TWlsZXN0b25lMTc0MjEx", "number": 16, "open_issues": 0, "state": "closed", "title": "1.0.0", "updated_at": "2020-01-30T12:18:05Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16" }
13
2019-09-04T22:41:18Z
2019-11-02T15:37:48Z
2019-11-02T15:23:47Z
MEMBER
null
- [x] closes #18880 - [x] tests added / passed - [x] passes `black pandas` - [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff` - [ ] whatsnew entry
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28289/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28289/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/28289.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/28289", "merged_at": "2019-11-02T15:23:47Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/28289.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/28289" }
https://api.github.com/repos/pandas-dev/pandas/issues/28290
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28290/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28290/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28290/events
https://github.com/pandas-dev/pandas/pull/28290
489,515,600
MDExOlB1bGxSZXF1ZXN0MzE0MzE1OTg5
28,290
Fix inconsistent casting to bool
{ "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": "2020-01-30T12:18:05Z", "closed_issues": 2207, "created_at": "2012-09-13T02:13:00Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/329591?v=4", "events_url": "https://api.github.com/users/wesm/events{/privacy}", "followers_url": "https://api.github.com/users/wesm/followers", "following_url": "https://api.github.com/users/wesm/following{/other_user}", "gists_url": "https://api.github.com/users/wesm/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/wesm", "id": 329591, "login": "wesm", "node_id": "MDQ6VXNlcjMyOTU5MQ==", "organizations_url": "https://api.github.com/users/wesm/orgs", "received_events_url": "https://api.github.com/users/wesm/received_events", "repos_url": "https://api.github.com/users/wesm/repos", "site_admin": false, "starred_url": "https://api.github.com/users/wesm/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/wesm/subscriptions", "type": "User", "url": "https://api.github.com/users/wesm" }, "description": "on-merge: backport to 1.0.x", "due_on": "2020-02-01T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/16", "id": 174211, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16/labels", "node_id": "MDk6TWlsZXN0b25lMTc0MjEx", "number": 16, "open_issues": 0, "state": "closed", "title": "1.0.0", "updated_at": "2020-01-30T12:18:05Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16" }
5
2019-09-05T04:02:35Z
2019-09-05T18:16:25Z
2019-09-05T18:14:17Z
MEMBER
null
Series logical ops (`|`, `&`, `^`) have a bunch of inconsistencies. This partially addresses one of them, and does so in a way that makes the diff for the next one much more manageable than it would be without this.
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28290/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28290/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/28290.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/28290", "merged_at": "2019-09-05T18:14:17Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/28290.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/28290" }
https://api.github.com/repos/pandas-dev/pandas/issues/28291
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28291/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28291/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28291/events
https://github.com/pandas-dev/pandas/issues/28291
489,528,693
MDU6SXNzdWU0ODk1Mjg2OTM=
28,291
[FR] add option to format \hline in to_latex()
{ "avatar_url": "https://avatars.githubusercontent.com/u/33796896?v=4", "events_url": "https://api.github.com/users/StevenLi-DS/events{/privacy}", "followers_url": "https://api.github.com/users/StevenLi-DS/followers", "following_url": "https://api.github.com/users/StevenLi-DS/following{/other_user}", "gists_url": "https://api.github.com/users/StevenLi-DS/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/StevenLi-DS", "id": 33796896, "login": "StevenLi-DS", "node_id": "MDQ6VXNlcjMzNzk2ODk2", "organizations_url": "https://api.github.com/users/StevenLi-DS/orgs", "received_events_url": "https://api.github.com/users/StevenLi-DS/received_events", "repos_url": "https://api.github.com/users/StevenLi-DS/repos", "site_admin": false, "starred_url": "https://api.github.com/users/StevenLi-DS/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/StevenLi-DS/subscriptions", "type": "User", "url": "https://api.github.com/users/StevenLi-DS" }
[ { "color": "4E9A06", "default": false, "description": null, "id": 76812, "name": "Enhancement", "node_id": "MDU6TGFiZWw3NjgxMg==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Enhancement" }, { "color": "006b75", "default": false, "description": "to_latex...
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
2019-09-05T05:01:15Z
2021-05-24T13:44:05Z
2021-05-24T13:44:05Z
NONE
null
Please considering add a parameter to allow users to add `\hline` to the latex output so that each two rows will have a horizontal line between them. For example: ```python import pandas as pd df = pd.DataFrame(data={'col_1': [1, 2, 4], 'col_2': [4, 3, 2]}) print(df.to_latex(index=False)) ``` It will give me: ``` \begin{tabular}{rr} \toprule col\_1 & col\_2 \\ \midrule 1 & 4 \\ 2 & 3 \\ 4 & 2 \\ \bottomrule \end{tabular} ``` I wish the output could be ``` \begin{tabular}{rr} \toprule \hline col\_1 & col\_2 \\ \hline \midrule 1 & 4 \\ \hline 2 & 3 \\ \hline 4 & 2 \\ \hline \bottomrule \end{tabular} ```
{ "+1": 2, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 2, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28291/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28291/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/28292
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28292/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28292/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28292/events
https://github.com/pandas-dev/pandas/issues/28292
489,574,912
MDU6SXNzdWU0ODk1NzQ5MTI=
28,292
df.style.highlight_max() crashes if DataFrame is empty, but has some metadata
{ "avatar_url": "https://avatars.githubusercontent.com/u/17309924?v=4", "events_url": "https://api.github.com/users/0anton/events{/privacy}", "followers_url": "https://api.github.com/users/0anton/followers", "following_url": "https://api.github.com/users/0anton/following{/other_user}", "gists_url": "https://api.github.com/users/0anton/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/0anton", "id": 17309924, "login": "0anton", "node_id": "MDQ6VXNlcjE3MzA5OTI0", "organizations_url": "https://api.github.com/users/0anton/orgs", "received_events_url": "https://api.github.com/users/0anton/received_events", "repos_url": "https://api.github.com/users/0anton/repos", "site_admin": false, "starred_url": "https://api.github.com/users/0anton/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/0anton/subscriptions", "type": "User", "url": "https://api.github.com/users/0anton" }
[ { "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
5
2019-09-05T07:23:02Z
2019-09-13T18:32:17Z
2019-09-13T18:32:17Z
NONE
null
#### Code Sample, a copy-pastable example if possible ```python print(df.columns) Index([], dtype='object', name='MONTH') df.style.highlight_max(axis=1).format("{:.0f}") ``` #### Problem description Pandas crashes with the trace shown below, when styler applied to an empty dataframe, which contains some meta-data. Expected output - empty output without crash. ``` IndexError Traceback (most recent call last) c:\cygwin64\home\antongolubev\.venv\lib\site-packages\IPython\core\formatters.py in __call__(self, obj) 343 method = get_real_method(obj, self.print_method) 344 if method is not None: --> 345 return method() 346 return None 347 else: c:\cygwin64\home\antongolubev\.venv\lib\site-packages\pandas\io\formats\style.py in _repr_html_(self) 162 Hooks into Jupyter notebook rich display system. 163 """ --> 164 return self.render() 165 166 @Appender( c:\cygwin64\home\antongolubev\.venv\lib\site-packages\pandas\io\formats\style.py in render(self, **kwargs) 518 self._compute() 519 # TODO: namespace all the pandas keys --> 520 d = self._translate() 521 # filter out empty styles, every cell will have a class 522 # but the list of props may just be [['', '']]. c:\cygwin64\home\antongolubev\.venv\lib\site-packages\pandas\io\formats\style.py in _translate(self) 331 index_header_row.extend( 332 [{"type": "th", "value": BLANK_VALUE, "class": " ".join([BLANK_CLASS])}] --> 333 * (len(clabels[0]) - len(hidden_columns)) 334 ) 335 IndexError: list index out of range ``` #### Expected Output Expected empty output (no exception), like it is correctly happenes with freshly initialized dataframe. #### Output of ``pd.show_versions()`` <details> INSTALLED VERSIONS ------------------ commit : None python : 3.7.3.final.0 python-bits : 64 OS : Windows OS-release : 10 machine : AMD64 processor : Intel64 Family 6 Model 158 Stepping 10, GenuineIntel byteorder : little LC_ALL : None LANG : en_US.utf8 LOCALE : None.None pandas : 0.25.1 numpy : 1.16.4 pytz : 2019.1 dateutil : 2.8.0 pip : 19.1.1 setuptools : 40.8.0 Cython : None pytest : 5.0.0 hypothesis : None sphinx : None blosc : None feather : None xlsxwriter : None lxml.etree : 4.3.4 html5lib : None pymysql : None psycopg2 : None jinja2 : 2.10.1 IPython : 7.6.0 pandas_datareader: None bs4 : None bottleneck : None fastparquet : None gcsfs : None lxml.etree : 4.3.4 matplotlib : 3.1.0 numexpr : None odfpy : None openpyxl : 2.6.2 pandas_gbq : None pyarrow : None pytables : None s3fs : None scipy : 1.3.0 sqlalchemy : None tables : None xarray : None xlrd : None xlwt : None xlsxwriter : 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/28292/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28292/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/28293
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28293/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28293/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28293/events
https://github.com/pandas-dev/pandas/issues/28293
489,686,761
MDU6SXNzdWU0ODk2ODY3NjE=
28,293
Different behavior of read_csv on Windows with Anaconda and Ubuntu 18
{ "avatar_url": "https://avatars.githubusercontent.com/u/17993048?v=4", "events_url": "https://api.github.com/users/jumpingfella/events{/privacy}", "followers_url": "https://api.github.com/users/jumpingfella/followers", "following_url": "https://api.github.com/users/jumpingfella/following{/other_user}", "gists_url": "https://api.github.com/users/jumpingfella/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jumpingfella", "id": 17993048, "login": "jumpingfella", "node_id": "MDQ6VXNlcjE3OTkzMDQ4", "organizations_url": "https://api.github.com/users/jumpingfella/orgs", "received_events_url": "https://api.github.com/users/jumpingfella/received_events", "repos_url": "https://api.github.com/users/jumpingfella/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jumpingfella/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jumpingfella/subscriptions", "type": "User", "url": "https://api.github.com/users/jumpingfella" }
[ { "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": "fbca04", "default": false, "descriptio...
closed
false
null
[]
null
3
2019-09-05T11:14:01Z
2020-01-16T22:38:33Z
2020-01-16T22:38:32Z
NONE
null
Hello, I'm experiencing different behavior of the following script: https://stackoverflow.com/questions/57791115/forecast-produced-by-gluon-ts-example-is-around-0 on Windows with Anaconda and on Ubuntu 18. It works as expected on Windows, but doesn't on Ubuntu 18 (produces plot around 0) This seems to have something to do with `df = pd.read_csv(url, header=0, index_col=0)`
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28293/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28293/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/28294
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28294/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28294/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28294/events
https://github.com/pandas-dev/pandas/issues/28294
489,701,476
MDU6SXNzdWU0ODk3MDE0NzY=
28,294
Clarify that MultiIndex.set_levels() interprets passed values as new components of the .levels attribute
{ "avatar_url": "https://avatars.githubusercontent.com/u/15961048?v=4", "events_url": "https://api.github.com/users/pepicello/events{/privacy}", "followers_url": "https://api.github.com/users/pepicello/followers", "following_url": "https://api.github.com/users/pepicello/following{/other_user}", "gists_url": "https://api.github.com/users/pepicello/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/pepicello", "id": 15961048, "login": "pepicello", "node_id": "MDQ6VXNlcjE1OTYxMDQ4", "organizations_url": "https://api.github.com/users/pepicello/orgs", "received_events_url": "https://api.github.com/users/pepicello/received_events", "repos_url": "https://api.github.com/users/pepicello/repos", "site_admin": false, "starred_url": "https://api.github.com/users/pepicello/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/pepicello/subscriptions", "type": "User", "url": "https://api.github.com/users/pepicello" }
[ { "color": "3465A4", "default": false, "description": null, "id": 134699, "name": "Docs", "node_id": "MDU6TGFiZWwxMzQ2OTk=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Docs" }, { "color": "207de5", "default": false, "description": null, "id": 712683...
closed
false
null
[]
{ "closed_at": null, "closed_issues": 786, "created_at": "2015-01-13T10:53:19Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4", "events_url": "https://api.github.com/users/jreback/events{/privacy}", "followers_url": "https://api.github.com/users/jreback/followers", "following_url": "https://api.github.com/users/jreback/following{/other_user}", "gists_url": "https://api.github.com/users/jreback/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jreback", "id": 953992, "login": "jreback", "node_id": "MDQ6VXNlcjk1Mzk5Mg==", "organizations_url": "https://api.github.com/users/jreback/orgs", "received_events_url": "https://api.github.com/users/jreback/received_events", "repos_url": "https://api.github.com/users/jreback/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jreback/subscriptions", "type": "User", "url": "https://api.github.com/users/jreback" }, "description": "Changes that would be nice to have in the next release. These issues are not blocking. They will be pushed to the next release if no one has time to fix them.", "due_on": null, "html_url": "https://github.com/pandas-dev/pandas/milestone/32", "id": 933188, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/32/labels", "node_id": "MDk6TWlsZXN0b25lOTMzMTg4", "number": 32, "open_issues": 1053, "state": "open", "title": "Contributions Welcome", "updated_at": "2021-11-21T00:50:06Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/32" }
8
2019-09-05T11:47:59Z
2021-09-05T21:55:14Z
2020-01-03T13:12:59Z
CONTRIBUTOR
null
#### Code Sample, a copy-pastable example if possible ```python import numpy as np import pandas as pd df = pd.DataFrame(np.random.rand(3, 3), columns=pd.MultiIndex.from_tuples([(1, 2), (1, 4), (5, 6)])) df.columns = df.columns.set_levels([1, 1, 3], level=0) ``` Which raises a ```ValueError```: ```python ValueError: Level values must be unique: [1, 1, 3] on level 0 ``` #### Problem description Despite a dataframe with non-unique MultiIndex can be created, they cannot be set using ```set_levels()```. Is this behaviour expected? I believe non-unique level values were not allowed for a period of time (#18882), but then they were allowed again (#21423), so I am not sure which is the current convention. #### Expected Output ```python 1 3 2 4 6 0 0.317669 0.329142 0.056725 1 0.969472 0.340309 0.135204 2 0.242408 0.934748 0.683186 ``` #### Output of ``pd.show_versions()`` <details> INSTALLED VERSIONS ------------------ commit : None python : 3.7.4.final.0 python-bits : 64 OS : Windows OS-release : 10 machine : AMD64 processor : Intel64 Family 6 Model 158 Stepping 10, GenuineIntel byteorder : little LC_ALL : None LANG : None LOCALE : None.None pandas : 0.25.1 numpy : 1.16.4 pytz : 2019.2 dateutil : 2.8.0 pip : 19.2.2 setuptools : 41.0.1 Cython : 0.29.13 pytest : 5.1.2 hypothesis : None sphinx : None blosc : None feather : None xlsxwriter : 1.1.8 lxml.etree : None html5lib : None pymysql : None psycopg2 : None jinja2 : 2.10.1 IPython : 7.8.0 pandas_datareader: None bs4 : None bottleneck : 1.2.1 fastparquet : None gcsfs : None lxml.etree : None matplotlib : 3.1.1 numexpr : None odfpy : None openpyxl : 2.6.2 pandas_gbq : None pyarrow : None pytables : None s3fs : None scipy : 1.3.1 sqlalchemy : 1.3.7 tables : None xarray : None xlrd : 1.2.0 xlwt : None xlsxwriter : 1.1.8 </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/28294/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28294/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/28295
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28295/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28295/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28295/events
https://github.com/pandas-dev/pandas/issues/28295
489,703,840
MDU6SXNzdWU0ODk3MDM4NDA=
28,295
MultiIndex.set_levels() unexpected behaviour
{ "avatar_url": "https://avatars.githubusercontent.com/u/15961048?v=4", "events_url": "https://api.github.com/users/pepicello/events{/privacy}", "followers_url": "https://api.github.com/users/pepicello/followers", "following_url": "https://api.github.com/users/pepicello/following{/other_user}", "gists_url": "https://api.github.com/users/pepicello/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/pepicello", "id": 15961048, "login": "pepicello", "node_id": "MDQ6VXNlcjE1OTYxMDQ4", "organizations_url": "https://api.github.com/users/pepicello/orgs", "received_events_url": "https://api.github.com/users/pepicello/received_events", "repos_url": "https://api.github.com/users/pepicello/repos", "site_admin": false, "starred_url": "https://api.github.com/users/pepicello/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/pepicello/subscriptions", "type": "User", "url": "https://api.github.com/users/pepicello" }
[ { "color": "e10c02", "default": false, "description": null, "id": 76811, "name": "Bug", "node_id": "MDU6TGFiZWw3NjgxMQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug" }, { "color": "207de5", "default": false, "description": null, "id": 71268330,...
closed
false
null
[]
null
1
2019-09-05T11:53:34Z
2019-09-05T16:45:07Z
2019-09-05T16:45:07Z
CONTRIBUTOR
null
#### Code Sample, a copy-pastable example if possible ```python import numpy as np import pandas as pd df = pd.DataFrame(np.random.rand(3, 3), columns=pd.MultiIndex.from_tuples([(1, 2), (1, 4), (5, 6)])) df.columns = df.columns.set_levels([1, 2, 3], level=0) ``` Output: ```python 1 2 2 4 6 0 0.729667 0.816939 0.763848 1 0.534183 0.571790 0.368467 2 0.983884 0.277658 0.256763 ``` #### Problem description Slightly different setup of #28294, but different issue. Here a level in a MultiIndex dataframe has duplicates to start with and a level with unique values is set afterwards, but the values are incorrect. It seems to work fine if the starting dataframe has unique level values. #### Expected Output ```python 1 2 3 2 4 6 0 0.729667 0.816939 0.763848 1 0.534183 0.571790 0.368467 2 0.983884 0.277658 0.256763 ``` #### Output of ``pd.show_versions()`` <details> INSTALLED VERSIONS ------------------ commit : None python : 3.7.4.final.0 python-bits : 64 OS : Windows OS-release : 10 machine : AMD64 processor : Intel64 Family 6 Model 158 Stepping 10, GenuineIntel byteorder : little LC_ALL : None LANG : None LOCALE : None.None pandas : 0.25.1 numpy : 1.16.4 pytz : 2019.2 dateutil : 2.8.0 pip : 19.2.2 setuptools : 41.0.1 Cython : 0.29.13 pytest : 5.1.2 hypothesis : None sphinx : None blosc : None feather : None xlsxwriter : 1.1.8 lxml.etree : None html5lib : None pymysql : None psycopg2 : None jinja2 : 2.10.1 IPython : 7.8.0 pandas_datareader: None bs4 : None bottleneck : 1.2.1 fastparquet : None gcsfs : None lxml.etree : None matplotlib : 3.1.1 numexpr : None odfpy : None openpyxl : 2.6.2 pandas_gbq : None pyarrow : None pytables : None s3fs : None scipy : 1.3.1 sqlalchemy : 1.3.7 tables : None xarray : None xlrd : 1.2.0 xlwt : None xlsxwriter : 1.1.8 </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/28295/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28295/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/28296
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28296/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28296/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28296/events
https://github.com/pandas-dev/pandas/pull/28296
489,774,885
MDExOlB1bGxSZXF1ZXN0MzE0NTIxMDY5
28,296
BUG: Merge on CategoricalIndex fails if left_index=True & right_index=True, but not if on={index} #28189
{ "avatar_url": "https://avatars.githubusercontent.com/u/30904672?v=4", "events_url": "https://api.github.com/users/hugoecarl/events{/privacy}", "followers_url": "https://api.github.com/users/hugoecarl/followers", "following_url": "https://api.github.com/users/hugoecarl/following{/other_user}", "gists_url": "https://api.github.com/users/hugoecarl/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/hugoecarl", "id": 30904672, "login": "hugoecarl", "node_id": "MDQ6VXNlcjMwOTA0Njcy", "organizations_url": "https://api.github.com/users/hugoecarl/orgs", "received_events_url": "https://api.github.com/users/hugoecarl/received_events", "repos_url": "https://api.github.com/users/hugoecarl/repos", "site_admin": false, "starred_url": "https://api.github.com/users/hugoecarl/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/hugoecarl/subscriptions", "type": "User", "url": "https://api.github.com/users/hugoecarl" }
[ { "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": "e11d21", "de...
closed
false
null
[]
null
5
2019-09-05T14:01:21Z
2019-12-17T17:42:55Z
2019-12-17T17:42:54Z
NONE
null
- [x] closes #28189 - [x] tests added / passed - [x] passes `black pandas` - [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff` - [x] whatsnew entry This modification resolves the error in issue #28189 but still not working as expected. It seems that there is a bug related with left-join, as you can see in issues #28220 and #28243. I'm making this pull request for the #28189 in case you want to resolve this bug separately from the left join problem. On the other hand, I can work on this and help is welcome.
{ "+1": 1, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 1, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28296/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28296/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/28296.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/28296", "merged_at": null, "patch_url": "https://github.com/pandas-dev/pandas/pull/28296.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/28296" }
https://api.github.com/repos/pandas-dev/pandas/issues/28297
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28297/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28297/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28297/events
https://github.com/pandas-dev/pandas/pull/28297
489,797,340
MDExOlB1bGxSZXF1ZXN0MzE0NTM3MDEw
28,297
fix Rolling for multi-index and reversed index.
{ "avatar_url": "https://avatars.githubusercontent.com/u/1970226?v=4", "events_url": "https://api.github.com/users/leftys/events{/privacy}", "followers_url": "https://api.github.com/users/leftys/followers", "following_url": "https://api.github.com/users/leftys/following{/other_user}", "gists_url": "https://api.github.com/users/leftys/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/leftys", "id": 1970226, "login": "leftys", "node_id": "MDQ6VXNlcjE5NzAyMjY=", "organizations_url": "https://api.github.com/users/leftys/orgs", "received_events_url": "https://api.github.com/users/leftys/received_events", "repos_url": "https://api.github.com/users/leftys/repos", "site_admin": false, "starred_url": "https://api.github.com/users/leftys/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/leftys/subscriptions", "type": "User", "url": "https://api.github.com/users/leftys" }
[ { "color": "4E9A06", "default": false, "description": null, "id": 76812, "name": "Enhancement", "node_id": "MDU6TGFiZWw3NjgxMg==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Enhancement" }, { "color": "d4c5f9", "default": false, "description": "rolling,...
closed
false
null
[]
{ "closed_at": "2020-01-30T12:18:05Z", "closed_issues": 2207, "created_at": "2012-09-13T02:13:00Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/329591?v=4", "events_url": "https://api.github.com/users/wesm/events{/privacy}", "followers_url": "https://api.github.com/users/wesm/followers", "following_url": "https://api.github.com/users/wesm/following{/other_user}", "gists_url": "https://api.github.com/users/wesm/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/wesm", "id": 329591, "login": "wesm", "node_id": "MDQ6VXNlcjMyOTU5MQ==", "organizations_url": "https://api.github.com/users/wesm/orgs", "received_events_url": "https://api.github.com/users/wesm/received_events", "repos_url": "https://api.github.com/users/wesm/repos", "site_admin": false, "starred_url": "https://api.github.com/users/wesm/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/wesm/subscriptions", "type": "User", "url": "https://api.github.com/users/wesm" }, "description": "on-merge: backport to 1.0.x", "due_on": "2020-02-01T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/16", "id": 174211, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16/labels", "node_id": "MDk6TWlsZXN0b25lMTc0MjEx", "number": 16, "open_issues": 0, "state": "closed", "title": "1.0.0", "updated_at": "2020-01-30T12:18:05Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16" }
7
2019-09-05T14:26:07Z
2020-03-01T16:01:26Z
2019-10-22T01:35:37Z
CONTRIBUTOR
null
Fix Rolling operation for level of multi-index and descending time index (that is monotonic, but decreasing). - [x] closes #19248 - [x] closes #15584 - [x] tests passed - [x] passes `black pandas` - [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff` - [x] whatsnew entry
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28297/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28297/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/28297.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/28297", "merged_at": "2019-10-22T01:35:37Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/28297.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/28297" }
https://api.github.com/repos/pandas-dev/pandas/issues/28298
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28298/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28298/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28298/events
https://github.com/pandas-dev/pandas/issues/28298
489,873,830
MDU6SXNzdWU0ODk4NzM4MzA=
28,298
Modify get_group() method to allow getting multiple groups
{ "avatar_url": "https://avatars.githubusercontent.com/u/42301547?v=4", "events_url": "https://api.github.com/users/frank-yifei-wang/events{/privacy}", "followers_url": "https://api.github.com/users/frank-yifei-wang/followers", "following_url": "https://api.github.com/users/frank-yifei-wang/following{/other_user}", "gists_url": "https://api.github.com/users/frank-yifei-wang/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/frank-yifei-wang", "id": 42301547, "login": "frank-yifei-wang", "node_id": "MDQ6VXNlcjQyMzAxNTQ3", "organizations_url": "https://api.github.com/users/frank-yifei-wang/orgs", "received_events_url": "https://api.github.com/users/frank-yifei-wang/received_events", "repos_url": "https://api.github.com/users/frank-yifei-wang/repos", "site_admin": false, "starred_url": "https://api.github.com/users/frank-yifei-wang/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/frank-yifei-wang/subscriptions", "type": "User", "url": "https://api.github.com/users/frank-yifei-wang" }
[ { "color": "729FCF", "default": false, "description": null, "id": 233160, "name": "Groupby", "node_id": "MDU6TGFiZWwyMzMxNjA=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Groupby" } ]
closed
false
null
[]
null
8
2019-09-05T16:34:00Z
2021-08-30T05:43:12Z
2021-07-11T17:37:10Z
NONE
null
#### Problem description The `get_group()` method supports getting **one group** from a grouped object by ```python # Current syntax grouped.get_group('name1') ``` but you can't get **multiple groups** simply by ```python # Desired syntax grouped.get_group(['name1', 'name2']) ``` This causes *"ValueError: must supply a tuple to get_group with multiple grouping keys"* My workaround for now is using `concat` and list comprehension ```python # Workaround pd.concat([group for (name, group) in grouped if name in ['name1', 'name2']]) ``` but this is a bit cumbersome and not Pythonic... #### Expected Output Could we modify `get_group()` to support the syntax shown in code snippet `# Desired syntax`? Or maybe implement another `get_groups()` method? #### Output of ``pd.show_versions()`` <details> INSTALLED VERSIONS ------------------ commit: None python: 3.7.2.final.0 python-bits: 64 OS: Windows OS-release: 7 machine: AMD64 processor: Intel64 Family 6 Model 94 Stepping 3, GenuineIntel byteorder: little LC_ALL: None LANG: en_US.UTF-8 LOCALE: None.None pandas: 0.24.2 pytest: 4.3.1 pip: 19.0.3 setuptools: 40.8.0 Cython: 0.29.6 numpy: 1.16.2 scipy: 1.2.1 pyarrow: None xarray: 0.12.3 IPython: 7.4.0 sphinx: 1.8.5 patsy: 0.5.1 dateutil: 2.8.0 pytz: 2018.9 blosc: None bottleneck: 1.2.1 tables: 3.5.1 numexpr: 2.6.9 feather: None matplotlib: 3.0.3 openpyxl: 2.6.1 xlrd: 1.2.0 xlwt: 1.3.0 xlsxwriter: 1.1.5 lxml.etree: 4.3.2 bs4: 4.7.1 html5lib: 1.0.1 sqlalchemy: 1.3.1 pymysql: None psycopg2: 2.7.6.1 (dt dec pq3 ext lo64) jinja2: 2.10 s3fs: None fastparquet: None pandas_gbq: None pandas_datareader: None gcsfs: None </details>
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28298/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28298/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/28299
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28299/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28299/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28299/events
https://github.com/pandas-dev/pandas/issues/28299
489,896,262
MDU6SXNzdWU0ODk4OTYyNjI=
28,299
to_datetime(foo, errors='coerce') does not swallow all errors
{ "avatar_url": "https://avatars.githubusercontent.com/u/17771011?v=4", "events_url": "https://api.github.com/users/miggec/events{/privacy}", "followers_url": "https://api.github.com/users/miggec/followers", "following_url": "https://api.github.com/users/miggec/following{/other_user}", "gists_url": "https://api.github.com/users/miggec/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/miggec", "id": 17771011, "login": "miggec", "node_id": "MDQ6VXNlcjE3NzcxMDEx", "organizations_url": "https://api.github.com/users/miggec/orgs", "received_events_url": "https://api.github.com/users/miggec/received_events", "repos_url": "https://api.github.com/users/miggec/repos", "site_admin": false, "starred_url": "https://api.github.com/users/miggec/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/miggec/subscriptions", "type": "User", "url": "https://api.github.com/users/miggec" }
[ { "color": "e10c02", "default": false, "description": null, "id": 76811, "name": "Bug", "node_id": "MDU6TGFiZWw3NjgxMQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug" }, { "color": "AFEEEE", "default": false, "description": null, "id": 211840, ...
closed
false
null
[]
{ "closed_at": "2020-01-30T12:18:05Z", "closed_issues": 2207, "created_at": "2012-09-13T02:13:00Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/329591?v=4", "events_url": "https://api.github.com/users/wesm/events{/privacy}", "followers_url": "https://api.github.com/users/wesm/followers", "following_url": "https://api.github.com/users/wesm/following{/other_user}", "gists_url": "https://api.github.com/users/wesm/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/wesm", "id": 329591, "login": "wesm", "node_id": "MDQ6VXNlcjMyOTU5MQ==", "organizations_url": "https://api.github.com/users/wesm/orgs", "received_events_url": "https://api.github.com/users/wesm/received_events", "repos_url": "https://api.github.com/users/wesm/repos", "site_admin": false, "starred_url": "https://api.github.com/users/wesm/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/wesm/subscriptions", "type": "User", "url": "https://api.github.com/users/wesm" }, "description": "on-merge: backport to 1.0.x", "due_on": "2020-02-01T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/16", "id": 174211, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16/labels", "node_id": "MDk6TWlsZXN0b25lMTc0MjEx", "number": 16, "open_issues": 0, "state": "closed", "title": "1.0.0", "updated_at": "2020-01-30T12:18:05Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16" }
4
2019-09-05T17:16:42Z
2019-09-12T12:45:21Z
2019-09-12T12:45:21Z
CONTRIBUTOR
null
#### Code Sample ```python # this fails with ValueError in 0.25.1: pandas.to_datetime('200622-12-31', errors='coerce') # but returns Timestamp('2022-06-21 19:00:00') in pandas 0.23.4 # this also fails: pandas.to_datetime('111111-24-11', errors='coerce') # but this does not: pandas.to_datetime('111111-23-11', errors='coerce') ``` #### Problem description I have some text files with malformed dates, which at one point I will process with the above code. While trying to migrate my code from 23.4 to 25.1 I got the following: ```python .../my_file.py in <module> ----> 1 pandas.to_datetime('200622-12-31', errors='coerce') .../lib/python3.7/site-packages/pandas/util/_decorators.py in wrapper(*args, **kwargs) 206 else: 207 kwargs[new_arg_name] = new_arg_value --> 208 return func(*args, **kwargs) 209 210 return wrapper .../lib/python3.7/site-packages/pandas/core/tools/datetimes.py in to_datetime(arg, errors, dayfirst, yearfirst, utc, box, format, exact, unit, infer_datetime_format, origin, cache) 794 result = convert_listlike(arg, box, format) 795 else: --> 796 result = convert_listlike(np.array([arg]), box, format)[0] 797 798 return result .../lib/python3.7/site-packages/pandas/core/tools/datetimes.py in _convert_listlike_datetimes(arg, box, format, name, tz, unit, errors, infer_datetime_format, dayfirst, yearfirst, exact) 461 errors=errors, 462 require_iso8601=require_iso8601, --> 463 allow_object=True, 464 ) 465 .../lib/python3.7/site-packages/pandas/core/arrays/datetimes.py in objects_to_datetime64ns(data, dayfirst, yearfirst, utc, errors, require_iso8601, allow_object) 1982 return values.view("i8"), tz_parsed 1983 except (ValueError, TypeError): -> 1984 raise e 1985 1986 if tz_parsed is not None: .../lib/python3.7/site-packages/pandas/core/arrays/datetimes.py in objects_to_datetime64ns(data, dayfirst, yearfirst, utc, errors, require_iso8601, allow_object) 1973 dayfirst=dayfirst, 1974 yearfirst=yearfirst, -> 1975 require_iso8601=require_iso8601, 1976 ) 1977 except ValueError as e: pandas/_libs/tslib.pyx in pandas._libs.tslib.array_to_datetime() pandas/_libs/tslib.pyx in pandas._libs.tslib.array_to_datetime() ValueError: offset must be a timedelta strictly between -timedelta(hours=24) and timedelta(hours=24). ``` #### Expected Output The main expectation is that an exception is not raised. I would probably expect ` pandas.to_datetime('200622-12-31', errors='coerce')` to return NaT, but pandas 23.4 seems to parse it into `Timestamp('2022-06-21 19:00:00')` #### Output of ``pd.show_versions()`` <details> INSTALLED VERSIONS ------------------ commit : None python : 3.7.3.final.0 python-bits : 64 OS : Linux OS-release : 4.15.0-58-generic machine : x86_64 processor : byteorder : little LC_ALL : None LANG : en_GB.UTF-8 LOCALE : en_US.UTF-8 pandas : 0.25.1 numpy : 1.16.4 pytz : 2019.1 dateutil : 2.8.0 pip : 19.1.1 setuptools : 41.0.1 Cython : 0.29.10 pytest : 4.6.3 hypothesis : 4.7.3 sphinx : None blosc : None feather : 0.4.0 xlsxwriter : 1.1.8 lxml.etree : 4.3.3 html5lib : 1.0.1 pymysql : 0.9.3 psycopg2 : 2.7.7 (dt dec pq3 ext lo64) jinja2 : 2.10.1 IPython : 7.5.0 pandas_datareader: None bs4 : 4.7.1 bottleneck : 1.2.1 fastparquet : None gcsfs : 0.3.0 lxml.etree : 4.3.3 matplotlib : 3.1.1 numexpr : 2.6.9 odfpy : None openpyxl : 2.6.2 pandas_gbq : None pyarrow : 0.13.0 pytables : None s3fs : None scipy : 1.3.0 sqlalchemy : 1.2.14 tables : 3.5.2 xarray : None xlrd : 1.2.0 xlwt : 1.3.0 xlsxwriter : 1.1.8 </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/28299/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28299/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/28300
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28300/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28300/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28300/events
https://github.com/pandas-dev/pandas/pull/28300
489,901,257
MDExOlB1bGxSZXF1ZXN0MzE0NjE5MzMy
28,300
BUG: make tz_localize operate on values rather than categories
{ "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": "AFEEEE", "default": false, "description": null, "id": 211840, "name": "Timeseries", "node_id": "MDU6TGFiZWwyMTE4NDA=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Timeseries" }, { "color": "e11d21", "default": false, "description": "Categoric...
closed
false
null
[]
{ "closed_at": "2020-01-30T12:18:05Z", "closed_issues": 2207, "created_at": "2012-09-13T02:13:00Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/329591?v=4", "events_url": "https://api.github.com/users/wesm/events{/privacy}", "followers_url": "https://api.github.com/users/wesm/followers", "following_url": "https://api.github.com/users/wesm/following{/other_user}", "gists_url": "https://api.github.com/users/wesm/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/wesm", "id": 329591, "login": "wesm", "node_id": "MDQ6VXNlcjMyOTU5MQ==", "organizations_url": "https://api.github.com/users/wesm/orgs", "received_events_url": "https://api.github.com/users/wesm/received_events", "repos_url": "https://api.github.com/users/wesm/repos", "site_admin": false, "starred_url": "https://api.github.com/users/wesm/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/wesm/subscriptions", "type": "User", "url": "https://api.github.com/users/wesm" }, "description": "on-merge: backport to 1.0.x", "due_on": "2020-02-01T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/16", "id": 174211, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16/labels", "node_id": "MDk6TWlsZXN0b25lMTc0MjEx", "number": 16, "open_issues": 0, "state": "closed", "title": "1.0.0", "updated_at": "2020-01-30T12:18:05Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16" }
8
2019-09-05T17:28:44Z
2019-11-12T11:25:23Z
2019-11-02T20:19:35Z
MEMBER
null
- [x] closes #27952 - [x] tests added / passed - [x] passes `black pandas` - [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff` - [x] whatsnew entry
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28300/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28300/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/28300.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/28300", "merged_at": "2019-11-02T20:19:35Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/28300.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/28300" }
https://api.github.com/repos/pandas-dev/pandas/issues/28301
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28301/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28301/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28301/events
https://github.com/pandas-dev/pandas/issues/28301
489,916,396
MDU6SXNzdWU0ODk5MTYzOTY=
28,301
groupby level after stack not actually grouping
{ "avatar_url": "https://avatars.githubusercontent.com/u/7414804?v=4", "events_url": "https://api.github.com/users/christopherzimmerman/events{/privacy}", "followers_url": "https://api.github.com/users/christopherzimmerman/followers", "following_url": "https://api.github.com/users/christopherzimmerman/following{/other_user}", "gists_url": "https://api.github.com/users/christopherzimmerman/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/christopherzimmerman", "id": 7414804, "login": "christopherzimmerman", "node_id": "MDQ6VXNlcjc0MTQ4MDQ=", "organizations_url": "https://api.github.com/users/christopherzimmerman/orgs", "received_events_url": "https://api.github.com/users/christopherzimmerman/received_events", "repos_url": "https://api.github.com/users/christopherzimmerman/repos", "site_admin": false, "starred_url": "https://api.github.com/users/christopherzimmerman/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/christopherzimmerman/subscriptions", "type": "User", "url": "https://api.github.com/users/christopherzimmerman" }
[ { "color": "e10c02", "default": false, "description": null, "id": 76811, "name": "Bug", "node_id": "MDU6TGFiZWw3NjgxMQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug" }, { "color": "729FCF", "default": false, "description": null, "id": 233160, ...
closed
false
null
[]
{ "closed_at": "2020-01-30T12:18:05Z", "closed_issues": 2207, "created_at": "2012-09-13T02:13:00Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/329591?v=4", "events_url": "https://api.github.com/users/wesm/events{/privacy}", "followers_url": "https://api.github.com/users/wesm/followers", "following_url": "https://api.github.com/users/wesm/following{/other_user}", "gists_url": "https://api.github.com/users/wesm/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/wesm", "id": 329591, "login": "wesm", "node_id": "MDQ6VXNlcjMyOTU5MQ==", "organizations_url": "https://api.github.com/users/wesm/orgs", "received_events_url": "https://api.github.com/users/wesm/received_events", "repos_url": "https://api.github.com/users/wesm/repos", "site_admin": false, "starred_url": "https://api.github.com/users/wesm/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/wesm/subscriptions", "type": "User", "url": "https://api.github.com/users/wesm" }, "description": "on-merge: backport to 1.0.x", "due_on": "2020-02-01T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/16", "id": 174211, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16/labels", "node_id": "MDk6TWlsZXN0b25lMTc0MjEx", "number": 16, "open_issues": 0, "state": "closed", "title": "1.0.0", "updated_at": "2020-01-30T12:18:05Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16" }
3
2019-09-05T18:01:51Z
2019-09-10T12:05:08Z
2019-09-10T12:05:08Z
CONTRIBUTOR
null
#### Code Sample, a copy-pastable example if possible ```python columns = pd.MultiIndex.from_product([['a', 'b'], [1, 2]]) index = [0, 0, 1, 1] values = np.arange(16).reshape(-1, 4) df = pd.DataFrame(values, columns=columns, index=index) a b 1 2 1 2 0 0 1 2 3 0 4 5 6 7 1 8 9 10 11 1 12 13 14 15 df.stack(1) a b 0 1 0 2 2 1 3 1 4 6 2 5 7 1 1 8 10 2 9 11 1 12 14 2 13 15 # ACTUAL BEHAVIOR df.stack(1).groupby(level=[0, 1]).sum() a b 0 1 0 2 2 1 3 1 4 6 2 5 7 1 1 8 10 2 9 11 1 12 14 2 13 15 # EXPECTED a b 0 1 4 8 2 6 10 1 1 20 24 2 22 26 # WORKAROUND df.stack(1).reset_index().groupby(['level_0', 'level_1']).sum().rename_axis([None, None]) ``` #### Problem description When grouping by levels after stacking, no grouping seems to be taking place. However, after resetting the index and using those series to group, the groupby works as expected #### Output of ``pd.show_versions()`` <details> INSTALLED VERSIONS ------------------ commit : None python : 3.6.7.final.0 python-bits : 64 OS : Windows OS-release : 10 machine : AMD64 processor : Intel64 Family 6 Model 58 Stepping 9, GenuineIntel byteorder : little LC_ALL : None LANG : en_US.UTF-8 LOCALE : None.None pandas : 0.25.0 numpy : 1.17.0 pytz : 2018.6 dateutil : 2.7.3 pip : 18.1 setuptools : 39.1.0 Cython : None pytest : None hypothesis : None sphinx : None blosc : None feather : None xlsxwriter : None lxml.etree : 4.3.4 html5lib : 1.0.1 pymysql : None psycopg2 : 2.7.5 (dt dec pq3 ext lo64) jinja2 : 2.10.1 IPython : 7.2.0 pandas_datareader: None bs4 : 4.7.1 bottleneck : None fastparquet : None gcsfs : None lxml.etree : 4.3.4 matplotlib : 3.0.0 numexpr : None odfpy : None openpyxl : None pandas_gbq : None pyarrow : None pytables : None s3fs : None scipy : 1.2.1 sqlalchemy : 1.2.12 tables : None xarray : None xlrd : None xlwt : None xlsxwriter : 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/28301/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28301/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/28302
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28302/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28302/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28302/events
https://github.com/pandas-dev/pandas/issues/28302
489,922,188
MDU6SXNzdWU0ODk5MjIxODg=
28,302
groupby(pd.Grouper) ignores loffset
{ "avatar_url": "https://avatars.githubusercontent.com/u/4216919?v=4", "events_url": "https://api.github.com/users/joelrich/events{/privacy}", "followers_url": "https://api.github.com/users/joelrich/followers", "following_url": "https://api.github.com/users/joelrich/following{/other_user}", "gists_url": "https://api.github.com/users/joelrich/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/joelrich", "id": 4216919, "login": "joelrich", "node_id": "MDQ6VXNlcjQyMTY5MTk=", "organizations_url": "https://api.github.com/users/joelrich/orgs", "received_events_url": "https://api.github.com/users/joelrich/received_events", "repos_url": "https://api.github.com/users/joelrich/repos", "site_admin": false, "starred_url": "https://api.github.com/users/joelrich/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/joelrich/subscriptions", "type": "User", "url": "https://api.github.com/users/joelrich" }
[ { "color": "e10c02", "default": false, "description": null, "id": 76811, "name": "Bug", "node_id": "MDU6TGFiZWw3NjgxMQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug" }, { "color": "AFEEEE", "default": false, "description": null, "id": 211840, ...
closed
false
null
[]
{ "closed_at": "2020-07-28T18:13:47Z", "closed_issues": 2378, "created_at": "2019-12-02T12:52:48Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4", "events_url": "https://api.github.com/users/jreback/events{/privacy}", "followers_url": "https://api.github.com/users/jreback/followers", "following_url": "https://api.github.com/users/jreback/following{/other_user}", "gists_url": "https://api.github.com/users/jreback/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jreback", "id": 953992, "login": "jreback", "node_id": "MDQ6VXNlcjk1Mzk5Mg==", "organizations_url": "https://api.github.com/users/jreback/orgs", "received_events_url": "https://api.github.com/users/jreback/received_events", "repos_url": "https://api.github.com/users/jreback/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jreback/subscriptions", "type": "User", "url": "https://api.github.com/users/jreback" }, "description": "", "due_on": "2020-08-01T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/68", "id": 4894670, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68/labels", "node_id": "MDk6TWlsZXN0b25lNDg5NDY3MA==", "number": 68, "open_issues": 0, "state": "closed", "title": "1.1", "updated_at": "2021-07-17T17:25:28Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68" }
6
2019-09-05T18:15:35Z
2020-05-26T05:19:03Z
2020-05-10T15:52:55Z
NONE
null
#### Code Sample, a copy-pastable example if possible ```python import pandas as pd df = pd.date_range(start="1/1/2018", end="1/2/2018", periods=1000).to_frame() print(df.resample("1h", loffset="15min").last().index) print(df.groupby(pd.Grouper(freq="1h", loffset="15min")).last().index) ``` #### Problem description I thought the two calls should be equivalent. However, the output is: ``` DatetimeIndex(['2018-01-01 00:15:00', '2018-01-01 01:15:00', '2018-01-01 02:15:00', '2018-01-01 03:15:00', '2018-01-01 04:15:00', '2018-01-01 05:15:00', '2018-01-01 06:15:00', '2018-01-01 07:15:00', '2018-01-01 08:15:00', '2018-01-01 09:15:00', '2018-01-01 10:15:00', '2018-01-01 11:15:00', '2018-01-01 12:15:00', '2018-01-01 13:15:00', '2018-01-01 14:15:00', '2018-01-01 15:15:00', '2018-01-01 16:15:00', '2018-01-01 17:15:00', '2018-01-01 18:15:00', '2018-01-01 19:15:00', '2018-01-01 20:15:00', '2018-01-01 21:15:00', '2018-01-01 22:15:00', '2018-01-01 23:15:00', '2018-01-02 00:15:00'], dtype='datetime64[ns]', freq='H') DatetimeIndex(['2018-01-01 00:00:00', '2018-01-01 01:00:00', '2018-01-01 02:00:00', '2018-01-01 03:00:00', '2018-01-01 04:00:00', '2018-01-01 05:00:00', '2018-01-01 06:00:00', '2018-01-01 07:00:00', '2018-01-01 08:00:00', '2018-01-01 09:00:00', '2018-01-01 10:00:00', '2018-01-01 11:00:00', '2018-01-01 12:00:00', '2018-01-01 13:00:00', '2018-01-01 14:00:00', '2018-01-01 15:00:00', '2018-01-01 16:00:00', '2018-01-01 17:00:00', '2018-01-01 18:00:00', '2018-01-01 19:00:00', '2018-01-01 20:00:00', '2018-01-01 21:00:00', '2018-01-01 22:00:00', '2018-01-01 23:00:00', '2018-01-02 00:00:00'], dtype='datetime64[ns]', freq='H') ``` #### Output of ``pd.show_versions()`` <details> INSTALLED VERSIONS ------------------ commit : None python : 3.7.3.final.0 python-bits : 64 OS : Linux OS-release : 4.4.0-17134-Microsoft machine : x86_64 processor : x86_64 byteorder : little LC_ALL : None LANG : C.UTF-8 LOCALE : en_US.UTF-8 pandas : 0.25.1 numpy : 1.17.1 pytz : 2019.2 dateutil : 2.8.0 pip : 19.2.3 setuptools : 41.2.0 Cython : None pytest : None hypothesis : None sphinx : None blosc : None feather : None xlsxwriter : None lxml.etree : 4.4.1 html5lib : None pymysql : None psycopg2 : None jinja2 : 2.10.1 IPython : 7.8.0 pandas_datareader: 0.7.4 bs4 : None bottleneck : None fastparquet : None gcsfs : None lxml.etree : 4.4.1 matplotlib : 3.1.1 numexpr : None odfpy : None openpyxl : None pandas_gbq : None pyarrow : 0.14.1 pytables : None s3fs : None scipy : 1.3.1 sqlalchemy : None tables : None xarray : None xlrd : None xlwt : None xlsxwriter : 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/28302/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28302/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/28303
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28303/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28303/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28303/events
https://github.com/pandas-dev/pandas/issues/28303
489,934,620
MDU6SXNzdWU0ODk5MzQ2MjA=
28,303
Extreme performance difference between int and float factorization
{ "avatar_url": "https://avatars.githubusercontent.com/u/4216919?v=4", "events_url": "https://api.github.com/users/joelrich/events{/privacy}", "followers_url": "https://api.github.com/users/joelrich/followers", "following_url": "https://api.github.com/users/joelrich/following{/other_user}", "gists_url": "https://api.github.com/users/joelrich/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/joelrich", "id": 4216919, "login": "joelrich", "node_id": "MDQ6VXNlcjQyMTY5MTk=", "organizations_url": "https://api.github.com/users/joelrich/orgs", "received_events_url": "https://api.github.com/users/joelrich/received_events", "repos_url": "https://api.github.com/users/joelrich/repos", "site_admin": false, "starred_url": "https://api.github.com/users/joelrich/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/joelrich/subscriptions", "type": "User", "url": "https://api.github.com/users/joelrich" }
[ { "color": "a10c02", "default": false, "description": "Memory or execution speed performance", "id": 8935311, "name": "Performance", "node_id": "MDU6TGFiZWw4OTM1MzEx", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Performance" } ]
closed
false
null
[]
{ "closed_at": "2020-12-26T13:57:50Z", "closed_issues": 1768, "created_at": "2020-05-29T23:47:32Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4", "events_url": "https://api.github.com/users/jreback/events{/privacy}", "followers_url": "https://api.github.com/users/jreback/followers", "following_url": "https://api.github.com/users/jreback/following{/other_user}", "gists_url": "https://api.github.com/users/jreback/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jreback", "id": 953992, "login": "jreback", "node_id": "MDQ6VXNlcjk1Mzk5Mg==", "organizations_url": "https://api.github.com/users/jreback/orgs", "received_events_url": "https://api.github.com/users/jreback/received_events", "repos_url": "https://api.github.com/users/jreback/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jreback/subscriptions", "type": "User", "url": "https://api.github.com/users/jreback" }, "description": "on-merge: backport to 1.2.x", "due_on": "2020-12-15T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/73", "id": 5479819, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/73/labels", "node_id": "MDk6TWlsZXN0b25lNTQ3OTgxOQ==", "number": 73, "open_issues": 0, "state": "closed", "title": "1.2", "updated_at": "2021-04-13T15:46:43Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/73" }
13
2019-09-05T18:43:23Z
2020-11-14T16:15:26Z
2020-11-14T16:15:26Z
NONE
null
#### Code Sample, a copy-pastable example if possible ```python import pandas as pd import numpy as np from time import time df = pd.date_range(start="1/1/2018", end="1/2/2018", periods=1e6).to_frame() start = time() dfr = df.resample("1s").last() print(time() - start) print("Length:", len(dfr)) print() group_index = np.round(df.index.astype(int) / 1e9) start = time() dfr = df.groupby(group_index).last() print(time() - start) print("Length:", len(dfr)) ``` #### Problem description In my current project, I use groupby as well as resample for the same data frames with the same aggregations. I have noticed that resample is way quicker than groupby. While I understand that groupby is more flexible, it would still be nice if the performance was comparable. In the example above, resample is more than 50 times faster: ``` Length: 86401 0.023558616638183594 Length: 86401 1.264981746673584 ``` I am aware that they don't result in the exact same data frames, but this does not matter for this discussion. #### Expected Output Better performance for groupby. I haven't looked at the groupby implementation and therefore I don't know if there is a good reason for the difference. If there is a good reason, some common cases could still be improved a lot. For example, in this case, we could just check first if the by-argument is monotonic increasing or decreasing. In this case, the operation can be implemented even without a hash map. #### Output of ``pd.show_versions()`` <details> INSTALLED VERSIONS ------------------ commit : None python : 3.7.3.final.0 python-bits : 64 OS : Linux OS-release : 4.4.0-17134-Microsoft machine : x86_64 processor : x86_64 byteorder : little LC_ALL : None LANG : C.UTF-8 LOCALE : en_US.UTF-8 pandas : 0.25.1 numpy : 1.17.1 pytz : 2019.2 dateutil : 2.8.0 pip : 19.2.3 setuptools : 41.2.0 Cython : None pytest : None hypothesis : None sphinx : None blosc : None feather : None xlsxwriter : None lxml.etree : 4.4.1 html5lib : None pymysql : None psycopg2 : None jinja2 : 2.10.1 IPython : 7.8.0 pandas_datareader: 0.7.4 bs4 : None bottleneck : None fastparquet : None gcsfs : None lxml.etree : 4.4.1 matplotlib : 3.1.1 numexpr : None odfpy : None openpyxl : None pandas_gbq : None pyarrow : 0.14.1 pytables : None s3fs : None scipy : 1.3.1 sqlalchemy : None tables : None xarray : None xlrd : None xlwt : None xlsxwriter : 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/28303/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28303/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/28304
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28304/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28304/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28304/events
https://github.com/pandas-dev/pandas/pull/28304
490,020,024
MDExOlB1bGxSZXF1ZXN0MzE0NzExNDU0
28,304
Added a way to check if a numeric type cell is NaN
{ "avatar_url": "https://avatars.githubusercontent.com/u/209396?v=4", "events_url": "https://api.github.com/users/antonini/events{/privacy}", "followers_url": "https://api.github.com/users/antonini/followers", "following_url": "https://api.github.com/users/antonini/following{/other_user}", "gists_url": "https://api.github.com/users/antonini/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/antonini", "id": 209396, "login": "antonini", "node_id": "MDQ6VXNlcjIwOTM5Ng==", "organizations_url": "https://api.github.com/users/antonini/orgs", "received_events_url": "https://api.github.com/users/antonini/received_events", "repos_url": "https://api.github.com/users/antonini/repos", "site_admin": false, "starred_url": "https://api.github.com/users/antonini/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/antonini/subscriptions", "type": "User", "url": "https://api.github.com/users/antonini" }
[ { "color": "bfe5bf", "default": false, "description": "read_excel, to_excel", "id": 49254273, "name": "IO Excel", "node_id": "MDU6TGFiZWw0OTI1NDI3Mw==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20Excel" }, { "color": "207de5", "default": false, "de...
closed
false
null
[]
null
3
2019-09-05T21:32:05Z
2019-09-11T01:20:23Z
2019-09-11T01:20:23Z
NONE
null
- [ ] closes #xxxx - [ ] tests added / passed - [ ] passes `black pandas` - [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff` - [ ] whatsnew entry
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28304/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28304/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/28304.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/28304", "merged_at": null, "patch_url": "https://github.com/pandas-dev/pandas/pull/28304.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/28304" }
https://api.github.com/repos/pandas-dev/pandas/issues/28305
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28305/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28305/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28305/events
https://github.com/pandas-dev/pandas/issues/28305
490,022,750
MDU6SXNzdWU0OTAwMjI3NTA=
28,305
Pandas df.rolling.mean() abnormal behavior for a Series having larger numbers (in the scale of billions)
{ "avatar_url": "https://avatars.githubusercontent.com/u/5788470?v=4", "events_url": "https://api.github.com/users/bobnvk99/events{/privacy}", "followers_url": "https://api.github.com/users/bobnvk99/followers", "following_url": "https://api.github.com/users/bobnvk99/following{/other_user}", "gists_url": "https://api.github.com/users/bobnvk99/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/bobnvk99", "id": 5788470, "login": "bobnvk99", "node_id": "MDQ6VXNlcjU3ODg0NzA=", "organizations_url": "https://api.github.com/users/bobnvk99/orgs", "received_events_url": "https://api.github.com/users/bobnvk99/received_events", "repos_url": "https://api.github.com/users/bobnvk99/repos", "site_admin": false, "starred_url": "https://api.github.com/users/bobnvk99/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/bobnvk99/subscriptions", "type": "User", "url": "https://api.github.com/users/bobnvk99" }
[ { "color": "207de5", "default": false, "description": "Clarification about behavior needed to assess issue", "id": 307649777, "name": "Needs Info", "node_id": "MDU6TGFiZWwzMDc2NDk3Nzc=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Needs%20Info" } ]
closed
false
null
[]
null
6
2019-09-05T21:39:19Z
2020-04-01T14:02:05Z
2020-04-01T14:02:05Z
NONE
null
#### Code Sample, a copy-pastable example if possible ```python #Sample residual pcts residuals_pct =[0.044516001,0.031137117,1.06758E+64,0.003522454,0.065171486,0.06033751,0.01325514,-0.005620799,-0.006225719,0.045713825,0.039280786,0.000531307] #Creating a dataframe with residual percent d = pd.DataFrame(residuals, columns=['residual_pct']) #Shifting the pct 1 row down. d['residual_pct_shift'] = d.residual_pct.shift(1) #Calculating the adjusted residual pct. d['adj_residual_pct'] = d['residual_pct_shift'][3:].rolling(window=3).mean() ``` #### Problem description I am trying to implement adjusted residual percent as the rolling average of the previous three residual percents. Due to some data issue, model forecasted the target variable in the scale of billions, consequently effecting the residual percentage calculation. However, this is irrelevant to the current problem, the issue is when doing the rolling average using .....rolling(window=3).mean(), **the average for the rows after the abnormal residual percent got affected**. **If I do take those same numbers and do the normal way of averaging or use MS Excel, I got it right.** Please see the image below: ![pandas_rolling_mean_issue](https://user-images.githubusercontent.com/5788470/64381815-aa270100-cff9-11e9-8f60-5d5469211f5d.PNG) #### Output of ``pd.show_versions()`` <details> INSTALLED VERSIONS ------------------ commit : None python : 3.7.3.final.0 python-bits : 64 OS : Windows OS-release : 10 machine : AMD64 processor : Intel64 Family 6 Model 142 Stepping 9, GenuineIntel byteorder : little LC_ALL : None LANG : None LOCALE : None.None pandas : 0.25.1 numpy : 1.16.4 pytz : 2019.2 dateutil : 2.8.0 pip : 19.2.2 setuptools : 41.0.1 Cython : 0.29.13 pytest : 5.0.1 hypothesis : None sphinx : 2.1.2 blosc : None feather : None xlsxwriter : 1.1.8 lxml.etree : 4.4.1 html5lib : 1.0.1 pymysql : None psycopg2 : None jinja2 : 2.10.1 IPython : 7.8.0 pandas_datareader: None bs4 : 4.8.0 bottleneck : 1.2.1 fastparquet : None gcsfs : None lxml.etree : 4.4.1 matplotlib : 3.1.1 numexpr : 2.7.0 odfpy : None openpyxl : 2.6.2 pandas_gbq : None pyarrow : None pytables : None s3fs : None scipy : 1.3.1 sqlalchemy : 1.3.7 tables : 3.5.2 xarray : None xlrd : 1.2.0 xlwt : 1.3.0 xlsxwriter : 1.1.8 </details> Is there anything that I am missing or unaware. I tried to check in the pandas' source code and found nothing. Irrespective of the scale of the numbers, excel and the normal way of averaging works fine. Please advise. I greatly appreciate your help. 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/28305/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28305/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/28306
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28306/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28306/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28306/events
https://github.com/pandas-dev/pandas/issues/28306
490,043,464
MDU6SXNzdWU0OTAwNDM0NjQ=
28,306
Pandas unstack() unexpected behavior with multiindex row and column
{ "avatar_url": "https://avatars.githubusercontent.com/u/13790067?v=4", "events_url": "https://api.github.com/users/fmmirzaei/events{/privacy}", "followers_url": "https://api.github.com/users/fmmirzaei/followers", "following_url": "https://api.github.com/users/fmmirzaei/following{/other_user}", "gists_url": "https://api.github.com/users/fmmirzaei/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/fmmirzaei", "id": 13790067, "login": "fmmirzaei", "node_id": "MDQ6VXNlcjEzNzkwMDY3", "organizations_url": "https://api.github.com/users/fmmirzaei/orgs", "received_events_url": "https://api.github.com/users/fmmirzaei/received_events", "repos_url": "https://api.github.com/users/fmmirzaei/repos", "site_admin": false, "starred_url": "https://api.github.com/users/fmmirzaei/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/fmmirzaei/subscriptions", "type": "User", "url": "https://api.github.com/users/fmmirzaei" }
[ { "color": "02d7e1", "default": false, "description": "Concat, Merge/Join, Stack/Unstack, Explode", "id": 13098779, "name": "Reshaping", "node_id": "MDU6TGFiZWwxMzA5ODc3OQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Reshaping" } ]
closed
false
null
[]
{ "closed_at": "2020-07-28T18:13:47Z", "closed_issues": 2378, "created_at": "2019-12-02T12:52:48Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4", "events_url": "https://api.github.com/users/jreback/events{/privacy}", "followers_url": "https://api.github.com/users/jreback/followers", "following_url": "https://api.github.com/users/jreback/following{/other_user}", "gists_url": "https://api.github.com/users/jreback/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jreback", "id": 953992, "login": "jreback", "node_id": "MDQ6VXNlcjk1Mzk5Mg==", "organizations_url": "https://api.github.com/users/jreback/orgs", "received_events_url": "https://api.github.com/users/jreback/received_events", "repos_url": "https://api.github.com/users/jreback/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jreback/subscriptions", "type": "User", "url": "https://api.github.com/users/jreback" }, "description": "", "due_on": "2020-08-01T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/68", "id": 4894670, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68/labels", "node_id": "MDk6TWlsZXN0b25lNDg5NDY3MA==", "number": 68, "open_issues": 0, "state": "closed", "title": "1.1", "updated_at": "2021-07-17T17:25:28Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68" }
1
2019-09-05T22:43:48Z
2020-03-26T20:08:08Z
2020-03-26T20:08:08Z
NONE
null
#### Code Sample, a copy-pastable example if possible ```python data = { ('effect_size', 'cohen_d', 'mean'): { ('m1', 'P3', '222'): 0.52, ('m1', 'A5', '111'): -0.07, ('m2', 'P3', '222'): -0.53, ('m2', 'A5', '111'): 0.05, }, ('wilcoxon', 'z_score', 'stouffer'): { ('m1', 'P3', '222'): 2.2, ('m1', 'A5', '111'): -0.92, ('m2', 'P3', '222'): -2.0, ('m2', 'A5', '111'): -0.52, } } df = pd.DataFrame(data) df.index.rename(['metric', 'bar', 'foo'], inplace=True) df.unstack(['foo', 'bar']) ``` #### Problem description The `df` looks like this before unstacking: ``` effect_size wilcoxon cohen_d z_score mean stouffer metric bar foo m1 A5 111 -0.07 -0.92 P3 222 0.52 2.20 m2 A5 111 0.05 -0.52 P3 222 -0.53 -2.00 ``` by unstacking `bar` and `foo`, I had expected to see them as column indices, but that's not what happens. Instead `foo` and `metric` are unstacked, and `bar` is left stacked as a row index: ``` > df.unstack(['foo', 'bar']) effect_size wilcoxon cohen_d z_score mean stouffer foo 111 222 111 222 metric m1 m2 m1 m2 m1 m2 m1 m2 bar A5 -0.07 0.05 NaN NaN -0.92 -0.52 NaN NaN P3 NaN NaN 0.52 -0.53 NaN NaN 2.2 -2.0 ``` I got around the problem by doing the following, but I think the above behavior might be a bug. Here's my workaround: ``` > print df.stack([0, 1, 2]).unstack(0).transpose() bar A5 P3 foo 111 222 effect_size wilcoxon effect_size wilcoxon cohen_d z_score cohen_d z_score mean stouffer mean stouffer metric m1 -0.07 -0.92 0.52 2.2 m2 0.05 -0.52 -0.53 -2.0 ``` #### Output of ``pd.show_versions()`` <details> [paste the output of ``pd.show_versions()`` here below this line] INSTALLED VERSIONS ------------------ commit: None python: 2.7.15.final.0 python-bits: 64 OS: Linux OS-release: 4.19.37-5+deb10u1rodete2-amd64 machine: x86_64 processor: byteorder: little LC_ALL: en_US.UTF-8 LANG: en_US.UTF-8 LOCALE: None.None pandas: 0.24.1 pytest: None pip: None setuptools: unknown Cython: None numpy: 1.16.4 scipy: 1.2.1 pyarrow: None xarray: None IPython: 2.0.0 sphinx: None patsy: 0.4.1 dateutil: 2.8.0 pytz: 2019.2 blosc: None bottleneck: None tables: 3.5.2 numexpr: 2.6.10dev0 feather: None matplotlib: 1.5.2 openpyxl: None xlrd: 1.2.0 xlwt: None xlsxwriter: None lxml.etree: None bs4: None html5lib: 1.0.1 sqlalchemy: None pymysql: None psycopg2: None jinja2: 2.10 s3fs: None fastparquet: None pandas_gbq: 0+unknown pandas_datareader: None gcsfs: None </details>
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28306/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28306/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/28307
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28307/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28307/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28307/events
https://github.com/pandas-dev/pandas/issues/28307
490,053,024
MDU6SXNzdWU0OTAwNTMwMjQ=
28,307
groupby/quantile breaks
{ "avatar_url": "https://avatars.githubusercontent.com/u/150974?v=4", "events_url": "https://api.github.com/users/daishi/events{/privacy}", "followers_url": "https://api.github.com/users/daishi/followers", "following_url": "https://api.github.com/users/daishi/following{/other_user}", "gists_url": "https://api.github.com/users/daishi/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/daishi", "id": 150974, "login": "daishi", "node_id": "MDQ6VXNlcjE1MDk3NA==", "organizations_url": "https://api.github.com/users/daishi/orgs", "received_events_url": "https://api.github.com/users/daishi/received_events", "repos_url": "https://api.github.com/users/daishi/repos", "site_admin": false, "starred_url": "https://api.github.com/users/daishi/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/daishi/subscriptions", "type": "User", "url": "https://api.github.com/users/daishi" }
[ { "color": "207de5", "default": false, "description": "Clarification about behavior needed to assess issue", "id": 307649777, "name": "Needs Info", "node_id": "MDU6TGFiZWwzMDc2NDk3Nzc=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Needs%20Info" } ]
closed
false
null
[]
null
4
2019-09-05T23:05:58Z
2019-09-06T16:29:58Z
2019-09-06T15:59:34Z
NONE
null
#### Code Sample, a copy-pastable example if possible ```python In [34]: pd.DataFrame({'x': [0, 1, 2], 'y': [0, 1, 2]}).groupby('x')['y'].quantile([0.5]) --------------------------------------------------------------------------- IndexError Traceback (most recent call last) <ipython-input-34-287422cf6b27> in <module> ----> 1 pd.DataFrame({'x': [0, 1, 2], 'y': [0, 1, 2]}).groupby('x')['y'].quantile([0.5]) ~/.venv-3.7.2/p4p_backend-1ulE3AqG/lib/python3.7/site-packages/pandas/core/groupby/groupby.py in quantile(self, q, interpolation) 1951 indices = np.concatenate(arrays) 1952 assert len(indices) == len(result) -> 1953 return result.take(indices) 1954 1955 @Substitution(name="groupby") ~/.venv-3.7.2/p4p_backend-1ulE3AqG/lib/python3.7/site-packages/pandas/core/series.py in take(self, indices, axis, is_copy, **kwargs) 4430 4431 indices = ensure_platform_int(indices) -> 4432 new_index = self.index.take(indices) 4433 4434 if is_categorical_dtype(self): ~/.venv-3.7.2/p4p_backend-1ulE3AqG/lib/python3.7/site-packages/pandas/core/indexes/multi.py in take(self, indices, axis, allow_fill, fill_value, **kwargs) 2030 allow_fill=allow_fill, 2031 fill_value=fill_value, -> 2032 na_value=-1, 2033 ) 2034 return MultiIndex( ~/.venv-3.7.2/p4p_backend-1ulE3AqG/lib/python3.7/site-packages/pandas/core/indexes/multi.py in _assert_take_fillable(self, values, indices, allow_fill, fill_value, na_value) 2058 taken = masked 2059 else: -> 2060 taken = [lab.take(indices) for lab in self.codes] 2061 return taken 2062 ~/.venv-3.7.2/p4p_backend-1ulE3AqG/lib/python3.7/site-packages/pandas/core/indexes/multi.py in <listcomp>(.0) 2058 taken = masked 2059 else: -> 2060 taken = [lab.take(indices) for lab in self.codes] 2061 return taken 2062 IndexError: index 3 is out of bounds for size 3 ``` #### Problem description An exception is thrown above. This was not an issue in Pandas 0.24.2. #### Expected Output #### Output of ``pd.show_versions()`` <details> ``` INSTALLED VERSIONS ------------------ commit : None python : 3.7.2.final.0 python-bits : 64 OS : Linux OS-release : 5.0.0-27-generic machine : x86_64 processor : x86_64 byteorder : little LC_ALL : None LANG : en_US.UTF-8 LOCALE : en_US.UTF-8 pandas : 0.25.1 numpy : 1.17.1 pytz : 2019.2 dateutil : 2.8.0 pip : 19.2.3 setuptools : 41.2.0 Cython : None pytest : 5.1.2 hypothesis : None sphinx : None blosc : None feather : None xlsxwriter : 1.2.0 lxml.etree : 4.4.1 html5lib : None pymysql : None psycopg2 : 2.8.3 (dt dec pq3 ext lo64) jinja2 : 2.10.1 IPython : 7.5.0 pandas_datareader: None bs4 : 4.8.0 bottleneck : None fastparquet : None gcsfs : None lxml.etree : 4.4.1 matplotlib : 3.1.1 numexpr : None odfpy : None openpyxl : 2.6.3 pandas_gbq : None pyarrow : None pytables : None s3fs : None scipy : 1.3.1 sqlalchemy : 1.3.8 tables : None xarray : None xlrd : 1.2.0 xlwt : None xlsxwriter : 1.2.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/28307/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28307/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/28308
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28308/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28308/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28308/events
https://github.com/pandas-dev/pandas/issues/28308
490,058,097
MDU6SXNzdWU0OTAwNTgwOTc=
28,308
Integers coerced to float when getting rows from all-numeric data frames
{ "avatar_url": "https://avatars.githubusercontent.com/u/298132?v=4", "events_url": "https://api.github.com/users/kalekundert/events{/privacy}", "followers_url": "https://api.github.com/users/kalekundert/followers", "following_url": "https://api.github.com/users/kalekundert/following{/other_user}", "gists_url": "https://api.github.com/users/kalekundert/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kalekundert", "id": 298132, "login": "kalekundert", "node_id": "MDQ6VXNlcjI5ODEzMg==", "organizations_url": "https://api.github.com/users/kalekundert/orgs", "received_events_url": "https://api.github.com/users/kalekundert/received_events", "repos_url": "https://api.github.com/users/kalekundert/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kalekundert/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kalekundert/subscriptions", "type": "User", "url": "https://api.github.com/users/kalekundert" }
[ { "color": "0052cc", "default": false, "description": null, "id": 34444536, "name": "Usage Question", "node_id": "MDU6TGFiZWwzNDQ0NDUzNg==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Usage%20Question" } ]
closed
false
null
[]
{ "closed_at": null, "closed_issues": 2361, "created_at": "2015-02-26T19:29:05Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/1020496?v=4", "events_url": "https://api.github.com/users/jorisvandenbossche/events{/privacy}", "followers_url": "https://api.github.com/users/jorisvandenbossche/followers", "following_url": "https://api.github.com/users/jorisvandenbossche/following{/other_user}", "gists_url": "https://api.github.com/users/jorisvandenbossche/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jorisvandenbossche", "id": 1020496, "login": "jorisvandenbossche", "node_id": "MDQ6VXNlcjEwMjA0OTY=", "organizations_url": "https://api.github.com/users/jorisvandenbossche/orgs", "received_events_url": "https://api.github.com/users/jorisvandenbossche/received_events", "repos_url": "https://api.github.com/users/jorisvandenbossche/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jorisvandenbossche/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jorisvandenbossche/subscriptions", "type": "User", "url": "https://api.github.com/users/jorisvandenbossche" }, "description": "A milestone for closed or open issues for which there is no action needed (eg not a bug, just a question / discussion, nothing to resolve, wontfix, etc).\r\n\r\n", "due_on": null, "html_url": "https://github.com/pandas-dev/pandas/milestone/33", "id": 997544, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/33/labels", "node_id": "MDk6TWlsZXN0b25lOTk3NTQ0", "number": 33, "open_issues": 11, "state": "open", "title": "No action", "updated_at": "2021-11-19T17:33:16Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/33" }
4
2019-09-05T23:26:42Z
2019-09-07T20:10:03Z
2019-09-07T20:09:55Z
NONE
null
When selecting a row in a data frame that only contains numeric values, pandas coerces any integer values to floats. I assume this keeps the underlying data structure more contiguous and improves performance, but it's not really semantically correct, because floats can't do everything that integers can. For example, the problem I ran into today came about because I was trying to use values from an integer column to index into a string: ```pycon >>> df = pd.DataFrame([[1, 2.0], [3, 4.0]], columns=['a' , 'b']) >>> df a b 0 1 2.0 1 3 4.0 >>> df.dtypes a int64 b float64 dtype: object >>> df.apply(lambda x: 'ABCD'[x.a], axis=1) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python3.7/site-packages/pandas/core/frame.py", line 6487, in apply return op.get_result() File "/usr/lib/python3.7/site-packages/pandas/core/apply.py", line 151, in get_result return self.apply_standard() File "/usr/lib/python3.7/site-packages/pandas/core/apply.py", line 257, in apply_standard self.apply_series_generator() File "/usr/lib/python3.7/site-packages/pandas/core/apply.py", line 286, in apply_series_generator results[i] = self.f(v) File "<stdin>", line 1, in <lambda> TypeError: ('string indices must be integers', 'occurred at index 0') ``` Note that either (i) removing the float column or (ii) adding a non-numeric column resolves the error. This makes code that depends on true integer behavior fragile, because it could be broken as unrelated columns are added or removed. ```pycon >>> df.drop('b', axis=1).apply(lambda x: 'ABCD'[x.a], axis=1) 0 B 1 D dtype: object >>> df.assign(c=['a', 'b']).apply(lambda x: 'ABCD'[x.a], axis=1) 0 B 1 D dtype: object ``` Clearly pandas prefers if everything is the same data type, but also knows how to handle the case where columns have different types. When given integer and float columns, pandas just considers them all "numeric" and coerces the integers to floats so that everything can be the same type. I would argue that integers and floats should be considered different types, because integers can do things (e.g. indexing and slicing) that floats can't, but I'll admit that I have a very narrow view of what's going on here. --- For what it's worth, a simpler way to see this same coercion is to just select a row: ```pycon >>> df a b 0 1 2.0 1 3 4.0 >>> df.iloc[0] a 1.0 b 2.0 Name: 0, dtype: float64 >>> df.drop('b', axis=1).iloc[0] a 1 Name: 0, dtype: int64 >>> df.assign(c=['a', 'b']).iloc[0] a 1 b 2 # I double-checked that b is still a float here, even though it's shown without a decimal. c a Name: 0, dtype: object ``` #### Output of ``pd.show_versions()`` <details> INSTALLED VERSIONS ------------------ commit: None python: 3.7.4.final.0 python-bits: 64 OS: Linux OS-release: 5.2.5-arch1-1-ARCH machine: x86_64 processor: byteorder: little LC_ALL: None LANG: en_US.UTF-8 LOCALE: en_US.UTF-8 pandas: 0.24.2 pytest: 4.6.3 pip: 19.2.3 setuptools: 41.0.1 Cython: None numpy: 1.16.4 scipy: 1.3.0 pyarrow: None xarray: None IPython: 7.5.0 sphinx: 2.1.1 patsy: None dateutil: 2.8.0 pytz: 2019.1 blosc: None bottleneck: None tables: None numexpr: None feather: None matplotlib: 3.1.1 openpyxl: 2.6.2 xlrd: 1.2.0 xlwt: None xlsxwriter: None lxml.etree: 4.4.0 bs4: None html5lib: None sqlalchemy: None pymysql: None psycopg2: None jinja2: 2.10.1 s3fs: None fastparquet: None pandas_gbq: None pandas_datareader: None gcsfs: None </details>
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28308/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28308/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/28309
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28309/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28309/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28309/events
https://github.com/pandas-dev/pandas/pull/28309
490,084,926
MDExOlB1bGxSZXF1ZXN0MzE0NzYxMDc5
28,309
CLN: catch Exception less
{ "avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4", "events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}", "followers_url": "https://api.github.com/users/jbrockmendel/followers", "following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}", "gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jbrockmendel", "id": 8078968, "login": "jbrockmendel", "node_id": "MDQ6VXNlcjgwNzg5Njg=", "organizations_url": "https://api.github.com/users/jbrockmendel/orgs", "received_events_url": "https://api.github.com/users/jbrockmendel/received_events", "repos_url": "https://api.github.com/users/jbrockmendel/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions", "type": "User", "url": "https://api.github.com/users/jbrockmendel" }
[ { "color": "207de5", "default": false, "description": null, "id": 211029535, "name": "Clean", "node_id": "MDU6TGFiZWwyMTEwMjk1MzU=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Clean" } ]
closed
false
null
[]
{ "closed_at": "2020-01-30T12:18:05Z", "closed_issues": 2207, "created_at": "2012-09-13T02:13:00Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/329591?v=4", "events_url": "https://api.github.com/users/wesm/events{/privacy}", "followers_url": "https://api.github.com/users/wesm/followers", "following_url": "https://api.github.com/users/wesm/following{/other_user}", "gists_url": "https://api.github.com/users/wesm/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/wesm", "id": 329591, "login": "wesm", "node_id": "MDQ6VXNlcjMyOTU5MQ==", "organizations_url": "https://api.github.com/users/wesm/orgs", "received_events_url": "https://api.github.com/users/wesm/received_events", "repos_url": "https://api.github.com/users/wesm/repos", "site_admin": false, "starred_url": "https://api.github.com/users/wesm/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/wesm/subscriptions", "type": "User", "url": "https://api.github.com/users/wesm" }, "description": "on-merge: backport to 1.0.x", "due_on": "2020-02-01T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/16", "id": 174211, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16/labels", "node_id": "MDk6TWlsZXN0b25lMTc0MjEx", "number": 16, "open_issues": 0, "state": "closed", "title": "1.0.0", "updated_at": "2020-01-30T12:18:05Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16" }
1
2019-09-06T01:35:34Z
2019-09-07T17:29:26Z
2019-09-07T17:23:08Z
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/28309/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28309/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/28309.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/28309", "merged_at": "2019-09-07T17:23:08Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/28309.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/28309" }
https://api.github.com/repos/pandas-dev/pandas/issues/28310
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28310/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28310/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28310/events
https://github.com/pandas-dev/pandas/pull/28310
490,089,339
MDExOlB1bGxSZXF1ZXN0MzE0NzY0MzQ0
28,310
CLN: catch specific Exceptions in _config
{ "avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4", "events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}", "followers_url": "https://api.github.com/users/jbrockmendel/followers", "following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}", "gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jbrockmendel", "id": 8078968, "login": "jbrockmendel", "node_id": "MDQ6VXNlcjgwNzg5Njg=", "organizations_url": "https://api.github.com/users/jbrockmendel/orgs", "received_events_url": "https://api.github.com/users/jbrockmendel/received_events", "repos_url": "https://api.github.com/users/jbrockmendel/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions", "type": "User", "url": "https://api.github.com/users/jbrockmendel" }
[ { "color": "207de5", "default": false, "description": null, "id": 211029535, "name": "Clean", "node_id": "MDU6TGFiZWwyMTEwMjk1MzU=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Clean" } ]
closed
false
null
[]
{ "closed_at": "2020-01-30T12:18:05Z", "closed_issues": 2207, "created_at": "2012-09-13T02:13:00Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/329591?v=4", "events_url": "https://api.github.com/users/wesm/events{/privacy}", "followers_url": "https://api.github.com/users/wesm/followers", "following_url": "https://api.github.com/users/wesm/following{/other_user}", "gists_url": "https://api.github.com/users/wesm/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/wesm", "id": 329591, "login": "wesm", "node_id": "MDQ6VXNlcjMyOTU5MQ==", "organizations_url": "https://api.github.com/users/wesm/orgs", "received_events_url": "https://api.github.com/users/wesm/received_events", "repos_url": "https://api.github.com/users/wesm/repos", "site_admin": false, "starred_url": "https://api.github.com/users/wesm/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/wesm/subscriptions", "type": "User", "url": "https://api.github.com/users/wesm" }, "description": "on-merge: backport to 1.0.x", "due_on": "2020-02-01T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/16", "id": 174211, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16/labels", "node_id": "MDk6TWlsZXN0b25lMTc0MjEx", "number": 16, "open_issues": 0, "state": "closed", "title": "1.0.0", "updated_at": "2020-01-30T12:18:05Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/16" }
2
2019-09-06T01:57:49Z
2019-09-07T21:25:03Z
2019-09-07T19:39:08Z
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/28310/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28310/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/28310.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/28310", "merged_at": "2019-09-07T19:39:08Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/28310.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/28310" }
https://api.github.com/repos/pandas-dev/pandas/issues/28311
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28311/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28311/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28311/events
https://github.com/pandas-dev/pandas/issues/28311
490,201,947
MDU6SXNzdWU0OTAyMDE5NDc=
28,311
concat and append ignore level names and order in multi-level index DataFrames
{ "avatar_url": "https://avatars.githubusercontent.com/u/12891830?v=4", "events_url": "https://api.github.com/users/jxrossel/events{/privacy}", "followers_url": "https://api.github.com/users/jxrossel/followers", "following_url": "https://api.github.com/users/jxrossel/following{/other_user}", "gists_url": "https://api.github.com/users/jxrossel/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jxrossel", "id": 12891830, "login": "jxrossel", "node_id": "MDQ6VXNlcjEyODkxODMw", "organizations_url": "https://api.github.com/users/jxrossel/orgs", "received_events_url": "https://api.github.com/users/jxrossel/received_events", "repos_url": "https://api.github.com/users/jxrossel/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jxrossel/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jxrossel/subscriptions", "type": "User", "url": "https://api.github.com/users/jxrossel" }
[ { "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, Stac...
open
false
null
[]
null
3
2019-09-06T08:37:14Z
2021-07-11T17:38:20Z
null
NONE
null
#### Code Sample ```python >>> tmp = pd.DataFrame( { 't': [0,0], 'h': [1,2], 'k': [3,4] } ) >>> tmp t h k 0 0 1 3 1 0 2 4 >>> tmp2 = tmp.set_index( ['h','k'] ) >>> tmp2 t h k 1 3 0 2 4 0 >>> tmp3 = tmp.set_index( ['k','h'] ) # swap levels >>> tmp3 t k h 3 1 0 4 2 0 >>> tmp2.append( tmp3, sort=False ) # k-level values are appended to h-level values and vice-versa t h k 1 3 0 2 4 0 3 1 0 4 2 0 >>> pd.concat( [ tmp2, tmp3 ], sort=False ) t h k 1 3 0 2 4 0 3 1 0 4 2 0 >>> tmp4 = pd.DataFrame( { 't': [ 0,0], 'h': [1,2], 'p': [3,4] } ).set_index( ['p','h'] ) # change level name >>> tmp4 t p h 3 1 0 4 2 0 >>> tmp2.append( tmp4, sort=False ) # level name ignored altogether t h k 1 3 0 2 4 0 3 1 0 4 2 0 ``` #### Problem description The multiindex level names are ignored at concatenation (as described here: https://github.com/pandas-dev/pandas/issues/10187). In addition, even with common level names, the level order is also ignored. I am not saying this is a bug, but since frame columns are aligned at concatenation it's a bit of a surprise to see index levels are not. Should a warning be added to the docs of both `concat` and `append` ? #### Output of ``pd.show_versions()`` <details> [paste the output of ``pd.show_versions()`` here below this line] INSTALLED VERSIONS ------------------ commit : None python : 3.6.5.final.0 python-bits : 64 OS : Windows OS-release : 10 machine : AMD64 processor : Intel64 Family 6 Model 60 Stepping 3, GenuineIntel byteorder : little LC_ALL : None LANG : None LOCALE : None.None pandas : 0.25.1 numpy : 1.16.1 pytz : 2018.3 dateutil : 2.7.2 pip : 9.0.3 setuptools : 39.0.1 Cython : 0.28.1 pytest : 3.5.0 hypothesis : None sphinx : 1.7.2 blosc : 1.5.1 feather : 0.4.0 xlsxwriter : 1.0.2 lxml.etree : 4.2.1 html5lib : 1.0.1 pymysql : None psycopg2 : None jinja2 : 2.10 IPython : 6.2.1 pandas_datareader: None bs4 : 4.6.0 bottleneck : 1.2.1 fastparquet : 0.1.4 gcsfs : None lxml.etree : 4.2.1 matplotlib : 3.0.2 numexpr : 2.6.4 odfpy : None openpyxl : None pandas_gbq : None pyarrow : 0.9.0 pytables : None s3fs : None scipy : 1.2.1 sqlalchemy : 1.2.5 tables : 3.4.2 xarray : 0.10.2 xlrd : 1.1.0 xlwt : None xlsxwriter : 1.0.2 </details>
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/28311/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28311/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/28312
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/28312/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/28312/comments
https://api.github.com/repos/pandas-dev/pandas/issues/28312/events
https://github.com/pandas-dev/pandas/issues/28312
490,240,575
MDU6SXNzdWU0OTAyNDA1NzU=
28,312
GroupBySeries Quantile fails when there are 3 or more categories
{ "avatar_url": "https://avatars.githubusercontent.com/u/12838917?v=4", "events_url": "https://api.github.com/users/josesho/events{/privacy}", "followers_url": "https://api.github.com/users/josesho/followers", "following_url": "https://api.github.com/users/josesho/following{/other_user}", "gists_url": "https://api.github.com/users/josesho/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/josesho", "id": 12838917, "login": "josesho", "node_id": "MDQ6VXNlcjEyODM4OTE3", "organizations_url": "https://api.github.com/users/josesho/orgs", "received_events_url": "https://api.github.com/users/josesho/received_events", "repos_url": "https://api.github.com/users/josesho/repos", "site_admin": false, "starred_url": "https://api.github.com/users/josesho/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/josesho/subscriptions", "type": "User", "url": "https://api.github.com/users/josesho" }
[ { "color": "009800", "default": false, "description": "Duplicate issue or pull request", "id": 40153326, "name": "Duplicate Report", "node_id": "MDU6TGFiZWw0MDE1MzMyNg==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Duplicate%20Report" } ]
closed
false
null
[]
null
1
2019-09-06T09:59:21Z
2019-09-06T16:00:15Z
2019-09-06T16:00:09Z
NONE
null
#### Code Sample Using the latest version of pandas v0.25.1 ```python import numpy as np import pandas as pd np.random.seed(12345) df1 = pd.DataFrame({ 'category': ['A', 'A', 'A', 'A', 'B', 'B', 'B', 'B', ], 'value': np.random.randint(1, 10, 8) }) df1.groupby("category").value.quantile([0.25, 0.75]) ``` produces ``` category A 0.25 2.75 0.75 5.25 B 0.25 2.75 0.75 6.25 Name: value, dtype: float64 ``` as expected. However, running this ```python np.random.seed(12345) df2 = pd.DataFrame({ 'category': ['A', 'A', 'A', 'A', 'B', 'B', 'B', 'B', 'C', 'C', 'C', 'C', ], 'value': np.random.randint(1, 10, 12) }) df2.groupby("category").value.quantile([0.25, 0.75]) ``` produces this error instead: ``` IndexError Traceback (most recent call last) <ipython-input-60-12c4dbb665fc> in <module> 8 }) 9 ---> 10 df2.groupby("category").value.quantile([0.25, 0.75]) ~/anaconda3/envs/dabest-dev-py3.7/lib/python3.7/site-packages/pandas/core/groupby/groupby.py in quantile(self, q, interpolation) 1951 indices = np.concatenate(arrays) 1952 assert len(indices) == len(result) -> 1953 return result.take(indices) 1954 1955 @Substitution(name="groupby") ~/anaconda3/envs/dabest-dev-py3.7/lib/python3.7/site-packages/pandas/core/series.py in take(self, indices, axis, is_copy, **kwargs) 4430 4431 indices = ensure_platform_int(indices) -> 4432 new_index = self.index.take(indices) 4433 4434 if is_categorical_dtype(self): ~/anaconda3/envs/dabest-dev-py3.7/lib/python3.7/site-packages/pandas/core/indexes/multi.py in take(self, indices, axis, allow_fill, fill_value, **kwargs) 2030 allow_fill=allow_fill, 2031 fill_value=fill_value, -> 2032 na_value=-1, 2033 ) 2034 return MultiIndex( ~/anaconda3/envs/dabest-dev-py3.7/lib/python3.7/site-packages/pandas/core/indexes/multi.py in _assert_take_fillable(self, values, indices, allow_fill, fill_value, na_value) 2058 taken = masked 2059 else: -> 2060 taken = [lab.take(indices) for lab in self.codes] 2061 return taken 2062 ~/anaconda3/envs/dabest-dev-py3.7/lib/python3.7/site-packages/pandas/core/indexes/multi.py in <listcomp>(.0) 2058 taken = masked 2059 else: -> 2060 taken = [lab.take(indices) for lab in self.codes] 2061 return taken 2062 IndexError: index 6 is out of bounds for size 6 ``` The expected output is produced with `pandas=0.24`: ```python df2.groupby("category").value.quantile([0.25, 0.75]) ``` ``` category A 0.25 2.75 0.75 5.25 B 0.25 2.75 0.75 6.25 C 0.25 1.75 0.75 7.25 ``` Not exactly sure how to mitigate this? I understand a related bug was patched with #28285 and #27526. #### Output of ``pd.show_versions()`` <details> INSTALLED VERSIONS ------------------ commit : None pandas : 0.25.1 numpy : 1.16.2 pytz : 2019.2 dateutil : 2.8.0 pip : 19.2.3 setuptools : 41.2.0 Cython : None pytest : 4.3.0 hypothesis : None sphinx : 2.2.0 blosc : None feather : None xlsxwriter : None lxml.etree : None html5lib : None pymysql : None psycopg2 : None jinja2 : 2.10.1 IPython : 7.2.0 pandas_datareader: None bs4 : None bottleneck : None fastparquet : None gcsfs : None lxml.etree : None matplotlib : 3.1.1 numexpr : None odfpy : None openpyxl : None pandas_gbq : None pyarrow : None pytables : None s3fs : None scipy : 1.2.1 sqlalchemy : None tables : None xarray : None xlrd : 1.2.0 xlwt : None xlsxwriter : 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/28312/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/28312/timeline
null
null
null