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/15408
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15408/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15408/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15408/events
https://github.com/pandas-dev/pandas/pull/15408
207,804,663
MDExOlB1bGxSZXF1ZXN0MTA2MzEwNjI5
15,408
TST: print skipped tests files
{ "avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4", "events_url": "https://api.github.com/users/jreback/events{/privacy}", "followers_url": "https://api.github.com/users/jreback/followers", "following_url": "https://api.github.com/users/jreback/following{/other_user}", "gists_url": "https://api.github.com/users/jreback/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jreback", "id": 953992, "login": "jreback", "node_id": "MDQ6VXNlcjk1Mzk5Mg==", "organizations_url": "https://api.github.com/users/jreback/orgs", "received_events_url": "https://api.github.com/users/jreback/received_events", "repos_url": "https://api.github.com/users/jreback/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jreback/subscriptions", "type": "User", "url": "https://api.github.com/users/jreback" }
[ { "color": "C4A000", "default": false, "description": "pandas testing functions or related to the test suite", "id": 127685, "name": "Testing", "node_id": "MDU6TGFiZWwxMjc2ODU=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Testing" } ]
closed
false
null
[]
{ "closed_at": "2017-05-06T10:20:19Z", "closed_issues": 987, "created_at": "2016-02-08T15:30:21Z", "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": "after 0.19.x series", "due_on": "2017-05-12T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/39", "id": 1570595, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39/labels", "node_id": "MDk6TWlsZXN0b25lMTU3MDU5NQ==", "number": 39, "open_issues": 0, "state": "closed", "title": "0.20.0", "updated_at": "2018-10-28T08:18:42Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39" }
0
2017-02-15T13:31:47Z
2017-02-15T15:23:55Z
2017-02-15T15:23:55Z
CONTRIBUTOR
null
xref #15341
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15408/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15408/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/15408.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/15408", "merged_at": null, "patch_url": "https://github.com/pandas-dev/pandas/pull/15408.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/15408" }
https://api.github.com/repos/pandas-dev/pandas/issues/15409
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15409/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15409/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15409/events
https://github.com/pandas-dev/pandas/issues/15409
207,814,665
MDU6SXNzdWUyMDc4MTQ2NjU=
15,409
Exception on df.groupby().rolling().agg([f1, f2])
{ "avatar_url": "https://avatars.githubusercontent.com/u/2196196?v=4", "events_url": "https://api.github.com/users/ohadle/events{/privacy}", "followers_url": "https://api.github.com/users/ohadle/followers", "following_url": "https://api.github.com/users/ohadle/following{/other_user}", "gists_url": "https://api.github.com/users/ohadle/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/ohadle", "id": 2196196, "login": "ohadle", "node_id": "MDQ6VXNlcjIxOTYxOTY=", "organizations_url": "https://api.github.com/users/ohadle/orgs", "received_events_url": "https://api.github.com/users/ohadle/received_events", "repos_url": "https://api.github.com/users/ohadle/repos", "site_admin": false, "starred_url": "https://api.github.com/users/ohadle/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ohadle/subscriptions", "type": "User", "url": "https://api.github.com/users/ohadle" }
[ { "color": "729FCF", "default": false, "description": null, "id": 233160, "name": "Groupby", "node_id": "MDU6TGFiZWwyMzMxNjA=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Groupby" }, { "color": "02d7e1", "default": false, "description": "Concat, Merge/Join, Stack/Unstack, Explode", "id": 13098779, "name": "Reshaping", "node_id": "MDU6TGFiZWwxMzA5ODc3OQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Reshaping" }, { "color": "009800", "default": false, "description": "Duplicate issue or pull request", "id": 40153326, "name": "Duplicate Report", "node_id": "MDU6TGFiZWw0MDE1MzMyNg==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Duplicate%20Report" } ]
closed
false
null
[]
{ "closed_at": null, "closed_issues": 2361, "created_at": "2015-02-26T19:29:05Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/1020496?v=4", "events_url": "https://api.github.com/users/jorisvandenbossche/events{/privacy}", "followers_url": "https://api.github.com/users/jorisvandenbossche/followers", "following_url": "https://api.github.com/users/jorisvandenbossche/following{/other_user}", "gists_url": "https://api.github.com/users/jorisvandenbossche/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jorisvandenbossche", "id": 1020496, "login": "jorisvandenbossche", "node_id": "MDQ6VXNlcjEwMjA0OTY=", "organizations_url": "https://api.github.com/users/jorisvandenbossche/orgs", "received_events_url": "https://api.github.com/users/jorisvandenbossche/received_events", "repos_url": "https://api.github.com/users/jorisvandenbossche/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jorisvandenbossche/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jorisvandenbossche/subscriptions", "type": "User", "url": "https://api.github.com/users/jorisvandenbossche" }, "description": "A milestone for closed or open issues for which there is no action needed (eg not a bug, just a question / discussion, nothing to resolve, wontfix, etc).\r\n\r\n", "due_on": null, "html_url": "https://github.com/pandas-dev/pandas/milestone/33", "id": 997544, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/33/labels", "node_id": "MDk6TWlsZXN0b25lOTk3NTQ0", "number": 33, "open_issues": 11, "state": "open", "title": "No action", "updated_at": "2021-11-19T17:33:16Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/33" }
2
2017-02-15T14:12:05Z
2017-02-15T15:17:35Z
2017-02-15T15:17:14Z
NONE
null
Trying to reproduce example `[_85]` from [the docs](http://pandas.pydata.org/pandas-docs/stable/computation.html#applying-multiple-functions-at-once): ```python from pandas import DataFrame, Timestamp c = pandas.DataFrame({u'ul_payload': {('a', Timestamp('2016-11-01 06:15:00')): 5, ('a', Timestamp('2016-11-01 07:45:00')): 8, ('a', Timestamp('2016-11-01 09:00:00')): 9, ('a', Timestamp('2016-11-01 07:15:00')): 6, ('a', Timestamp('2016-11-01 07:30:00')): 7, ('a', Timestamp('2016-11-01 06:00:00')): 4}, u'dl_payload': {('a', Timestamp('2016-11-01 06:15:00')): 15, ('a', Timestamp('2016-11-01 07:45:00')): 18, ('a', Timestamp('2016-11-01 09:00:00')): 19, ('a', Timestamp('2016-11-01 07:15:00')): 16, ('a', Timestamp('2016-11-01 07:30:00')): 17, ('a', Timestamp('2016-11-01 06:00:00')): 14}}) In [27]: c Out[27]: dl_payload ul_payload a 2016-11-01 06:00:00 14 4 2016-11-01 06:15:00 15 5 2016-11-01 07:15:00 16 6 2016-11-01 07:30:00 17 7 2016-11-01 07:45:00 18 8 2016-11-01 09:00:00 19 9 In [30]: c.groupby(level=0).rolling(window=3).agg([np.sum, np.max]) --------------------------------------------------------------------------- Exception Traceback (most recent call last) /Users/olevinkr/repos/research/src/son/research/apps/deep_forecast/data.py in <module>() ----> 1 c.groupby(level=0).rolling(window=3).agg([np.sum, np.max]) /Users/olevinkr/anaconda/lib/python2.7/site-packages/pandas/core/window.pyc in aggregate(self, arg, *args, **kwargs) 1063 @Appender(SelectionMixin._agg_doc) 1064 def aggregate(self, arg, *args, **kwargs): -> 1065 return super(Rolling, self).aggregate(arg, *args, **kwargs) 1066 1067 agg = aggregate /Users/olevinkr/anaconda/lib/python2.7/site-packages/pandas/core/window.pyc in aggregate(self, arg, *args, **kwargs) 319 320 def aggregate(self, arg, *args, **kwargs): --> 321 result, how = self._aggregate(arg, *args, **kwargs) 322 if result is None: 323 return self.apply(arg, args=args, kwargs=kwargs) /Users/olevinkr/anaconda/lib/python2.7/site-packages/pandas/core/base.pyc in _aggregate(self, arg, *args, **kwargs) 566 return result, True 567 elif hasattr(arg, '__iter__'): --> 568 return self._aggregate_multiple_funcs(arg, _level=_level), None 569 else: 570 result = None /Users/olevinkr/anaconda/lib/python2.7/site-packages/pandas/core/base.pyc in _aggregate_multiple_funcs(self, arg, _level) 611 try: 612 colg = self._gotitem(col, ndim=1, subset=obj[col]) --> 613 results.append(colg.aggregate(arg)) 614 keys.append(col) 615 except (TypeError, DataError): /Users/olevinkr/anaconda/lib/python2.7/site-packages/pandas/core/window.pyc in aggregate(self, arg, *args, **kwargs) 1063 @Appender(SelectionMixin._agg_doc) 1064 def aggregate(self, arg, *args, **kwargs): -> 1065 return super(Rolling, self).aggregate(arg, *args, **kwargs) 1066 1067 agg = aggregate /Users/olevinkr/anaconda/lib/python2.7/site-packages/pandas/core/window.pyc in aggregate(self, arg, *args, **kwargs) 319 320 def aggregate(self, arg, *args, **kwargs): --> 321 result, how = self._aggregate(arg, *args, **kwargs) 322 if result is None: 323 return self.apply(arg, args=args, kwargs=kwargs) /Users/olevinkr/anaconda/lib/python2.7/site-packages/pandas/core/base.pyc in _aggregate(self, arg, *args, **kwargs) 566 return result, True 567 elif hasattr(arg, '__iter__'): --> 568 return self._aggregate_multiple_funcs(arg, _level=_level), None 569 else: 570 result = None /Users/olevinkr/anaconda/lib/python2.7/site-packages/pandas/core/base.pyc in _aggregate_multiple_funcs(self, arg, _level) 595 for a in arg: 596 try: --> 597 colg = self._gotitem(obj.name, ndim=1, subset=obj) 598 results.append(colg.aggregate(a)) 599 /Users/olevinkr/anaconda/lib/python2.7/site-packages/pandas/core/base.pyc in _gotitem(self, key, ndim, subset) 682 for attr in self._attributes]) 683 self = self.__class__(subset, --> 684 groupby=self._groupby[key], 685 parent=self, 686 **kwargs) /Users/olevinkr/anaconda/lib/python2.7/site-packages/pandas/core/base.pyc in __getitem__(self, key) 328 def __getitem__(self, key): 329 if self._selection is not None: --> 330 raise Exception('Column(s) %s already selected' % self._selection) 331 332 if isinstance(key, (list, tuple, ABCSeries, ABCIndexClass, Exception: Column(s) dl_payload already selected ``` Aggregating by a single function doesn't throw the exception (xref https://github.com/pandas-dev/pandas/issues/14013): ```python In [29]: c.groupby(level=0).rolling(window=3).agg(np.sum) Out[29]: dl_payload ul_payload a a 2016-11-01 06:00:00 NaN NaN 2016-11-01 06:15:00 NaN NaN 2016-11-01 07:15:00 45.0 15.0 2016-11-01 07:30:00 48.0 18.0 2016-11-01 07:45:00 51.0 21.0 2016-11-01 09:00:00 54.0 24.0 ``` <details> INSTALLED VERSIONS ------------------ commit: None python: 2.7.13.final.0 python-bits: 64 OS: Darwin OS-release: 16.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.19.2 nose: 1.3.7 pip: 9.0.1 setuptools: 28.6.1 Cython: 0.25.2 numpy: 1.11.3 scipy: 0.18.1 statsmodels: 0.6.1 xarray: 0.9.1 IPython: 5.1.0 sphinx: 1.5.1 patsy: 0.4.1 dateutil: 2.6.0 pytz: 2016.10 blosc: None bottleneck: 1.2.0 tables: 3.3.0 numexpr: 2.6.2 matplotlib: 2.0.0 openpyxl: 2.4.1 xlrd: 1.0.0 xlwt: 1.2.0 xlsxwriter: 0.9.6 lxml: 3.7.2 bs4: 4.5.3 html5lib: None httplib2: None apiclient: None sqlalchemy: 1.1.5 pymysql: None psycopg2: 2.6.2 (dt dec pq3 ext lo64) jinja2: 2.9.4 boto: 2.45.0 pandas_datareader: None </details>
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15409/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15409/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/15410
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15410/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15410/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15410/events
https://github.com/pandas-dev/pandas/issues/15410
207,822,048
MDU6SXNzdWUyMDc4MjIwNDg=
15,410
allow flexible convert_dates parameter in pandas.read_json
{ "avatar_url": "https://avatars.githubusercontent.com/u/1304950?v=4", "events_url": "https://api.github.com/users/sdementen/events{/privacy}", "followers_url": "https://api.github.com/users/sdementen/followers", "following_url": "https://api.github.com/users/sdementen/following{/other_user}", "gists_url": "https://api.github.com/users/sdementen/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sdementen", "id": 1304950, "login": "sdementen", "node_id": "MDQ6VXNlcjEzMDQ5NTA=", "organizations_url": "https://api.github.com/users/sdementen/orgs", "received_events_url": "https://api.github.com/users/sdementen/received_events", "repos_url": "https://api.github.com/users/sdementen/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sdementen/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sdementen/subscriptions", "type": "User", "url": "https://api.github.com/users/sdementen" }
[ { "color": "207de5", "default": false, "description": "read_json, to_json, json_normalize", "id": 49379259, "name": "IO JSON", "node_id": "MDU6TGFiZWw0OTM3OTI1OQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20JSON" } ]
closed
false
null
[]
null
2
2017-02-15T14:39:35Z
2017-02-15T15:14:52Z
2017-02-15T14:48:28Z
CONTRIBUTOR
null
Currently, when using pandas.read_json to convert a json structure into a DataFrame, it is difficult to parse on the fly datetime except with convert_dates that allows rules: ``` convert_dates : boolean, default True List of columns to parse for dates; If True, then try to parse datelike columns default is True; a column label is datelike if it ends with '_at', it ends with '_time', it begins with 'timestamp', it is 'modified', or it is 'date' ``` It would be more flexible to allow to specify either a boolean (and keep the current rules) or to specify some (simplified) list of regexp pattern like: - to replicate current rules: `convert_dates=("*_at","*_time","timestamp*","modified","date")` - to allow alternatives:`convert_dates=("*_at","*_on","datetime_*","start","end")` Haven't yet looked at the implementation, just sharing a feature request...
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15410/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15410/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/15411
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15411/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15411/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15411/events
https://github.com/pandas-dev/pandas/pull/15411
207,861,916
MDExOlB1bGxSZXF1ZXN0MTA2MzUyMjA2
15,411
DOC: use shared_docs for Index.get_indexer, get_indexer_non_unique
{ "avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4", "events_url": "https://api.github.com/users/jreback/events{/privacy}", "followers_url": "https://api.github.com/users/jreback/followers", "following_url": "https://api.github.com/users/jreback/following{/other_user}", "gists_url": "https://api.github.com/users/jreback/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jreback", "id": 953992, "login": "jreback", "node_id": "MDQ6VXNlcjk1Mzk5Mg==", "organizations_url": "https://api.github.com/users/jreback/orgs", "received_events_url": "https://api.github.com/users/jreback/received_events", "repos_url": "https://api.github.com/users/jreback/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jreback/subscriptions", "type": "User", "url": "https://api.github.com/users/jreback" }
[ { "color": "3465A4", "default": false, "description": null, "id": 134699, "name": "Docs", "node_id": "MDU6TGFiZWwxMzQ2OTk=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Docs" }, { "color": "0b02e1", "default": false, "description": "Related to indexing 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": "2017-05-06T10:20:19Z", "closed_issues": 987, "created_at": "2016-02-08T15:30:21Z", "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": "after 0.19.x series", "due_on": "2017-05-12T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/39", "id": 1570595, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39/labels", "node_id": "MDk6TWlsZXN0b25lMTU3MDU5NQ==", "number": 39, "open_issues": 0, "state": "closed", "title": "0.20.0", "updated_at": "2018-10-28T08:18:42Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39" }
0
2017-02-15T16:52:48Z
2017-02-15T18:00:37Z
2017-02-15T18:00:37Z
CONTRIBUTOR
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/15411/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15411/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/15411.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/15411", "merged_at": "2017-02-15T18:00:37Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/15411.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/15411" }
https://api.github.com/repos/pandas-dev/pandas/issues/15412
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15412/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15412/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15412/events
https://github.com/pandas-dev/pandas/pull/15412
207,875,399
MDExOlB1bGxSZXF1ZXN0MTA2MzYxNzgz
15,412
STYLE: flake8 upgraded to 3.3 on conda
{ "avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4", "events_url": "https://api.github.com/users/jreback/events{/privacy}", "followers_url": "https://api.github.com/users/jreback/followers", "following_url": "https://api.github.com/users/jreback/following{/other_user}", "gists_url": "https://api.github.com/users/jreback/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jreback", "id": 953992, "login": "jreback", "node_id": "MDQ6VXNlcjk1Mzk5Mg==", "organizations_url": "https://api.github.com/users/jreback/orgs", "received_events_url": "https://api.github.com/users/jreback/received_events", "repos_url": "https://api.github.com/users/jreback/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jreback/subscriptions", "type": "User", "url": "https://api.github.com/users/jreback" }
[ { "color": "eb6420", "default": false, "description": "Code style, linting, code_checks", "id": 106935113, "name": "Code Style", "node_id": "MDU6TGFiZWwxMDY5MzUxMTM=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Code%20Style" } ]
closed
false
null
[]
{ "closed_at": "2017-05-06T10:20:19Z", "closed_issues": 987, "created_at": "2016-02-08T15:30:21Z", "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": "after 0.19.x series", "due_on": "2017-05-12T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/39", "id": 1570595, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39/labels", "node_id": "MDk6TWlsZXN0b25lMTU3MDU5NQ==", "number": 39, "open_issues": 0, "state": "closed", "title": "0.20.0", "updated_at": "2018-10-28T08:18:42Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39" }
0
2017-02-15T17:39:59Z
2017-02-15T17:59:12Z
2017-02-15T17:59:12Z
CONTRIBUTOR
null
fixes for E305, 2 blank lines after a class definition
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15412/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15412/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/15412.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/15412", "merged_at": "2017-02-15T17:59:12Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/15412.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/15412" }
https://api.github.com/repos/pandas-dev/pandas/issues/15413
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15413/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15413/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15413/events
https://github.com/pandas-dev/pandas/issues/15413
207,881,137
MDU6SXNzdWUyMDc4ODExMzc=
15,413
Cannot set value correctly
{ "avatar_url": "https://avatars.githubusercontent.com/u/9294979?v=4", "events_url": "https://api.github.com/users/fduxiao/events{/privacy}", "followers_url": "https://api.github.com/users/fduxiao/followers", "following_url": "https://api.github.com/users/fduxiao/following{/other_user}", "gists_url": "https://api.github.com/users/fduxiao/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/fduxiao", "id": 9294979, "login": "fduxiao", "node_id": "MDQ6VXNlcjkyOTQ5Nzk=", "organizations_url": "https://api.github.com/users/fduxiao/orgs", "received_events_url": "https://api.github.com/users/fduxiao/received_events", "repos_url": "https://api.github.com/users/fduxiao/repos", "site_admin": false, "starred_url": "https://api.github.com/users/fduxiao/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/fduxiao/subscriptions", "type": "User", "url": "https://api.github.com/users/fduxiao" }
[ { "color": "e10c02", "default": false, "description": null, "id": 76811, "name": "Bug", "node_id": "MDU6TGFiZWw3NjgxMQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug" }, { "color": "0b02e1", "default": false, "description": "Related to indexing on series/frames, not to indexes themselves", "id": 2822098, "name": "Indexing", "node_id": "MDU6TGFiZWwyODIyMDk4", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Indexing" } ]
open
false
null
[]
null
7
2017-02-15T18:01:26Z
2021-05-08T01:03:07Z
null
NONE
null
#### Code Sample, a copy-pastable example if possible ```python # It's pretty simple but it doesn't work. # Here stocks is inside a class which type is pd.Series. # I tried to print money / price * (1-r) and found it was not zero. # However, self.stocks[ticker] is never changed which confuses me self.stocks[ticker] += money / price * (1 - r) ``` #### Problem description See the comments above. It only happens when I tried to use a certain set of data but works for other situations. I've tried to change the value of self.stocks[name] and something more strange happened. ``` python # this works self.stocks[ticker] = 6 self.stocks[ticker] += money / price * (1 - r) # I was able to see the different value printed after the line # but if I change it to if self.stocks[ticker] == 0: self.stocks[ticker] = 0 self.stocks[ticker] += money / price* (1 - r) # it repeated the unchanged result which drove me mad ``` #### Expected Output self.stocks[ticker] should be changed #### Output of ``pd.show_versions()`` <details> # Paste the output here pd.show_versions() here INSTALLED VERSIONS ------------------ commit: None python: 3.6.0.final.0 python-bits: 64 OS: Darwin OS-release: 16.3.0 machine: x86_64 processor: i386 byteorder: little LC_ALL: None LANG: zh_CN.UTF-8 LOCALE: zh_CN.UTF-8 pandas: 0.19.2 nose: None pip: 9.0.1 setuptools: 32.2.0 Cython: None numpy: 1.12.0 scipy: 0.18.1 statsmodels: None xarray: None IPython: 5.1.0 sphinx: None patsy: None dateutil: 2.6.0 pytz: 2016.10 blosc: None bottleneck: None tables: None numexpr: 2.6.2 matplotlib: 2.0.0 openpyxl: 2.4.2 xlrd: 1.0.0 xlwt: None xlsxwriter: None lxml: 3.7.2 bs4: None html5lib: None httplib2: None apiclient: None sqlalchemy: None pymysql: None psycopg2: None jinja2: 2.9.5 boto: None pandas_datareader: None </details>
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15413/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15413/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/15414
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15414/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15414/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15414/events
https://github.com/pandas-dev/pandas/pull/15414
207,889,853
MDExOlB1bGxSZXF1ZXN0MTA2MzcyMDk4
15,414
BUG: Accept Generic Array-Like for .where
{ "avatar_url": "https://avatars.githubusercontent.com/u/9273653?v=4", "events_url": "https://api.github.com/users/gfyoung/events{/privacy}", "followers_url": "https://api.github.com/users/gfyoung/followers", "following_url": "https://api.github.com/users/gfyoung/following{/other_user}", "gists_url": "https://api.github.com/users/gfyoung/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/gfyoung", "id": 9273653, "login": "gfyoung", "node_id": "MDQ6VXNlcjkyNzM2NTM=", "organizations_url": "https://api.github.com/users/gfyoung/orgs", "received_events_url": "https://api.github.com/users/gfyoung/received_events", "repos_url": "https://api.github.com/users/gfyoung/repos", "site_admin": false, "starred_url": "https://api.github.com/users/gfyoung/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gfyoung/subscriptions", "type": "User", "url": "https://api.github.com/users/gfyoung" }
[ { "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": "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": "2017-05-06T10:20:19Z", "closed_issues": 987, "created_at": "2016-02-08T15:30:21Z", "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": "after 0.19.x series", "due_on": "2017-05-12T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/39", "id": 1570595, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39/labels", "node_id": "MDk6TWlsZXN0b25lMTU3MDU5NQ==", "number": 39, "open_issues": 0, "state": "closed", "title": "0.20.0", "updated_at": "2018-10-28T08:18:42Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39" }
11
2017-02-15T18:36:17Z
2017-02-25T22:55:28Z
2017-02-24T20:05:19Z
MEMBER
null
Setup: ~~~python >>> s = Series([1, 2, 3]) >>> cond = [False, True, True] ~~~ Before: ~~~python >>> s.where(cond) ... ValueError: where requires an ndarray like object for its condition ~~~ After: ~~~python >>> s.where(cond) 0 NaN 1 2.0 2 3.0 dtype: float64 ~~~ Note that `Index` objects can accept array-like objects as conditionals, and I wrote tests to confirm.
{ "+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/15414/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15414/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/15414.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/15414", "merged_at": null, "patch_url": "https://github.com/pandas-dev/pandas/pull/15414.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/15414" }
https://api.github.com/repos/pandas-dev/pandas/issues/15415
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15415/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15415/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15415/events
https://github.com/pandas-dev/pandas/pull/15415
207,896,500
MDExOlB1bGxSZXF1ZXN0MTA2Mzc2NzYz
15,415
BLD: use latest conda version with latest miniconda installer on appveyor
{ "avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4", "events_url": "https://api.github.com/users/jreback/events{/privacy}", "followers_url": "https://api.github.com/users/jreback/followers", "following_url": "https://api.github.com/users/jreback/following{/other_user}", "gists_url": "https://api.github.com/users/jreback/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jreback", "id": 953992, "login": "jreback", "node_id": "MDQ6VXNlcjk1Mzk5Mg==", "organizations_url": "https://api.github.com/users/jreback/orgs", "received_events_url": "https://api.github.com/users/jreback/received_events", "repos_url": "https://api.github.com/users/jreback/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jreback/subscriptions", "type": "User", "url": "https://api.github.com/users/jreback" }
[ { "color": "a2bca7", "default": false, "description": "Continuous Integration", "id": 48070600, "name": "CI", "node_id": "MDU6TGFiZWw0ODA3MDYwMA==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/CI" } ]
closed
false
null
[]
{ "closed_at": "2017-05-06T10:20:19Z", "closed_issues": 987, "created_at": "2016-02-08T15:30:21Z", "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": "after 0.19.x series", "due_on": "2017-05-12T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/39", "id": 1570595, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39/labels", "node_id": "MDk6TWlsZXN0b25lMTU3MDU5NQ==", "number": 39, "open_issues": 0, "state": "closed", "title": "0.20.0", "updated_at": "2018-10-28T08:18:42Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39" }
0
2017-02-15T19:01:20Z
2017-02-15T20:21:24Z
2017-02-15T20:21:24Z
CONTRIBUTOR
null
change 3.6 build to use numpy=1.12 & add back xlwt (was not on defaults for a while)
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15415/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15415/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/15415.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/15415", "merged_at": null, "patch_url": "https://github.com/pandas-dev/pandas/pull/15415.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/15415" }
https://api.github.com/repos/pandas-dev/pandas/issues/15416
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15416/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15416/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15416/events
https://github.com/pandas-dev/pandas/pull/15416
207,935,079
MDExOlB1bGxSZXF1ZXN0MTA2NDA0MjY1
15,416
TST: convert yield based test_pickle.py to parametrized to remove warnings
{ "avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4", "events_url": "https://api.github.com/users/jreback/events{/privacy}", "followers_url": "https://api.github.com/users/jreback/followers", "following_url": "https://api.github.com/users/jreback/following{/other_user}", "gists_url": "https://api.github.com/users/jreback/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jreback", "id": 953992, "login": "jreback", "node_id": "MDQ6VXNlcjk1Mzk5Mg==", "organizations_url": "https://api.github.com/users/jreback/orgs", "received_events_url": "https://api.github.com/users/jreback/received_events", "repos_url": "https://api.github.com/users/jreback/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jreback/subscriptions", "type": "User", "url": "https://api.github.com/users/jreback" }
[ { "color": "C4A000", "default": false, "description": "pandas testing functions or related to the test suite", "id": 127685, "name": "Testing", "node_id": "MDU6TGFiZWwxMjc2ODU=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Testing" } ]
closed
false
null
[]
{ "closed_at": "2017-05-06T10:20:19Z", "closed_issues": 987, "created_at": "2016-02-08T15:30:21Z", "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": "after 0.19.x series", "due_on": "2017-05-12T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/39", "id": 1570595, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39/labels", "node_id": "MDk6TWlsZXN0b25lMTU3MDU5NQ==", "number": 39, "open_issues": 0, "state": "closed", "title": "0.20.0", "updated_at": "2018-10-28T08:18:42Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39" }
1
2017-02-15T21:35:02Z
2017-02-16T14:12:51Z
2017-02-16T14:12:51Z
CONTRIBUTOR
null
xref #15341
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15416/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15416/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/15416.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/15416", "merged_at": null, "patch_url": "https://github.com/pandas-dev/pandas/pull/15416.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/15416" }
https://api.github.com/repos/pandas-dev/pandas/issues/15417
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15417/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15417/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15417/events
https://github.com/pandas-dev/pandas/issues/15417
207,937,687
MDU6SXNzdWUyMDc5Mzc2ODc=
15,417
Join on level between two UNIQUE MultiIndex objects with unique level broadcast
{ "avatar_url": "https://avatars.githubusercontent.com/u/12834389?v=4", "events_url": "https://api.github.com/users/blalterman/events{/privacy}", "followers_url": "https://api.github.com/users/blalterman/followers", "following_url": "https://api.github.com/users/blalterman/following{/other_user}", "gists_url": "https://api.github.com/users/blalterman/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/blalterman", "id": 12834389, "login": "blalterman", "node_id": "MDQ6VXNlcjEyODM0Mzg5", "organizations_url": "https://api.github.com/users/blalterman/orgs", "received_events_url": "https://api.github.com/users/blalterman/received_events", "repos_url": "https://api.github.com/users/blalterman/repos", "site_admin": false, "starred_url": "https://api.github.com/users/blalterman/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/blalterman/subscriptions", "type": "User", "url": "https://api.github.com/users/blalterman" }
[ { "color": "02d7e1", "default": false, "description": "Concat, Merge/Join, Stack/Unstack, Explode", "id": 13098779, "name": "Reshaping", "node_id": "MDU6TGFiZWwxMzA5ODc3OQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Reshaping" }, { "color": "009800", "default": false, "description": "Duplicate issue or pull request", "id": 40153326, "name": "Duplicate Report", "node_id": "MDU6TGFiZWw0MDE1MzMyNg==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Duplicate%20Report" }, { "color": "207de5", "default": false, "description": null, "id": 71268330, "name": "MultiIndex", "node_id": "MDU6TGFiZWw3MTI2ODMzMA==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/MultiIndex" } ]
closed
false
null
[]
{ "closed_at": null, "closed_issues": 786, "created_at": "2015-01-13T10:53:19Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4", "events_url": "https://api.github.com/users/jreback/events{/privacy}", "followers_url": "https://api.github.com/users/jreback/followers", "following_url": "https://api.github.com/users/jreback/following{/other_user}", "gists_url": "https://api.github.com/users/jreback/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jreback", "id": 953992, "login": "jreback", "node_id": "MDQ6VXNlcjk1Mzk5Mg==", "organizations_url": "https://api.github.com/users/jreback/orgs", "received_events_url": "https://api.github.com/users/jreback/received_events", "repos_url": "https://api.github.com/users/jreback/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jreback/subscriptions", "type": "User", "url": "https://api.github.com/users/jreback" }, "description": "Changes that would be nice to have in the next release. These issues are not blocking. They will be pushed to the next release if no one has time to fix them.", "due_on": null, "html_url": "https://github.com/pandas-dev/pandas/milestone/32", "id": 933188, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/32/labels", "node_id": "MDk6TWlsZXN0b25lOTMzMTg4", "number": 32, "open_issues": 1053, "state": "open", "title": "Contributions Welcome", "updated_at": "2021-11-21T00:50:06Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/32" }
2
2017-02-15T21:44:41Z
2020-04-03T04:25:01Z
2020-04-03T04:25:00Z
NONE
null
Performing simple arithmetic operations between two `DataFrames` that have a MultiIndex on the columns is disabled because the join on level is deemed ambiguous. This is not the case when the labels in both `DataFrame`s are unique and there is a unique mapping between the two and the MultiIndex levels are uniquely labeled. First, let's just construct the DataFrame. ``` >>> data = { ('b', 'x', ''): {0: 0.5, 1: 0.59999999999999998, 2: 0.69999999999999996}, ('b', 'y', ''): {0: -0.25, 1: -0.26000000000000001, 2: 0.27000000000000002}, ('b', 'z', ''): {0: 0.29999999999999999, 1: 0.40000000000000002, 2: -0.69999999999999996}, ('v', 'x', 'a'): {0: 125.0, 1: 250.0, 2: 375.0}, ('v', 'x', 'p1'): {0: 100.0, 1: 200.0, 2: 300.0}, ('v', 'x', 'p2'): {0: 150.0, 1: 300.0, 2: 450.0}, ('v', 'y', 'a'): {0: 250.0, 1: 375.0, 2: 750.0}, ('v', 'y', 'p1'): {0: 200.0, 1: 300.0, 2: 600.0}, ('v', 'y', 'p2'): {0: 300.0, 1: 450.0, 2: 900.0}, ('v', 'z', 'a'): {0: 500.0, 1: 750.0, 2: 1000.0}, ('v', 'z', 'p1'): {0: 400.0, 1: 600.0, 2: 800.0}, ('v', 'z', 'p2'): {0: 600.0, 1: 900.0, 2: 1200.0}} >>> data = pd.DataFrame.from_dict(data, orient="columns").sort_index(axis=1) >>> data.columns.names = ["Measurement", "Component", "Species"] >>> data.T 0 1 2 Measurement Component Species b x 0.50 0.60 0.70 y -0.25 -0.26 0.27 z 0.30 0.40 -0.70 v x a 125.00 250.00 375.00 p1 100.00 200.00 300.00 p2 150.00 300.00 450.00 y a 250.00 375.00 750.00 p1 200.00 300.00 600.00 p2 300.00 450.00 900.00 z a 500.00 750.00 1000.00 p1 400.00 600.00 800.00 p2 600.00 900.00 1200.00 ``` In the case that there is a unique mapping between the two `DataFrames` such that there is a single level over which to broadcast, a `TypeError` is currently raised. ``` >>> mag = data.pow(2).sum(axis=1, level=["Measurement", "Species"]).pipe(np.sqrt) >>> mag Measurement b v Species a p1 p2 0 0.634429 572.821962 458.257569 687.386354 1 0.766551 875.000000 700.000000 1050.000000 2 1.026109 1305.038314 1044.030651 1566.045976 >>> data.divide(mag, axis=1, level="Component").T Traceback (most recent call last) ... TypeError: Join on level between two MultiIndex objects is ambiguous ``` This solution provides a simple tool for many users, removing the necessity of a common for loop and manual index selection. The expected output would be something like ``` >>> data.divide(mag, axis=1, level="Component").T 0 1 2 Measurement Component Species b x 0.788110 0.782727 0.682189 y -0.394055 -0.339182 0.263130 z 0.472866 0.521818 -0.682189 v x a 0.218218 0.285714 0.287348 p1 0.218218 0.285714 0.287348 p2 0.218218 0.285714 0.287348 y a 0.436436 0.428571 0.574696 p1 0.436436 0.428571 0.574696 p2 0.436436 0.428571 0.574696 z a 0.872872 0.857143 0.766261 p1 0.872872 0.857143 0.766261 p2 0.872872 0.857143 0.766261 ``` #### Output of ``pd.show_versions()`` <details> INSTALLED VERSIONS ------------------ commit: None python: 2.7.12.final.0 python-bits: 64 OS: Darwin OS-release: 14.5.0 machine: x86_64 processor: i386 byteorder: little LC_ALL: None LANG: en_US.UTF-8 pandas: 0.18.1 nose: None pip: 8.1.2 setuptools: 26.1.1 Cython: None numpy: 1.11.1 scipy: 0.18.0 statsmodels: None xarray: None IPython: 5.1.0 sphinx: None patsy: 0.4.1 dateutil: 2.5.3 pytz: 2016.6.1 blosc: None bottleneck: None tables: 3.2.3.1 numexpr: 2.6.1 matplotlib: 1.5.1 openpyxl: None xlrd: 1.0.0 xlwt: None xlsxwriter: None lxml: None bs4: None html5lib: None httplib2: None apiclient: None sqlalchemy: None pymysql: None psycopg2: None jinja2: 2.8 boto: None pandas_datareader: None </details>
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15417/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15417/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/15418
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15418/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15418/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15418/events
https://github.com/pandas-dev/pandas/pull/15418
207,961,594
MDExOlB1bGxSZXF1ZXN0MTA2NDIyNTY5
15,418
Ensure the right values are set in SeriesGroupBy.nunique
{ "avatar_url": "https://avatars.githubusercontent.com/u/780934?v=4", "events_url": "https://api.github.com/users/aiguofer/events{/privacy}", "followers_url": "https://api.github.com/users/aiguofer/followers", "following_url": "https://api.github.com/users/aiguofer/following{/other_user}", "gists_url": "https://api.github.com/users/aiguofer/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/aiguofer", "id": 780934, "login": "aiguofer", "node_id": "MDQ6VXNlcjc4MDkzNA==", "organizations_url": "https://api.github.com/users/aiguofer/orgs", "received_events_url": "https://api.github.com/users/aiguofer/received_events", "repos_url": "https://api.github.com/users/aiguofer/repos", "site_admin": false, "starred_url": "https://api.github.com/users/aiguofer/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/aiguofer/subscriptions", "type": "User", "url": "https://api.github.com/users/aiguofer" }
[ { "color": "e10c02", "default": false, "description": null, "id": 76811, "name": "Bug", "node_id": "MDU6TGFiZWw3NjgxMQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug" }, { "color": "729FCF", "default": false, "description": null, "id": 233160, "name": "Groupby", "node_id": "MDU6TGFiZWwyMzMxNjA=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Groupby" } ]
closed
false
null
[]
{ "closed_at": "2017-05-06T10:20:19Z", "closed_issues": 987, "created_at": "2016-02-08T15:30:21Z", "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": "after 0.19.x series", "due_on": "2017-05-12T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/39", "id": 1570595, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39/labels", "node_id": "MDk6TWlsZXN0b25lMTU3MDU5NQ==", "number": 39, "open_issues": 0, "state": "closed", "title": "0.20.0", "updated_at": "2018-10-28T08:18:42Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39" }
7
2017-02-15T23:24:23Z
2017-02-16T14:29:05Z
2017-02-16T14:28:48Z
CONTRIBUTOR
null
We only need to use the group boundaries as the index for `res` so that the dimensions match those of `out`. Fixes #13453 - [x] closes #13453 - [x] tests added / passed - [x] passes ``git diff upstream/master | 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/15418/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15418/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/15418.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/15418", "merged_at": null, "patch_url": "https://github.com/pandas-dev/pandas/pull/15418.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/15418" }
https://api.github.com/repos/pandas-dev/pandas/issues/15419
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15419/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15419/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15419/events
https://github.com/pandas-dev/pandas/issues/15419
208,006,142
MDU6SXNzdWUyMDgwMDYxNDI=
15,419
Using a string as an index of dataframe
{ "avatar_url": "https://avatars.githubusercontent.com/u/16576251?v=4", "events_url": "https://api.github.com/users/yadynesh/events{/privacy}", "followers_url": "https://api.github.com/users/yadynesh/followers", "following_url": "https://api.github.com/users/yadynesh/following{/other_user}", "gists_url": "https://api.github.com/users/yadynesh/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/yadynesh", "id": 16576251, "login": "yadynesh", "node_id": "MDQ6VXNlcjE2NTc2MjUx", "organizations_url": "https://api.github.com/users/yadynesh/orgs", "received_events_url": "https://api.github.com/users/yadynesh/received_events", "repos_url": "https://api.github.com/users/yadynesh/repos", "site_admin": false, "starred_url": "https://api.github.com/users/yadynesh/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/yadynesh/subscriptions", "type": "User", "url": "https://api.github.com/users/yadynesh" }
[ { "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" }
1
2017-02-16T03:40:59Z
2017-02-16T08:52:26Z
2017-02-16T08:52:14Z
NONE
null
#### Code Sample, a copy-pastable example if possible temp = "['A', 'B']" transactions[temp] #### Problem description I am trying to use a string as an index of dataframe. Here if I write **transactions[['A', 'B']]** the code runs ,but when I write the same thing into a string and pass it as an index it does not work. #### Expected Output I want to display a dataframe including both the columns.
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15419/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15419/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/15420
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15420/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15420/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15420/events
https://github.com/pandas-dev/pandas/issues/15420
208,009,145
MDU6SXNzdWUyMDgwMDkxNDU=
15,420
rank incorrectly orders ordered categories
{ "avatar_url": "https://avatars.githubusercontent.com/u/2009725?v=4", "events_url": "https://api.github.com/users/dfd/events{/privacy}", "followers_url": "https://api.github.com/users/dfd/followers", "following_url": "https://api.github.com/users/dfd/following{/other_user}", "gists_url": "https://api.github.com/users/dfd/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/dfd", "id": 2009725, "login": "dfd", "node_id": "MDQ6VXNlcjIwMDk3MjU=", "organizations_url": "https://api.github.com/users/dfd/orgs", "received_events_url": "https://api.github.com/users/dfd/received_events", "repos_url": "https://api.github.com/users/dfd/repos", "site_admin": false, "starred_url": "https://api.github.com/users/dfd/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/dfd/subscriptions", "type": "User", "url": "https://api.github.com/users/dfd" }
[ { "color": "e10c02", "default": false, "description": null, "id": 76811, "name": "Bug", "node_id": "MDU6TGFiZWw3NjgxMQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug" }, { "color": "e11d21", "default": false, "description": "Categorical Data Type", "id": 78527356, "name": "Categorical", "node_id": "MDU6TGFiZWw3ODUyNzM1Ng==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Categorical" } ]
closed
false
null
[]
{ "closed_at": "2017-05-06T10:20:19Z", "closed_issues": 987, "created_at": "2016-02-08T15:30:21Z", "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": "after 0.19.x series", "due_on": "2017-05-12T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/39", "id": 1570595, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39/labels", "node_id": "MDk6TWlsZXN0b25lMTU3MDU5NQ==", "number": 39, "open_issues": 0, "state": "closed", "title": "0.20.0", "updated_at": "2018-10-28T08:18:42Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39" }
1
2017-02-16T04:01:20Z
2017-02-24T19:57:32Z
2017-02-24T19:57:32Z
NONE
null
#### Code Sample, a copy-pastable example if possible ```python import pandas as pd a = pd.DataFrame(['first', 'second', 'third', 'fourth', 'fifth', 'sixth'], columns=['A']) a['A'] = a['A'].astype('category', ).cat.set_categories( ['first', 'second', 'third', 'fourth', 'fifth', 'sixth'], ordered=True) a['A'].rank() # outputs: # 0 2.0 # 1 4.0 # 2 6.0 # 3 3.0 # 4 1.0 # 5 5.0 ``` #### Problem description rank seems to be ignoring the order of ordered categories. #### Expected Output ``` 0 1.0 1 2.0 2 3.0 3 4.0 4 5.0 5 6.0 ``` #### Output of ``pd.show_versions()`` <details> ``` INSTALLED VERSIONS ------------------ commit: None python: 3.6.0.final.0 python-bits: 64 OS: Linux OS-release: 4.4.0-59-generic machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: en_US.UTF-8 LOCALE: en_US.UTF-8 pandas: 0.19.2 nose: None pip: 9.0.1 setuptools: 34.2.0 Cython: None numpy: 1.12.0 scipy: None statsmodels: None xarray: None IPython: None sphinx: None patsy: None dateutil: 2.6.0 pytz: 2016.10 blosc: None bottleneck: None tables: None numexpr: None matplotlib: None openpyxl: None xlrd: None xlwt: None xlsxwriter: None lxml: None bs4: None html5lib: None httplib2: None apiclient: None sqlalchemy: None pymysql: None psycopg2: None jinja2: None boto: None pandas_datareader: None ``` </details>
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15420/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15420/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/15421
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15421/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15421/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15421/events
https://github.com/pandas-dev/pandas/issues/15421
208,108,846
MDU6SXNzdWUyMDgxMDg4NDY=
15,421
Unexpected string->float conversion in DataFrame.groupby().apply()
{ "avatar_url": "https://avatars.githubusercontent.com/u/5485367?v=4", "events_url": "https://api.github.com/users/yegulalp/events{/privacy}", "followers_url": "https://api.github.com/users/yegulalp/followers", "following_url": "https://api.github.com/users/yegulalp/following{/other_user}", "gists_url": "https://api.github.com/users/yegulalp/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/yegulalp", "id": 5485367, "login": "yegulalp", "node_id": "MDQ6VXNlcjU0ODUzNjc=", "organizations_url": "https://api.github.com/users/yegulalp/orgs", "received_events_url": "https://api.github.com/users/yegulalp/received_events", "repos_url": "https://api.github.com/users/yegulalp/repos", "site_admin": false, "starred_url": "https://api.github.com/users/yegulalp/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/yegulalp/subscriptions", "type": "User", "url": "https://api.github.com/users/yegulalp" }
[ { "color": "e10c02", "default": false, "description": null, "id": 76811, "name": "Bug", "node_id": "MDU6TGFiZWw3NjgxMQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug" }, { "color": "009800", "default": false, "description": "Duplicate issue or pull request", "id": 40153326, "name": "Duplicate Report", "node_id": "MDU6TGFiZWw0MDE1MzMyNg==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Duplicate%20Report" } ]
closed
false
null
[]
{ "closed_at": "2017-05-06T10:20:19Z", "closed_issues": 987, "created_at": "2016-02-08T15:30:21Z", "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": "after 0.19.x series", "due_on": "2017-05-12T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/39", "id": 1570595, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39/labels", "node_id": "MDk6TWlsZXN0b25lMTU3MDU5NQ==", "number": 39, "open_issues": 0, "state": "closed", "title": "0.20.0", "updated_at": "2018-10-28T08:18:42Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39" }
1
2017-02-16T12:33:52Z
2017-03-16T11:52:16Z
2017-02-16T13:24:50Z
NONE
null
#### Code Sample, a copy-pastable example if possible ```python # Your code here import pandas as pd df = pd.DataFrame({'A':[10, 20, 30], 'B': [ 'foo', '3', '4'], 'T': [pd.Timestamp("12:31:22")]*3}) def get_B(g): return g.iloc[0][['B']] print df.groupby('A').apply(get_B) # Observed output: B A 10 NaN 20 3.0 30 4.0 ``` #### Problem description groupby.apply() does an unexpected conversion from string to float for column 'B' in the example above. The bug is triggered only when both of the following happen: 1. A column ('B' in the example above) has string values, some of which are parseable as numbers and some which are not. 2. Another column ('T' in the example above) in the dataframe has timestamps. #### Expected Output ``` B A 10 foo 20 3 30 4 ``` #### Output of ``pd.show_versions()`` <details> # Paste the output here pd.show_versions() here INSTALLED VERSIONS ------------------ commit: None python: 2.7.13.final.0 python-bits: 64 OS: Windows OS-release: 7 machine: AMD64 processor: Intel64 Family 6 Model 60 Stepping 3, GenuineIntel byteorder: little LC_ALL: None LANG: None LOCALE: None.None pandas: 0.19.2 nose: 1.3.7 pip: 9.0.1 setuptools: 27.2.0 Cython: 0.25.2 numpy: 1.11.3 scipy: 0.18.1 statsmodels: 0.6.1 xarray: None IPython: 5.1.0 sphinx: 1.5.1 patsy: 0.4.1 dateutil: 2.6.0 pytz: 2016.10 blosc: None bottleneck: 1.2.0 tables: 3.2.2 numexpr: 2.6.1 matplotlib: 1.5.1 openpyxl: 2.4.0 xlrd: 1.0.0 xlwt: 1.1.2 xlsxwriter: 0.9.6 lxml: 3.7.2 bs4: 4.5.3 html5lib: None httplib2: None apiclient: None sqlalchemy: 1.1.4 pymysql: None psycopg2: None jinja2: 2.8.1 boto: 2.45.0 pandas_datareader: 0.2.1 </details>
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15421/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15421/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/15422
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15422/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15422/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15422/events
https://github.com/pandas-dev/pandas/pull/15422
208,130,442
MDExOlB1bGxSZXF1ZXN0MTA2NTMxNTky
15,422
Rank categorical
{ "avatar_url": "https://avatars.githubusercontent.com/u/2135985?v=4", "events_url": "https://api.github.com/users/dakaitbakait/events{/privacy}", "followers_url": "https://api.github.com/users/dakaitbakait/followers", "following_url": "https://api.github.com/users/dakaitbakait/following{/other_user}", "gists_url": "https://api.github.com/users/dakaitbakait/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/dakaitbakait", "id": 2135985, "login": "dakaitbakait", "node_id": "MDQ6VXNlcjIxMzU5ODU=", "organizations_url": "https://api.github.com/users/dakaitbakait/orgs", "received_events_url": "https://api.github.com/users/dakaitbakait/received_events", "repos_url": "https://api.github.com/users/dakaitbakait/repos", "site_admin": false, "starred_url": "https://api.github.com/users/dakaitbakait/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/dakaitbakait/subscriptions", "type": "User", "url": "https://api.github.com/users/dakaitbakait" }
[ { "color": "e10c02", "default": false, "description": null, "id": 76811, "name": "Bug", "node_id": "MDU6TGFiZWw3NjgxMQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug" }, { "color": "e11d21", "default": false, "description": "Categorical Data Type", "id": 78527356, "name": "Categorical", "node_id": "MDU6TGFiZWw3ODUyNzM1Ng==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Categorical" } ]
closed
false
null
[]
{ "closed_at": "2017-05-06T10:20:19Z", "closed_issues": 987, "created_at": "2016-02-08T15:30:21Z", "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": "after 0.19.x series", "due_on": "2017-05-12T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/39", "id": 1570595, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39/labels", "node_id": "MDk6TWlsZXN0b25lMTU3MDU5NQ==", "number": 39, "open_issues": 0, "state": "closed", "title": "0.20.0", "updated_at": "2018-10-28T08:18:42Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39" }
10
2017-02-16T14:05:04Z
2017-02-25T10:55:45Z
2017-02-24T19:57:32Z
CONTRIBUTOR
null
check for categorical, and then pass the underlying integer codes. - [ ] closes #15420 - [ ] tests added / passed - [ ] passes ``git diff upstream/master | 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/15422/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15422/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/15422.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/15422", "merged_at": null, "patch_url": "https://github.com/pandas-dev/pandas/pull/15422.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/15422" }
https://api.github.com/repos/pandas-dev/pandas/issues/15423
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15423/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15423/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15423/events
https://github.com/pandas-dev/pandas/pull/15423
208,144,881
MDExOlB1bGxSZXF1ZXN0MTA2NTQyMjQ2
15,423
BUG: to_sql convert index name to string (#15404)
{ "avatar_url": "https://avatars.githubusercontent.com/u/7094955?v=4", "events_url": "https://api.github.com/users/redbullpeter/events{/privacy}", "followers_url": "https://api.github.com/users/redbullpeter/followers", "following_url": "https://api.github.com/users/redbullpeter/following{/other_user}", "gists_url": "https://api.github.com/users/redbullpeter/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/redbullpeter", "id": 7094955, "login": "redbullpeter", "node_id": "MDQ6VXNlcjcwOTQ5NTU=", "organizations_url": "https://api.github.com/users/redbullpeter/orgs", "received_events_url": "https://api.github.com/users/redbullpeter/received_events", "repos_url": "https://api.github.com/users/redbullpeter/repos", "site_admin": false, "starred_url": "https://api.github.com/users/redbullpeter/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/redbullpeter/subscriptions", "type": "User", "url": "https://api.github.com/users/redbullpeter" }
[ { "color": "e10c02", "default": false, "description": null, "id": 76811, "name": "Bug", "node_id": "MDU6TGFiZWw3NjgxMQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug" }, { "color": "5319e7", "default": false, "description": "to_sql, read_sql, read_sql_query", "id": 47232590, "name": "IO SQL", "node_id": "MDU6TGFiZWw0NzIzMjU5MA==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20SQL" } ]
closed
false
null
[]
{ "closed_at": "2017-05-06T10:20:19Z", "closed_issues": 987, "created_at": "2016-02-08T15:30:21Z", "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": "after 0.19.x series", "due_on": "2017-05-12T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/39", "id": 1570595, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39/labels", "node_id": "MDk6TWlsZXN0b25lMTU3MDU5NQ==", "number": 39, "open_issues": 0, "state": "closed", "title": "0.20.0", "updated_at": "2018-10-28T08:18:42Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39" }
6
2017-02-16T14:58:28Z
2017-02-17T13:16:17Z
2017-02-17T13:09:21Z
CONTRIBUTOR
null
…rs with numeric index name - needs conversion to string - [x] closes #15404 - [x] tests passed - [x] passes ``git diff upstream/master | 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/15423/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15423/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/15423.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/15423", "merged_at": "2017-02-17T13:09:21Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/15423.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/15423" }
https://api.github.com/repos/pandas-dev/pandas/issues/15424
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15424/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15424/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15424/events
https://github.com/pandas-dev/pandas/issues/15424
208,157,221
MDU6SXNzdWUyMDgxNTcyMjE=
15,424
Indexing MultiIndex with NDFrame indexer fails if index of indexer does not contain 0
{ "avatar_url": "https://avatars.githubusercontent.com/u/1224492?v=4", "events_url": "https://api.github.com/users/toobaz/events{/privacy}", "followers_url": "https://api.github.com/users/toobaz/followers", "following_url": "https://api.github.com/users/toobaz/following{/other_user}", "gists_url": "https://api.github.com/users/toobaz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/toobaz", "id": 1224492, "login": "toobaz", "node_id": "MDQ6VXNlcjEyMjQ0OTI=", "organizations_url": "https://api.github.com/users/toobaz/orgs", "received_events_url": "https://api.github.com/users/toobaz/received_events", "repos_url": "https://api.github.com/users/toobaz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/toobaz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/toobaz/subscriptions", "type": "User", "url": "https://api.github.com/users/toobaz" }
[ { "color": "e10c02", "default": false, "description": null, "id": 76811, "name": "Bug", "node_id": "MDU6TGFiZWw3NjgxMQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug" }, { "color": "0b02e1", "default": false, "description": "Related to indexing on series/frames, not to indexes themselves", "id": 2822098, "name": "Indexing", "node_id": "MDU6TGFiZWwyODIyMDk4", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Indexing" }, { "color": "207de5", "default": false, "description": null, "id": 71268330, "name": "MultiIndex", "node_id": "MDU6TGFiZWw3MTI2ODMzMA==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/MultiIndex" } ]
closed
false
null
[]
{ "closed_at": "2017-05-06T10:20:19Z", "closed_issues": 987, "created_at": "2016-02-08T15:30:21Z", "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": "after 0.19.x series", "due_on": "2017-05-12T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/39", "id": 1570595, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39/labels", "node_id": "MDk6TWlsZXN0b25lMTU3MDU5NQ==", "number": 39, "open_issues": 0, "state": "closed", "title": "0.20.0", "updated_at": "2018-10-28T08:18:42Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39" }
7
2017-02-16T15:39:14Z
2017-02-20T14:44:01Z
2017-02-20T14:44:01Z
MEMBER
null
#### Code Sample, a copy-pastable example if possible ```python In [2]: d = pd.DataFrame([[1, 1, 3], ...: [1, 2, 4], ...: [2, 2, 5]], columns=['a', 'b', 'c']) In [3]: d.set_index(['a', 'b']).loc[pd.Series([1, 2])] Out[3]: c a b 1 1 3 2 4 2 2 5 In [4]: d.set_index(['a', 'b']).loc[pd.Series([1, 2], index=[2,0])] Out[4]: c a b 1 1 3 2 4 2 2 5 In [5]: d.set_index(['a', 'b']).loc[pd.Series([1, 2], index=[2,3])] --------------------------------------------------------------------------- KeyError Traceback (most recent call last) <ipython-input-5-a23ad44827f6> in <module>() ----> 1 d.set_index(['a', 'b']).loc[pd.Series([1, 2], index=[2,3])] /home/pietro/nobackup/repo/pandas/pandas/core/indexing.py in __getitem__(self, key) 1339 else: 1340 key = com._apply_if_callable(key, self.obj) -> 1341 return self._getitem_axis(key, axis=0) 1342 1343 def _is_scalar_access(self, key): /home/pietro/nobackup/repo/pandas/pandas/core/indexing.py in _getitem_axis(self, key, axis) 1527 if isinstance(labels, MultiIndex): 1528 if (not isinstance(key, tuple) and len(key) > 1 and -> 1529 not isinstance(key[0], tuple)): 1530 if isinstance(key, ABCSeries): 1531 # GH 14730 /home/pietro/nobackup/repo/pandas/pandas/core/series.py in __getitem__(self, key) 604 key = com._apply_if_callable(key, self) 605 try: --> 606 result = self.index.get_value(self, key) 607 608 if not is_scalar(result): /home/pietro/nobackup/repo/pandas/pandas/indexes/base.py in get_value(self, series, key) 2304 try: 2305 return self._engine.get_value(s, k, -> 2306 tz=getattr(series.dtype, 'tz', None)) 2307 except KeyError as e1: 2308 if len(self) > 0 and self.inferred_type in ['integer', 'boolean']: /home/pietro/nobackup/repo/pandas/pandas/index.pyx in pandas.index.IndexEngine.get_value (pandas/index.c:3992)() /home/pietro/nobackup/repo/pandas/pandas/index.pyx in pandas.index.IndexEngine.get_value (pandas/index.c:3689)() /home/pietro/nobackup/repo/pandas/pandas/index.pyx in pandas.index.IndexEngine.get_loc (pandas/index.c:4688)() /home/pietro/nobackup/repo/pandas/pandas/src/hashtable_class_helper.pxi in pandas.hashtable.Int64HashTable.get_item (pandas/hashtable.c:13370)() /home/pietro/nobackup/repo/pandas/pandas/src/hashtable_class_helper.pxi in pandas.hashtable.Int64HashTable.get_item (pandas/hashtable.c:13308)() KeyError: 0 ``` #### Problem description The index of the indexer should not matter at all... and indeed there is no bug when indexing a (non-``Multi``)``Index``: ``` In [6]: d.set_index(['a']).loc[pd.Series([1, 2], index=[2,3])] Out[6]: b c a 1 1 3 1 2 4 2 2 5 ``` #### Expected Output The same as ``d.set_index(['a', 'b']).loc[pd.Series([1, 2])]``. A PR is on its way. #### Output of ``pd.show_versions()`` <details> INSTALLED VERSIONS ------------------ commit: None python: 3.5.2.final.0 python-bits: 64 OS: Linux OS-release: 4.7.0-1-amd64 machine: x86_64 processor: byteorder: little LC_ALL: None LANG: it_IT.utf8 LOCALE: it_IT.UTF-8 pandas: 0.19.0+464.g0b28e5a pytest: None pip: 8.1.2 setuptools: 28.0.0 Cython: 0.23.4 numpy: 1.12.0 scipy: 0.18.1 xarray: None IPython: 5.1.0.dev sphinx: 1.4.8 patsy: 0.3.0-dev dateutil: 2.5.3 pytz: 2015.7 blosc: None bottleneck: 1.2.0 tables: 3.2.2 numexpr: 2.6.0 feather: None matplotlib: 2.0.0rc2 openpyxl: None xlrd: 1.0.0 xlwt: 1.1.2 xlsxwriter: 0.9.3 lxml: None bs4: 4.5.1 html5lib: 0.999 httplib2: 0.9.1 apiclient: 1.5.2 sqlalchemy: 1.0.15 pymysql: None psycopg2: None jinja2: 2.8 s3fs: None pandas_datareader: 0.2.1 </details>
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15424/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15424/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/15425
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15425/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15425/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15425/events
https://github.com/pandas-dev/pandas/pull/15425
208,158,935
MDExOlB1bGxSZXF1ZXN0MTA2NTUyMzU1
15,425
Mi indexing
{ "avatar_url": "https://avatars.githubusercontent.com/u/1224492?v=4", "events_url": "https://api.github.com/users/toobaz/events{/privacy}", "followers_url": "https://api.github.com/users/toobaz/followers", "following_url": "https://api.github.com/users/toobaz/following{/other_user}", "gists_url": "https://api.github.com/users/toobaz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/toobaz", "id": 1224492, "login": "toobaz", "node_id": "MDQ6VXNlcjEyMjQ0OTI=", "organizations_url": "https://api.github.com/users/toobaz/orgs", "received_events_url": "https://api.github.com/users/toobaz/received_events", "repos_url": "https://api.github.com/users/toobaz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/toobaz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/toobaz/subscriptions", "type": "User", "url": "https://api.github.com/users/toobaz" }
[ { "color": "0b02e1", "default": false, "description": "Related to indexing on series/frames, not to indexes themselves", "id": 2822098, "name": "Indexing", "node_id": "MDU6TGFiZWwyODIyMDk4", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Indexing" }, { "color": "207de5", "default": false, "description": null, "id": 71268330, "name": "MultiIndex", "node_id": "MDU6TGFiZWw3MTI2ODMzMA==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/MultiIndex" } ]
closed
false
null
[]
{ "closed_at": "2017-05-06T10:20:19Z", "closed_issues": 987, "created_at": "2016-02-08T15:30:21Z", "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": "after 0.19.x series", "due_on": "2017-05-12T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/39", "id": 1570595, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39/labels", "node_id": "MDk6TWlsZXN0b25lMTU3MDU5NQ==", "number": 39, "open_issues": 0, "state": "closed", "title": "0.20.0", "updated_at": "2018-10-28T08:18:42Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39" }
8
2017-02-16T15:44:48Z
2017-02-21T01:00:44Z
2017-02-20T14:44:02Z
MEMBER
null
- [x] closes #15424 - [x] closes #15434 - [x] tests added / passed - [x] passes ``git diff upstream/master | flake8 --diff`` - [x] whatsnew entry This also fixes indexing with a ``DataFrame``, which was actually not mentioned in #15424 (but it's a twoliner)
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15425/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15425/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/15425.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/15425", "merged_at": null, "patch_url": "https://github.com/pandas-dev/pandas/pull/15425.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/15425" }
https://api.github.com/repos/pandas-dev/pandas/issues/15426
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15426/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15426/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15426/events
https://github.com/pandas-dev/pandas/issues/15426
208,160,018
MDU6SXNzdWUyMDgxNjAwMTg=
15,426
BUG: timezone lost in groupby-agg with cython functions
{ "avatar_url": "https://avatars.githubusercontent.com/u/1341083?v=4", "events_url": "https://api.github.com/users/munierSalem/events{/privacy}", "followers_url": "https://api.github.com/users/munierSalem/followers", "following_url": "https://api.github.com/users/munierSalem/following{/other_user}", "gists_url": "https://api.github.com/users/munierSalem/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/munierSalem", "id": 1341083, "login": "munierSalem", "node_id": "MDQ6VXNlcjEzNDEwODM=", "organizations_url": "https://api.github.com/users/munierSalem/orgs", "received_events_url": "https://api.github.com/users/munierSalem/received_events", "repos_url": "https://api.github.com/users/munierSalem/repos", "site_admin": false, "starred_url": "https://api.github.com/users/munierSalem/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/munierSalem/subscriptions", "type": "User", "url": "https://api.github.com/users/munierSalem" }
[ { "color": "e10c02", "default": false, "description": null, "id": 76811, "name": "Bug", "node_id": "MDU6TGFiZWw3NjgxMQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug" }, { "color": "729FCF", "default": false, "description": null, "id": 233160, "name": "Groupby", "node_id": "MDU6TGFiZWwyMzMxNjA=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Groupby" }, { "color": "5319e7", "default": false, "description": "Timezone data dtype", "id": 60458168, "name": "Timezones", "node_id": "MDU6TGFiZWw2MDQ1ODE2OA==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Timezones" } ]
closed
false
null
[]
{ "closed_at": "2017-05-06T10:20:19Z", "closed_issues": 987, "created_at": "2016-02-08T15:30:21Z", "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": "after 0.19.x series", "due_on": "2017-05-12T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/39", "id": 1570595, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39/labels", "node_id": "MDk6TWlsZXN0b25lMTU3MDU5NQ==", "number": 39, "open_issues": 0, "state": "closed", "title": "0.20.0", "updated_at": "2018-10-28T08:18:42Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39" }
10
2017-02-16T15:48:12Z
2017-02-27T15:46:31Z
2017-02-27T15:46:31Z
NONE
null
xref #10668 (for more examples) Hello! I'm running into some odd behavior trying to group rows of a pandas dataframe by ID and then selecting out max/min datetimes (w/ timezones). This is with python 2.7, pandas 0.18.1 and numpy 1.11.1 (I saw in earlier posts a similar problem was apparently fixed w/ pandas 0.15). Specifically, if I try: `print orders.groupby('OrderID')['start_time'].agg(np.min).iloc[:5]` I get: ``` OrderID O161101XVS100000044 2016-11-01 12:03:12.920000-04:00 O161101XVS100000047 2016-11-01 12:03:36.693000-04:00 O161101XVS100000098 2016-11-01 12:09:08.330000-04:00 O161101XVS100000122 2016-11-01 12:09:59.950000-04:00 O161101XVS100000152 2016-11-01 12:11:29.790000-04:00 Name: start_time, dtype: datetime64[ns, US/Eastern] ``` Where the raw data had times closer to 8 am (US/Eastern). In other words, it reverted back to UTC times, even though it says it's eastern times, and has UTC-4 offset. But if I instead try: `print orders.groupby('OrderID')['start_time'].agg(lambda x: np.min(x)).iloc[:5]` I now get: ``` OrderID O161101XVS100000044 2016-11-01 08:03:12.920000-04:00 O161101XVS100000047 2016-11-01 08:03:36.693000-04:00 O161101XVS100000098 2016-11-01 08:09:08.330000-04:00 O161101XVS100000122 2016-11-01 08:09:59.950000-04:00 O161101XVS100000152 2016-11-01 08:11:29.790000-04:00 Name: start_time, dtype: datetime64[ns, US/Eastern] ``` Which is the behavior I intended. This second method is vastly slower, and I would have assumed the two approaches would yield identical results ...
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15426/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15426/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/15427
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15427/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15427/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15427/events
https://github.com/pandas-dev/pandas/pull/15427
208,218,475
MDExOlB1bGxSZXF1ZXN0MTA2NTk0NjYw
15,427
TST: remove yielding tests from test_msgpacks.py
{ "avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4", "events_url": "https://api.github.com/users/jreback/events{/privacy}", "followers_url": "https://api.github.com/users/jreback/followers", "following_url": "https://api.github.com/users/jreback/following{/other_user}", "gists_url": "https://api.github.com/users/jreback/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jreback", "id": 953992, "login": "jreback", "node_id": "MDQ6VXNlcjk1Mzk5Mg==", "organizations_url": "https://api.github.com/users/jreback/orgs", "received_events_url": "https://api.github.com/users/jreback/received_events", "repos_url": "https://api.github.com/users/jreback/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jreback/subscriptions", "type": "User", "url": "https://api.github.com/users/jreback" }
[ { "color": "C4A000", "default": false, "description": "pandas testing functions or related to the test suite", "id": 127685, "name": "Testing", "node_id": "MDU6TGFiZWwxMjc2ODU=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Testing" } ]
closed
false
null
[]
{ "closed_at": "2017-05-06T10:20:19Z", "closed_issues": 987, "created_at": "2016-02-08T15:30:21Z", "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": "after 0.19.x series", "due_on": "2017-05-12T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/39", "id": 1570595, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39/labels", "node_id": "MDk6TWlsZXN0b25lMTU3MDU5NQ==", "number": 39, "open_issues": 0, "state": "closed", "title": "0.20.0", "updated_at": "2018-10-28T08:18:42Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39" }
1
2017-02-16T19:17:40Z
2017-02-17T14:51:47Z
2017-02-17T14:51:47Z
CONTRIBUTOR
null
xref #15341
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15427/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15427/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/15427.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/15427", "merged_at": "2017-02-17T14:51:47Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/15427.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/15427" }
https://api.github.com/repos/pandas-dev/pandas/issues/15428
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15428/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15428/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15428/events
https://github.com/pandas-dev/pandas/issues/15428
208,258,746
MDU6SXNzdWUyMDgyNTg3NDY=
15,428
BUG: pd.cut with bins=1 and input all 0s
{ "avatar_url": "https://avatars.githubusercontent.com/u/15273575?v=4", "events_url": "https://api.github.com/users/luca-s/events{/privacy}", "followers_url": "https://api.github.com/users/luca-s/followers", "following_url": "https://api.github.com/users/luca-s/following{/other_user}", "gists_url": "https://api.github.com/users/luca-s/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/luca-s", "id": 15273575, "login": "luca-s", "node_id": "MDQ6VXNlcjE1MjczNTc1", "organizations_url": "https://api.github.com/users/luca-s/orgs", "received_events_url": "https://api.github.com/users/luca-s/received_events", "repos_url": "https://api.github.com/users/luca-s/repos", "site_admin": false, "starred_url": "https://api.github.com/users/luca-s/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/luca-s/subscriptions", "type": "User", "url": "https://api.github.com/users/luca-s" }
[ { "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": "eb6420", "default": false, "description": "Non-arithmetic algos: value_counts, factorize, sorting, isin, clip, shift, diff", "id": 57296398, "name": "Algos", "node_id": "MDU6TGFiZWw1NzI5NjM5OA==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Algos" } ]
closed
false
null
[]
{ "closed_at": "2017-05-06T10:20:19Z", "closed_issues": 987, "created_at": "2016-02-08T15:30:21Z", "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": "after 0.19.x series", "due_on": "2017-05-12T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/39", "id": 1570595, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39/labels", "node_id": "MDk6TWlsZXN0b25lMTU3MDU5NQ==", "number": 39, "open_issues": 0, "state": "closed", "title": "0.20.0", "updated_at": "2018-10-28T08:18:42Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39" }
1
2017-02-16T21:53:44Z
2017-03-08T13:43:24Z
2017-03-08T13:43:24Z
CONTRIBUTOR
null
#### Code Sample, a copy-pastable example if possible ```python >>> import pandas as pd >>> pd.__version__ u'0.19.2' >>> s = pd.Series([0,0,0]) >>> pd.cut(s, 1) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/luca/.local/lib/python2.7/site-packages/pandas/tools/tile.py", line 119, in cut include_lowest=include_lowest) File "/home/luca/.local/lib/python2.7/site-packages/pandas/tools/tile.py", line 194, in _bins_to_cuts raise ValueError('Bin edges must be unique: %s' % repr(bins)) ValueError: Bin edges must be unique: array([ 0., 0.]) >>> s = pd.Series([-1,-1,-1]) >>> pd.cut(s, 1) 0 (-1.001, -0.999] 1 (-1.001, -0.999] 2 (-1.001, -0.999] >>> s = pd.Series([1,1,1]) >>> pd.cut(s, 1) 0 (0.999, 1.001] 1 (0.999, 1.001] 2 (0.999, 1.001] ``` #### Problem description The special case of an input containing all 0s raises a ValueError. I had a look at the [code](https://github.com/pandas-dev/pandas/blob/master/pandas/tools/tile.py#L107) and it is straightforward to fix. I can provide a PR if requested. #### Expected Output ``` >>> pd.cut(s, 1) 0 (-0.001, 0.001] 1 (-0.001, 0.001] 2 (-0.001, 0.001] ``` #### Output of ``pd.show_versions()`` <details> >>> pd.show_versions() INSTALLED VERSIONS ------------------ commit: None python: 2.7.12.final.0 python-bits: 64 OS: Linux OS-release: 4.8.0-36-generic machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: en_US.UTF-8 LOCALE: None.None pandas: 0.19.2 nose: 1.3.7 pip: 8.1.1 setuptools: 32.3.1 Cython: 0.23.4 numpy: 1.12.0 scipy: 0.18.1 statsmodels: 0.6.1 xarray: None IPython: 5.1.0 sphinx: 1.5.1 patsy: 0.4.1 dateutil: 2.6.0 pytz: 2016.10 blosc: None bottleneck: None tables: None numexpr: None matplotlib: 1.5.3 openpyxl: None xlrd: None xlwt: None xlsxwriter: None lxml: None bs4: None html5lib: 0.999 httplib2: 0.9.1 apiclient: None sqlalchemy: 1.1.4 pymysql: None psycopg2: None jinja2: 2.8.1 boto: None pandas_datareader: 0.2.1 </details>
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15428/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15428/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/15429
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15429/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15429/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15429/events
https://github.com/pandas-dev/pandas/issues/15429
208,261,566
MDU6SXNzdWUyMDgyNjE1NjY=
15,429
BUG: groupby.transform ValueError: Could not convert object to NumPy datetime
{ "avatar_url": "https://avatars.githubusercontent.com/u/10407290?v=4", "events_url": "https://api.github.com/users/stephenrauch/events{/privacy}", "followers_url": "https://api.github.com/users/stephenrauch/followers", "following_url": "https://api.github.com/users/stephenrauch/following{/other_user}", "gists_url": "https://api.github.com/users/stephenrauch/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/stephenrauch", "id": 10407290, "login": "stephenrauch", "node_id": "MDQ6VXNlcjEwNDA3Mjkw", "organizations_url": "https://api.github.com/users/stephenrauch/orgs", "received_events_url": "https://api.github.com/users/stephenrauch/received_events", "repos_url": "https://api.github.com/users/stephenrauch/repos", "site_admin": false, "starred_url": "https://api.github.com/users/stephenrauch/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/stephenrauch/subscriptions", "type": "User", "url": "https://api.github.com/users/stephenrauch" }
[ { "color": "e10c02", "default": false, "description": null, "id": 76811, "name": "Bug", "node_id": "MDU6TGFiZWw3NjgxMQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug" }, { "color": "729FCF", "default": false, "description": null, "id": 233160, "name": "Groupby", "node_id": "MDU6TGFiZWwyMzMxNjA=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Groupby" }, { "color": "009800", "default": false, "description": "Duplicate issue or pull request", "id": 40153326, "name": "Duplicate Report", "node_id": "MDU6TGFiZWw0MDE1MzMyNg==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Duplicate%20Report" } ]
closed
false
null
[]
{ "closed_at": null, "closed_issues": 2361, "created_at": "2015-02-26T19:29:05Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/1020496?v=4", "events_url": "https://api.github.com/users/jorisvandenbossche/events{/privacy}", "followers_url": "https://api.github.com/users/jorisvandenbossche/followers", "following_url": "https://api.github.com/users/jorisvandenbossche/following{/other_user}", "gists_url": "https://api.github.com/users/jorisvandenbossche/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jorisvandenbossche", "id": 1020496, "login": "jorisvandenbossche", "node_id": "MDQ6VXNlcjEwMjA0OTY=", "organizations_url": "https://api.github.com/users/jorisvandenbossche/orgs", "received_events_url": "https://api.github.com/users/jorisvandenbossche/received_events", "repos_url": "https://api.github.com/users/jorisvandenbossche/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jorisvandenbossche/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jorisvandenbossche/subscriptions", "type": "User", "url": "https://api.github.com/users/jorisvandenbossche" }, "description": "A milestone for closed or open issues for which there is no action needed (eg not a bug, just a question / discussion, nothing to resolve, wontfix, etc).\r\n\r\n", "due_on": null, "html_url": "https://github.com/pandas-dev/pandas/milestone/33", "id": 997544, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/33/labels", "node_id": "MDk6TWlsZXN0b25lOTk3NTQ0", "number": 33, "open_issues": 11, "state": "open", "title": "No action", "updated_at": "2021-11-19T17:33:16Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/33" }
1
2017-02-16T22:03:40Z
2017-02-17T14:32:59Z
2017-02-17T14:32:51Z
CONTRIBUTOR
null
#### Problem description As can be seen [here](http://stackoverflow.com/questions/42260764/pandas-timestamp-difference-in-groupby-transform), the error `ValueError: Could not convert object to NumPy datetime` is being thrown by: ```python df = DataFrame(dict(A=Timestamp('20130101'), B=np.arange(5))) result = df.groupby('A')['A'].transform(lambda x: x.max() - x.min()) ``` NOTE: I will be submitting a PR shortly. #### Output of ``pd.show_versions()`` <details> INSTALLED VERSIONS ------------------ commit: None python: 3.5.1.final.0 python-bits: 32 OS: Windows OS-release: 7 machine: AMD64 processor: Intel64 Family 6 Model 69 Stepping 1, GenuineIntel byteorder: little pandas: 0.19.2 nose: 1.3.7 pip: 8.1.2 setuptools: 18.2 Cython: None numpy: 1.12.0 dateutil: 2.6.0 pytz: 2016.6.1 </details>
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15429/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15429/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/15430
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15430/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15430/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15430/events
https://github.com/pandas-dev/pandas/pull/15430
208,264,189
MDExOlB1bGxSZXF1ZXN0MTA2NjI1OTE0
15,430
BUG: GH15429 transform result of timedelta from datetime
{ "avatar_url": "https://avatars.githubusercontent.com/u/10407290?v=4", "events_url": "https://api.github.com/users/stephenrauch/events{/privacy}", "followers_url": "https://api.github.com/users/stephenrauch/followers", "following_url": "https://api.github.com/users/stephenrauch/following{/other_user}", "gists_url": "https://api.github.com/users/stephenrauch/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/stephenrauch", "id": 10407290, "login": "stephenrauch", "node_id": "MDQ6VXNlcjEwNDA3Mjkw", "organizations_url": "https://api.github.com/users/stephenrauch/orgs", "received_events_url": "https://api.github.com/users/stephenrauch/received_events", "repos_url": "https://api.github.com/users/stephenrauch/repos", "site_admin": false, "starred_url": "https://api.github.com/users/stephenrauch/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/stephenrauch/subscriptions", "type": "User", "url": "https://api.github.com/users/stephenrauch" }
[ { "color": "e10c02", "default": false, "description": null, "id": 76811, "name": "Bug", "node_id": "MDU6TGFiZWw3NjgxMQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug" }, { "color": "729FCF", "default": false, "description": null, "id": 233160, "name": "Groupby", "node_id": "MDU6TGFiZWwyMzMxNjA=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Groupby" }, { "color": "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": "2017-05-06T10:20:19Z", "closed_issues": 987, "created_at": "2016-02-08T15:30:21Z", "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": "after 0.19.x series", "due_on": "2017-05-12T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/39", "id": 1570595, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39/labels", "node_id": "MDk6TWlsZXN0b25lMTU3MDU5NQ==", "number": 39, "open_issues": 0, "state": "closed", "title": "0.20.0", "updated_at": "2018-10-28T08:18:42Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39" }
9
2017-02-16T22:13:26Z
2017-02-27T21:38:46Z
2017-02-27T21:38:08Z
CONTRIBUTOR
null
The transform() operation needs to return a like-indexed. To facilitate this, transform starts with a copy of the original series. Then, after the computation for each group, sets the appropriate elements of the copied series equal to the result. At that point is does a type comparison, and discovers that the timedelta is not cast-able to a datetime. - [x] closes #10972 - [x] tests added / passed - [x] passes ``git diff upstream/master | 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/15430/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15430/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/15430.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/15430", "merged_at": null, "patch_url": "https://github.com/pandas-dev/pandas/pull/15430.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/15430" }
https://api.github.com/repos/pandas-dev/pandas/issues/15431
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15431/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15431/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15431/events
https://github.com/pandas-dev/pandas/issues/15431
208,266,978
MDU6SXNzdWUyMDgyNjY5Nzg=
15,431
BUG: pd.qcut with q=1 and input with identical values
{ "avatar_url": "https://avatars.githubusercontent.com/u/15273575?v=4", "events_url": "https://api.github.com/users/luca-s/events{/privacy}", "followers_url": "https://api.github.com/users/luca-s/followers", "following_url": "https://api.github.com/users/luca-s/following{/other_user}", "gists_url": "https://api.github.com/users/luca-s/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/luca-s", "id": 15273575, "login": "luca-s", "node_id": "MDQ6VXNlcjE1MjczNTc1", "organizations_url": "https://api.github.com/users/luca-s/orgs", "received_events_url": "https://api.github.com/users/luca-s/received_events", "repos_url": "https://api.github.com/users/luca-s/repos", "site_admin": false, "starred_url": "https://api.github.com/users/luca-s/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/luca-s/subscriptions", "type": "User", "url": "https://api.github.com/users/luca-s" }
[ { "color": "e10c02", "default": false, "description": null, "id": 76811, "name": "Bug", "node_id": "MDU6TGFiZWw3NjgxMQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug" }, { "color": "02d7e1", "default": false, "description": "Concat, Merge/Join, Stack/Unstack, Explode", "id": 13098779, "name": "Reshaping", "node_id": "MDU6TGFiZWwxMzA5ODc3OQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Reshaping" }, { "color": "009800", "default": false, "description": "Duplicate issue or pull request", "id": 40153326, "name": "Duplicate Report", "node_id": "MDU6TGFiZWw0MDE1MzMyNg==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Duplicate%20Report" } ]
closed
false
null
[]
{ "closed_at": "2017-05-06T10:20:19Z", "closed_issues": 987, "created_at": "2016-02-08T15:30:21Z", "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": "after 0.19.x series", "due_on": "2017-05-12T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/39", "id": 1570595, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39/labels", "node_id": "MDk6TWlsZXN0b25lMTU3MDU5NQ==", "number": 39, "open_issues": 0, "state": "closed", "title": "0.20.0", "updated_at": "2018-10-28T08:18:42Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39" }
2
2017-02-16T22:24:42Z
2017-02-17T14:51:34Z
2017-02-17T14:45:26Z
CONTRIBUTOR
null
#### Code Sample, a copy-pastable example if possible ```python import pandas as pd >>> pd.__version__ u'0.19.2' >>> s = pd.Series([1,1,1]) >>> pd.qcut(s, 1) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/luca/.local/lib/python2.7/site-packages/pandas/tools/tile.py", line 175, in qcut precision=precision, include_lowest=True) File "/home/luca/.local/lib/python2.7/site-packages/pandas/tools/tile.py", line 194, in _bins_to_cuts raise ValueError('Bin edges must be unique: %s' % repr(bins)) ValueError: Bin edges must be unique: array([1, 1]) >>> s = pd.Series([1,1,2]) >>> pd.qcut(s, 1) 0 [1, 2] 1 [1, 2] 2 [1, 2] >>> s = pd.Series([0,1,2]) >>> pd.qcut(s, 1) 0 [0, 2] 1 [0, 2] 2 [0, 2] ``` #### Problem description If the input contains identical values pd.qcut fails even with q=1. I had a look at the [code](https://github.com/pandas-dev/pandas/blob/master/pandas/tools/tile.py#L209) and I can try to relax the check to allow this specific case to pass and avoid the exception, but then I have to make sure the code can handle a single edge. #### Expected Output ``` >>> s = pd.Series([1,1,1]) >>> pd.qcut(s, 1) 0 [0, 2] 1 [0, 2] 2 [0, 2] ``` #### Output of ``pd.show_versions()`` <details> >>> pd.show_versions() INSTALLED VERSIONS ------------------ commit: None python: 2.7.12.final.0 python-bits: 64 OS: Linux OS-release: 4.8.0-36-generic machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: en_US.UTF-8 LOCALE: None.None pandas: 0.19.2 nose: 1.3.7 pip: 8.1.1 setuptools: 32.3.1 Cython: 0.23.4 numpy: 1.12.0 scipy: 0.18.1 statsmodels: 0.6.1 xarray: None IPython: 5.1.0 sphinx: 1.5.1 patsy: 0.4.1 dateutil: 2.6.0 pytz: 2016.10 blosc: None bottleneck: None tables: None numexpr: None matplotlib: 1.5.3 openpyxl: None xlrd: None xlwt: None xlsxwriter: None lxml: None bs4: None html5lib: 0.999 httplib2: 0.9.1 apiclient: None sqlalchemy: 1.1.4 pymysql: None psycopg2: None jinja2: 2.8.1 boto: None pandas_datareader: 0.2.1 </details>
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15431/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15431/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/15432
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15432/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15432/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15432/events
https://github.com/pandas-dev/pandas/issues/15432
208,272,187
MDU6SXNzdWUyMDgyNzIxODc=
15,432
Resample convention='start' not functioning properly
{ "avatar_url": "https://avatars.githubusercontent.com/u/12938743?v=4", "events_url": "https://api.github.com/users/GrierPhillips/events{/privacy}", "followers_url": "https://api.github.com/users/GrierPhillips/followers", "following_url": "https://api.github.com/users/GrierPhillips/following{/other_user}", "gists_url": "https://api.github.com/users/GrierPhillips/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/GrierPhillips", "id": 12938743, "login": "GrierPhillips", "node_id": "MDQ6VXNlcjEyOTM4NzQz", "organizations_url": "https://api.github.com/users/GrierPhillips/orgs", "received_events_url": "https://api.github.com/users/GrierPhillips/received_events", "repos_url": "https://api.github.com/users/GrierPhillips/repos", "site_admin": false, "starred_url": "https://api.github.com/users/GrierPhillips/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/GrierPhillips/subscriptions", "type": "User", "url": "https://api.github.com/users/GrierPhillips" }
[ { "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": "resample method", "id": 74975453, "name": "Resample", "node_id": "MDU6TGFiZWw3NDk3NTQ1Mw==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Resample" } ]
closed
false
null
[]
null
1
2017-02-16T22:45:14Z
2017-07-16T15:55:34Z
2017-07-16T15:55:34Z
NONE
null
#### Code Sample, a copy-pastable example if possible ```python import pandas as pd df = pd.DataFrame({'values': [2, 3]}, index='1986-01-31', '1986-2-28') df.resample('M', convention='s').sum() ``` #### Problem description The convention argument does not seem to have any function on start on end when Month is passed as the resample period for a datetime index. #### Expected Output | |values| |------------|--| |1986-01-01|2| |1986-02-01|3| #### Actual Output | |values| |-------------|--| |1986-01-31|2| |1986-02-28|3| #### Output of ``pd.show_versions()`` <details> INSTALLED VERSIONS ------------------ commit: None python: 3.5.2.final.0 python-bits: 64 OS: Darwin OS-release: 16.3.0 machine: x86_64 processor: i386 byteorder: little LC_ALL: None LANG: en_US.UTF-8 LOCALE: en_US.UTF-8 pandas: 0.19.2 nose: 1.3.7 pip: 9.0.1 setuptools: 27.2.0 Cython: 0.25.2 numpy: 1.11.3 scipy: 0.18.1 statsmodels: 0.6.1 xarray: None IPython: 5.1.0 sphinx: 1.5.1 patsy: 0.4.1 dateutil: 2.6.0 pytz: 2016.10 blosc: None bottleneck: 1.2.0 tables: 3.3.0 numexpr: 2.6.1 matplotlib: 2.0.0 openpyxl: 2.4.1 xlrd: 1.0.0 xlwt: 1.2.0 xlsxwriter: 0.9.6 lxml: 3.7.2 bs4: 4.5.3 html5lib: None httplib2: 0.9.2 apiclient: 1.6.1 sqlalchemy: 1.1.5 pymysql: None psycopg2: 2.6.2 (dt dec pq3 ext lo64) jinja2: 2.9.4 boto: 2.45.0 pandas_datareader: None </details>
{ "+1": 1, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 1, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15432/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15432/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/15433
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15433/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15433/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15433/events
https://github.com/pandas-dev/pandas/pull/15433
208,280,140
MDExOlB1bGxSZXF1ZXN0MTA2NjM2MzIy
15,433
BUG: GH15426 timezone lost in groupby-agg with cython functions
{ "avatar_url": "https://avatars.githubusercontent.com/u/10407290?v=4", "events_url": "https://api.github.com/users/stephenrauch/events{/privacy}", "followers_url": "https://api.github.com/users/stephenrauch/followers", "following_url": "https://api.github.com/users/stephenrauch/following{/other_user}", "gists_url": "https://api.github.com/users/stephenrauch/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/stephenrauch", "id": 10407290, "login": "stephenrauch", "node_id": "MDQ6VXNlcjEwNDA3Mjkw", "organizations_url": "https://api.github.com/users/stephenrauch/orgs", "received_events_url": "https://api.github.com/users/stephenrauch/received_events", "repos_url": "https://api.github.com/users/stephenrauch/repos", "site_admin": false, "starred_url": "https://api.github.com/users/stephenrauch/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/stephenrauch/subscriptions", "type": "User", "url": "https://api.github.com/users/stephenrauch" }
[ { "color": "729FCF", "default": false, "description": null, "id": 233160, "name": "Groupby", "node_id": "MDU6TGFiZWwyMzMxNjA=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Groupby" }, { "color": "5319e7", "default": false, "description": "Timezone data dtype", "id": 60458168, "name": "Timezones", "node_id": "MDU6TGFiZWw2MDQ1ODE2OA==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Timezones" } ]
closed
false
null
[]
{ "closed_at": "2017-05-06T10:20:19Z", "closed_issues": 987, "created_at": "2016-02-08T15:30:21Z", "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": "after 0.19.x series", "due_on": "2017-05-12T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/39", "id": 1570595, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39/labels", "node_id": "MDk6TWlsZXN0b25lMTU3MDU5NQ==", "number": 39, "open_issues": 0, "state": "closed", "title": "0.20.0", "updated_at": "2018-10-28T08:18:42Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39" }
4
2017-02-16T23:19:19Z
2017-02-27T15:46:38Z
2017-02-27T15:46:31Z
CONTRIBUTOR
null
- [x] closes #15426 - [x] tests added / passed - [x] passes ``git diff upstream/master | 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/15433/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15433/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/15433.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/15433", "merged_at": null, "patch_url": "https://github.com/pandas-dev/pandas/pull/15433.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/15433" }
https://api.github.com/repos/pandas-dev/pandas/issues/15434
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15434/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15434/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15434/events
https://github.com/pandas-dev/pandas/issues/15434
208,294,019
MDU6SXNzdWUyMDgyOTQwMTk=
15,434
MultiIndex can't be indexed with an np.array
{ "avatar_url": "https://avatars.githubusercontent.com/u/1224492?v=4", "events_url": "https://api.github.com/users/toobaz/events{/privacy}", "followers_url": "https://api.github.com/users/toobaz/followers", "following_url": "https://api.github.com/users/toobaz/following{/other_user}", "gists_url": "https://api.github.com/users/toobaz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/toobaz", "id": 1224492, "login": "toobaz", "node_id": "MDQ6VXNlcjEyMjQ0OTI=", "organizations_url": "https://api.github.com/users/toobaz/orgs", "received_events_url": "https://api.github.com/users/toobaz/received_events", "repos_url": "https://api.github.com/users/toobaz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/toobaz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/toobaz/subscriptions", "type": "User", "url": "https://api.github.com/users/toobaz" }
[ { "color": "0b02e1", "default": false, "description": "Related to indexing on series/frames, not to indexes themselves", "id": 2822098, "name": "Indexing", "node_id": "MDU6TGFiZWwyODIyMDk4", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Indexing" }, { "color": "207de5", "default": false, "description": null, "id": 71268330, "name": "MultiIndex", "node_id": "MDU6TGFiZWw3MTI2ODMzMA==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/MultiIndex" }, { "color": "0052cc", "default": false, "description": "pandas objects compatability with Numpy or Python functions", "id": 76865106, "name": "Compat", "node_id": "MDU6TGFiZWw3Njg2NTEwNg==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Compat" } ]
closed
false
null
[]
{ "closed_at": "2017-05-06T10:20:19Z", "closed_issues": 987, "created_at": "2016-02-08T15:30:21Z", "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": "after 0.19.x series", "due_on": "2017-05-12T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/39", "id": 1570595, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39/labels", "node_id": "MDk6TWlsZXN0b25lMTU3MDU5NQ==", "number": 39, "open_issues": 0, "state": "closed", "title": "0.20.0", "updated_at": "2018-10-28T08:18:42Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39" }
1
2017-02-17T00:28:39Z
2017-02-20T14:44:02Z
2017-02-20T14:44:01Z
MEMBER
null
From #15425 #### Code Sample, a copy-pastable example if possible ```python In [3]: mi = pd.MultiIndex.from_product([[1, 2], ['a', 'b']]) In [4]: pd.Series(range(4)).loc[np.array([1, 2])] Out[4]: 1 1 2 2 dtype: int64 In [5]: pd.Series(range(4), index=mi).loc[np.array([1, 2])] --------------------------------------------------------------------------- TypeError Traceback (most recent call last) /home/pietro/nobackup/repo/pandas/pandas/core/indexing.py in _get_label(self, label, axis) 99 try: --> 100 return self.obj._xs(label, axis=axis) 101 except: /home/pietro/nobackup/repo/pandas/pandas/core/generic.py in xs(self, key, axis, level, drop_level) 1842 loc, new_index = self.index.get_loc_level(key, -> 1843 drop_level=drop_level) 1844 else: /home/pietro/nobackup/repo/pandas/pandas/indexes/multi.py in get_loc_level(self, key, level, drop_level) 1932 else: -> 1933 return partial_selection(key) 1934 else: /home/pietro/nobackup/repo/pandas/pandas/indexes/multi.py in partial_selection(key, indexer) 1897 if indexer is None: -> 1898 indexer = self.get_loc(key) 1899 ilevels = [i for i in range(len(key)) /home/pietro/nobackup/repo/pandas/pandas/indexes/multi.py in get_loc(self, key, method) 1807 start, stop = (self.slice_locs(lead_key, lead_key) -> 1808 if lead_key else (0, len(self))) 1809 /home/pietro/nobackup/repo/pandas/pandas/indexes/multi.py in slice_locs(self, start, end, step, kind) 1713 # happens in get_slice_bound method), but it adds meaningful doc. -> 1714 return super(MultiIndex, self).slice_locs(start, end, step, kind=kind) 1715 /home/pietro/nobackup/repo/pandas/pandas/indexes/base.py in slice_locs(self, start, end, step, kind) 3346 if start is not None: -> 3347 start_slice = self.get_slice_bound(start, 'left', kind) 3348 if start_slice is None: /home/pietro/nobackup/repo/pandas/pandas/indexes/multi.py in get_slice_bound(self, label, side, kind) 1684 label = label, -> 1685 return self._partial_tup_index(label, side=side) 1686 /home/pietro/nobackup/repo/pandas/pandas/indexes/multi.py in _partial_tup_index(self, tup, side) 1727 -> 1728 if lab not in lev: 1729 if not lev.is_type_compatible(lib.infer_dtype([lab])): /home/pietro/nobackup/repo/pandas/pandas/indexes/base.py in __contains__(self, key) 1495 def __contains__(self, key): -> 1496 hash(key) 1497 # work around some kind of odd cython bug TypeError: unhashable type: 'numpy.ndarray' During handling of the above exception, another exception occurred: TypeError Traceback (most recent call last) <ipython-input-5-bf8891f2016d> in <module>() ----> 1 pd.Series(range(4), index=mi).loc[np.array([1, 2])] /home/pietro/nobackup/repo/pandas/pandas/core/indexing.py in __getitem__(self, key) 1339 else: 1340 key = com._apply_if_callable(key, self.obj) -> 1341 return self._getitem_axis(key, axis=0) 1342 1343 def _is_scalar_access(self, key): /home/pietro/nobackup/repo/pandas/pandas/core/indexing.py in _getitem_axis(self, key, axis) 1550 # fall thru to straight lookup 1551 self._has_valid_type(key, axis) -> 1552 return self._get_label(key, axis=axis) 1553 1554 /home/pietro/nobackup/repo/pandas/pandas/core/indexing.py in _get_label(self, label, axis) 100 return self.obj._xs(label, axis=axis) 101 except: --> 102 return self.obj[label] 103 elif isinstance(label, tuple) and isinstance(label[axis], slice): 104 raise IndexingError('no slices here, handle elsewhere') /home/pietro/nobackup/repo/pandas/pandas/core/series.py in __getitem__(self, key) 645 key = check_bool_indexer(self.index, key) 646 --> 647 return self._get_with(key) 648 649 def _get_with(self, key): /home/pietro/nobackup/repo/pandas/pandas/core/series.py in _get_with(self, key) 658 if isinstance(key, tuple): 659 try: --> 660 return self._get_values_tuple(key) 661 except: 662 if len(key) == 1: /home/pietro/nobackup/repo/pandas/pandas/core/series.py in _get_values_tuple(self, key) 706 707 # If key is contained, would have returned by now --> 708 indexer, new_index = self.index.get_loc_level(key) 709 return self._constructor(self._values[indexer], 710 index=new_index).__finalize__(self) /home/pietro/nobackup/repo/pandas/pandas/indexes/multi.py in get_loc_level(self, key, level, drop_level) 1931 return partial_selection(key) 1932 else: -> 1933 return partial_selection(key) 1934 else: 1935 indexer = None /home/pietro/nobackup/repo/pandas/pandas/indexes/multi.py in partial_selection(key, indexer) 1896 def partial_selection(key, indexer=None): 1897 if indexer is None: -> 1898 indexer = self.get_loc(key) 1899 ilevels = [i for i in range(len(key)) 1900 if key[i] != slice(None, None)] /home/pietro/nobackup/repo/pandas/pandas/indexes/multi.py in get_loc(self, key, method) 1806 lead_key, follow_key = key[:i], key[i:] 1807 start, stop = (self.slice_locs(lead_key, lead_key) -> 1808 if lead_key else (0, len(self))) 1809 1810 if start == stop: /home/pietro/nobackup/repo/pandas/pandas/indexes/multi.py in slice_locs(self, start, end, step, kind) 1712 # This function adds nothing to its parent implementation (the magic 1713 # happens in get_slice_bound method), but it adds meaningful doc. -> 1714 return super(MultiIndex, self).slice_locs(start, end, step, kind=kind) 1715 1716 def _partial_tup_index(self, tup, side='left'): /home/pietro/nobackup/repo/pandas/pandas/indexes/base.py in slice_locs(self, start, end, step, kind) 3345 start_slice = None 3346 if start is not None: -> 3347 start_slice = self.get_slice_bound(start, 'left', kind) 3348 if start_slice is None: 3349 start_slice = 0 /home/pietro/nobackup/repo/pandas/pandas/indexes/multi.py in get_slice_bound(self, label, side, kind) 1683 if not isinstance(label, tuple): 1684 label = label, -> 1685 return self._partial_tup_index(label, side=side) 1686 1687 def slice_locs(self, start=None, end=None, step=None, kind=None): /home/pietro/nobackup/repo/pandas/pandas/indexes/multi.py in _partial_tup_index(self, tup, side) 1726 section = labs[start:end] 1727 -> 1728 if lab not in lev: 1729 if not lev.is_type_compatible(lib.infer_dtype([lab])): 1730 raise TypeError('Level type mismatch: %s' % lab) /home/pietro/nobackup/repo/pandas/pandas/indexes/base.py in __contains__(self, key) 1494 1495 def __contains__(self, key): -> 1496 hash(key) 1497 # work around some kind of odd cython bug 1498 try: TypeError: unhashable type: 'numpy.ndarray' ``` #### Problem description The ``array`` should be accepted as it is accepted for the (non-``Multi``)``Index`` #### Expected Output ``` python In [6]: pd.Series(range(4), index=mi).loc[np.array([1, 2])] Out[6]: 1 a 0 b 1 2 a 2 b 3 dtype: int64 ``` #### Output of ``pd.show_versions()`` <details> INSTALLED VERSIONS ------------------ commit: None python: 3.5.2.final.0 python-bits: 64 OS: Linux OS-release: 4.7.0-1-amd64 machine: x86_64 processor: byteorder: little LC_ALL: None LANG: it_IT.utf8 LOCALE: it_IT.UTF-8 pandas: 0.19.0+466.g5a8883b pytest: 3.0.6 pip: 8.1.2 setuptools: 28.0.0 Cython: 0.23.4 numpy: 1.12.0 scipy: 0.18.1 xarray: None IPython: 5.1.0.dev sphinx: 1.4.8 patsy: 0.3.0-dev dateutil: 2.5.3 pytz: 2015.7 blosc: None bottleneck: 1.2.0 tables: 3.2.2 numexpr: 2.6.0 feather: None matplotlib: 2.0.0rc2 openpyxl: 2.3.0 xlrd: 1.0.0 xlwt: 1.1.2 xlsxwriter: 0.9.3 lxml: 3.6.4 bs4: 4.5.1 html5lib: 0.999 httplib2: 0.9.1 apiclient: 1.5.2 sqlalchemy: 1.0.15 pymysql: None psycopg2: None jinja2: 2.8 s3fs: None pandas_datareader: 0.2.1 </details>
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15434/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15434/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/15435
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15435/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15435/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15435/events
https://github.com/pandas-dev/pandas/issues/15435
208,300,251
MDU6SXNzdWUyMDgzMDAyNTE=
15,435
Boolean operations in groupby objects are extremely slow compared to numpy counterpart.
{ "avatar_url": "https://avatars.githubusercontent.com/u/17755465?v=4", "events_url": "https://api.github.com/users/dsevero/events{/privacy}", "followers_url": "https://api.github.com/users/dsevero/followers", "following_url": "https://api.github.com/users/dsevero/following{/other_user}", "gists_url": "https://api.github.com/users/dsevero/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/dsevero", "id": 17755465, "login": "dsevero", "node_id": "MDQ6VXNlcjE3NzU1NDY1", "organizations_url": "https://api.github.com/users/dsevero/orgs", "received_events_url": "https://api.github.com/users/dsevero/received_events", "repos_url": "https://api.github.com/users/dsevero/repos", "site_admin": false, "starred_url": "https://api.github.com/users/dsevero/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/dsevero/subscriptions", "type": "User", "url": "https://api.github.com/users/dsevero" }
[ { "color": "729FCF", "default": false, "description": null, "id": 233160, "name": "Groupby", "node_id": "MDU6TGFiZWwyMzMxNjA=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Groupby" }, { "color": "a10c02", "default": false, "description": "Memory or execution speed performance", "id": 8935311, "name": "Performance", "node_id": "MDU6TGFiZWw4OTM1MzEx", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Performance" } ]
closed
false
null
[]
{ "closed_at": "2018-05-16T03:09:58Z", "closed_issues": 1645, "created_at": "2017-10-20T10:17:09Z", "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": "after 0.22", "due_on": "2018-05-15T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/53", "id": 2853937, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/53/labels", "node_id": "MDk6TWlsZXN0b25lMjg1MzkzNw==", "number": 53, "open_issues": 0, "state": "closed", "title": "0.23.0", "updated_at": "2018-08-20T06:48:57Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/53" }
3
2017-02-17T01:03:15Z
2018-03-01T01:30:19Z
2018-03-01T01:30:19Z
NONE
null
```python %timeit -n 10000 np.random.choice([True, False], 10000).any() %timeit -n 10000 np.random.choice([True, False], 10000).sum().astype(bool) ``` ``` 10000 loops, best of 3: 83.7 µs per loop 10000 loops, best of 3: 106 µs per loop ``` ```python import numpy as np import pandas as pd df = pd.DataFrame({ "a": np.random.randint(0,20, 10000), "b": np.random.randint(0,20, 10000), "c": np.random.choice([True, False], 10000) }) %timeit -n 100 df.groupby(["a", "b"])["c"].any() %timeit -n 100 df.groupby(["a", "b"])["c"].sum().astype(bool) ``` ``` 100 loops, best of 3: 40.9 ms per loop 100 loops, best of 3: 1.46 ms per loop ``` #### Problem description The issue here is that the `any` method for `groupby` objects seams to be freakishly slow. It is actually better to sum up all the boolean values and do a typecast with `.astype(bool)`. In numpy the operations have similar benchmarks. The method with `any` is actually faster!. <details> INSTALLED VERSIONS ------------------ commit: None python: 3.5.2.final.0 python-bits: 64 OS: Linux OS-release: 4.4.0-53-generic machine: x86_64 processor: x86_64 byteorder: little LC_ALL: en_US.UTF-8 LANG: en_US.UTF-8 LOCALE: en_US.UTF-8 pandas: 0.19.2 nose: None pip: 8.1.1 setuptools: None Cython: None numpy: 1.12.0 scipy: 0.18.1 statsmodels: None xarray: None IPython: 5.2.2 sphinx: None patsy: None dateutil: 2.6.0 pytz: 2016.10 blosc: None bottleneck: None tables: None numexpr: None matplotlib: 2.0.0 openpyxl: None xlrd: None xlwt: None xlsxwriter: None lxml: None bs4: None html5lib: 0.999 httplib2: None apiclient: None sqlalchemy: None pymysql: None psycopg2: None jinja2: 2.9.5 boto: 2.45.0 pandas_datareader: None </details>
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15435/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15435/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/15436
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15436/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15436/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15436/events
https://github.com/pandas-dev/pandas/pull/15436
208,319,082
MDExOlB1bGxSZXF1ZXN0MTA2NjU5Mjcx
15,436
Documents touch-up for DataFrame.to_excel() freeze_panes option
{ "avatar_url": "https://avatars.githubusercontent.com/u/10188148?v=4", "events_url": "https://api.github.com/users/jeffcarey/events{/privacy}", "followers_url": "https://api.github.com/users/jeffcarey/followers", "following_url": "https://api.github.com/users/jeffcarey/following{/other_user}", "gists_url": "https://api.github.com/users/jeffcarey/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jeffcarey", "id": 10188148, "login": "jeffcarey", "node_id": "MDQ6VXNlcjEwMTg4MTQ4", "organizations_url": "https://api.github.com/users/jeffcarey/orgs", "received_events_url": "https://api.github.com/users/jeffcarey/received_events", "repos_url": "https://api.github.com/users/jeffcarey/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jeffcarey/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jeffcarey/subscriptions", "type": "User", "url": "https://api.github.com/users/jeffcarey" }
[ { "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": "2017-05-06T10:20:19Z", "closed_issues": 987, "created_at": "2016-02-08T15:30:21Z", "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": "after 0.19.x series", "due_on": "2017-05-12T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/39", "id": 1570595, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39/labels", "node_id": "MDk6TWlsZXN0b25lMTU3MDU5NQ==", "number": 39, "open_issues": 0, "state": "closed", "title": "0.20.0", "updated_at": "2018-10-28T08:18:42Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39" }
1
2017-02-17T02:54:35Z
2017-02-17T08:17:39Z
2017-02-17T08:17:39Z
CONTRIBUTOR
null
Follow-up to @jorisvandenbossche 's comments on pull request #15291. Only doc strings and external documentation modified.
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15436/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15436/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/15436.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/15436", "merged_at": "2017-02-17T08:17:39Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/15436.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/15436" }
https://api.github.com/repos/pandas-dev/pandas/issues/15437
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15437/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15437/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15437/events
https://github.com/pandas-dev/pandas/pull/15437
208,459,424
MDExOlB1bGxSZXF1ZXN0MTA2NzQ0MDAy
15,437
BUG: pd.cut with bins=1 and input all 0s
{ "avatar_url": "https://avatars.githubusercontent.com/u/15273575?v=4", "events_url": "https://api.github.com/users/luca-s/events{/privacy}", "followers_url": "https://api.github.com/users/luca-s/followers", "following_url": "https://api.github.com/users/luca-s/following{/other_user}", "gists_url": "https://api.github.com/users/luca-s/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/luca-s", "id": 15273575, "login": "luca-s", "node_id": "MDQ6VXNlcjE1MjczNTc1", "organizations_url": "https://api.github.com/users/luca-s/orgs", "received_events_url": "https://api.github.com/users/luca-s/received_events", "repos_url": "https://api.github.com/users/luca-s/repos", "site_admin": false, "starred_url": "https://api.github.com/users/luca-s/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/luca-s/subscriptions", "type": "User", "url": "https://api.github.com/users/luca-s" }
[ { "color": "e10c02", "default": false, "description": null, "id": 76811, "name": "Bug", "node_id": "MDU6TGFiZWw3NjgxMQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug" }, { "color": "02d7e1", "default": false, "description": "Concat, Merge/Join, Stack/Unstack, Explode", "id": 13098779, "name": "Reshaping", "node_id": "MDU6TGFiZWwxMzA5ODc3OQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Reshaping" } ]
closed
false
null
[]
{ "closed_at": "2017-05-06T10:20:19Z", "closed_issues": 987, "created_at": "2016-02-08T15:30:21Z", "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": "after 0.19.x series", "due_on": "2017-05-12T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/39", "id": 1570595, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39/labels", "node_id": "MDk6TWlsZXN0b25lMTU3MDU5NQ==", "number": 39, "open_issues": 0, "state": "closed", "title": "0.20.0", "updated_at": "2018-10-28T08:18:42Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39" }
12
2017-02-17T14:35:00Z
2017-03-08T13:51:17Z
2017-03-08T13:43:24Z
CONTRIBUTOR
null
The special case of running pd.cut() qith bins=1 an input containing all 0s raises a ValueError - [x] closes #15428 closes #15431 - [X] tests added / passed - [X] passes ``git diff upstream/master | 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/15437/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15437/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/15437.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/15437", "merged_at": null, "patch_url": "https://github.com/pandas-dev/pandas/pull/15437.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/15437" }
https://api.github.com/repos/pandas-dev/pandas/issues/15438
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15438/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15438/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15438/events
https://github.com/pandas-dev/pandas/issues/15438
208,477,475
MDU6SXNzdWUyMDg0Nzc0NzU=
15,438
Adding support for indexing a MultiIndex with a DataFrame and/or bi-dimensional np.array
{ "avatar_url": "https://avatars.githubusercontent.com/u/1224492?v=4", "events_url": "https://api.github.com/users/toobaz/events{/privacy}", "followers_url": "https://api.github.com/users/toobaz/followers", "following_url": "https://api.github.com/users/toobaz/following{/other_user}", "gists_url": "https://api.github.com/users/toobaz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/toobaz", "id": 1224492, "login": "toobaz", "node_id": "MDQ6VXNlcjEyMjQ0OTI=", "organizations_url": "https://api.github.com/users/toobaz/orgs", "received_events_url": "https://api.github.com/users/toobaz/received_events", "repos_url": "https://api.github.com/users/toobaz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/toobaz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/toobaz/subscriptions", "type": "User", "url": "https://api.github.com/users/toobaz" }
[ { "color": "4E9A06", "default": false, "description": null, "id": 76812, "name": "Enhancement", "node_id": "MDU6TGFiZWw3NjgxMg==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Enhancement" }, { "color": "207de5", "default": false, "description": null, "id": 71268330, "name": "MultiIndex", "node_id": "MDU6TGFiZWw3MTI2ODMzMA==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/MultiIndex" }, { "color": "207de5", "default": false, "description": "Requires discussion from core team before further action", "id": 219960758, "name": "Needs Discussion", "node_id": "MDU6TGFiZWwyMTk5NjA3NTg=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Needs%20Discussion" } ]
open
false
null
[]
null
4
2017-02-17T15:41:38Z
2021-05-08T01:06:00Z
null
MEMBER
null
(From #15425 ) Currently, (non-``Multi``)``Index``es can be indexed with ``Series`` indexers. And this actually also applies to ``MultiIndex``es, of which you would be selecting from the first level. Hence, it seems a natural consequence for ``MultiIndex``es to be indexed with ``DataFrame`` indexers. Moreover, once #15434 is fixed, we will have a bi-dimensional object (``MultiIndex``) which can be indexed with ``np.array``s... but only one-dimensional ones! This is also strange. The feature per se is certainly useful. As a simple real world example, I am currently working with a ``subjects`` ``DataFrame`` to which I must attribute two columns from ``design``, another ``DataFrame``, depending on a ``group`` and ``time`` columns of ``subjects``, which are also levels of the ``MultiIndex`` of ``design``. I would like to just do ``` python subjects[design.columns] = design.loc[subjects[["group", "time"]]] ``` Now, I know this could be solved by ``.join``ing the two ``DataFrames``... but this is conceptually more complicated (I even currently ignore whether I can join one ``DataFrame`` on columns and the other on index levels... but this is OT), to the point that I'm rather doing: ```python to_mi = lambda df : df.set_index(list(df.columns)).index subjects[design.columns] = design.loc[to_mi(subjects[["group", "time"]])] ``` @jorisvandenbossche [suggests](https://github.com/pandas-dev/pandas/pull/15425#issuecomment-280500783) this feature would add complexity to indexing, _"eg, should the column names align on the level names?"_. I'm personally fine with both answers: - **Yes**: then we just use something like ``to_mi`` above (transforming a ``DataFrame`` in ``MultiIndex``, and then using it to actually index) - **No**: then it's really really simple (we just transform the ``DataFrame`` into tuples - I had actually already done this in #15425 before rolling back) "**Yes**" is probably the cleanest answer (possibly together with allowing indexing with bi-dimensional ``np.array``s, to obtain the equivalent of the "**No**" answer). In any case, once we decide, I can take care of 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/15438/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15438/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/15439
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15439/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15439/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15439/events
https://github.com/pandas-dev/pandas/pull/15439
208,484,596
MDExOlB1bGxSZXF1ZXN0MTA2NzYxNjMy
15,439
BUG: Categorical.unique() preserves categories
{ "avatar_url": "https://avatars.githubusercontent.com/u/684364?v=4", "events_url": "https://api.github.com/users/kernc/events{/privacy}", "followers_url": "https://api.github.com/users/kernc/followers", "following_url": "https://api.github.com/users/kernc/following{/other_user}", "gists_url": "https://api.github.com/users/kernc/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kernc", "id": 684364, "login": "kernc", "node_id": "MDQ6VXNlcjY4NDM2NA==", "organizations_url": "https://api.github.com/users/kernc/orgs", "received_events_url": "https://api.github.com/users/kernc/received_events", "repos_url": "https://api.github.com/users/kernc/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kernc/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kernc/subscriptions", "type": "User", "url": "https://api.github.com/users/kernc" }
[ { "color": "729FCF", "default": false, "description": null, "id": 233160, "name": "Groupby", "node_id": "MDU6TGFiZWwyMzMxNjA=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Groupby" }, { "color": "e11d21", "default": false, "description": "Categorical Data Type", "id": 78527356, "name": "Categorical", "node_id": "MDU6TGFiZWw3ODUyNzM1Ng==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Categorical" } ]
closed
false
null
[]
{ "closed_at": "2017-05-06T10:20:19Z", "closed_issues": 987, "created_at": "2016-02-08T15:30:21Z", "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": "after 0.19.x series", "due_on": "2017-05-12T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/39", "id": 1570595, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39/labels", "node_id": "MDk6TWlsZXN0b25lMTU3MDU5NQ==", "number": 39, "open_issues": 0, "state": "closed", "title": "0.20.0", "updated_at": "2018-10-28T08:18:42Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39" }
6
2017-02-17T16:06:45Z
2017-02-22T18:55:31Z
2017-02-22T18:50:40Z
CONTRIBUTOR
null
- [X] closes #13179 - [x] tests added / passed - [X] passes ``git diff upstream/master | 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/15439/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15439/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/15439.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/15439", "merged_at": null, "patch_url": "https://github.com/pandas-dev/pandas/pull/15439.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/15439" }
https://api.github.com/repos/pandas-dev/pandas/issues/15440
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15440/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15440/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15440/events
https://github.com/pandas-dev/pandas/issues/15440
208,494,657
MDU6SXNzdWUyMDg0OTQ2NTc=
15,440
Adding Timedelta parameter to time-based .rolling()
{ "avatar_url": "https://avatars.githubusercontent.com/u/453745?v=4", "events_url": "https://api.github.com/users/chrisaycock/events{/privacy}", "followers_url": "https://api.github.com/users/chrisaycock/followers", "following_url": "https://api.github.com/users/chrisaycock/following{/other_user}", "gists_url": "https://api.github.com/users/chrisaycock/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/chrisaycock", "id": 453745, "login": "chrisaycock", "node_id": "MDQ6VXNlcjQ1Mzc0NQ==", "organizations_url": "https://api.github.com/users/chrisaycock/orgs", "received_events_url": "https://api.github.com/users/chrisaycock/received_events", "repos_url": "https://api.github.com/users/chrisaycock/repos", "site_admin": false, "starred_url": "https://api.github.com/users/chrisaycock/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/chrisaycock/subscriptions", "type": "User", "url": "https://api.github.com/users/chrisaycock" }
[ { "color": "e10c02", "default": false, "description": null, "id": 76811, "name": "Bug", "node_id": "MDU6TGFiZWw3NjgxMQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug" }, { "color": "02d7e1", "default": false, "description": "Concat, Merge/Join, Stack/Unstack, Explode", "id": 13098779, "name": "Reshaping", "node_id": "MDU6TGFiZWwxMzA5ODc3OQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Reshaping" }, { "color": "0052cc", "default": false, "description": "DateOffsets", "id": 53181044, "name": "Frequency", "node_id": "MDU6TGFiZWw1MzE4MTA0NA==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Frequency" } ]
closed
false
null
[]
{ "closed_at": "2017-05-06T10:20:19Z", "closed_issues": 987, "created_at": "2016-02-08T15:30:21Z", "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": "after 0.19.x series", "due_on": "2017-05-12T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/39", "id": 1570595, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39/labels", "node_id": "MDk6TWlsZXN0b25lMTU3MDU5NQ==", "number": 39, "open_issues": 0, "state": "closed", "title": "0.20.0", "updated_at": "2018-10-28T08:18:42Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39" }
6
2017-02-17T16:42:36Z
2017-03-05T21:26:00Z
2017-02-18T12:08:54Z
CONTRIBUTOR
null
Starting with a simple DataFrame: ```python n = 10 df = pd.DataFrame({'value': np.arange(n)}, index=pd.date_range('2015-12-24', periods=n, freq="D")) ``` I can invoke a time-based `.rolling()` with a string for the offset: ```python df.rolling('3d').sum() ``` I would like to invoke it with a `Timedelta` since it is easier to arithmetically change the window length: ```python df.rolling(pd.Timedelta(days=3)).sum() ```
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15440/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15440/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/15441
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15441/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15441/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15441/events
https://github.com/pandas-dev/pandas/issues/15441
208,506,199
MDU6SXNzdWUyMDg1MDYxOTk=
15,441
[ENH] read_table(usecols = int | str) to produce squeezed Series
{ "avatar_url": "https://avatars.githubusercontent.com/u/8426290?v=4", "events_url": "https://api.github.com/users/DSLituiev/events{/privacy}", "followers_url": "https://api.github.com/users/DSLituiev/followers", "following_url": "https://api.github.com/users/DSLituiev/following{/other_user}", "gists_url": "https://api.github.com/users/DSLituiev/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/DSLituiev", "id": 8426290, "login": "DSLituiev", "node_id": "MDQ6VXNlcjg0MjYyOTA=", "organizations_url": "https://api.github.com/users/DSLituiev/orgs", "received_events_url": "https://api.github.com/users/DSLituiev/received_events", "repos_url": "https://api.github.com/users/DSLituiev/repos", "site_admin": false, "starred_url": "https://api.github.com/users/DSLituiev/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/DSLituiev/subscriptions", "type": "User", "url": "https://api.github.com/users/DSLituiev" }
[ { "color": "AD7FA8", "default": false, "description": null, "id": 35818298, "name": "API Design", "node_id": "MDU6TGFiZWwzNTgxODI5OA==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/API%20Design" }, { "color": "5319e7", "default": false, "description": "read_csv, to_csv", "id": 47229171, "name": "IO CSV", "node_id": "MDU6TGFiZWw0NzIyOTE3MQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20CSV" } ]
closed
false
null
[]
{ "closed_at": 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
2017-02-17T17:28:07Z
2018-07-06T20:21:16Z
2017-02-18T14:22:16Z
NONE
null
#### Problem description This is a feature request for usecols to accept integer value and string. If integer/string is provided, flag `squeeze` is to be turned on, thus producing a Series. #### Rationale + consistency with `index_col` which accepts both integer/string and lists + shortcut #### Expected Output ```python # test testfile = "pandas/tests/io/data/tips.csv" df = pd.read_table(testfile, sep=",", usecols="tip") assert isinstance(df, pd.Series) df = pd.read_table(testfile, sep=",", usecols=2) assert isinstance(df, pd.Series) df = pd.read_table(testfile, sep=",", usecols=[2]) assert isinstance(df, pd.DataFrame) ``` #### Output of ``pd.show_versions()`` <details> INSTALLED VERSIONS ------------------ commit: None python: 3.3.2.final.0 python-bits: 64 OS: Linux OS-release: 2.6.32-642.13.1.el6.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.19.0 nose: 1.3.0 pip: 8.1.2 setuptools: 20.9.0 Cython: 0.25.1 numpy: 1.11.2 scipy: 0.18.0 statsmodels: 0.6.1 xarray: None IPython: 5.0.0.dev sphinx: None patsy: 0.4.1 dateutil: 2.5.3 pytz: 2016.6.1 blosc: None bottleneck: None tables: 3.3.1-dev0 numexpr: 2.6.1 matplotlib: 1.5.1 openpyxl: None xlrd: None xlwt: None xlsxwriter: None lxml: None bs4: 4.4.1 html5lib: None httplib2: 0.9.2 apiclient: None sqlalchemy: None pymysql: None psycopg2: None jinja2: 2.8 boto: None pandas_datareader: None </details>
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15441/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15441/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/15442
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15442/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15442/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15442/events
https://github.com/pandas-dev/pandas/issues/15442
208,514,619
MDU6SXNzdWUyMDg1MTQ2MTk=
15,442
COMPAT: .unique() should be type preserving
{ "avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4", "events_url": "https://api.github.com/users/jreback/events{/privacy}", "followers_url": "https://api.github.com/users/jreback/followers", "following_url": "https://api.github.com/users/jreback/following{/other_user}", "gists_url": "https://api.github.com/users/jreback/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jreback", "id": 953992, "login": "jreback", "node_id": "MDQ6VXNlcjk1Mzk5Mg==", "organizations_url": "https://api.github.com/users/jreback/orgs", "received_events_url": "https://api.github.com/users/jreback/received_events", "repos_url": "https://api.github.com/users/jreback/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jreback/subscriptions", "type": "User", "url": "https://api.github.com/users/jreback" }
[ { "color": "0e8a16", "default": true, "description": null, "id": 717120670, "name": "good first issue", "node_id": "MDU6TGFiZWw3MTcxMjA2NzA=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/good%20first%20issue" }, { "color": "cdea3c", "default": false, "description": "Unit test(s) needed to prevent regressions", "id": 986278782, "name": "Needs Tests", "node_id": "MDU6TGFiZWw5ODYyNzg3ODI=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Needs%20Tests" } ]
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
2017-02-17T18:04:14Z
2019-11-14T14:47:49Z
2019-11-14T14:47:49Z
CONTRIBUTOR
null
xref https://github.com/pandas-dev/pandas/pull/15439/files#r101811209 ``` In [1]: Series([1, 2, 2], dtype='int8').unique() Out[1]: array([1, 2]) In [3]: Series([1, 2, 2], dtype='int32').unique() Out[3]: array([1, 2]) In [4]: Series([1, 2, 2], dtype='int64').unique() Out[4]: array([1, 2]) In [5]: Series([1, 2, 2], dtype='float32').unique() Out[5]: array([ 1., 2.]) ``` these should all be the original dtype. We only create hashtables (and use them in unique) for ``int64``, ``float64`` and ``uint64``, should do this for other dtypes. https://github.com/pandas-dev/pandas/blob/master/pandas/src/hashtable_class_helper.pxi.in#L222 I thought there was an issue about this, but guess not.
{ "+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/15442/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15442/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/15443
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15443/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15443/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15443/events
https://github.com/pandas-dev/pandas/pull/15443
208,542,241
MDExOlB1bGxSZXF1ZXN0MTA2ODAyNzEx
15,443
BUG: rolling not accepting Timedelta-like window args (#15440)
{ "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": "02d7e1", "default": false, "description": "Concat, Merge/Join, Stack/Unstack, Explode", "id": 13098779, "name": "Reshaping", "node_id": "MDU6TGFiZWwxMzA5ODc3OQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Reshaping" }, { "color": "5319e7", "default": false, "description": "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": "2017-05-06T10:20:19Z", "closed_issues": 987, "created_at": "2016-02-08T15:30:21Z", "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": "after 0.19.x series", "due_on": "2017-05-12T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/39", "id": 1570595, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39/labels", "node_id": "MDk6TWlsZXN0b25lMTU3MDU5NQ==", "number": 39, "open_issues": 0, "state": "closed", "title": "0.20.0", "updated_at": "2018-10-28T08:18:42Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39" }
6
2017-02-17T20:05:22Z
2017-12-20T02:04:10Z
2017-02-18T12:08:54Z
MEMBER
null
- [x] closes #15440 - [x] tests added / passed - [x] passes ``git diff upstream/master | flake8 --diff`` - [x] whatsnew entry Allow `rolling()` to accept `pd.Timedelta` or `datetime.timedelta` as a `window` argument.
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15443/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15443/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/15443.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/15443", "merged_at": "2017-02-18T12:08:54Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/15443.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/15443" }
https://api.github.com/repos/pandas-dev/pandas/issues/15444
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15444/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15444/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15444/events
https://github.com/pandas-dev/pandas/pull/15444
208,542,278
MDExOlB1bGxSZXF1ZXN0MTA2ODAyNzM1
15,444
Add __copy__ and __deepcopy__ to NDFrame
{ "avatar_url": "https://avatars.githubusercontent.com/u/1190540?v=4", "events_url": "https://api.github.com/users/bmcfee/events{/privacy}", "followers_url": "https://api.github.com/users/bmcfee/followers", "following_url": "https://api.github.com/users/bmcfee/following{/other_user}", "gists_url": "https://api.github.com/users/bmcfee/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/bmcfee", "id": 1190540, "login": "bmcfee", "node_id": "MDQ6VXNlcjExOTA1NDA=", "organizations_url": "https://api.github.com/users/bmcfee/orgs", "received_events_url": "https://api.github.com/users/bmcfee/received_events", "repos_url": "https://api.github.com/users/bmcfee/repos", "site_admin": false, "starred_url": "https://api.github.com/users/bmcfee/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/bmcfee/subscriptions", "type": "User", "url": "https://api.github.com/users/bmcfee" }
[ { "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": "0052cc", "default": false, "description": "pandas objects compatability with Numpy or Python functions", "id": 76865106, "name": "Compat", "node_id": "MDU6TGFiZWw3Njg2NTEwNg==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Compat" } ]
closed
false
null
[]
{ "closed_at": "2017-05-06T10:20:19Z", "closed_issues": 987, "created_at": "2016-02-08T15:30:21Z", "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": "after 0.19.x series", "due_on": "2017-05-12T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/39", "id": 1570595, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39/labels", "node_id": "MDk6TWlsZXN0b25lMTU3MDU5NQ==", "number": 39, "open_issues": 0, "state": "closed", "title": "0.20.0", "updated_at": "2018-10-28T08:18:42Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39" }
15
2017-02-17T20:05:32Z
2017-02-20T19:24:40Z
2017-02-20T19:24:11Z
CONTRIBUTOR
null
- [ ] closes #15370 - [ ] tests added / passed - [ ] passes ``git diff upstream/master | 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/15444/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15444/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/15444.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/15444", "merged_at": null, "patch_url": "https://github.com/pandas-dev/pandas/pull/15444.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/15444" }
https://api.github.com/repos/pandas-dev/pandas/issues/15445
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15445/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15445/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15445/events
https://github.com/pandas-dev/pandas/pull/15445
208,544,937
MDExOlB1bGxSZXF1ZXN0MTA2ODA0NjQ5
15,445
BUG: testing on windows
{ "avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4", "events_url": "https://api.github.com/users/jreback/events{/privacy}", "followers_url": "https://api.github.com/users/jreback/followers", "following_url": "https://api.github.com/users/jreback/following{/other_user}", "gists_url": "https://api.github.com/users/jreback/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jreback", "id": 953992, "login": "jreback", "node_id": "MDQ6VXNlcjk1Mzk5Mg==", "organizations_url": "https://api.github.com/users/jreback/orgs", "received_events_url": "https://api.github.com/users/jreback/received_events", "repos_url": "https://api.github.com/users/jreback/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jreback/subscriptions", "type": "User", "url": "https://api.github.com/users/jreback" }
[ { "color": "C4A000", "default": false, "description": "pandas testing functions or related to the test suite", "id": 127685, "name": "Testing", "node_id": "MDU6TGFiZWwxMjc2ODU=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Testing" }, { "color": "fbca04", "default": false, "description": "Windows OS", "id": 57186974, "name": "Windows", "node_id": "MDU6TGFiZWw1NzE4Njk3NA==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Windows" } ]
closed
false
null
[]
{ "closed_at": "2017-05-06T10:20:19Z", "closed_issues": 987, "created_at": "2016-02-08T15:30:21Z", "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": "after 0.19.x series", "due_on": "2017-05-12T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/39", "id": 1570595, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39/labels", "node_id": "MDk6TWlsZXN0b25lMTU3MDU5NQ==", "number": 39, "open_issues": 0, "state": "closed", "title": "0.20.0", "updated_at": "2018-10-28T08:18:42Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39" }
1
2017-02-17T20:17:43Z
2020-04-01T20:21:34Z
2017-02-18T17:05:35Z
CONTRIBUTOR
null
- we are passing builds which actually have an error - fix the small dtype issue
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15445/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15445/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/15445.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/15445", "merged_at": null, "patch_url": "https://github.com/pandas-dev/pandas/pull/15445.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/15445" }
https://api.github.com/repos/pandas-dev/pandas/issues/15446
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15446/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15446/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15446/events
https://github.com/pandas-dev/pandas/issues/15446
208,552,971
MDU6SXNzdWUyMDg1NTI5NzE=
15,446
Should str.replace accept a compiled expression?
{ "avatar_url": "https://avatars.githubusercontent.com/u/5758789?v=4", "events_url": "https://api.github.com/users/gwerbin/events{/privacy}", "followers_url": "https://api.github.com/users/gwerbin/followers", "following_url": "https://api.github.com/users/gwerbin/following{/other_user}", "gists_url": "https://api.github.com/users/gwerbin/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/gwerbin", "id": 5758789, "login": "gwerbin", "node_id": "MDQ6VXNlcjU3NTg3ODk=", "organizations_url": "https://api.github.com/users/gwerbin/orgs", "received_events_url": "https://api.github.com/users/gwerbin/received_events", "repos_url": "https://api.github.com/users/gwerbin/repos", "site_admin": false, "starred_url": "https://api.github.com/users/gwerbin/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gwerbin/subscriptions", "type": "User", "url": "https://api.github.com/users/gwerbin" }
[ { "color": "4E9A06", "default": false, "description": null, "id": 76812, "name": "Enhancement", "node_id": "MDU6TGFiZWw3NjgxMg==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Enhancement" }, { "color": "AD7FA8", "default": false, "description": null, "id": 35818298, "name": "API Design", "node_id": "MDU6TGFiZWwzNTgxODI5OA==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/API%20Design" }, { "color": "5319e7", "default": false, "description": "String extension data type and string data", "id": 57522093, "name": "Strings", "node_id": "MDU6TGFiZWw1NzUyMjA5Mw==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Strings" } ]
closed
false
null
[]
{ "closed_at": "2017-05-06T10:20:19Z", "closed_issues": 987, "created_at": "2016-02-08T15:30:21Z", "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": "after 0.19.x series", "due_on": "2017-05-12T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/39", "id": 1570595, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39/labels", "node_id": "MDk6TWlsZXN0b25lMTU3MDU5NQ==", "number": 39, "open_issues": 0, "state": "closed", "title": "0.20.0", "updated_at": "2018-10-28T08:18:42Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39" }
4
2017-02-17T20:55:17Z
2017-03-06T00:16:20Z
2017-03-05T11:23:58Z
NONE
null
The current solution is to call `str.replace(<compiled_re>.pattern, flags=<compiled_re>.flags)` which is relatively ugly and verbose in my opnion. Here's a contrived example of removing stopwords and normalizing whitespace afterwards: ```python import pandas as pd import re some_names = pd.Series(["three weddings and a funeral", "the big lebowski", "florence and the machine"]) stopwords = ["the", "a", "and"] stopwords_re = re.compile(r"(\s+)?\b({})\b(\s+)?".format("|".join(stopwords), re.IGNORECASE) whitespace_re = re.compile(r"\s+") # desired code: # some_names.str.replace(stopwords_re, " ").str.strip().str.replace(whitespace_re, " ") # actual code: some_names.\ str.replace(stopwords_re.pattern, " ", flags=stopwords_re.flags).\ str.strip().str.replace(whitespace_re.pattern, " ", flags=whitespace_re.flags) ``` Why do I think this is better? 1. It's [nice](http://stackoverflow.com/a/453568/2954547) to have commonly used regular expressions compiled and to carry their flags around with them (and also allows the use of ["verbose" regular expressions](http://stackoverflow.com/a/29159014/2954547)) 2. It's not that compiled regular expressions should quack like strings... it's that in this case we're making strings quack like compiled regular expressions, but at the same time not letting those compiled regular expressions quack their own quack. Is there a good reason _not_ to implement 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/15446/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15446/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/15447
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15447/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15447/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15447/events
https://github.com/pandas-dev/pandas/issues/15447
208,568,401
MDU6SXNzdWUyMDg1Njg0MDE=
15,447
Wrong result of pandas.sparse.series.SparseSeries.loc with indexer of length 1
{ "avatar_url": "https://avatars.githubusercontent.com/u/1224492?v=4", "events_url": "https://api.github.com/users/toobaz/events{/privacy}", "followers_url": "https://api.github.com/users/toobaz/followers", "following_url": "https://api.github.com/users/toobaz/following{/other_user}", "gists_url": "https://api.github.com/users/toobaz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/toobaz", "id": 1224492, "login": "toobaz", "node_id": "MDQ6VXNlcjEyMjQ0OTI=", "organizations_url": "https://api.github.com/users/toobaz/orgs", "received_events_url": "https://api.github.com/users/toobaz/received_events", "repos_url": "https://api.github.com/users/toobaz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/toobaz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/toobaz/subscriptions", "type": "User", "url": "https://api.github.com/users/toobaz" }
[ { "color": "e10c02", "default": false, "description": null, "id": 76811, "name": "Bug", "node_id": "MDU6TGFiZWw3NjgxMQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug" }, { "color": "0b02e1", "default": false, "description": "Related to indexing on series/frames, not to indexes themselves", "id": 2822098, "name": "Indexing", "node_id": "MDU6TGFiZWwyODIyMDk4", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Indexing" }, { "color": "009800", "default": false, "description": "Sparse Data Type", "id": 49182326, "name": "Sparse", "node_id": "MDU6TGFiZWw0OTE4MjMyNg==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Sparse" }, { "color": "207de5", "default": false, "description": null, "id": 71268330, "name": "MultiIndex", "node_id": "MDU6TGFiZWw3MTI2ODMzMA==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/MultiIndex" } ]
closed
false
null
[]
{ "closed_at": "2017-05-06T10:20:19Z", "closed_issues": 987, "created_at": "2016-02-08T15:30:21Z", "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": "after 0.19.x series", "due_on": "2017-05-12T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/39", "id": 1570595, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39/labels", "node_id": "MDk6TWlsZXN0b25lMTU3MDU5NQ==", "number": 39, "open_issues": 0, "state": "closed", "title": "0.20.0", "updated_at": "2018-10-28T08:18:42Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39" }
1
2017-02-17T21:55:02Z
2017-03-07T21:17:20Z
2017-03-07T21:17:20Z
MEMBER
null
#### Code Sample, a copy-pastable example if possible ```python In [3]: idx = pd.MultiIndex.from_tuples([('A', 0), ('A', 1), ('B', 0), ('C', 0), ('C', 1)]) In [4]: orig = pd.Series([1, np.nan, np.nan, 3, np.nan], index=idx) In [5]: sparse = orig.to_sparse() In [6]: sparse.loc[['A']] Out[6]: A NaN dtype: float64 BlockIndex Block locations: array([], dtype=int32) Block lengths: array([], dtype=int32) ``` #### Problem description It should return as below #### Expected Output ``` python In [7]: orig.loc[['A']].to_sparse() Out[7]: A 0 1.0 1 NaN dtype: float64 BlockIndex Block locations: array([0], dtype=int32) Block lengths: array([1], dtype=int32) ``` #### Output of ``pd.show_versions()`` INSTALLED VERSIONS ------------------ commit: f65a6415f15d438432cc6954ead61b052c5d4d60 python: 3.5.2.final.0 python-bits: 64 OS: Linux OS-release: 4.7.0-1-amd64 machine: x86_64 processor: byteorder: little LC_ALL: None LANG: it_IT.utf8 LOCALE: it_IT.UTF-8 pandas: 0.19.0+473.gf65a641 pytest: 3.0.6 pip: 8.1.2 setuptools: 28.0.0 Cython: 0.23.4 numpy: 1.12.0 scipy: 0.18.1 xarray: None IPython: 5.1.0.dev sphinx: 1.4.8 patsy: 0.3.0-dev dateutil: 2.5.3 pytz: 2015.7 blosc: None bottleneck: 1.2.0 tables: 3.2.2 numexpr: 2.6.0 feather: None matplotlib: 2.0.0rc2 openpyxl: 2.3.0 xlrd: 1.0.0 xlwt: 1.1.2 xlsxwriter: 0.9.3 lxml: 3.6.4 bs4: 4.5.1 html5lib: 0.999 httplib2: 0.9.1 apiclient: 1.5.2 sqlalchemy: 1.0.15 pymysql: None psycopg2: None jinja2: 2.8 s3fs: None pandas_datareader: 0.2.1 </details>
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15447/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15447/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/15448
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15448/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15448/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15448/events
https://github.com/pandas-dev/pandas/pull/15448
208,573,492
MDExOlB1bGxSZXF1ZXN0MTA2ODIzMjk2
15,448
BUG: Trivial fix to #15447
{ "avatar_url": "https://avatars.githubusercontent.com/u/1224492?v=4", "events_url": "https://api.github.com/users/toobaz/events{/privacy}", "followers_url": "https://api.github.com/users/toobaz/followers", "following_url": "https://api.github.com/users/toobaz/following{/other_user}", "gists_url": "https://api.github.com/users/toobaz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/toobaz", "id": 1224492, "login": "toobaz", "node_id": "MDQ6VXNlcjEyMjQ0OTI=", "organizations_url": "https://api.github.com/users/toobaz/orgs", "received_events_url": "https://api.github.com/users/toobaz/received_events", "repos_url": "https://api.github.com/users/toobaz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/toobaz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/toobaz/subscriptions", "type": "User", "url": "https://api.github.com/users/toobaz" }
[]
closed
false
null
[]
null
3
2017-02-17T22:20:36Z
2017-02-21T01:01:29Z
2017-02-17T22:32:24Z
MEMBER
null
- [x] closes #15447 - [ ] tests added / passed - [x] passes ``git diff upstream/master | flake8 --diff`` - [ ] whatsnew entry This is not really meant for merging because I don't understand that piece code and don't have time to understand it. But if you want to merge it anyway I can add a test and a whatsnew entry.
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15448/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15448/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/15448.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/15448", "merged_at": null, "patch_url": "https://github.com/pandas-dev/pandas/pull/15448.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/15448" }
https://api.github.com/repos/pandas-dev/pandas/issues/15449
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15449/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15449/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15449/events
https://github.com/pandas-dev/pandas/pull/15449
208,577,688
MDExOlB1bGxSZXF1ZXN0MTA2ODI2NDI4
15,449
Week Start/End Resamping: WS/WE frequencies
{ "avatar_url": "https://avatars.githubusercontent.com/u/780934?v=4", "events_url": "https://api.github.com/users/aiguofer/events{/privacy}", "followers_url": "https://api.github.com/users/aiguofer/followers", "following_url": "https://api.github.com/users/aiguofer/following{/other_user}", "gists_url": "https://api.github.com/users/aiguofer/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/aiguofer", "id": 780934, "login": "aiguofer", "node_id": "MDQ6VXNlcjc4MDkzNA==", "organizations_url": "https://api.github.com/users/aiguofer/orgs", "received_events_url": "https://api.github.com/users/aiguofer/received_events", "repos_url": "https://api.github.com/users/aiguofer/repos", "site_admin": false, "starred_url": "https://api.github.com/users/aiguofer/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/aiguofer/subscriptions", "type": "User", "url": "https://api.github.com/users/aiguofer" }
[ { "color": "0052cc", "default": false, "description": "DateOffsets", "id": 53181044, "name": "Frequency", "node_id": "MDU6TGFiZWw1MzE4MTA0NA==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Frequency" } ]
closed
false
null
[]
null
6
2017-02-17T22:43:49Z
2019-04-29T17:28:32Z
2017-05-13T21:37:43Z
CONTRIBUTOR
null
This is just some initial work to start the conversation. - [ ] closes #7049 - [ ] tests added / passed - [ ] passes ``git diff upstream/master | 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/15449/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15449/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/15449.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/15449", "merged_at": null, "patch_url": "https://github.com/pandas-dev/pandas/pull/15449.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/15449" }
https://api.github.com/repos/pandas-dev/pandas/issues/15450
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15450/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15450/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15450/events
https://github.com/pandas-dev/pandas/pull/15450
208,578,956
MDExOlB1bGxSZXF1ZXN0MTA2ODI3Mzgx
15,450
DOC: correct rpy2 examples (GH15142)
{ "avatar_url": "https://avatars.githubusercontent.com/u/1020496?v=4", "events_url": "https://api.github.com/users/jorisvandenbossche/events{/privacy}", "followers_url": "https://api.github.com/users/jorisvandenbossche/followers", "following_url": "https://api.github.com/users/jorisvandenbossche/following{/other_user}", "gists_url": "https://api.github.com/users/jorisvandenbossche/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jorisvandenbossche", "id": 1020496, "login": "jorisvandenbossche", "node_id": "MDQ6VXNlcjEwMjA0OTY=", "organizations_url": "https://api.github.com/users/jorisvandenbossche/orgs", "received_events_url": "https://api.github.com/users/jorisvandenbossche/received_events", "repos_url": "https://api.github.com/users/jorisvandenbossche/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jorisvandenbossche/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jorisvandenbossche/subscriptions", "type": "User", "url": "https://api.github.com/users/jorisvandenbossche" }
[ { "color": "3465A4", "default": false, "description": null, "id": 134699, "name": "Docs", "node_id": "MDU6TGFiZWwxMzQ2OTk=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Docs" } ]
closed
false
null
[]
{ "closed_at": "2017-05-06T10:20:19Z", "closed_issues": 987, "created_at": "2016-02-08T15:30:21Z", "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": "after 0.19.x series", "due_on": "2017-05-12T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/39", "id": 1570595, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39/labels", "node_id": "MDk6TWlsZXN0b25lMTU3MDU5NQ==", "number": 39, "open_issues": 0, "state": "closed", "title": "0.20.0", "updated_at": "2018-10-28T08:18:42Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39" }
2
2017-02-17T22:51:06Z
2018-04-10T11:35:37Z
2017-02-18T10:52:02Z
MEMBER
null
To fix the current doc build errors (https://github.com/pandas-dev/pandas/pull/15142#issuecomment-274346255)
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15450/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15450/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/15450.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/15450", "merged_at": "2017-02-18T10:52:02Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/15450.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/15450" }
https://api.github.com/repos/pandas-dev/pandas/issues/15451
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15451/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15451/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15451/events
https://github.com/pandas-dev/pandas/pull/15451
208,610,514
MDExOlB1bGxSZXF1ZXN0MTA2ODQ3MDcy
15,451
DOC: Link CONTRIBUTING.md to contributing.rst
{ "avatar_url": "https://avatars.githubusercontent.com/u/9273653?v=4", "events_url": "https://api.github.com/users/gfyoung/events{/privacy}", "followers_url": "https://api.github.com/users/gfyoung/followers", "following_url": "https://api.github.com/users/gfyoung/following{/other_user}", "gists_url": "https://api.github.com/users/gfyoung/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/gfyoung", "id": 9273653, "login": "gfyoung", "node_id": "MDQ6VXNlcjkyNzM2NTM=", "organizations_url": "https://api.github.com/users/gfyoung/orgs", "received_events_url": "https://api.github.com/users/gfyoung/received_events", "repos_url": "https://api.github.com/users/gfyoung/repos", "site_admin": false, "starred_url": "https://api.github.com/users/gfyoung/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gfyoung/subscriptions", "type": "User", "url": "https://api.github.com/users/gfyoung" }
[ { "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": "2017-05-06T10:20:19Z", "closed_issues": 987, "created_at": "2016-02-08T15:30:21Z", "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": "after 0.19.x series", "due_on": "2017-05-12T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/39", "id": 1570595, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39/labels", "node_id": "MDk6TWlsZXN0b25lMTU3MDU5NQ==", "number": 39, "open_issues": 0, "state": "closed", "title": "0.20.0", "updated_at": "2018-10-28T08:18:42Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39" }
1
2017-02-18T04:00:31Z
2017-02-21T22:26:13Z
2017-02-21T22:26:04Z
MEMBER
null
Cuts down `CONTRIBUTING.md` to summarize `contributing.rst` and links to relevant sections. Closes #15349.
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15451/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15451/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/15451.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/15451", "merged_at": "2017-02-21T22:26:04Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/15451.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/15451" }
https://api.github.com/repos/pandas-dev/pandas/issues/15452
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15452/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15452/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15452/events
https://github.com/pandas-dev/pandas/issues/15452
208,614,084
MDU6SXNzdWUyMDg2MTQwODQ=
15,452
Incoherence between Index and MultiIndex when labels in list are not found
{ "avatar_url": "https://avatars.githubusercontent.com/u/1224492?v=4", "events_url": "https://api.github.com/users/toobaz/events{/privacy}", "followers_url": "https://api.github.com/users/toobaz/followers", "following_url": "https://api.github.com/users/toobaz/following{/other_user}", "gists_url": "https://api.github.com/users/toobaz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/toobaz", "id": 1224492, "login": "toobaz", "node_id": "MDQ6VXNlcjEyMjQ0OTI=", "organizations_url": "https://api.github.com/users/toobaz/orgs", "received_events_url": "https://api.github.com/users/toobaz/received_events", "repos_url": "https://api.github.com/users/toobaz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/toobaz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/toobaz/subscriptions", "type": "User", "url": "https://api.github.com/users/toobaz" }
[ { "color": "0e8a16", "default": true, "description": null, "id": 717120670, "name": "good first issue", "node_id": "MDU6TGFiZWw3MTcxMjA2NzA=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/good%20first%20issue" }, { "color": "cdea3c", "default": false, "description": "Unit test(s) needed to prevent regressions", "id": 986278782, "name": "Needs Tests", "node_id": "MDU6TGFiZWw5ODYyNzg3ODI=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Needs%20Tests" } ]
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" }
14
2017-02-18T05:22:09Z
2021-05-24T18:55:28Z
2021-05-24T18:55:28Z
MEMBER
null
#### Code Sample, a copy-pastable example if possible ```python In [2]: s = pd.Series(range(4), index=pd.MultiIndex.from_product([[1,2], ['a', 'b']])) In [3]: s.loc[['not', 'found']] Out[3]: Series([], dtype: int64) ``` #### Problem description With regular ``Index``es, looking for a list of labels of which none is present will raise ``KeyError`` (see below). We should be coherent (and while I would prefer the empty result to the exception, this was already discussed in #7999). #### Expected Output Compare to ``` python In [4]: s.reset_index().loc[['not', 'found']] --------------------------------------------------------------------------- KeyError Traceback (most recent call last) <ipython-input-4-e13655430320> in <module>() ----> 1 s.reset_index().loc[['not', 'found']] /home/nobackup/repo/pandas/pandas/core/indexing.py in __getitem__(self, key) 1339 else: 1340 key = com._apply_if_callable(key, self.obj) -> 1341 return self._getitem_axis(key, axis=0) 1342 1343 def _is_scalar_access(self, key): /home/nobackup/repo/pandas/pandas/core/indexing.py in _getitem_axis(self, key, axis) 1539 raise ValueError('Cannot index with multidimensional key') 1540 -> 1541 return self._getitem_iterable(key, axis=axis) 1542 1543 # nested tuple slicing /home/nobackup/repo/pandas/pandas/core/indexing.py in _getitem_iterable(self, key, axis) 1049 def _getitem_iterable(self, key, axis=0): 1050 if self._should_validate_iterable(axis): -> 1051 self._has_valid_type(key, axis) 1052 1053 labels = self.obj._get_axis(axis) /home/nobackup/repo/pandas/pandas/core/indexing.py in _has_valid_type(self, key, axis) 1429 1430 raise KeyError("None of [%s] are in the [%s]" % -> 1431 (key, self.obj._get_axis_name(axis))) 1432 1433 return True KeyError: "None of [['not', 'found']] are in the [index]" ``` #### Output of ``pd.show_versions()`` <details> INSTALLED VERSIONS ------------------ commit: f65a6415f15d438432cc6954ead61b052c5d4d60 python: 3.5.2.final.0 python-bits: 64 OS: Linux OS-release: 4.7.0-1-amd64 machine: x86_64 processor: byteorder: little LC_ALL: None LANG: it_IT.utf8 LOCALE: it_IT.UTF-8 pandas: 0.19.0+473.gf65a641 pytest: 3.0.6 pip: 8.1.2 setuptools: 28.0.0 Cython: 0.23.4 numpy: 1.12.0 scipy: 0.18.1 xarray: None IPython: 5.1.0.dev sphinx: 1.4.8 patsy: 0.3.0-dev dateutil: 2.5.3 pytz: 2015.7 blosc: None bottleneck: 1.2.0 tables: 3.2.2 numexpr: 2.6.0 feather: None matplotlib: 2.0.0rc2 openpyxl: 2.3.0 xlrd: 1.0.0 xlwt: 1.1.2 xlsxwriter: 0.9.3 lxml: 3.6.4 bs4: 4.5.1 html5lib: 0.999 httplib2: 0.9.1 apiclient: 1.5.2 sqlalchemy: 1.0.15 pymysql: None psycopg2: None jinja2: 2.8 s3fs: None pandas_datareader: 0.2.1 </details>
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15452/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15452/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/15453
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15453/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15453/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15453/events
https://github.com/pandas-dev/pandas/issues/15453
208,642,270
MDU6SXNzdWUyMDg2NDIyNzA=
15,453
BUG: int64 overflow/wrap around with sum()
{ "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": "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, and Logical operations", "id": 47223669, "name": "Numeric Operations", "node_id": "MDU6TGFiZWw0NzIyMzY2OQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Numeric%20Operations" }, { "color": "0e8a16", "default": true, "description": null, "id": 717120670, "name": "good first issue", "node_id": "MDU6TGFiZWw3MTcxMjA2NzA=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/good%20first%20issue" } ]
closed
false
null
[]
{ "closed_at": "2017-10-28T18:54:27Z", "closed_issues": 764, "created_at": "2017-03-23T13:26:25Z", "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": "2017-10-27T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/46", "id": 2406656, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/46/labels", "node_id": "MDk6TWlsZXN0b25lMjQwNjY1Ng==", "number": 46, "open_issues": 0, "state": "closed", "title": "0.21.0", "updated_at": "2018-07-08T21:53:21Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/46" }
11
2017-02-18T13:36:10Z
2017-10-20T13:24:03Z
2017-10-20T13:23:39Z
CONTRIBUTOR
null
#### Code Sample, a copy-pastable example if possible ```python In [1]: import pandas as pd In [2]: s = pd.Series([2**31]) In [3]: print(s.dtype, s.sum()) (dtype('int64'), -2147483648) In [4]: pd.Series([2**31 - 1, 1]).sum() Out[4]: -2147483648 In [5]: pd.Series([2**31 - 1, 1]).astype('int32').sum() Out[5]: 2147483648 ``` #### Problem description negative values in [3] and [4] #### Expected Output see [5] #### Output of ``pd.show_versions()`` <details> ```python In [6]: pd.show_versions() INSTALLED VERSIONS ------------------ commit: None python: 2.7.13.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.19.2 nose: 1.3.7 pip: 9.0.1 setuptools: 34.2.0 Cython: None numpy: 1.12.0 scipy: 0.19.0rc1 statsmodels: 0.8.0 xarray: None IPython: 5.2.2 sphinx: 1.5.2 patsy: None dateutil: 2.6.0 pytz: 2016.10 blosc: None bottleneck: 1.2.0 tables: None numexpr: 2.6.2 matplotlib: 1.5.3 openpyxl: None xlrd: None xlwt: None xlsxwriter: None lxml: None bs4: 4.5.3 html5lib: 0.999999999 httplib2: 0.10.3 apiclient: 1.6.2 sqlalchemy: 1.1.5 pymysql: None psycopg2: 2.6.2 (dt dec pq3 ext lo64) jinja2: 2.9.5 boto: None pandas_datareader: None ``` </details>
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15453/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15453/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/15454
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15454/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15454/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15454/events
https://github.com/pandas-dev/pandas/issues/15454
208,659,710
MDU6SXNzdWUyMDg2NTk3MTA=
15,454
BUG: __getitem__ on MultiIndex with empty slice raises
{ "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": "0e8a16", "default": true, "description": null, "id": 717120670, "name": "good first issue", "node_id": "MDU6TGFiZWw3MTcxMjA2NzA=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/good%20first%20issue" }, { "color": "cdea3c", "default": false, "description": "Unit test(s) needed to prevent regressions", "id": 986278782, "name": "Needs Tests", "node_id": "MDU6TGFiZWw5ODYyNzg3ODI=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Needs%20Tests" } ]
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
2017-02-18T18:23:10Z
2020-01-21T18:26:46Z
2020-01-21T18:26:46Z
CONTRIBUTOR
null
#### Code Sample, a copy-pastable example if possible ```python # Your code here In [26]: df = pd.DataFrame(0, index=range(2), columns=pd.MultiIndex.from_product([[1], [2]])) ...: ...: In [27]: df Out[27]: 1 2 0 0 1 0 In [28]: df[[]] --------------------------------------------------------------------------- IndexError Traceback (most recent call last) <ipython-input-28-13353c6d99d3> in <module>() ----> 1 df[[]] /Users/tom.augspurger/Envs/py3/lib/python3.6/site-packages/pandas/pandas/core/frame.py in __getitem__(self, key) 2014 if isinstance(key, (Series, np.ndarray, Index, list)): 2015 # either boolean or fancy integer index -> 2016 return self._getitem_array(key) 2017 elif isinstance(key, DataFrame): 2018 return self._getitem_frame(key) /Users/tom.augspurger/Envs/py3/lib/python3.6/site-packages/pandas/pandas/core/frame.py in _getitem_array(self, key) 2058 return self.take(indexer, axis=0, convert=False) 2059 else: -> 2060 indexer = self.loc._convert_to_indexer(key, axis=1) 2061 return self.take(indexer, axis=1, convert=True) 2062 /Users/tom.augspurger/Envs/py3/lib/python3.6/site-packages/pandas/pandas/core/indexing.py in _convert_to_indexer(self, obj, axis, is_setter) 1216 # this is not the most robust, but... 1217 if (isinstance(labels, MultiIndex) and -> 1218 not isinstance(objarr[0], tuple)): 1219 level = 0 1220 _, indexer = labels.reindex(objarr, level=level) IndexError: index 0 is out of bounds for axis 0 with size 0 ``` #### Problem description This is inconsistent with our other indexers, which all return empty DataFrames / series 1. Regular index in the columns or index ```python In [30]: df.T[[]] Out[30]: Empty DataFrame Columns: [] Index: [(1, 2)] ``` ```python In [32]: df.loc[[]] Out[32]: Empty DataFrame Columns: [(1, 2)] Index: [] ``` 2. MultiIndex in the index with .loc ```python In [34]: df.T.loc[[]] Out[34]: Empty DataFrame Columns: [0, 1] Index: [] ``` A probably related bug: while `df.loc[:, []]` works as expected, `__setitem__` raises with the same error: ```python In [65]: df.loc[:, []] # OK Out[65]: Empty DataFrame Columns: [] Index: [0, 1] ``` ```python In [66]: df.loc[:, []] = 10 # should be a no-op really --------------------------------------------------------------------------- IndexError Traceback (most recent call last) <ipython-input-66-6cd48eddd6a3> in <module>() ----> 1 df.loc[:, []] = 10 /Users/tom.augspurger/Envs/py3/lib/python3.6/site-packages/pandas/pandas/core/indexing.py in __setitem__(self, key, value) 146 else: 147 key = com._apply_if_callable(key, self.obj) --> 148 indexer = self._get_setitem_indexer(key) 149 self._setitem_with_indexer(indexer, value) 150 /Users/tom.augspurger/Envs/py3/lib/python3.6/site-packages/pandas/pandas/core/indexing.py in _get_setitem_indexer(self, key) 125 if isinstance(key, tuple): 126 try: --> 127 return self._convert_tuple(key, is_setter=True) 128 except IndexingError: 129 pass /Users/tom.augspurger/Envs/py3/lib/python3.6/site-packages/pandas/pandas/core/indexing.py in _convert_tuple(self, key, is_setter) 192 if i >= self.obj.ndim: 193 raise IndexingError('Too many indexers') --> 194 idx = self._convert_to_indexer(k, axis=i, is_setter=is_setter) 195 keyidx.append(idx) 196 return tuple(keyidx) /Users/tom.augspurger/Envs/py3/lib/python3.6/site-packages/pandas/pandas/core/indexing.py in _convert_to_indexer(self, obj, axis, is_setter) 1216 # this is not the most robust, but... 1217 if (isinstance(labels, MultiIndex) and -> 1218 not isinstance(objarr[0], tuple)): 1219 level = 0 1220 _, indexer = labels.reindex(objarr, level=level) IndexError: index 0 is out of bounds for axis 0 with size 0 ``` #### Expected Output ```python In [47]: pd.DataFrame([], index=[0, 1]) Out[47]: Empty DataFrame Columns: [] Index: [0, 1] ``` I *think* that's right, all the columns should be dropped. #### Output of ``pd.show_versions()`` <details> # Paste the output here pd.show_versions() here INSTALLED VERSIONS ------------------ commit: 0ceb40fde46ec705a6a7d0a7e53477e65ad2c891 python: 3.6.0.final.0 python-bits: 64 OS: Darwin OS-release: 16.4.0 machine: x86_64 processor: i386 byteorder: little LC_ALL: None LANG: en_US.UTF-8 LOCALE: en_US.UTF-8 pandas: 0.19.0+466.g0ceb40fde.dirty pytest: 3.0.5 pip: 9.0.1 setuptools: 32.3.0 Cython: 0.25.2 numpy: 1.12.0 scipy: 0.18.1 xarray: None IPython: 5.2.2 sphinx: 1.5.2 patsy: 0.4.1 dateutil: 2.6.0 pytz: 2016.10 blosc: None bottleneck: 1.2.0 tables: None numexpr: 2.6.1 feather: None matplotlib: 2.0.0 openpyxl: None xlrd: 1.0.0 xlwt: None xlsxwriter: None lxml: None bs4: None html5lib: 0.9999999 httplib2: None apiclient: None sqlalchemy: 1.1.5 pymysql: None psycopg2: 2.6.2 (dt dec pq3 ext lo64) jinja2: 2.9.5 s3fs: 0.0.8 pandas_datareader: None </details>
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15454/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15454/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/15455
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15455/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15455/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15455/events
https://github.com/pandas-dev/pandas/pull/15455
208,669,178
MDExOlB1bGxSZXF1ZXN0MTA2ODc1NDA2
15,455
DOC: DataFrame.get_value
{ "avatar_url": "https://avatars.githubusercontent.com/u/9993?v=4", "events_url": "https://api.github.com/users/palewire/events{/privacy}", "followers_url": "https://api.github.com/users/palewire/followers", "following_url": "https://api.github.com/users/palewire/following{/other_user}", "gists_url": "https://api.github.com/users/palewire/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/palewire", "id": 9993, "login": "palewire", "node_id": "MDQ6VXNlcjk5OTM=", "organizations_url": "https://api.github.com/users/palewire/orgs", "received_events_url": "https://api.github.com/users/palewire/received_events", "repos_url": "https://api.github.com/users/palewire/repos", "site_admin": false, "starred_url": "https://api.github.com/users/palewire/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/palewire/subscriptions", "type": "User", "url": "https://api.github.com/users/palewire" }
[ { "color": "3465A4", "default": false, "description": null, "id": 134699, "name": "Docs", "node_id": "MDU6TGFiZWwxMzQ2OTk=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Docs" } ]
closed
false
null
[]
null
12
2017-02-18T20:26:02Z
2017-05-13T21:37:09Z
2017-05-13T21:37:09Z
CONTRIBUTOR
null
Basic examples for working with DataFrame's ``get_value`` method. I do not understand how the ``takeable`` option is supposed to work. If someone can explain it to me, I'd be happy to add an example for that as well.
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15455/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15455/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/15455.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/15455", "merged_at": null, "patch_url": "https://github.com/pandas-dev/pandas/pull/15455.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/15455" }
https://api.github.com/repos/pandas-dev/pandas/issues/15456
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15456/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15456/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15456/events
https://github.com/pandas-dev/pandas/pull/15456
208,751,492
MDExOlB1bGxSZXF1ZXN0MTA2OTE5NDQ3
15,456
ENH: str.replace accepts a compiled expression
{ "avatar_url": "https://avatars.githubusercontent.com/u/11428213?v=4", "events_url": "https://api.github.com/users/rouzazari/events{/privacy}", "followers_url": "https://api.github.com/users/rouzazari/followers", "following_url": "https://api.github.com/users/rouzazari/following{/other_user}", "gists_url": "https://api.github.com/users/rouzazari/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/rouzazari", "id": 11428213, "login": "rouzazari", "node_id": "MDQ6VXNlcjExNDI4MjEz", "organizations_url": "https://api.github.com/users/rouzazari/orgs", "received_events_url": "https://api.github.com/users/rouzazari/received_events", "repos_url": "https://api.github.com/users/rouzazari/repos", "site_admin": false, "starred_url": "https://api.github.com/users/rouzazari/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/rouzazari/subscriptions", "type": "User", "url": "https://api.github.com/users/rouzazari" }
[ { "color": "4E9A06", "default": false, "description": null, "id": 76812, "name": "Enhancement", "node_id": "MDU6TGFiZWw3NjgxMg==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Enhancement" }, { "color": "5319e7", "default": false, "description": "String extension data type and string data", "id": 57522093, "name": "Strings", "node_id": "MDU6TGFiZWw1NzUyMjA5Mw==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Strings" } ]
closed
false
null
[]
{ "closed_at": "2017-05-06T10:20:19Z", "closed_issues": 987, "created_at": "2016-02-08T15:30:21Z", "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": "after 0.19.x series", "due_on": "2017-05-12T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/39", "id": 1570595, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39/labels", "node_id": "MDk6TWlsZXN0b25lMTU3MDU5NQ==", "number": 39, "open_issues": 0, "state": "closed", "title": "0.20.0", "updated_at": "2018-10-28T08:18:42Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39" }
19
2017-02-19T22:20:09Z
2017-03-05T22:44:45Z
2017-03-05T11:23:58Z
CONTRIBUTOR
null
.str.replace now accepts a compiled regular expression. See #15446 - [x] closes #15446 - [x] tests added / passed - [x] passes ``git diff upstream/master | 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/15456/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15456/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/15456.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/15456", "merged_at": "2017-03-05T11:23:57Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/15456.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/15456" }
https://api.github.com/repos/pandas-dev/pandas/issues/15457
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15457/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15457/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15457/events
https://github.com/pandas-dev/pandas/issues/15457
208,757,480
MDU6SXNzdWUyMDg3NTc0ODA=
15,457
"TypeError: unorderable types" in Python3 when column for MultiIndex contains tuple and int
{ "avatar_url": "https://avatars.githubusercontent.com/u/1224492?v=4", "events_url": "https://api.github.com/users/toobaz/events{/privacy}", "followers_url": "https://api.github.com/users/toobaz/followers", "following_url": "https://api.github.com/users/toobaz/following{/other_user}", "gists_url": "https://api.github.com/users/toobaz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/toobaz", "id": 1224492, "login": "toobaz", "node_id": "MDQ6VXNlcjEyMjQ0OTI=", "organizations_url": "https://api.github.com/users/toobaz/orgs", "received_events_url": "https://api.github.com/users/toobaz/received_events", "repos_url": "https://api.github.com/users/toobaz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/toobaz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/toobaz/subscriptions", "type": "User", "url": "https://api.github.com/users/toobaz" }
[ { "color": "ffa0ff", "default": false, "description": "Incorrect or improved errors from pandas", "id": 42670965, "name": "Error Reporting", "node_id": "MDU6TGFiZWw0MjY3MDk2NQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Error%20Reporting" }, { "color": "207de5", "default": false, "description": null, "id": 71268330, "name": "MultiIndex", "node_id": "MDU6TGFiZWw3MTI2ODMzMA==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/MultiIndex" }, { "color": "e11d21", "default": false, "description": "Categorical Data Type", "id": 78527356, "name": "Categorical", "node_id": "MDU6TGFiZWw3ODUyNzM1Ng==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Categorical" } ]
closed
false
null
[]
{ "closed_at": "2019-01-26T00:51:26Z", "closed_issues": 2048, "created_at": "2018-03-29T12:00:12Z", "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": "", "due_on": "2019-01-31T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/55", "id": 3228419, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/55/labels", "node_id": "MDk6TWlsZXN0b25lMzIyODQxOQ==", "number": 55, "open_issues": 0, "state": "closed", "title": "0.24.0", "updated_at": "2019-01-29T07:42:40Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/55" }
9
2017-02-19T23:52:17Z
2018-08-12T08:16:21Z
2018-08-12T08:16:21Z
MEMBER
null
#### Code Sample, a copy-pastable example if possible ```python In [2]: df = pd.DataFrame([[2, 1], [4, (1,2)]]).set_index([0, 1]) --------------------------------------------------------------------------- TypeError Traceback (most recent call last) /home/pietro/nobackup/repo/pandas/pandas/core/categorical.py in __init__(self, values, categories, ordered, name, fastpath) 288 try: --> 289 codes, categories = factorize(values, sort=True) 290 except TypeError: /home/pietro/nobackup/repo/pandas/pandas/core/algorithms.py in factorize(values, sort, order, na_sentinel, size_hint) 360 uniques, labels = safe_sort(uniques, labels, na_sentinel=na_sentinel, --> 361 assume_unique=True) 362 /home/pietro/nobackup/repo/pandas/pandas/core/algorithms.py in safe_sort(values, labels, na_sentinel, assume_unique) 258 # unorderable in py3 if mixed str/int --> 259 ordered = sort_mixed(values) 260 else: /home/pietro/nobackup/repo/pandas/pandas/core/algorithms.py in sort_mixed(values) 251 dtype=bool) --> 252 nums = np.sort(values[~str_pos]) 253 strs = np.sort(values[str_pos]) /usr/lib/python3/dist-packages/numpy/core/fromnumeric.py in sort(a, axis, kind, order) 821 a = asanyarray(a).copy(order="K") --> 822 a.sort(axis=axis, kind=kind, order=order) 823 return a TypeError: unorderable types: tuple() > int() During handling of the above exception, another exception occurred: TypeError Traceback (most recent call last) <ipython-input-2-b560307721b0> in <module>() ----> 1 df = pd.DataFrame([[2, 1], [4, (1,2)]]).set_index([0, 1]) /home/pietro/nobackup/repo/pandas/pandas/core/frame.py in set_index(self, keys, drop, append, inplace, verify_integrity) 2907 arrays.append(level) 2908 -> 2909 index = MultiIndex.from_arrays(arrays, names=names) 2910 2911 if verify_integrity and not index.is_unique: /home/pietro/nobackup/repo/pandas/pandas/indexes/multi.py in from_arrays(cls, arrays, sortorder, names) 1085 from pandas.core.categorical import _factorize_from_iterables 1086 -> 1087 labels, levels = _factorize_from_iterables(arrays) 1088 if names is None: 1089 names = [getattr(arr, "name", None) for arr in arrays] /home/pietro/nobackup/repo/pandas/pandas/core/categorical.py in _factorize_from_iterables(iterables) 2082 # For consistency, it should return a list of 2 lists. 2083 return [[], []] -> 2084 return map(list, lzip(*[_factorize_from_iterable(it) for it in iterables])) /home/pietro/nobackup/repo/pandas/pandas/core/categorical.py in <listcomp>(.0) 2082 # For consistency, it should return a list of 2 lists. 2083 return [[], []] -> 2084 return map(list, lzip(*[_factorize_from_iterable(it) for it in iterables])) /home/pietro/nobackup/repo/pandas/pandas/core/categorical.py in _factorize_from_iterable(values) 2054 codes = values.codes 2055 else: -> 2056 cat = Categorical(values, ordered=True) 2057 categories = cat.categories 2058 codes = cat.codes /home/pietro/nobackup/repo/pandas/pandas/core/categorical.py in __init__(self, values, categories, ordered, name, fastpath) 293 # raise, as we don't have a sortable data structure and so 294 # the user should give us one by specifying categories --> 295 raise TypeError("'values' is not ordered, please " 296 "explicitly specify the categories order " 297 "by passing in a categories argument.") TypeError: 'values' is not ordered, please explicitly specify the categories order by passing in a categories argument. ``` #### Problem description I would understand the ``unorderable types`` error - after all, I'm asking to have different types in the index, and pandas maybe wants to compare them, and it can't (this error obviously only affects Python3). But then, ``` python In [3]: pd.DataFrame([[2, 'a'], [4, (1,2)]]).set_index([0, 1]) Out[3]: Empty DataFrame Columns: [] Index: [(2, a), (4, (1, 2))] ``` works fine, (even though ``'a' > (1,2)`` raises ``TypeError``), and even allows me to sort the resulting index! Moreover, [I understand this should be supported](https://github.com/pandas-dev/pandas/issues/11565#issuecomment-157691996). #### Expected Output ``` python Empty DataFrame Columns: [] Index: [(4, 1), (2, (1, 2))] ``` #### Output of ``pd.show_versions()`` <details> INSTALLED VERSIONS ------------------ commit: None python: 3.5.2.final.0 python-bits: 64 OS: Linux OS-release: 4.7.0-1-amd64 machine: x86_64 processor: byteorder: little LC_ALL: None LANG: it_IT.utf8 LOCALE: it_IT.UTF-8 pandas: 0.19.0+473.gf65a641 pytest: 3.0.6 pip: 8.1.2 setuptools: 28.0.0 Cython: 0.23.4 numpy: 1.12.0 scipy: 0.18.1 xarray: None IPython: 5.1.0.dev sphinx: 1.4.8 patsy: 0.3.0-dev dateutil: 2.5.3 pytz: 2015.7 blosc: None bottleneck: 1.2.0 tables: 3.2.2 numexpr: 2.6.0 feather: None matplotlib: 2.0.0rc2 openpyxl: 2.3.0 xlrd: 1.0.0 xlwt: 1.1.2 xlsxwriter: 0.9.3 lxml: 3.6.4 bs4: 4.5.1 html5lib: 0.999 httplib2: 0.9.1 apiclient: 1.5.2 sqlalchemy: 1.0.15 pymysql: None psycopg2: None jinja2: 2.8 s3fs: None pandas_datareader: 0.2.1 </details>
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15457/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15457/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/15458
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15458/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15458/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15458/events
https://github.com/pandas-dev/pandas/issues/15458
208,771,213
MDU6SXNzdWUyMDg3NzEyMTM=
15,458
DOC: DataFrame.plot options are not documented in docstring form
{ "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" }
[ { "color": "3465A4", "default": false, "description": null, "id": 134699, "name": "Docs", "node_id": "MDU6TGFiZWwxMzQ2OTk=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Docs" }, { "color": "0e8a16", "default": true, "description": null, "id": 717120670, "name": "good first issue", "node_id": "MDU6TGFiZWw3MTcxMjA2NzA=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/good%20first%20issue" } ]
closed
false
null
[]
{ "closed_at": 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" }
7
2017-02-20T02:44:45Z
2020-01-22T08:46:07Z
2020-01-22T08:46:00Z
MEMBER
null
These can be seen by inspecting the `__call__` attribute, but they are referenced from the particular plotting methods, but not easily learned about in IPython/Jupyter. https://github.com/pandas-dev/pandas/blob/master/pandas/tools/plotting.py#L3781
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15458/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15458/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/15459
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15459/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15459/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15459/events
https://github.com/pandas-dev/pandas/issues/15459
208,776,457
MDU6SXNzdWUyMDg3NzY0NTc=
15,459
pandas0.19.2 make django1.10.4 not work
{ "avatar_url": "https://avatars.githubusercontent.com/u/9493702?v=4", "events_url": "https://api.github.com/users/llfccc/events{/privacy}", "followers_url": "https://api.github.com/users/llfccc/followers", "following_url": "https://api.github.com/users/llfccc/following{/other_user}", "gists_url": "https://api.github.com/users/llfccc/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/llfccc", "id": 9493702, "login": "llfccc", "node_id": "MDQ6VXNlcjk0OTM3MDI=", "organizations_url": "https://api.github.com/users/llfccc/orgs", "received_events_url": "https://api.github.com/users/llfccc/received_events", "repos_url": "https://api.github.com/users/llfccc/repos", "site_admin": false, "starred_url": "https://api.github.com/users/llfccc/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/llfccc/subscriptions", "type": "User", "url": "https://api.github.com/users/llfccc" }
[ { "color": "009800", "default": false, "description": "Duplicate issue or pull request", "id": 40153326, "name": "Duplicate Report", "node_id": "MDU6TGFiZWw0MDE1MzMyNg==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Duplicate%20Report" } ]
closed
false
null
[]
{ "closed_at": null, "closed_issues": 2361, "created_at": "2015-02-26T19:29:05Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/1020496?v=4", "events_url": "https://api.github.com/users/jorisvandenbossche/events{/privacy}", "followers_url": "https://api.github.com/users/jorisvandenbossche/followers", "following_url": "https://api.github.com/users/jorisvandenbossche/following{/other_user}", "gists_url": "https://api.github.com/users/jorisvandenbossche/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jorisvandenbossche", "id": 1020496, "login": "jorisvandenbossche", "node_id": "MDQ6VXNlcjEwMjA0OTY=", "organizations_url": "https://api.github.com/users/jorisvandenbossche/orgs", "received_events_url": "https://api.github.com/users/jorisvandenbossche/received_events", "repos_url": "https://api.github.com/users/jorisvandenbossche/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jorisvandenbossche/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jorisvandenbossche/subscriptions", "type": "User", "url": "https://api.github.com/users/jorisvandenbossche" }, "description": "A milestone for closed or open issues for which there is no action needed (eg not a bug, just a question / discussion, nothing to resolve, wontfix, etc).\r\n\r\n", "due_on": null, "html_url": "https://github.com/pandas-dev/pandas/milestone/33", "id": 997544, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/33/labels", "node_id": "MDk6TWlsZXN0b25lOTk3NTQ0", "number": 33, "open_issues": 11, "state": "open", "title": "No action", "updated_at": "2021-11-19T17:33:16Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/33" }
2
2017-02-20T03:36:29Z
2017-02-20T14:09:22Z
2017-02-20T14:09:22Z
NONE
null
#### Code Sample, a copy-pastable example if possible ```python #coding=utf-8 from django.forms.models import model_to_dict from django.db import connection import os,sys import time,datetime from .models import RegistrationTable import pandas as pd def insert_db(data,SupplierPaymentDict,company_name,chinese_name): return 0 ``` #### Problem description if i import pandas 0.19.2 into the programe ,only type import pandas will make the error。 the error is ,if i use mod_wsgi4.4+apache2.4+django1.10.4 to run a website,i will got “127.0.0.1 is respording”,but if i use django‘runserver like “ python manage.py runserver ",it will work well。 but if i roll back to 0.18.0,all is ok #### Output of ``pd.show_versions()`` <details> # Paste the output here pd.show_versions() here >>> pandas.show_versions() INSTALLED VERSIONS ------------------ commit: None python: 2.7.13.final.0 python-bits: 32 OS: Windows OS-release: 7 machine: AMD64 processor: Intel64 Family 6 Model 58 Stepping 9, GenuineIntel byteorder: little LC_ALL: None LANG: None LOCALE: None.None pandas: 0.19.2 nose: 1.3.7 pip: 9.0.1 setuptools: 27.2.0 Cython: 0.25.2 numpy: 1.12.0 scipy: 0.18.1 statsmodels: 0.6.1 xarray: None IPython: 5.1.0 sphinx: 1.5.1 patsy: 0.4.1 dateutil: 2.6.0 pytz: 2016.10 blosc: None bottleneck: 1.2.0 tables: 3.2.2 numexpr: 2.6.1 matplotlib: 2.0.0 openpyxl: 2.4.1 xlrd: 1.0.0 xlwt: 1.2.0 xlsxwriter: 0.9.6 lxml: 3.7.2 bs4: 4.5.3 html5lib: None httplib2: None apiclient: None sqlalchemy: 1.1.5 pymysql: 0.7.9.None psycopg2: None jinja2: 2.9.4 boto: 2.45.0 pandas_datareader: None </details>
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15459/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15459/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/15460
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15460/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15460/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15460/events
https://github.com/pandas-dev/pandas/issues/15460
208,859,048
MDU6SXNzdWUyMDg4NTkwNDg=
15,460
Quantile fails when only NaNs on some rows/columns
{ "avatar_url": "https://avatars.githubusercontent.com/u/2195834?v=4", "events_url": "https://api.github.com/users/jluttine/events{/privacy}", "followers_url": "https://api.github.com/users/jluttine/followers", "following_url": "https://api.github.com/users/jluttine/following{/other_user}", "gists_url": "https://api.github.com/users/jluttine/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jluttine", "id": 2195834, "login": "jluttine", "node_id": "MDQ6VXNlcjIxOTU4MzQ=", "organizations_url": "https://api.github.com/users/jluttine/orgs", "received_events_url": "https://api.github.com/users/jluttine/received_events", "repos_url": "https://api.github.com/users/jluttine/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jluttine/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jluttine/subscriptions", "type": "User", "url": "https://api.github.com/users/jluttine" }
[ { "color": "e10c02", "default": false, "description": null, "id": 76811, "name": "Bug", "node_id": "MDU6TGFiZWw3NjgxMQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug" }, { "color": "02d7e1", "default": false, "description": "Concat, Merge/Join, Stack/Unstack, Explode", "id": 13098779, "name": "Reshaping", "node_id": "MDU6TGFiZWwxMzA5ODc3OQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Reshaping" }, { "color": "009800", "default": false, "description": "Duplicate issue or pull request", "id": 40153326, "name": "Duplicate Report", "node_id": "MDU6TGFiZWw0MDE1MzMyNg==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Duplicate%20Report" }, { "color": "006b75", "default": false, "description": "Arithmetic, Comparison, and Logical operations", "id": 47223669, "name": "Numeric Operations", "node_id": "MDU6TGFiZWw0NzIyMzY2OQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Numeric%20Operations" } ]
closed
false
null
[]
{ "closed_at": null, "closed_issues": 2361, "created_at": "2015-02-26T19:29:05Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/1020496?v=4", "events_url": "https://api.github.com/users/jorisvandenbossche/events{/privacy}", "followers_url": "https://api.github.com/users/jorisvandenbossche/followers", "following_url": "https://api.github.com/users/jorisvandenbossche/following{/other_user}", "gists_url": "https://api.github.com/users/jorisvandenbossche/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jorisvandenbossche", "id": 1020496, "login": "jorisvandenbossche", "node_id": "MDQ6VXNlcjEwMjA0OTY=", "organizations_url": "https://api.github.com/users/jorisvandenbossche/orgs", "received_events_url": "https://api.github.com/users/jorisvandenbossche/received_events", "repos_url": "https://api.github.com/users/jorisvandenbossche/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jorisvandenbossche/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jorisvandenbossche/subscriptions", "type": "User", "url": "https://api.github.com/users/jorisvandenbossche" }, "description": "A milestone for closed or open issues for which there is no action needed (eg not a bug, just a question / discussion, nothing to resolve, wontfix, etc).\r\n\r\n", "due_on": null, "html_url": "https://github.com/pandas-dev/pandas/milestone/33", "id": 997544, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/33/labels", "node_id": "MDk6TWlsZXN0b25lOTk3NTQ0", "number": 33, "open_issues": 11, "state": "open", "title": "No action", "updated_at": "2021-11-19T17:33:16Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/33" }
1
2017-02-20T11:55:31Z
2017-02-20T14:08:49Z
2017-02-20T14:08:24Z
NONE
null
Quantile method on DataFrame fails when there are NaNs in some specific way. Some cases it handles properly. I guess it's somehow related to cases when some rows and/or columns have only NaNs. First, some working examples: ```python >>> pd.DataFrame({"a": [1, 2, 3], "b": [np.nan, np.nan, np.nan]}).quantile(axis=0) a 2.0 b NaN Name: 0.5, dtype: float64 ``` ```python >>> pd.DataFrame({"a": [1, 2, 3], "b": [np.nan, np.nan, np.nan]}).quantile(axis=1) 0 1.0 1 2.0 2 3.0 Name: 0.5, dtype: float64 ``` #### Code Sample, a copy-pastable example if possible If I change the second element on the first column to NaN, it all breaks. Now there's one row and one column with only NaNs: ```python >>> pd.DataFrame({"a": [1, np.nan, 3], "b": [np.nan, np.nan, np.nan]}).quantile(axis=0) a 1.0 b 3.0 Name: 0.5, dtype: float64 ``` ```python >>> pd.DataFrame({"a": [1, np.nan, 3], "b": [np.nan, np.nan, np.nan]}).quantile(axis=1) --------------------------------------------------------------------------- ValueError Traceback (most recent call last) <ipython-input-2-a62c307ef5d1> in <module>() ----> 1 pd.DataFrame({"a": [1, np.nan, 3], "b": [np.nan, np.nan, np.nan]}).quantile(axis=1) /.../lib/python3.5/site-packages/pandas/core/frame.py in quantile(self, q, axis, numeric_only, interpolation) 5153 axis=1, 5154 interpolation=interpolation, -> 5155 transposed=is_transposed) 5156 5157 if result.ndim == 2: /.../lib/python3.5/site-packages/pandas/core/internals.py in quantile(self, **kwargs) 3142 3143 def quantile(self, **kwargs): -> 3144 return self.reduction('quantile', **kwargs) 3145 3146 def setitem(self, **kwargs): /.../lib/python3.5/site-packages/pandas/core/internals.py in reduction(self, f, axis, consolidate, transposed, **kwargs) 3071 for b in self.blocks: 3072 kwargs['mgr'] = self -> 3073 axe, block = getattr(b, f)(axis=axis, **kwargs) 3074 3075 axes.append(axe) /.../lib/python3.5/site-packages/pandas/core/internals.py in quantile(self, qs, interpolation, axis, mgr) 1325 values = _block_shape(values[~mask], ndim=self.ndim) 1326 if self.ndim > 1: -> 1327 values = values.reshape(result_shape) 1328 1329 from pandas import Float64Index ValueError: total size of new array must be unchanged ``` #### Problem description In the first case, the quantiles are incorrect and in the second case, the quantile computation should *not* raise an error. #### Expected Output ```python >>> pd.DataFrame({"a": [1, np.nan, 3], "b": [np.nan, np.nan, np.nan]}).quantile(axis=0) a 2.0 b NaN Name: 0.5, dtype: float64 ``` ```python >>> pd.DataFrame({"a": [1, np.nan, 3], "b": [np.nan, np.nan, np.nan]}).quantile(axis=1) 0 1.0 1 NaN 2 3.0 ``` #### Output of ``pd.show_versions()`` <details> # Paste the output here pd.show_versions() here INSTALLED VERSIONS ------------------ commit: None python: 3.5.3.final.0 python-bits: 64 OS: Linux OS-release: 4.9.9-gnu-1 machine: x86_64 processor: byteorder: little LC_ALL: None LANG: en_US.UTF-8 LOCALE: en_US.UTF-8 pandas: 0.19.0 nose: None pip: 8.1.2 setuptools: 27.2.0.post20161106 Cython: None numpy: 1.11.1 scipy: 0.18.1 statsmodels: None xarray: None IPython: 5.1.0 sphinx: None patsy: None dateutil: 2.5.3 pytz: 2016.7 blosc: None bottleneck: None tables: 3.2.3.1 numexpr: 2.6.1 matplotlib: 1.5.3 openpyxl: None xlrd: None xlwt: None xlsxwriter: None lxml: None bs4: None html5lib: None httplib2: None apiclient: None sqlalchemy: 1.0.13 pymysql: None psycopg2: 2.6.2 (dt dec pq3 ext lo64) jinja2: 2.9.4 boto: None pandas_datareader: None </details>
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15460/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15460/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/15461
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15461/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15461/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15461/events
https://github.com/pandas-dev/pandas/pull/15461
208,955,770
MDExOlB1bGxSZXF1ZXN0MTA3MDU4ODYy
15,461
BUG: fix SparseSeries reindex by using Series implementation
{ "avatar_url": "https://avatars.githubusercontent.com/u/1224492?v=4", "events_url": "https://api.github.com/users/toobaz/events{/privacy}", "followers_url": "https://api.github.com/users/toobaz/followers", "following_url": "https://api.github.com/users/toobaz/following{/other_user}", "gists_url": "https://api.github.com/users/toobaz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/toobaz", "id": 1224492, "login": "toobaz", "node_id": "MDQ6VXNlcjEyMjQ0OTI=", "organizations_url": "https://api.github.com/users/toobaz/orgs", "received_events_url": "https://api.github.com/users/toobaz/received_events", "repos_url": "https://api.github.com/users/toobaz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/toobaz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/toobaz/subscriptions", "type": "User", "url": "https://api.github.com/users/toobaz" }
[ { "color": "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": "009800", "default": false, "description": "Sparse Data Type", "id": 49182326, "name": "Sparse", "node_id": "MDU6TGFiZWw0OTE4MjMyNg==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Sparse" } ]
closed
false
null
[]
{ "closed_at": "2017-05-06T10:20:19Z", "closed_issues": 987, "created_at": "2016-02-08T15:30:21Z", "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": "after 0.19.x series", "due_on": "2017-05-12T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/39", "id": 1570595, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39/labels", "node_id": "MDk6TWlsZXN0b25lMTU3MDU5NQ==", "number": 39, "open_issues": 0, "state": "closed", "title": "0.20.0", "updated_at": "2018-10-28T08:18:42Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39" }
21
2017-02-20T18:37:34Z
2017-03-07T23:19:52Z
2017-03-07T21:17:20Z
MEMBER
null
- [x] closes #15447 - [x] tests added / passed - [x] passes ``git diff master | flake8 --diff`` - [x] whatsnew entry I abunded a bit with the tests for ``.reindex()`` (for ``.loc`` there were already quite a bit). This is completely independent from the approach in #15448 , which also made sense but on which I will come back in a different PR. In the current PR, I'm just exploiting the fact that sparse ``SparseBlock``s "know what to do", and the ``SparseSeries`` itself has nothing particular to do for reindexing.
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15461/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15461/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/15461.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/15461", "merged_at": null, "patch_url": "https://github.com/pandas-dev/pandas/pull/15461.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/15461" }
https://api.github.com/repos/pandas-dev/pandas/issues/15462
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15462/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15462/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15462/events
https://github.com/pandas-dev/pandas/issues/15462
208,997,005
MDU6SXNzdWUyMDg5OTcwMDU=
15,462
BUG: read_table doesn't properly read uint64
{ "avatar_url": "https://avatars.githubusercontent.com/u/5066965?v=4", "events_url": "https://api.github.com/users/nkeriks/events{/privacy}", "followers_url": "https://api.github.com/users/nkeriks/followers", "following_url": "https://api.github.com/users/nkeriks/following{/other_user}", "gists_url": "https://api.github.com/users/nkeriks/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/nkeriks", "id": 5066965, "login": "nkeriks", "node_id": "MDQ6VXNlcjUwNjY5NjU=", "organizations_url": "https://api.github.com/users/nkeriks/orgs", "received_events_url": "https://api.github.com/users/nkeriks/received_events", "repos_url": "https://api.github.com/users/nkeriks/repos", "site_admin": false, "starred_url": "https://api.github.com/users/nkeriks/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nkeriks/subscriptions", "type": "User", "url": "https://api.github.com/users/nkeriks" }
[ { "color": "0052cc", "default": false, "description": null, "id": 34444536, "name": "Usage Question", "node_id": "MDU6TGFiZWwzNDQ0NDUzNg==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Usage%20Question" }, { "color": "5319e7", "default": false, "description": "read_csv, to_csv", "id": 47229171, "name": "IO CSV", "node_id": "MDU6TGFiZWw0NzIyOTE3MQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20CSV" } ]
closed
false
null
[]
{ "closed_at": null, "closed_issues": 2361, "created_at": "2015-02-26T19:29:05Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/1020496?v=4", "events_url": "https://api.github.com/users/jorisvandenbossche/events{/privacy}", "followers_url": "https://api.github.com/users/jorisvandenbossche/followers", "following_url": "https://api.github.com/users/jorisvandenbossche/following{/other_user}", "gists_url": "https://api.github.com/users/jorisvandenbossche/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jorisvandenbossche", "id": 1020496, "login": "jorisvandenbossche", "node_id": "MDQ6VXNlcjEwMjA0OTY=", "organizations_url": "https://api.github.com/users/jorisvandenbossche/orgs", "received_events_url": "https://api.github.com/users/jorisvandenbossche/received_events", "repos_url": "https://api.github.com/users/jorisvandenbossche/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jorisvandenbossche/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jorisvandenbossche/subscriptions", "type": "User", "url": "https://api.github.com/users/jorisvandenbossche" }, "description": "A milestone for closed or open issues for which there is no action needed (eg not a bug, just a question / discussion, nothing to resolve, wontfix, etc).\r\n\r\n", "due_on": null, "html_url": "https://github.com/pandas-dev/pandas/milestone/33", "id": 997544, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/33/labels", "node_id": "MDk6TWlsZXN0b25lOTk3NTQ0", "number": 33, "open_issues": 11, "state": "open", "title": "No action", "updated_at": "2021-11-19T17:33:16Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/33" }
2
2017-02-20T22:37:24Z
2017-02-20T23:00:00Z
2017-02-20T23:00:00Z
NONE
null
#### Code Sample ```python import pandas as pd import numpy as np import StringIO tmp = StringIO.StringIO(buf="id\n" + "9"*19 + "\n") pd.read_table(tmp, dtype={'id': np.uint64}) ``` #### Problem description A string of 19 nines is about 2^{63.11} and fits in a np.uint64, e.g., `np.array([9999999999999999999])` has dtype uint64. `pd.read_table` without the dtype option will simply coerce this column to `object` dtype, which is reasonable. #### Expected Output A data frame with dtype np.uint64, or perhaps a warning that `read_table` doesn't support uint64. #### Output of ``pd.show_versions()`` <details> INSTALLED VERSIONS ------------------ commit: None python: 2.7.13.final.0 python-bits: 64 OS: Darwin OS-release: 16.4.0 machine: x86_64 processor: i386 byteorder: little LC_ALL: None LANG: en_US.UTF-8 LOCALE: None.None pandas: 0.19.2 nose: 1.3.7 pip: 9.0.1 setuptools: 32.1.0 Cython: None numpy: 1.12.0 scipy: 0.18.1 statsmodels: None xarray: None IPython: 5.2.2 sphinx: None patsy: None dateutil: 2.6.0 pytz: 2016.10 blosc: None bottleneck: None tables: None numexpr: None matplotlib: 2.0.0 openpyxl: None xlrd: None xlwt: None xlsxwriter: None lxml: None bs4: None html5lib: 0.9999999 httplib2: None apiclient: None sqlalchemy: None pymysql: None psycopg2: None jinja2: 2.9.5 boto: None pandas_datareader: None </details>
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15462/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15462/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/15463
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15463/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15463/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15463/events
https://github.com/pandas-dev/pandas/issues/15463
209,004,381
MDU6SXNzdWUyMDkwMDQzODE=
15,463
Series.rolling(3).quantile(10) segmentation fault
{ "avatar_url": "https://avatars.githubusercontent.com/u/684364?v=4", "events_url": "https://api.github.com/users/kernc/events{/privacy}", "followers_url": "https://api.github.com/users/kernc/followers", "following_url": "https://api.github.com/users/kernc/following{/other_user}", "gists_url": "https://api.github.com/users/kernc/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kernc", "id": 684364, "login": "kernc", "node_id": "MDQ6VXNlcjY4NDM2NA==", "organizations_url": "https://api.github.com/users/kernc/orgs", "received_events_url": "https://api.github.com/users/kernc/received_events", "repos_url": "https://api.github.com/users/kernc/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kernc/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kernc/subscriptions", "type": "User", "url": "https://api.github.com/users/kernc" }
[ { "color": "e10c02", "default": false, "description": null, "id": 76811, "name": "Bug", "node_id": "MDU6TGFiZWw3NjgxMQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug" }, { "color": "02d7e1", "default": false, "description": "Concat, Merge/Join, Stack/Unstack, Explode", "id": 13098779, "name": "Reshaping", "node_id": "MDU6TGFiZWwxMzA5ODc3OQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Reshaping" }, { "color": "006b75", "default": false, "description": "Arithmetic, Comparison, and Logical operations", "id": 47223669, "name": "Numeric Operations", "node_id": "MDU6TGFiZWw0NzIyMzY2OQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Numeric%20Operations" } ]
closed
false
null
[]
{ "closed_at": "2017-05-06T10:20:19Z", "closed_issues": 987, "created_at": "2016-02-08T15:30:21Z", "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": "after 0.19.x series", "due_on": "2017-05-12T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/39", "id": 1570595, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39/labels", "node_id": "MDk6TWlsZXN0b25lMTU3MDU5NQ==", "number": 39, "open_issues": 0, "state": "closed", "title": "0.20.0", "updated_at": "2018-10-28T08:18:42Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39" }
3
2017-02-20T23:27:52Z
2017-02-23T13:24:28Z
2017-02-23T13:24:28Z
CONTRIBUTOR
null
#### Code Sample, a copy-pastable example if possible ```python >>> pd.Series(np.arange(10)).rolling(3).quantile(10) [1] 20214 segmentation fault ``` #### Problem description The value 10 is over the fraction of 1 which .quantile() works with, but I guess it still shouldn't crash my interpreter. #### Expected Output ```text ValueError: quantile value 10 not in [0, 1] ``` #### Output of ``pd.show_versions()`` pandas 0.19.0+479.g4842bc7
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15463/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15463/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/15464
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15464/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15464/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15464/events
https://github.com/pandas-dev/pandas/pull/15464
209,015,011
MDExOlB1bGxSZXF1ZXN0MTA3MDk4MjIz
15,464
CI: add circle ci support
{ "avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4", "events_url": "https://api.github.com/users/jreback/events{/privacy}", "followers_url": "https://api.github.com/users/jreback/followers", "following_url": "https://api.github.com/users/jreback/following{/other_user}", "gists_url": "https://api.github.com/users/jreback/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jreback", "id": 953992, "login": "jreback", "node_id": "MDQ6VXNlcjk1Mzk5Mg==", "organizations_url": "https://api.github.com/users/jreback/orgs", "received_events_url": "https://api.github.com/users/jreback/received_events", "repos_url": "https://api.github.com/users/jreback/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jreback/subscriptions", "type": "User", "url": "https://api.github.com/users/jreback" }
[ { "color": "a2bca7", "default": false, "description": "Continuous Integration", "id": 48070600, "name": "CI", "node_id": "MDU6TGFiZWw0ODA3MDYwMA==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/CI" } ]
closed
false
null
[]
{ "closed_at": "2017-05-06T10:20:19Z", "closed_issues": 987, "created_at": "2016-02-08T15:30:21Z", "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": "after 0.19.x series", "due_on": "2017-05-12T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/39", "id": 1570595, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39/labels", "node_id": "MDk6TWlsZXN0b25lMTU3MDU5NQ==", "number": 39, "open_issues": 0, "state": "closed", "title": "0.20.0", "updated_at": "2018-10-28T08:18:42Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39" }
3
2017-02-21T00:59:03Z
2017-02-21T22:32:37Z
2017-02-21T02:39:52Z
CONTRIBUTOR
null
this adds support for using CircleCI; configured to put 4 of our builds (3.4, 3.4-slow, 2.7 compat, and 3.5 ascii), they are still on Travis ATM. They are built/tested simultaneously on CircleCI (as we get 4 containers for open-source). CircleCI is a PITA. It has parallelism, but no build-matrix. So this took a while to get right. Don't currently use pytest-xdist as was getting some failures, but maybe can turn on at some point. I'll come back later and remove the builds from TravisCI when everything's all connected.
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15464/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15464/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/15464.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/15464", "merged_at": null, "patch_url": "https://github.com/pandas-dev/pandas/pull/15464.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/15464" }
https://api.github.com/repos/pandas-dev/pandas/issues/15465
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15465/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15465/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15465/events
https://github.com/pandas-dev/pandas/pull/15465
209,028,754
MDExOlB1bGxSZXF1ZXN0MTA3MTA3MjIz
15,465
TST: remove 4 builds from travis that are on circleci
{ "avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4", "events_url": "https://api.github.com/users/jreback/events{/privacy}", "followers_url": "https://api.github.com/users/jreback/followers", "following_url": "https://api.github.com/users/jreback/following{/other_user}", "gists_url": "https://api.github.com/users/jreback/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jreback", "id": 953992, "login": "jreback", "node_id": "MDQ6VXNlcjk1Mzk5Mg==", "organizations_url": "https://api.github.com/users/jreback/orgs", "received_events_url": "https://api.github.com/users/jreback/received_events", "repos_url": "https://api.github.com/users/jreback/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jreback/subscriptions", "type": "User", "url": "https://api.github.com/users/jreback" }
[ { "color": "a2bca7", "default": false, "description": "Continuous Integration", "id": 48070600, "name": "CI", "node_id": "MDU6TGFiZWw0ODA3MDYwMA==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/CI" } ]
closed
false
null
[]
{ "closed_at": "2017-05-06T10:20:19Z", "closed_issues": 987, "created_at": "2016-02-08T15:30:21Z", "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": "after 0.19.x series", "due_on": "2017-05-12T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/39", "id": 1570595, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39/labels", "node_id": "MDk6TWlsZXN0b25lMTU3MDU5NQ==", "number": 39, "open_issues": 0, "state": "closed", "title": "0.20.0", "updated_at": "2018-10-28T08:18:42Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39" }
4
2017-02-21T02:54:08Z
2017-02-22T22:14:41Z
2017-02-22T15:01:49Z
CONTRIBUTOR
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/15465/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15465/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/15465.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/15465", "merged_at": "2017-02-22T15:01:49Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/15465.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/15465" }
https://api.github.com/repos/pandas-dev/pandas/issues/15466
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15466/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15466/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15466/events
https://github.com/pandas-dev/pandas/pull/15466
209,038,101
MDExOlB1bGxSZXF1ZXN0MTA3MTEzNDkx
15,466
GH6322, Bug on reset_index for a MultiIndex of all NaNs
{ "avatar_url": "https://avatars.githubusercontent.com/u/842982?v=4", "events_url": "https://api.github.com/users/tzinckgraf/events{/privacy}", "followers_url": "https://api.github.com/users/tzinckgraf/followers", "following_url": "https://api.github.com/users/tzinckgraf/following{/other_user}", "gists_url": "https://api.github.com/users/tzinckgraf/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/tzinckgraf", "id": 842982, "login": "tzinckgraf", "node_id": "MDQ6VXNlcjg0Mjk4Mg==", "organizations_url": "https://api.github.com/users/tzinckgraf/orgs", "received_events_url": "https://api.github.com/users/tzinckgraf/received_events", "repos_url": "https://api.github.com/users/tzinckgraf/repos", "site_admin": false, "starred_url": "https://api.github.com/users/tzinckgraf/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/tzinckgraf/subscriptions", "type": "User", "url": "https://api.github.com/users/tzinckgraf" }
[ { "color": "e10c02", "default": false, "description": null, "id": 76811, "name": "Bug", "node_id": "MDU6TGFiZWw3NjgxMQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug" }, { "color": "d7e102", "default": false, "description": "np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate", "id": 2822342, "name": "Missing-data", "node_id": "MDU6TGFiZWwyODIyMzQy", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Missing-data" }, { "color": "02d7e1", "default": false, "description": "Concat, Merge/Join, Stack/Unstack, Explode", "id": 13098779, "name": "Reshaping", "node_id": "MDU6TGFiZWwxMzA5ODc3OQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Reshaping" }, { "color": "207de5", "default": false, "description": null, "id": 71268330, "name": "MultiIndex", "node_id": "MDU6TGFiZWw3MTI2ODMzMA==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/MultiIndex" } ]
closed
false
null
[]
{ "closed_at": "2017-05-06T10:20:19Z", "closed_issues": 987, "created_at": "2016-02-08T15:30:21Z", "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": "after 0.19.x series", "due_on": "2017-05-12T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/39", "id": 1570595, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39/labels", "node_id": "MDk6TWlsZXN0b25lMTU3MDU5NQ==", "number": 39, "open_issues": 0, "state": "closed", "title": "0.20.0", "updated_at": "2018-10-28T08:18:42Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39" }
2
2017-02-21T04:13:48Z
2017-02-21T13:41:32Z
2017-02-21T13:38:57Z
CONTRIBUTOR
null
The reset_index function fails for a MultiIndex if at least one column of the index is all NaN. - [x] closes #6322 - [x] tests added / passed - [x] passes ``git diff upstream/master | flake8 --diff`` - [x] whatsnew entry As per the comment in the issue, I tried other solutions such as putting the `take` under an `if len(values)` call, unfortunately that broke other issues downstream. I started to investigate and it seems like a `MultiIndex` makes a category that ignores `NaN`, so the `values` in the `reset_index` is empty. After trying a few options, the `if mask.all()` seemed like the simplest 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/15466/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15466/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/15466.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/15466", "merged_at": null, "patch_url": "https://github.com/pandas-dev/pandas/pull/15466.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/15466" }
https://api.github.com/repos/pandas-dev/pandas/issues/15467
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15467/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15467/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15467/events
https://github.com/pandas-dev/pandas/issues/15467
209,088,031
MDU6SXNzdWUyMDkwODgwMzE=
15,467
DataFrame.to_string(index=False) alignment bug
{ "avatar_url": "https://avatars.githubusercontent.com/u/1216791?v=4", "events_url": "https://api.github.com/users/jzwinck/events{/privacy}", "followers_url": "https://api.github.com/users/jzwinck/followers", "following_url": "https://api.github.com/users/jzwinck/following{/other_user}", "gists_url": "https://api.github.com/users/jzwinck/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jzwinck", "id": 1216791, "login": "jzwinck", "node_id": "MDQ6VXNlcjEyMTY3OTE=", "organizations_url": "https://api.github.com/users/jzwinck/orgs", "received_events_url": "https://api.github.com/users/jzwinck/received_events", "repos_url": "https://api.github.com/users/jzwinck/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jzwinck/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jzwinck/subscriptions", "type": "User", "url": "https://api.github.com/users/jzwinck" }
[ { "color": "e10c02", "default": false, "description": null, "id": 76811, "name": "Bug", "node_id": "MDU6TGFiZWw3NjgxMQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug" }, { "color": "ededed", "default": false, "description": "__repr__ of pandas objects, to_string", "id": 13101118, "name": "Output-Formatting", "node_id": "MDU6TGFiZWwxMzEwMTExOA==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Output-Formatting" }, { "color": "009800", "default": false, "description": "Duplicate issue or pull request", "id": 40153326, "name": "Duplicate Report", "node_id": "MDU6TGFiZWw0MDE1MzMyNg==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Duplicate%20Report" } ]
closed
false
null
[]
{ "closed_at": null, "closed_issues": 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
2017-02-21T09:34:43Z
2017-02-21T14:10:43Z
2017-02-21T14:10:23Z
CONTRIBUTOR
null
```python import pandas as pd df = pd.DataFrame() df['a'] = ['hello world', 'hi'] df['b'] = 0 print(df.to_string(index=False)) ``` #### Problem description It fails to align the first column header: a b hello world 0 hi 0 #### Expected Output a b hello world 0 hi 0 #### Output of ``pd.show_versions()`` pandas: 0.19.2 python: 3.5.1 OS: Linux LC_ALL: None LANG: en_US.UTF-8 LOCALE: en_US.UTF-8
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15467/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15467/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/15468
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15468/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15468/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15468/events
https://github.com/pandas-dev/pandas/pull/15468
209,098,753
MDExOlB1bGxSZXF1ZXN0MTA3MTU1NTU2
15,468
PERF: fast non-unique indexing
{ "avatar_url": "https://avatars.githubusercontent.com/u/514522?v=4", "events_url": "https://api.github.com/users/horta/events{/privacy}", "followers_url": "https://api.github.com/users/horta/followers", "following_url": "https://api.github.com/users/horta/following{/other_user}", "gists_url": "https://api.github.com/users/horta/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/horta", "id": 514522, "login": "horta", "node_id": "MDQ6VXNlcjUxNDUyMg==", "organizations_url": "https://api.github.com/users/horta/orgs", "received_events_url": "https://api.github.com/users/horta/received_events", "repos_url": "https://api.github.com/users/horta/repos", "site_admin": false, "starred_url": "https://api.github.com/users/horta/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/horta/subscriptions", "type": "User", "url": "https://api.github.com/users/horta" }
[ { "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": "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
true
null
[]
null
5
2017-02-21T10:15:44Z
2017-02-25T00:42:28Z
2017-02-25T00:38:02Z
CONTRIBUTOR
null
closes #15364 This is essentially the same pull request as https://github.com/pandas-dev/pandas/pull/15372 but now from a proper branch.
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15468/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15468/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/15468.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/15468", "merged_at": null, "patch_url": "https://github.com/pandas-dev/pandas/pull/15468.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/15468" }
https://api.github.com/repos/pandas-dev/pandas/issues/15469
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15469/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15469/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15469/events
https://github.com/pandas-dev/pandas/issues/15469
209,216,432
MDU6SXNzdWUyMDkyMTY0MzI=
15,469
DOC: Exponentially Weighted Windows page not showing formulas
{ "avatar_url": "https://avatars.githubusercontent.com/u/79948?v=4", "events_url": "https://api.github.com/users/flaviodrt/events{/privacy}", "followers_url": "https://api.github.com/users/flaviodrt/followers", "following_url": "https://api.github.com/users/flaviodrt/following{/other_user}", "gists_url": "https://api.github.com/users/flaviodrt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/flaviodrt", "id": 79948, "login": "flaviodrt", "node_id": "MDQ6VXNlcjc5OTQ4", "organizations_url": "https://api.github.com/users/flaviodrt/orgs", "received_events_url": "https://api.github.com/users/flaviodrt/received_events", "repos_url": "https://api.github.com/users/flaviodrt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/flaviodrt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/flaviodrt/subscriptions", "type": "User", "url": "https://api.github.com/users/flaviodrt" }
[ { "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": "2017-05-06T10:20:19Z", "closed_issues": 987, "created_at": "2016-02-08T15:30:21Z", "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": "after 0.19.x series", "due_on": "2017-05-12T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/39", "id": 1570595, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39/labels", "node_id": "MDk6TWlsZXN0b25lMTU3MDU5NQ==", "number": 39, "open_issues": 0, "state": "closed", "title": "0.20.0", "updated_at": "2018-10-28T08:18:42Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39" }
4
2017-02-21T17:28:35Z
2017-03-10T09:25:12Z
2017-03-09T14:26:57Z
NONE
null
The Exponentially Weighted Windows page is not rendering the formulas in LaTeX format. http://pandas.pydata.org/pandas-docs/stable/computation.html#exponentially-weighted-windows
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15469/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15469/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/15470
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15470/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15470/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15470/events
https://github.com/pandas-dev/pandas/issues/15470
209,270,351
MDU6SXNzdWUyMDkyNzAzNTE=
15,470
On Series with CategoricalIndex, __getitem__ not equal to .loc
{ "avatar_url": "https://avatars.githubusercontent.com/u/684364?v=4", "events_url": "https://api.github.com/users/kernc/events{/privacy}", "followers_url": "https://api.github.com/users/kernc/followers", "following_url": "https://api.github.com/users/kernc/following{/other_user}", "gists_url": "https://api.github.com/users/kernc/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kernc", "id": 684364, "login": "kernc", "node_id": "MDQ6VXNlcjY4NDM2NA==", "organizations_url": "https://api.github.com/users/kernc/orgs", "received_events_url": "https://api.github.com/users/kernc/received_events", "repos_url": "https://api.github.com/users/kernc/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kernc/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kernc/subscriptions", "type": "User", "url": "https://api.github.com/users/kernc" }
[ { "color": "3465A4", "default": false, "description": null, "id": 134699, "name": "Docs", "node_id": "MDU6TGFiZWwxMzQ2OTk=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Docs" }, { "color": "0b02e1", "default": false, "description": "Related to indexing on series/frames, not to indexes themselves", "id": 2822098, "name": "Indexing", "node_id": "MDU6TGFiZWwyODIyMDk4", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Indexing" }, { "color": "e11d21", "default": false, "description": "Categorical Data Type", "id": 78527356, "name": "Categorical", "node_id": "MDU6TGFiZWw3ODUyNzM1Ng==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Categorical" } ]
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" }
3
2017-02-21T20:57:39Z
2021-05-08T01:11:06Z
null
CONTRIBUTOR
null
#### Code Sample, a copy-pastable example if possible ```python >>> s = pd.Series([2, 1, 0], index=pd.CategoricalIndex([2, 1, 0])) >>> s.index CategoricalIndex([2, 1, 0], categories=[0, 1, 2], ordered=False, dtype='category') >>> s[[0, 1, 2]].equals(s.loc[[0, 1, 2]]) # Should be True False >>> s[[0, 1, 2]].equals(s.iloc[[0, 1, 2]]) # Should be False True ``` #### Problem description For Series with CategoricalIndex, `__getitem__` indexing behaves differently than `.loc`. On other-indexed series, these accessors return the same result: ```py >>> s = pd.Series([2, 1, 0], index=[2, 1, 0]) >>> s[[0, 1, 2]].equals(s.loc[[0, 1, 2]]) # Should be True True >>> s[[0, 1, 2]].equals(s.iloc[[0, 1, 2]]) # Should be True False ``` #### Expected Output ```python >>> s = pd.Series([2, 1, 0], index=pd.CategoricalIndex([2, 1, 0])) >>> s[[0, 1, 2]].equals(s.loc[[0, 1, 2]]) True ``` #### Output of ``pd.show_versions()`` 0.19.0+479.git
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15470/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15470/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/15471
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15471/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15471/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15471/events
https://github.com/pandas-dev/pandas/issues/15471
209,291,599
MDU6SXNzdWUyMDkyOTE1OTk=
15,471
ERR: better error message when using invalid indexer in iloc
{ "avatar_url": "https://avatars.githubusercontent.com/u/1020496?v=4", "events_url": "https://api.github.com/users/jorisvandenbossche/events{/privacy}", "followers_url": "https://api.github.com/users/jorisvandenbossche/followers", "following_url": "https://api.github.com/users/jorisvandenbossche/following{/other_user}", "gists_url": "https://api.github.com/users/jorisvandenbossche/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jorisvandenbossche", "id": 1020496, "login": "jorisvandenbossche", "node_id": "MDQ6VXNlcjEwMjA0OTY=", "organizations_url": "https://api.github.com/users/jorisvandenbossche/orgs", "received_events_url": "https://api.github.com/users/jorisvandenbossche/received_events", "repos_url": "https://api.github.com/users/jorisvandenbossche/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jorisvandenbossche/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jorisvandenbossche/subscriptions", "type": "User", "url": "https://api.github.com/users/jorisvandenbossche" }
[ { "color": "0b02e1", "default": false, "description": "Related to indexing on series/frames, not to indexes themselves", "id": 2822098, "name": "Indexing", "node_id": "MDU6TGFiZWwyODIyMDk4", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Indexing" }, { "color": "ffa0ff", "default": false, "description": "Incorrect or improved errors from pandas", "id": 42670965, "name": "Error Reporting", "node_id": "MDU6TGFiZWw0MjY3MDk2NQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Error%20Reporting" } ]
closed
false
null
[]
{ "closed_at": null, "closed_issues": 786, "created_at": "2015-01-13T10:53:19Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4", "events_url": "https://api.github.com/users/jreback/events{/privacy}", "followers_url": "https://api.github.com/users/jreback/followers", "following_url": "https://api.github.com/users/jreback/following{/other_user}", "gists_url": "https://api.github.com/users/jreback/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jreback", "id": 953992, "login": "jreback", "node_id": "MDQ6VXNlcjk1Mzk5Mg==", "organizations_url": "https://api.github.com/users/jreback/orgs", "received_events_url": "https://api.github.com/users/jreback/received_events", "repos_url": "https://api.github.com/users/jreback/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jreback/subscriptions", "type": "User", "url": "https://api.github.com/users/jreback" }, "description": "Changes that would be nice to have in the next release. These issues are not blocking. They will be pushed to the next release if no one has time to fix them.", "due_on": null, "html_url": "https://github.com/pandas-dev/pandas/milestone/32", "id": 933188, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/32/labels", "node_id": "MDk6TWlsZXN0b25lOTMzMTg4", "number": 32, "open_issues": 1053, "state": "open", "title": "Contributions Welcome", "updated_at": "2021-11-21T00:50:06Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/32" }
3
2017-02-21T22:23:03Z
2020-03-30T19:45:22Z
2020-03-30T19:45:22Z
MEMBER
null
Not the most important isssue, but I find the error message when doing label based indexing with strings in `iloc` not very clear: ``` In [12]: s = pd.Series(range(5), index=pd.date_range("2012-01-01", periods=5)) In [15]: s.loc["2012-01-02":"2012-01-04"] Out[15]: 2012-01-02 1 2012-01-03 2 2012-01-04 3 Freq: D, dtype: int64 In [16]: s.iloc["2012-01-02":"2012-01-04"] ... TypeError: cannot do slice indexing on <class 'pandas.tseries.index.DatetimeIndex'> with these indexers [2012-01-02] of <class 'str'> ``` So I by accident used iloc instead of loc, but the error message did not directly make my error clear to me. I think it should just say something about that strings are not allowed in iloc. Because I *can* do slice indexing with strings on a DatetimeIndex (as the error message says I cannot), only not with iloc :-) (on pandas 0.19.2)
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15471/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15471/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/15472
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15472/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15472/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15472/events
https://github.com/pandas-dev/pandas/issues/15472
209,321,450
MDU6SXNzdWUyMDkzMjE0NTA=
15,472
Indexing a MultiIndex with a (Multi)Index
{ "avatar_url": "https://avatars.githubusercontent.com/u/1224492?v=4", "events_url": "https://api.github.com/users/toobaz/events{/privacy}", "followers_url": "https://api.github.com/users/toobaz/followers", "following_url": "https://api.github.com/users/toobaz/following{/other_user}", "gists_url": "https://api.github.com/users/toobaz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/toobaz", "id": 1224492, "login": "toobaz", "node_id": "MDQ6VXNlcjEyMjQ0OTI=", "organizations_url": "https://api.github.com/users/toobaz/orgs", "received_events_url": "https://api.github.com/users/toobaz/received_events", "repos_url": "https://api.github.com/users/toobaz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/toobaz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/toobaz/subscriptions", "type": "User", "url": "https://api.github.com/users/toobaz" }
[ { "color": "e10c02", "default": false, "description": null, "id": 76811, "name": "Bug", "node_id": "MDU6TGFiZWw3NjgxMQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug" }, { "color": "0b02e1", "default": false, "description": "Related to indexing on series/frames, not to indexes themselves", "id": 2822098, "name": "Indexing", "node_id": "MDU6TGFiZWwyODIyMDk4", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Indexing" }, { "color": "207de5", "default": false, "description": null, "id": 71268330, "name": "MultiIndex", "node_id": "MDU6TGFiZWw3MTI2ODMzMA==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/MultiIndex" } ]
open
false
null
[]
null
3
2017-02-22T01:04:08Z
2021-05-08T01:12:01Z
null
MEMBER
null
#### Code Sample, a copy-pastable example if possible ```python In [2]: s = pd.Series(range(8), index=pd.MultiIndex.from_product([[1,2], [3,4], [3,4]], names=['a', 'b', 'c'])) In [3]: s.loc[s.index] # Works as expected Out[3]: a b c 1 3 3 0 4 1 4 3 2 4 3 2 3 3 4 4 5 4 3 6 4 7 dtype: int64 In [4]: s.loc[s.iloc[2:-1].index] # Works as expected Out[4]: a b c 1 4 3 2 4 3 2 3 3 4 4 5 4 3 6 dtype: int64 In [5]: s.loc[s.index.droplevel('c')] # Just reindexes... weird Out[5]: 1 3 NaN 3 NaN 4 NaN 4 NaN 2 3 NaN 3 NaN 4 NaN 4 NaN dtype: float64 In [6]: s.loc[s.index.droplevel(['b', 'c']), :] # Works (flat index) Out[6]: a b c 1 3 3 0 4 1 4 3 2 4 3 2 3 3 4 4 5 4 3 6 4 7 dtype: int64 In [7]: s.loc[s.index.droplevel(['b', 'c'])] #... but fails if I use the shortened notation! [...] TypeError: unhashable type: 'Int64Index' In [8]: s.loc[s.swaplevel('b', 'c')] # Works Out[8]: a b c 1 3 3 0 4 1 4 3 2 4 3 2 3 3 4 4 5 4 3 6 4 7 dtype: int64 In [9]: s.loc[s.index.swaplevel('b', 'c')] # Different result! (reindexes) Out[9]: a c b 1 3 3 0 4 3 2 3 4 1 4 4 3 2 3 3 4 4 3 6 3 4 5 4 4 7 dtype: int64 In [10]: s.loc[pd.MultiIndex.from_product([[1,2], [3], [4]], names=['a', 'c', 'b'])] # Does not respect column names! Out[10]: a c b 1 3 4 1 2 3 4 5 dtype: int64 ``` #### Problem description This clearly needs a unified approach (and I can try). #### Expected Output I guess most expected outputs above are obvious, except for ``In [10]:`` (and maybe ``In [5]:``, which however is already discussed [elsewhere](15452)). That is: it is not obvious whether level names in the indexer should be matched to level names in the indexed, when both are set ([see this comment](https://github.com/pandas-dev/pandas/pull/15425#issuecomment-280500783)). It would probably be more ``pandas``-ish if they were. In other terms, while there is no doubt that ``` python Out[10]: a c b 1 3 4 1 2 3 4 5 dtype: int64 ``` is wrong, we must decide whether we want ``` python Out[10]: a b c 1 3 4 1 2 3 4 5 dtype: int64 ``` or ``` python Out[10]: a b c 1 4 3 2 2 4 3 6 dtype: int64 ``` #### Output of ``pd.show_versions()`` <details> INSTALLED VERSIONS ------------------ commit: None python: 3.5.2.final.0 python-bits: 64 OS: Linux OS-release: 4.7.0-1-amd64 machine: x86_64 processor: byteorder: little LC_ALL: None LANG: it_IT.utf8 LOCALE: it_IT.UTF-8 pandas: 0.19.0+478.g12f2c6a pytest: 3.0.6 pip: 8.1.2 setuptools: 28.0.0 Cython: 0.23.4 numpy: 1.12.0 scipy: 0.18.1 xarray: None IPython: 5.1.0.dev sphinx: 1.4.8 patsy: 0.3.0-dev dateutil: 2.5.3 pytz: 2015.7 blosc: None bottleneck: 1.2.0 tables: 3.2.2 numexpr: 2.6.0 feather: None matplotlib: 2.0.0rc2 openpyxl: 2.3.0 xlrd: 1.0.0 xlwt: 1.1.2 xlsxwriter: 0.9.3 lxml: 3.6.4 bs4: 4.5.1 html5lib: 0.999 httplib2: 0.9.1 apiclient: 1.5.2 sqlalchemy: 1.0.15 pymysql: None psycopg2: None jinja2: 2.8 s3fs: None pandas_datareader: 0.2.1 </details>
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15472/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15472/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/15473
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15473/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15473/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15473/events
https://github.com/pandas-dev/pandas/issues/15473
209,428,740
MDU6SXNzdWUyMDk0Mjg3NDA=
15,473
Pandas isin with empty dataframe produces epoch value on datetime type instead of boolean
{ "avatar_url": "https://avatars.githubusercontent.com/u/3942723?v=4", "events_url": "https://api.github.com/users/jamesporritt/events{/privacy}", "followers_url": "https://api.github.com/users/jamesporritt/followers", "following_url": "https://api.github.com/users/jamesporritt/following{/other_user}", "gists_url": "https://api.github.com/users/jamesporritt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jamesporritt", "id": 3942723, "login": "jamesporritt", "node_id": "MDQ6VXNlcjM5NDI3MjM=", "organizations_url": "https://api.github.com/users/jamesporritt/orgs", "received_events_url": "https://api.github.com/users/jamesporritt/received_events", "repos_url": "https://api.github.com/users/jamesporritt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jamesporritt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jamesporritt/subscriptions", "type": "User", "url": "https://api.github.com/users/jamesporritt" }
[ { "color": "e10c02", "default": false, "description": null, "id": 76811, "name": "Bug", "node_id": "MDU6TGFiZWw3NjgxMQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug" }, { "color": "AFEEEE", "default": false, "description": null, "id": 211840, "name": "Timeseries", "node_id": "MDU6TGFiZWwyMTE4NDA=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Timeseries" } ]
closed
false
null
[]
{ "closed_at": "2017-05-06T10:20:19Z", "closed_issues": 987, "created_at": "2016-02-08T15:30:21Z", "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": "after 0.19.x series", "due_on": "2017-05-12T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/39", "id": 1570595, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39/labels", "node_id": "MDk6TWlsZXN0b25lMTU3MDU5NQ==", "number": 39, "open_issues": 0, "state": "closed", "title": "0.20.0", "updated_at": "2018-10-28T08:18:42Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39" }
1
2017-02-22T11:38:02Z
2017-03-05T01:45:21Z
2017-03-05T01:45:21Z
NONE
null
I've noticed that doing an isin on a DataFrame which contains datetime types where the operand is an empty DataFrame produces epoch datetime values (i.e. 1970-01-01), instead of 'False'. It seems unlikely that this is correct? The following code demonstrates this: ```python import pandas as pd data = {'date': ['2014-05-01 18:47:05.069722', '2014-05-01 18:47:05.119994', '2014-05-02 18:47:05.178768']} data2 = {'date': ['2014-05-01 18:47:05.069722', '2014-05-01 18:47:05.119994']} df = pd.DataFrame(data, columns = ['date']) df['date'] = pd.to_datetime(df['date']) df2 = pd.DataFrame(data2, columns = ['date']) df2['date'] = pd.to_datetime(df2['date']) df3 = pd.DataFrame([], columns = ['date']) df4 = pd.DataFrame() print df.isin(df2) print df.isin(df3) print df.isin(df4) ``` This outputs: ``` date 0 True 1 True 2 False date 0 1970-01-01 1 1970-01-01 2 1970-01-01 date 0 1970-01-01 1 1970-01-01 2 1970-01-01 ``` I would normally expect a list of False values instead of '1970-01-01'? I notice that with pandas = 0.16.2 and numpy = 1.9.2, df.isin(df3) produces the more expected: ``` date 0 False 1 False 2 False ``` But df.isin(df4) is as previous. <details> INSTALLED VERSIONS ------------------ commit: None python: 2.7.13.final.0 python-bits: 64 OS: Linux OS-release: 2.6.32-279.el6.x86_64 machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: en_US.UTF-8 LOCALE: None.None pandas: 0.19.2 nose: None pip: 9.0.1 setuptools: 2.2 Cython: None numpy: 1.12.0 scipy: None statsmodels: None xarray: None IPython: 5.2.2 sphinx: None patsy: None dateutil: 2.6.0 pytz: 2016.10 blosc: None bottleneck: None tables: None numexpr: None matplotlib: None openpyxl: None xlrd: None xlwt: None xlsxwriter: None lxml: None bs4: None html5lib: None httplib2: None apiclient: None sqlalchemy: 1.1.5 pymysql: None psycopg2: None jinja2: None boto: None pandas_datareader: None </details>
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15473/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15473/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/15474
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15474/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15474/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15474/events
https://github.com/pandas-dev/pandas/issues/15474
209,433,080
MDU6SXNzdWUyMDk0MzMwODA=
15,474
VIS/BUG DatetimeIndex with freq=None plot return rotated xtickslabels
{ "avatar_url": "https://avatars.githubusercontent.com/u/25247745?v=4", "events_url": "https://api.github.com/users/weber-s/events{/privacy}", "followers_url": "https://api.github.com/users/weber-s/followers", "following_url": "https://api.github.com/users/weber-s/following{/other_user}", "gists_url": "https://api.github.com/users/weber-s/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/weber-s", "id": 25247745, "login": "weber-s", "node_id": "MDQ6VXNlcjI1MjQ3NzQ1", "organizations_url": "https://api.github.com/users/weber-s/orgs", "received_events_url": "https://api.github.com/users/weber-s/received_events", "repos_url": "https://api.github.com/users/weber-s/repos", "site_admin": false, "starred_url": "https://api.github.com/users/weber-s/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/weber-s/subscriptions", "type": "User", "url": "https://api.github.com/users/weber-s" }
[ { "color": "8AE234", "default": false, "description": null, "id": 2413328, "name": "Visualization", "node_id": "MDU6TGFiZWwyNDEzMzI4", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Visualization" }, { "color": "0052cc", "default": false, "description": null, "id": 34444536, "name": "Usage Question", "node_id": "MDU6TGFiZWwzNDQ0NDUzNg==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Usage%20Question" } ]
closed
false
null
[]
null
3
2017-02-22T11:57:15Z
2020-04-30T06:00:36Z
2020-04-30T06:00:35Z
NONE
null
#### Code Sample ```python file = 'test.csv' #with a "date" column df1 = pd.read_csv(file, index_col="date", parse_dates=["date"]) df1.plot() idx =pd.date_range('2000-01-01','2003-01-01', freq="6d") df2 = pd.DataFrame(index=idx, data=np.random.randn(len(idx),1)) df2.plot() ``` #### Problem description When plotting a time indexed series, we expect no rotation in x labels. It does not work when importing data with ``` df = pd.read_csv(file, index_col="date", parse_dates=["date"]) ``` where the rotation occurs. Moreover, set ```rot=0``` gives a strange behavior with label not centered on ticks. The only difference is that ```freq=None``` in the first case. #### Expected Output No rotation by default. Here is what we have for ```df1.plot()``` (Problem) : ![df1](https://cloud.githubusercontent.com/assets/25247745/23210539/4e568686-f8fe-11e6-89b7-a71417d5ac37.png) Here is what we have for ```df1.plot(rot=0)``` (Problem) : ![df1rot](https://cloud.githubusercontent.com/assets/25247745/23210548/56dcf8da-f8fe-11e6-81b8-3aca0464ffdb.png) Here is what we have for ```df2.plot()``` (Ok) : ![df2](https://cloud.githubusercontent.com/assets/25247745/23210373/8bcb829c-f8fd-11e6-9b1b-ffc99d8d223a.png) ### Details May be related to : - https://github.com/pandas-dev/pandas/issues/8150 - https://github.com/pandas-dev/pandas/issues/15025 <details> INSTALLED VERSIONS ------------------ commit: None python: 3.6.0.final.0 python-bits: 64 OS: Linux OS-release: 4.9.9-1-ARCH machine: x86_64 processor: byteorder: little LC_ALL: None LANG: fr_FR.UTF-8 LOCALE: fr_FR.UTF-8 pandas: 0.19.2 nose: None pip: None setuptools: 34.2.0 Cython: None numpy: 1.12.0 scipy: 0.18.1 statsmodels: None xarray: None IPython: 5.1.0 sphinx: None patsy: None dateutil: 2.6.0 pytz: 2016.10 blosc: None bottleneck: None tables: None numexpr: None matplotlib: 2.0.0 openpyxl: None xlrd: None xlwt: None xlsxwriter: None lxml: None bs4: None html5lib: None httplib2: 0.10.3 apiclient: None sqlalchemy: None pymysql: None psycopg2: None jinja2: 2.9.5 boto: None pandas_datareader: None </details>
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15474/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15474/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/15475
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15475/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15475/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15475/events
https://github.com/pandas-dev/pandas/issues/15475
209,483,933
MDU6SXNzdWUyMDk0ODM5MzM=
15,475
Groupby all levels except the specified ones
{ "avatar_url": "https://avatars.githubusercontent.com/u/6556306?v=4", "events_url": "https://api.github.com/users/harisbal/events{/privacy}", "followers_url": "https://api.github.com/users/harisbal/followers", "following_url": "https://api.github.com/users/harisbal/following{/other_user}", "gists_url": "https://api.github.com/users/harisbal/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/harisbal", "id": 6556306, "login": "harisbal", "node_id": "MDQ6VXNlcjY1NTYzMDY=", "organizations_url": "https://api.github.com/users/harisbal/orgs", "received_events_url": "https://api.github.com/users/harisbal/received_events", "repos_url": "https://api.github.com/users/harisbal/repos", "site_admin": false, "starred_url": "https://api.github.com/users/harisbal/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/harisbal/subscriptions", "type": "User", "url": "https://api.github.com/users/harisbal" }
[ { "color": "4E9A06", "default": false, "description": null, "id": 76812, "name": "Enhancement", "node_id": "MDU6TGFiZWw3NjgxMg==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Enhancement" }, { "color": "729FCF", "default": false, "description": null, "id": 233160, "name": "Groupby", "node_id": "MDU6TGFiZWwyMzMxNjA=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Groupby" }, { "color": "AD7FA8", "default": false, "description": null, "id": 35818298, "name": "API Design", "node_id": "MDU6TGFiZWwzNTgxODI5OA==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/API%20Design" }, { "color": "0e8a16", "default": true, "description": null, "id": 717120670, "name": "good first issue", "node_id": "MDU6TGFiZWw3MTcxMjA2NzA=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/good%20first%20issue" } ]
closed
false
null
[]
{ "closed_at": "2019-01-26T00:51:26Z", "closed_issues": 2048, "created_at": "2018-03-29T12:00:12Z", "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": "", "due_on": "2019-01-31T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/55", "id": 3228419, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/55/labels", "node_id": "MDk6TWlsZXN0b25lMzIyODQxOQ==", "number": 55, "open_issues": 0, "state": "closed", "title": "0.24.0", "updated_at": "2019-01-29T07:42:40Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/55" }
4
2017-02-22T15:16:28Z
2018-11-03T13:56:52Z
2018-11-03T13:56:52Z
CONTRIBUTOR
null
Inspired by > http://stackoverflow.com/questions/25606478/grouping-by-everything-except-for-one-index-column-in-pandas I was thinking if it would be useful to add a parameter to the groupby function (e.g. allbut=True) so that pandas will group all levels except the specified ones) . I suggest so because in a multilevel index with several levels, eliminating just one level requires a quite verbose approach
{ "+1": 3, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 3, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15475/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15475/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/15476
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15476/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15476/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15476/events
https://github.com/pandas-dev/pandas/pull/15476
209,506,892
MDExOlB1bGxSZXF1ZXN0MTA3NDQ1Mjcw
15,476
The roll_quantile function now throws an exception instead of causing a segfault
{ "avatar_url": "https://avatars.githubusercontent.com/u/3327633?v=4", "events_url": "https://api.github.com/users/csizsek/events{/privacy}", "followers_url": "https://api.github.com/users/csizsek/followers", "following_url": "https://api.github.com/users/csizsek/following{/other_user}", "gists_url": "https://api.github.com/users/csizsek/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/csizsek", "id": 3327633, "login": "csizsek", "node_id": "MDQ6VXNlcjMzMjc2MzM=", "organizations_url": "https://api.github.com/users/csizsek/orgs", "received_events_url": "https://api.github.com/users/csizsek/received_events", "repos_url": "https://api.github.com/users/csizsek/repos", "site_admin": false, "starred_url": "https://api.github.com/users/csizsek/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/csizsek/subscriptions", "type": "User", "url": "https://api.github.com/users/csizsek" }
[ { "color": "ffa0ff", "default": false, "description": "Incorrect or improved errors from pandas", "id": 42670965, "name": "Error Reporting", "node_id": "MDU6TGFiZWw0MjY3MDk2NQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Error%20Reporting" }, { "color": "eb6420", "default": false, "description": "Non-arithmetic algos: value_counts, factorize, sorting, isin, clip, shift, diff", "id": 57296398, "name": "Algos", "node_id": "MDU6TGFiZWw1NzI5NjM5OA==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Algos" } ]
closed
false
null
[]
{ "closed_at": "2017-05-06T10:20:19Z", "closed_issues": 987, "created_at": "2016-02-08T15:30:21Z", "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": "after 0.19.x series", "due_on": "2017-05-12T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/39", "id": 1570595, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39/labels", "node_id": "MDk6TWlsZXN0b25lMTU3MDU5NQ==", "number": 39, "open_issues": 0, "state": "closed", "title": "0.20.0", "updated_at": "2018-10-28T08:18:42Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39" }
9
2017-02-22T16:29:15Z
2017-02-23T13:28:59Z
2017-02-23T13:24:28Z
CONTRIBUTOR
null
The roll_quantile function in window.pyx now raises a ValueError when the quantile value is not in [0.0, 1.0]. Also added tests for the new exception and extended test cases for the roll_quantile function. - [x] closes #15463 - [x] tests added / passed - [ ] does not pass ``git diff upstream/master | flake8 --diff`` because of some cdef code blocks in the file but my code does not generate any errors - [x] two EOL spaces removed by my editor
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 1, "laugh": 0, "rocket": 0, "total_count": 1, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15476/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15476/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/15476.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/15476", "merged_at": null, "patch_url": "https://github.com/pandas-dev/pandas/pull/15476.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/15476" }
https://api.github.com/repos/pandas-dev/pandas/issues/15477
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15477/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15477/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15477/events
https://github.com/pandas-dev/pandas/pull/15477
209,551,880
MDExOlB1bGxSZXF1ZXN0MTA3NDc3NzM5
15,477
CLN: split off frozen (immutable) data structures into pandas/indexes/frozen.py
{ "avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4", "events_url": "https://api.github.com/users/jreback/events{/privacy}", "followers_url": "https://api.github.com/users/jreback/followers", "following_url": "https://api.github.com/users/jreback/following{/other_user}", "gists_url": "https://api.github.com/users/jreback/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jreback", "id": 953992, "login": "jreback", "node_id": "MDQ6VXNlcjk1Mzk5Mg==", "organizations_url": "https://api.github.com/users/jreback/orgs", "received_events_url": "https://api.github.com/users/jreback/received_events", "repos_url": "https://api.github.com/users/jreback/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jreback/subscriptions", "type": "User", "url": "https://api.github.com/users/jreback" }
[ { "color": "0052cc", "default": false, "description": "pandas objects compatability with Numpy or Python functions", "id": 76865106, "name": "Compat", "node_id": "MDU6TGFiZWw3Njg2NTEwNg==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Compat" }, { "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": "2017-05-06T10:20:19Z", "closed_issues": 987, "created_at": "2016-02-08T15:30:21Z", "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": "after 0.19.x series", "due_on": "2017-05-12T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/39", "id": 1570595, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39/labels", "node_id": "MDk6TWlsZXN0b25lMTU3MDU5NQ==", "number": 39, "open_issues": 0, "state": "closed", "title": "0.20.0", "updated_at": "2018-10-28T08:18:42Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39" }
1
2017-02-22T19:15:18Z
2017-02-24T12:14:43Z
2017-02-24T12:14:43Z
CONTRIBUTOR
null
should make it a bit easier to work with these; and no reason to be in pandas/core/base.py
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15477/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15477/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/15477.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/15477", "merged_at": null, "patch_url": "https://github.com/pandas-dev/pandas/pull/15477.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/15477" }
https://api.github.com/repos/pandas-dev/pandas/issues/15478
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15478/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15478/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15478/events
https://github.com/pandas-dev/pandas/pull/15478
209,601,141
MDExOlB1bGxSZXF1ZXN0MTA3NTEyODQ0
15,478
BUG: GH #12223, GH #15262. Allow ints for names in MultiIndex
{ "avatar_url": "https://avatars.githubusercontent.com/u/15113894?v=4", "events_url": "https://api.github.com/users/Dr-Irv/events{/privacy}", "followers_url": "https://api.github.com/users/Dr-Irv/followers", "following_url": "https://api.github.com/users/Dr-Irv/following{/other_user}", "gists_url": "https://api.github.com/users/Dr-Irv/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Dr-Irv", "id": 15113894, "login": "Dr-Irv", "node_id": "MDQ6VXNlcjE1MTEzODk0", "organizations_url": "https://api.github.com/users/Dr-Irv/orgs", "received_events_url": "https://api.github.com/users/Dr-Irv/received_events", "repos_url": "https://api.github.com/users/Dr-Irv/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Dr-Irv/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Dr-Irv/subscriptions", "type": "User", "url": "https://api.github.com/users/Dr-Irv" }
[ { "color": "e10c02", "default": false, "description": null, "id": 76811, "name": "Bug", "node_id": "MDU6TGFiZWw3NjgxMQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug" }, { "color": "ededed", "default": false, "description": "__repr__ of pandas objects, to_string", "id": 13101118, "name": "Output-Formatting", "node_id": "MDU6TGFiZWwxMzEwMTExOA==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Output-Formatting" }, { "color": "207de5", "default": false, "description": null, "id": 71268330, "name": "MultiIndex", "node_id": "MDU6TGFiZWw3MTI2ODMzMA==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/MultiIndex" } ]
closed
false
null
[]
{ "closed_at": "2017-05-06T10:20:19Z", "closed_issues": 987, "created_at": "2016-02-08T15:30:21Z", "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": "after 0.19.x series", "due_on": "2017-05-12T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/39", "id": 1570595, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39/labels", "node_id": "MDk6TWlsZXN0b25lMTU3MDU5NQ==", "number": 39, "open_issues": 0, "state": "closed", "title": "0.20.0", "updated_at": "2018-10-28T08:18:42Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39" }
11
2017-02-22T22:25:10Z
2017-02-28T15:43:50Z
2017-02-24T20:18:20Z
CONTRIBUTOR
null
- [X] closes #12223 and #15262 - [X] tests added / passed - `pandas/tests/frame/test_combine_concat.py::TestDataFrameConcatCommon::test_concat_numerical_names` - [X] passes ``git diff upstream/master | flake8 --diff`` - [X] whatsnew entry See discussion in #10461 . Now if we internally know we need to call `get_level_values` for a specific level number, there is an internal function for doing that, which should allow better support for when people create indices with names that are integers.
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15478/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15478/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/15478.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/15478", "merged_at": null, "patch_url": "https://github.com/pandas-dev/pandas/pull/15478.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/15478" }
https://api.github.com/repos/pandas-dev/pandas/issues/15479
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15479/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15479/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15479/events
https://github.com/pandas-dev/pandas/pull/15479
209,677,192
MDExOlB1bGxSZXF1ZXN0MTA3NTY0MjY0
15,479
Fixed LatexFormatter with MultIndex index
{ "avatar_url": "https://avatars.githubusercontent.com/u/3869734?v=4", "events_url": "https://api.github.com/users/agartland/events{/privacy}", "followers_url": "https://api.github.com/users/agartland/followers", "following_url": "https://api.github.com/users/agartland/following{/other_user}", "gists_url": "https://api.github.com/users/agartland/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/agartland", "id": 3869734, "login": "agartland", "node_id": "MDQ6VXNlcjM4Njk3MzQ=", "organizations_url": "https://api.github.com/users/agartland/orgs", "received_events_url": "https://api.github.com/users/agartland/received_events", "repos_url": "https://api.github.com/users/agartland/repos", "site_admin": false, "starred_url": "https://api.github.com/users/agartland/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/agartland/subscriptions", "type": "User", "url": "https://api.github.com/users/agartland" }
[ { "color": "ededed", "default": false, "description": "__repr__ of pandas objects, to_string", "id": 13101118, "name": "Output-Formatting", "node_id": "MDU6TGFiZWwxMzEwMTExOA==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Output-Formatting" }, { "color": "006b75", "default": false, "description": "to_latex", "id": 251382258, "name": "IO LaTeX", "node_id": "MDU6TGFiZWwyNTEzODIyNTg=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20LaTeX" } ]
closed
false
null
[]
null
13
2017-02-23T06:38:46Z
2017-08-17T10:25:50Z
2017-08-17T10:25:50Z
CONTRIBUTOR
null
Used `MultiIndex.formatter()` to correctly sparsify the index for `to_latex()`. I was having an issue with printing Latex tables. This can be seen in the comparison of `to_string()` and `to_latex()` for the following table. Notice that the first row of `Vol8` should not be missing any labels because it marks a new label in the outermost level. This is correct in `to_string` and incorrect in `to_latex`. Output of `to_string()`: ``` Volunteer Visit Stim Marker Vol6 2 Long CD137+ 96 IFNg+ 192 Short CD154+ 96 14 Long IFNg+ 288 Short CD137+ 192 Vol7 2 Long CD69- 96 IFNg+ 96 Short CD137+ 96 4 Short CD137+ 192 IFNg+ 96 14 Short CD137+ 96 CD154+ 96 IFNg+ 96 Vol8 2 Short CD137+ 288 4 Long IFNg+ 192 ``` Output of `to_latex()`: ``` \begin{tabular}{llllr} \toprule & & & & Total cells \\ Volunteer & Visit & Stim & Marker & \\ \midrule Vol6 & 2 & Long & CD137+ & 96 \\ & & & IFNg+ & 192 \\ & & Short & CD154+ & 96 \\ & 14 & Long & IFNg+ & 288 \\ & & Short & CD137+ & 192 \\ Vol7 & 2 & Long & CD69- & 96 \\ & & & IFNg+ & 96 \\ & & Short & CD137+ & 96 \\ & 4 & & & 192 \\ & & & IFNg+ & 96 \\ & 14 & & CD137+ & 96 \\ & & & CD154+ & 96 \\ & & & IFNg+ & 96 \\ Vol8 & 2 & & CD137+ & 288 \\ & 4 & Long & IFNg+ & 192 \\ \bottomrule \end{tabular} ``` I've tested the relevant pieces of this code using this example, but I would be grateful for help with adding tests to the repository. I'm not set up to develop the `pandas` codebase currently and am not exactly sure how to add the right tests in the right places. Thanks! - [x] Addresses issue #15480 - [x] tests added / passed - [ ] passes ``git diff upstream/master | flake8 --diff``
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15479/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15479/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/15479.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/15479", "merged_at": null, "patch_url": "https://github.com/pandas-dev/pandas/pull/15479.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/15479" }
https://api.github.com/repos/pandas-dev/pandas/issues/15480
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15480/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15480/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15480/events
https://github.com/pandas-dev/pandas/issues/15480
209,677,711
MDU6SXNzdWUyMDk2Nzc3MTE=
15,480
Bug with sparsify in DataFrame.to_latex()
{ "avatar_url": "https://avatars.githubusercontent.com/u/3869734?v=4", "events_url": "https://api.github.com/users/agartland/events{/privacy}", "followers_url": "https://api.github.com/users/agartland/followers", "following_url": "https://api.github.com/users/agartland/following{/other_user}", "gists_url": "https://api.github.com/users/agartland/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/agartland", "id": 3869734, "login": "agartland", "node_id": "MDQ6VXNlcjM4Njk3MzQ=", "organizations_url": "https://api.github.com/users/agartland/orgs", "received_events_url": "https://api.github.com/users/agartland/received_events", "repos_url": "https://api.github.com/users/agartland/repos", "site_admin": false, "starred_url": "https://api.github.com/users/agartland/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/agartland/subscriptions", "type": "User", "url": "https://api.github.com/users/agartland" }
[ { "color": "ededed", "default": false, "description": "__repr__ of pandas objects, to_string", "id": 13101118, "name": "Output-Formatting", "node_id": "MDU6TGFiZWwxMzEwMTExOA==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Output-Formatting" }, { "color": "207de5", "default": false, "description": null, "id": 71268330, "name": "MultiIndex", "node_id": "MDU6TGFiZWw3MTI2ODMzMA==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/MultiIndex" }, { "color": "006b75", "default": false, "description": "to_latex", "id": 251382258, "name": "IO LaTeX", "node_id": "MDU6TGFiZWwyNTEzODIyNTg=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20LaTeX" } ]
closed
false
null
[]
null
2
2017-02-23T06:42:44Z
2018-06-10T18:58:36Z
2018-06-10T18:58:36Z
CONTRIBUTOR
null
Please see PR #15479 I was having an issue with printing Latex tables with a MultiIndex and wanting a sparse index displayed. This can be seen in the comparison of `to_string()` and `to_latex()` for the following table. Notice that the first row of `Vol8` should not be missing any labels because it marks a new label in the outermost level. This is correct in `to_string` and incorrect in `to_latex`. Output of `to_string()`: ``` Volunteer Visit Stim Marker Vol6 2 Long CD137+ 96 IFNg+ 192 Short CD154+ 96 14 Long IFNg+ 288 Short CD137+ 192 Vol7 2 Long CD69- 96 IFNg+ 96 Short CD137+ 96 4 Short CD137+ 192 IFNg+ 96 14 Short CD137+ 96 CD154+ 96 IFNg+ 96 Vol8 2 Short CD137+ 288 4 Long IFNg+ 192 ``` Output of `to_latex()`: ``` \begin{tabular}{llllr} \toprule & & & & Total cells \\ Volunteer & Visit & Stim & Marker & \\ \midrule Vol6 & 2 & Long & CD137+ & 96 \\ & & & IFNg+ & 192 \\ & & Short & CD154+ & 96 \\ & 14 & Long & IFNg+ & 288 \\ & & Short & CD137+ & 192 \\ Vol7 & 2 & Long & CD69- & 96 \\ & & & IFNg+ & 96 \\ & & Short & CD137+ & 96 \\ & 4 & & & 192 \\ & & & IFNg+ & 96 \\ & 14 & & CD137+ & 96 \\ & & & CD154+ & 96 \\ & & & IFNg+ & 96 \\ Vol8 & 2 & & CD137+ & 288 \\ & 4 & Long & IFNg+ & 192 \\ \bottomrule \end{tabular} ```
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15480/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15480/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/15481
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15481/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15481/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15481/events
https://github.com/pandas-dev/pandas/issues/15481
209,711,149
MDU6SXNzdWUyMDk3MTExNDk=
15,481
ENH: BusinessHour to support multiple opening and closing times per day
{ "avatar_url": "https://avatars.githubusercontent.com/u/1216791?v=4", "events_url": "https://api.github.com/users/jzwinck/events{/privacy}", "followers_url": "https://api.github.com/users/jzwinck/followers", "following_url": "https://api.github.com/users/jzwinck/following{/other_user}", "gists_url": "https://api.github.com/users/jzwinck/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jzwinck", "id": 1216791, "login": "jzwinck", "node_id": "MDQ6VXNlcjEyMTY3OTE=", "organizations_url": "https://api.github.com/users/jzwinck/orgs", "received_events_url": "https://api.github.com/users/jzwinck/received_events", "repos_url": "https://api.github.com/users/jzwinck/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jzwinck/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jzwinck/subscriptions", "type": "User", "url": "https://api.github.com/users/jzwinck" }
[ { "color": "4E9A06", "default": false, "description": null, "id": 76812, "name": "Enhancement", "node_id": "MDU6TGFiZWw3NjgxMg==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Enhancement" }, { "color": "0052cc", "default": false, "description": "DateOffsets", "id": 53181044, "name": "Frequency", "node_id": "MDU6TGFiZWw1MzE4MTA0NA==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Frequency" } ]
closed
false
null
[]
{ "closed_at": "2019-07-19T00:34:29Z", "closed_issues": 1289, "created_at": "2018-10-23T02:34:15Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4", "events_url": "https://api.github.com/users/jreback/events{/privacy}", "followers_url": "https://api.github.com/users/jreback/followers", "following_url": "https://api.github.com/users/jreback/following{/other_user}", "gists_url": "https://api.github.com/users/jreback/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jreback", "id": 953992, "login": "jreback", "node_id": "MDQ6VXNlcjk1Mzk5Mg==", "organizations_url": "https://api.github.com/users/jreback/orgs", "received_events_url": "https://api.github.com/users/jreback/received_events", "repos_url": "https://api.github.com/users/jreback/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jreback/subscriptions", "type": "User", "url": "https://api.github.com/users/jreback" }, "description": "", "due_on": "2019-07-01T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/61", "id": 3759483, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels", "node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==", "number": 61, "open_issues": 0, "state": "closed", "title": "0.25.0", "updated_at": "2020-01-02T15:10:40Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61" }
3
2017-02-23T09:45:43Z
2019-06-28T14:10:21Z
2019-06-28T14:10:21Z
CONTRIBUTOR
null
BusinessHour supports arbitrary start and end times. But some businesses open and close more than once per day. Some examples: * Restaurants, who might want to analyze foot traffic or revenue, but excluding times they don't open. * Stock markets, several of which have a lunch break. * Mexico, where standard business hours are 07:00-14:00 and 16:00-18:00. Many use cases could be satisfied by just two opens and two closes per day, but it might be just as well to support any amount.
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15481/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15481/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/15482
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15482/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15482/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15482/events
https://github.com/pandas-dev/pandas/issues/15482
209,736,546
MDU6SXNzdWUyMDk3MzY1NDY=
15,482
BUG: DataFrame.consolidate throws TypeError with bytes blocks
{ "avatar_url": "https://avatars.githubusercontent.com/u/7279321?v=4", "events_url": "https://api.github.com/users/adbull/events{/privacy}", "followers_url": "https://api.github.com/users/adbull/followers", "following_url": "https://api.github.com/users/adbull/following{/other_user}", "gists_url": "https://api.github.com/users/adbull/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/adbull", "id": 7279321, "login": "adbull", "node_id": "MDQ6VXNlcjcyNzkzMjE=", "organizations_url": "https://api.github.com/users/adbull/orgs", "received_events_url": "https://api.github.com/users/adbull/received_events", "repos_url": "https://api.github.com/users/adbull/repos", "site_admin": false, "starred_url": "https://api.github.com/users/adbull/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/adbull/subscriptions", "type": "User", "url": "https://api.github.com/users/adbull" }
[ { "color": "e10c02", "default": false, "description": null, "id": 76811, "name": "Bug", "node_id": "MDU6TGFiZWw3NjgxMQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug" }, { "color": "e102d8", "default": false, "description": "Unexpected or buggy dtype conversions", "id": 31404521, "name": "Dtype Conversions", "node_id": "MDU6TGFiZWwzMTQwNDUyMQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Dtype%20Conversions" }, { "color": "009800", "default": false, "description": "Duplicate issue or pull request", "id": 40153326, "name": "Duplicate Report", "node_id": "MDU6TGFiZWw0MDE1MzMyNg==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Duplicate%20Report" } ]
closed
false
null
[]
{ "closed_at": "2017-05-06T10:20:19Z", "closed_issues": 987, "created_at": "2016-02-08T15:30:21Z", "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": "after 0.19.x series", "due_on": "2017-05-12T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/39", "id": 1570595, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39/labels", "node_id": "MDk6TWlsZXN0b25lMTU3MDU5NQ==", "number": 39, "open_issues": 0, "state": "closed", "title": "0.20.0", "updated_at": "2018-10-28T08:18:42Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39" }
4
2017-02-23T11:33:44Z
2017-03-05T14:41:32Z
2017-03-05T14:41:26Z
CONTRIBUTOR
null
#### Code Sample, a copy-pastable example if possible ```python x = pd.DataFrame([['a']]).astype('S1') y = pd.concat([x]*2, 1) y.consolidate() ``` #### Problem description This throws the following error: ```python File "bug.py", line 3, in <module> y.consolidate() File "/home/anaconda3/lib/python3.5/site-packages/pandas/core/generic.py", line 2822, in consolidate cons_data = self._protect_consolidate(f) File "/home/anaconda3/lib/python3.5/site-packages/pandas/core/generic.py", line 2790, in _protect_consolidate result = f() File "/home/anaconda3/lib/python3.5/site-packages/pandas/core/generic.py", line 2821, in <lambda> f = lambda: self._data.consolidate() File "/home/anaconda3/lib/python3.5/site-packages/pandas/core/internals.py", line 3526, in consolidate bm._consolidate_inplace() File "/home/anaconda3/lib/python3.5/site-packages/pandas/core/internals.py", line 3531, in _consolidate_inplace self.blocks = tuple(_consolidate(self.blocks)) File "/home/anaconda3/lib/python3.5/site-packages/pandas/core/internals.py", line 4523, in _consolidate _can_consolidate=_can_consolidate) File "/home/anaconda3/lib/python3.5/site-packages/pandas/core/internals.py", line 4543, in _merge_blocks new_values = _vstack([b.values for b in blocks], dtype) File "/home/anaconda3/lib/python3.5/site-packages/pandas/core/internals.py", line 4584, in _vstack if dtype == _NS_DTYPE or dtype == _TD_DTYPE: TypeError: data type "bytes8" not understood ``` #### Expected Output No error should be thrown, y should be consolidated. #### Output of ``pd.show_versions()`` <details> INSTALLED VERSIONS ------------------ commit: None python: 3.5.2.final.0 python-bits: 64 OS: Linux OS-release: 4.9.8-100.fc24.x86_64 machine: x86_64 processor: x86_64 byteorder: little LC_ALL: C LANG: C LOCALE: None.None pandas: 0.19.2 nose: 1.3.7 pip: 9.0.1 setuptools: 27.2.0 Cython: 0.25.2 numpy: 1.11.3 scipy: 0.18.1 statsmodels: 0.8.0 xarray: 0.9.1 IPython: 4.2.0 sphinx: 1.5.1 patsy: 0.4.1 dateutil: 2.6.0 pytz: 2016.10 blosc: None bottleneck: 1.2.0 tables: 3.3.0 numexpr: 2.6.2 matplotlib: 2.0.0 openpyxl: 2.4.1 xlrd: 1.0.0 xlwt: 1.2.0 xlsxwriter: 0.9.6 lxml: 3.7.2 bs4: 4.5.3 html5lib: 0.999 httplib2: None apiclient: None sqlalchemy: 1.1.5 pymysql: None psycopg2: None jinja2: 2.9.4 boto: 2.45.0 pandas_datareader: None </details>
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15482/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15482/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/15483
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15483/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15483/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15483/events
https://github.com/pandas-dev/pandas/issues/15483
209,756,182
MDU6SXNzdWUyMDk3NTYxODI=
15,483
DEPR: .consolidate() should be non-public
{ "avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4", "events_url": "https://api.github.com/users/jreback/events{/privacy}", "followers_url": "https://api.github.com/users/jreback/followers", "following_url": "https://api.github.com/users/jreback/following{/other_user}", "gists_url": "https://api.github.com/users/jreback/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jreback", "id": 953992, "login": "jreback", "node_id": "MDQ6VXNlcjk1Mzk5Mg==", "organizations_url": "https://api.github.com/users/jreback/orgs", "received_events_url": "https://api.github.com/users/jreback/received_events", "repos_url": "https://api.github.com/users/jreback/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jreback/subscriptions", "type": "User", "url": "https://api.github.com/users/jreback" }
[ { "color": "5319e7", "default": false, "description": "Functionality to remove in pandas", "id": 87485152, "name": "Deprecate", "node_id": "MDU6TGFiZWw4NzQ4NTE1Mg==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Deprecate" } ]
closed
false
null
[]
{ "closed_at": "2017-05-06T10:20:19Z", "closed_issues": 987, "created_at": "2016-02-08T15:30:21Z", "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": "after 0.19.x series", "due_on": "2017-05-12T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/39", "id": 1570595, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39/labels", "node_id": "MDk6TWlsZXN0b25lMTU3MDU5NQ==", "number": 39, "open_issues": 0, "state": "closed", "title": "0.20.0", "updated_at": "2018-10-28T08:18:42Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39" }
3
2017-02-23T13:07:16Z
2017-02-28T10:43:23Z
2017-02-28T10:43:23Z
CONTRIBUTOR
null
no user reason to use this, and will eventually disappear in pandas 2.0 anyhow. I would rename to ``_consolidate()`` and then provide a deprecation warning for ``.consolidate()``. Would need to change some internal code to use the renamed version. xref https://github.com/pandas-dev/pandas/issues/15482#issuecomment-281986233
{ "+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/15483/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15483/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/15484
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15484/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15484/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15484/events
https://github.com/pandas-dev/pandas/pull/15484
209,757,710
MDExOlB1bGxSZXF1ZXN0MTA3NjIxODIy
15,484
CLN: remove pandas/io/gbq.py and tests and replace with pandas-gbq
{ "avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4", "events_url": "https://api.github.com/users/jreback/events{/privacy}", "followers_url": "https://api.github.com/users/jreback/followers", "following_url": "https://api.github.com/users/jreback/following{/other_user}", "gists_url": "https://api.github.com/users/jreback/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jreback", "id": 953992, "login": "jreback", "node_id": "MDQ6VXNlcjk1Mzk5Mg==", "organizations_url": "https://api.github.com/users/jreback/orgs", "received_events_url": "https://api.github.com/users/jreback/received_events", "repos_url": "https://api.github.com/users/jreback/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jreback/subscriptions", "type": "User", "url": "https://api.github.com/users/jreback" }
[ { "color": "0052cc", "default": false, "description": "pandas-gbq compatability", "id": 57351315, "name": "IO Google", "node_id": "MDU6TGFiZWw1NzM1MTMxNQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20Google" } ]
closed
false
null
[]
{ "closed_at": "2017-05-06T10:20:19Z", "closed_issues": 987, "created_at": "2016-02-08T15:30:21Z", "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": "after 0.19.x series", "due_on": "2017-05-12T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/39", "id": 1570595, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39/labels", "node_id": "MDk6TWlsZXN0b25lMTU3MDU5NQ==", "number": 39, "open_issues": 0, "state": "closed", "title": "0.20.0", "updated_at": "2018-10-28T08:18:42Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39" }
9
2017-02-23T13:14:15Z
2017-02-27T20:48:07Z
2017-02-27T20:48:07Z
CONTRIBUTOR
null
closes #15347 - going to have to migrate the docs as well, but need some work on pandas-gbq side for this. - should change the tests to check a bit more (a more comprehensive check)
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15484/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15484/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/15484.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/15484", "merged_at": null, "patch_url": "https://github.com/pandas-dev/pandas/pull/15484.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/15484" }
https://api.github.com/repos/pandas-dev/pandas/issues/15485
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15485/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15485/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15485/events
https://github.com/pandas-dev/pandas/issues/15485
209,804,647
MDU6SXNzdWUyMDk4MDQ2NDc=
15,485
DOC: docstrings of is_type_factory and is_instance_factory in config.py not accurate.
{ "avatar_url": "https://avatars.githubusercontent.com/u/8450892?v=4", "events_url": "https://api.github.com/users/fumitoh/events{/privacy}", "followers_url": "https://api.github.com/users/fumitoh/followers", "following_url": "https://api.github.com/users/fumitoh/following{/other_user}", "gists_url": "https://api.github.com/users/fumitoh/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/fumitoh", "id": 8450892, "login": "fumitoh", "node_id": "MDQ6VXNlcjg0NTA4OTI=", "organizations_url": "https://api.github.com/users/fumitoh/orgs", "received_events_url": "https://api.github.com/users/fumitoh/received_events", "repos_url": "https://api.github.com/users/fumitoh/repos", "site_admin": false, "starred_url": "https://api.github.com/users/fumitoh/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/fumitoh/subscriptions", "type": "User", "url": "https://api.github.com/users/fumitoh" }
[ { "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": "2017-05-06T10:20:19Z", "closed_issues": 987, "created_at": "2016-02-08T15:30:21Z", "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": "after 0.19.x series", "due_on": "2017-05-12T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/39", "id": 1570595, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39/labels", "node_id": "MDk6TWlsZXN0b25lMTU3MDU5NQ==", "number": 39, "open_issues": 0, "state": "closed", "title": "0.20.0", "updated_at": "2018-10-28T08:18:42Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39" }
5
2017-02-23T16:03:22Z
2017-02-24T19:53:56Z
2017-02-24T19:53:43Z
CONTRIBUTOR
null
The validators returned by the functions don't return True, contrary to the docstrings' descriptions.
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15485/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15485/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/15486
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15486/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15486/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15486/events
https://github.com/pandas-dev/pandas/issues/15486
209,831,451
MDU6SXNzdWUyMDk4MzE0NTE=
15,486
ENH: fill_value argument for shift
{ "avatar_url": "https://avatars.githubusercontent.com/u/7279321?v=4", "events_url": "https://api.github.com/users/adbull/events{/privacy}", "followers_url": "https://api.github.com/users/adbull/followers", "following_url": "https://api.github.com/users/adbull/following{/other_user}", "gists_url": "https://api.github.com/users/adbull/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/adbull", "id": 7279321, "login": "adbull", "node_id": "MDQ6VXNlcjcyNzkzMjE=", "organizations_url": "https://api.github.com/users/adbull/orgs", "received_events_url": "https://api.github.com/users/adbull/received_events", "repos_url": "https://api.github.com/users/adbull/repos", "site_admin": false, "starred_url": "https://api.github.com/users/adbull/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/adbull/subscriptions", "type": "User", "url": "https://api.github.com/users/adbull" }
[ { "color": "4E9A06", "default": false, "description": null, "id": 76812, "name": "Enhancement", "node_id": "MDU6TGFiZWw3NjgxMg==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Enhancement" }, { "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": "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": "02d7e1", "default": false, "description": "Concat, Merge/Join, Stack/Unstack, Explode", "id": 13098779, "name": "Reshaping", "node_id": "MDU6TGFiZWwxMzA5ODc3OQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Reshaping" }, { "color": "0e8a16", "default": true, "description": null, "id": 717120670, "name": "good first issue", "node_id": "MDU6TGFiZWw3MTcxMjA2NzA=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/good%20first%20issue" } ]
closed
false
null
[]
{ "closed_at": "2019-01-26T00:51:26Z", "closed_issues": 2048, "created_at": "2018-03-29T12:00:12Z", "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": "", "due_on": "2019-01-31T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/55", "id": 3228419, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/55/labels", "node_id": "MDk6TWlsZXN0b25lMzIyODQxOQ==", "number": 55, "open_issues": 0, "state": "closed", "title": "0.24.0", "updated_at": "2019-01-29T07:42:40Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/55" }
5
2017-02-23T17:35:25Z
2018-12-26T01:29:55Z
2018-12-26T01:29:55Z
CONTRIBUTOR
null
#### Feature Request At the moment, the Series/DataFrame `shift` methods always fill with nans, which causes an upcast for boolean/integer types. In cases where there is an appropriate non-nan fill value, it would be useful to provide this value in `shift`, rather than having to correctly downcast the result. This would presumably also be more efficient than `.shift().fillna()` in those cases where no upcast is required. #### Example Code ```python >>> pd.Series([True]).shift(fill_value=False) 0 False dtype: bool ```
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15486/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15486/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/15487
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15487/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15487/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15487/events
https://github.com/pandas-dev/pandas/issues/15487
209,831,581
MDU6SXNzdWUyMDk4MzE1ODE=
15,487
support CategoricalIndex for read_msgpack
{ "avatar_url": "https://avatars.githubusercontent.com/u/20513804?v=4", "events_url": "https://api.github.com/users/abast/events{/privacy}", "followers_url": "https://api.github.com/users/abast/followers", "following_url": "https://api.github.com/users/abast/following{/other_user}", "gists_url": "https://api.github.com/users/abast/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/abast", "id": 20513804, "login": "abast", "node_id": "MDQ6VXNlcjIwNTEzODA0", "organizations_url": "https://api.github.com/users/abast/orgs", "received_events_url": "https://api.github.com/users/abast/received_events", "repos_url": "https://api.github.com/users/abast/repos", "site_admin": false, "starred_url": "https://api.github.com/users/abast/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/abast/subscriptions", "type": "User", "url": "https://api.github.com/users/abast" }
[ { "color": "e10c02", "default": false, "description": null, "id": 76811, "name": "Bug", "node_id": "MDU6TGFiZWw3NjgxMQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug" }, { "color": "e11d21", "default": false, "description": "Categorical Data Type", "id": 78527356, "name": "Categorical", "node_id": "MDU6TGFiZWw3ODUyNzM1Ng==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Categorical" } ]
closed
false
null
[]
{ "closed_at": "2017-05-06T10:20:19Z", "closed_issues": 987, "created_at": "2016-02-08T15:30:21Z", "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": "after 0.19.x series", "due_on": "2017-05-12T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/39", "id": 1570595, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39/labels", "node_id": "MDk6TWlsZXN0b25lMTU3MDU5NQ==", "number": 39, "open_issues": 0, "state": "closed", "title": "0.20.0", "updated_at": "2018-10-28T08:18:42Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39" }
1
2017-02-23T17:35:55Z
2017-02-24T20:41:46Z
2017-02-24T20:41:46Z
CONTRIBUTOR
null
#### The following code fails: ``` import pandas as pd pdf = pd.DataFrame(dict(A=[1,1,1,2,2,2], B = [1,2,3,4,5,6])) pdf['A'] = pdf['A'].astype('category') pdf.set_index('A', inplace = True) pdf.to_msgpack('/some/path') pdf2 = pd.read_msgpack('/some/path') ``` ``` --------------------------------------------------------------------------- KeyError Traceback (most recent call last) <ipython-input-6-cab186b6bdcd> in <module>() 4 pdf.set_index('A', inplace = True) 5 pdf.to_msgpack(/some/path') ----> 6 pdf2 = pd.read_msgpack('/some/path') /.../Anaconda2/lib/python2.7/site-packages/pandas/io/packers.pyc in read_msgpack(path_or_buf, encoding, iterator, **kwargs) 200 if exists: 201 with open(path_or_buf, 'rb') as fh: --> 202 return read(fh) 203 204 # treat as a binary-like /.../Anaconda2/lib/python2.7/site-packages/pandas/io/packers.pyc in read(fh) 185 186 def read(fh): --> 187 l = list(unpack(fh, encoding=encoding, **kwargs)) 188 if len(l) == 1: 189 return l[0] pandas/msgpack/_unpacker.pyx in pandas.msgpack._unpacker.Unpacker.__next__ (pandas/msgpack/_unpacker.cpp:5618)() pandas/msgpack/_unpacker.pyx in pandas.msgpack._unpacker.Unpacker._unpack (pandas/msgpack/_unpacker.cpp:4602)() /.../Anaconda2/lib/python2.7/site-packages/pandas/io/packers.pyc in decode(obj) 557 data = unconvert(obj[u'data'], dtype, 558 obj.get(u'compress')) --> 559 return globals()[obj[u'klass']](data, dtype=dtype, name=obj[u'name']) 560 elif typ == u'range_index': 561 return globals()[obj[u'klass']](obj[u'start'], KeyError: u'CategoricalIndex' ``` #### Problem description `read_msgpack` apparently does not seem to support a CategoricalIndex, however, it is possible to save a dataframe with a CategoricalIndex using `to_msgpack`. Background: I am currently using the to_msgpack method to save a dask dataframe, where the index is (something like) a time stamp. It is not unique. I am overall very satisfied with the performance of `to_msgpack`, however when it comes to space efficency, having a categorical index would probably provide a significant improvement. Or maybe it works, but I am using it wrong? #### Output of ``pd.show_versions()`` <details> INSTALLED VERSIONS ------------------ commit: None python: 2.7.12.final.0 python-bits: 64 OS: Linux OS-release: 2.6.16.60-0.42.5-smp machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: en_US.UTF-8 LOCALE: None.None pandas: 0.19.2 nose: 1.3.7 pip: 8.1.2 setuptools: 27.2.0 Cython: 0.24.1 numpy: 1.11.1 scipy: 0.18.1 statsmodels: 0.6.1 xarray: None IPython: 5.2.2 sphinx: 1.4.6 patsy: 0.4.1 dateutil: 2.5.3 pytz: 2016.6.1 blosc: 1.4.4 bottleneck: 1.1.0 tables: 3.2.3.1 numexpr: 2.6.1 matplotlib: 1.5.3 openpyxl: 2.3.2 xlrd: 1.0.0 xlwt: 1.1.2 xlsxwriter: 0.9.3 lxml: 3.6.4 bs4: 4.5.1 html5lib: None httplib2: 0.9.2 apiclient: None sqlalchemy: 1.0.13 pymysql: None psycopg2: None jinja2: 2.8 boto: 2.42.0 pandas_datareader: None </details>
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15487/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15487/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/15488
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15488/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15488/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15488/events
https://github.com/pandas-dev/pandas/issues/15488
209,846,668
MDU6SXNzdWUyMDk4NDY2Njg=
15,488
Repr-ing SparseDataFrame after setting a value
{ "avatar_url": "https://avatars.githubusercontent.com/u/684364?v=4", "events_url": "https://api.github.com/users/kernc/events{/privacy}", "followers_url": "https://api.github.com/users/kernc/followers", "following_url": "https://api.github.com/users/kernc/following{/other_user}", "gists_url": "https://api.github.com/users/kernc/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kernc", "id": 684364, "login": "kernc", "node_id": "MDQ6VXNlcjY4NDM2NA==", "organizations_url": "https://api.github.com/users/kernc/orgs", "received_events_url": "https://api.github.com/users/kernc/received_events", "repos_url": "https://api.github.com/users/kernc/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kernc/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kernc/subscriptions", "type": "User", "url": "https://api.github.com/users/kernc" }
[ { "color": "e10c02", "default": false, "description": null, "id": 76811, "name": "Bug", "node_id": "MDU6TGFiZWw3NjgxMQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug" }, { "color": "0b02e1", "default": false, "description": "Related to indexing on series/frames, not to indexes themselves", "id": 2822098, "name": "Indexing", "node_id": "MDU6TGFiZWwyODIyMDk4", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Indexing" }, { "color": "009800", "default": false, "description": "Sparse Data Type", "id": 49182326, "name": "Sparse", "node_id": "MDU6TGFiZWw0OTE4MjMyNg==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Sparse" } ]
closed
false
null
[]
{ "closed_at": "2017-05-06T10:20:19Z", "closed_issues": 987, "created_at": "2016-02-08T15:30:21Z", "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": "after 0.19.x series", "due_on": "2017-05-12T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/39", "id": 1570595, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39/labels", "node_id": "MDk6TWlsZXN0b25lMTU3MDU5NQ==", "number": 39, "open_issues": 0, "state": "closed", "title": "0.20.0", "updated_at": "2018-10-28T08:18:42Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39" }
1
2017-02-23T18:36:33Z
2017-03-07T13:28:16Z
2017-03-07T13:28:16Z
CONTRIBUTOR
null
#### Code Sample, a copy-pastable example if possible ```python >>> sdf = pd.SparseDataFrame(index=[0, 1], columns=[0, 1]) >>> sdf[0][0] = 1 # This warns; ignore >>> sdf AttributeError: 'NoneType' object has no attribute 'type' ``` #### Problem description After some value is set on a copy of a SparseSeries, the enclosing SparseDataFrame can no longer be printed (raises AttributeError). #### Expected Output ```py >>> sdf 0 1 0 NaN NaN 1 NaN NaN ``` #### Output of ``pd.show_versions()`` 0.19.0+479.git
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15488/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15488/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/15489
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15489/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15489/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15489/events
https://github.com/pandas-dev/pandas/pull/15489
209,847,734
MDExOlB1bGxSZXF1ZXN0MTA3Njg2MjY2
15,489
BUG: repr SparseDataFrame after setting a value
{ "avatar_url": "https://avatars.githubusercontent.com/u/684364?v=4", "events_url": "https://api.github.com/users/kernc/events{/privacy}", "followers_url": "https://api.github.com/users/kernc/followers", "following_url": "https://api.github.com/users/kernc/following{/other_user}", "gists_url": "https://api.github.com/users/kernc/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kernc", "id": 684364, "login": "kernc", "node_id": "MDQ6VXNlcjY4NDM2NA==", "organizations_url": "https://api.github.com/users/kernc/orgs", "received_events_url": "https://api.github.com/users/kernc/received_events", "repos_url": "https://api.github.com/users/kernc/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kernc/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kernc/subscriptions", "type": "User", "url": "https://api.github.com/users/kernc" }
[ { "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": "009800", "default": false, "description": "Sparse Data Type", "id": 49182326, "name": "Sparse", "node_id": "MDU6TGFiZWw0OTE4MjMyNg==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Sparse" } ]
closed
false
null
[]
{ "closed_at": "2017-05-06T10:20:19Z", "closed_issues": 987, "created_at": "2016-02-08T15:30:21Z", "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": "after 0.19.x series", "due_on": "2017-05-12T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/39", "id": 1570595, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39/labels", "node_id": "MDk6TWlsZXN0b25lMTU3MDU5NQ==", "number": 39, "open_issues": 0, "state": "closed", "title": "0.20.0", "updated_at": "2018-10-28T08:18:42Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39" }
4
2017-02-23T18:41:06Z
2017-03-07T13:28:23Z
2017-03-07T13:28:16Z
CONTRIBUTOR
null
- [x] closes #15488 - [x] tests added / passed - [X] passes ``git diff upstream/master | 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/15489/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15489/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/15489.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/15489", "merged_at": null, "patch_url": "https://github.com/pandas-dev/pandas/pull/15489.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/15489" }
https://api.github.com/repos/pandas-dev/pandas/issues/15490
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15490/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15490/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15490/events
https://github.com/pandas-dev/pandas/issues/15490
209,852,852
MDU6SXNzdWUyMDk4NTI4NTI=
15,490
BUG: assignment with .at or .loc modifies dataframe when it fails
{ "avatar_url": "https://avatars.githubusercontent.com/u/7799980?v=4", "events_url": "https://api.github.com/users/stuz5000/events{/privacy}", "followers_url": "https://api.github.com/users/stuz5000/followers", "following_url": "https://api.github.com/users/stuz5000/following{/other_user}", "gists_url": "https://api.github.com/users/stuz5000/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/stuz5000", "id": 7799980, "login": "stuz5000", "node_id": "MDQ6VXNlcjc3OTk5ODA=", "organizations_url": "https://api.github.com/users/stuz5000/orgs", "received_events_url": "https://api.github.com/users/stuz5000/received_events", "repos_url": "https://api.github.com/users/stuz5000/repos", "site_admin": false, "starred_url": "https://api.github.com/users/stuz5000/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/stuz5000/subscriptions", "type": "User", "url": "https://api.github.com/users/stuz5000" }
[ { "color": "e10c02", "default": false, "description": null, "id": 76811, "name": "Bug", "node_id": "MDU6TGFiZWw3NjgxMQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug" }, { "color": "0b02e1", "default": false, "description": "Related to indexing on series/frames, not to indexes themselves", "id": 2822098, "name": "Indexing", "node_id": "MDU6TGFiZWwyODIyMDk4", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Indexing" } ]
open
false
null
[]
{ "closed_at": null, "closed_issues": 278, "created_at": "2013-01-06T03:02:01Z", "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": "Milestone for filing things away that may be reached someday (at which point such issues should be moved to the appropriate release milestone)", "due_on": "2022-12-31T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/20", "id": 239227, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/20/labels", "node_id": "MDk6TWlsZXN0b25lMjM5MjI3", "number": 20, "open_issues": 108, "state": "open", "title": "Someday", "updated_at": "2021-08-08T01:48:22Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/20" }
6
2017-02-23T19:01:54Z
2021-05-08T01:12:44Z
null
NONE
null
#### Code Sample, a copy-pastable example if possible ``` d = pd.DataFrame() try: d.set_value(0, "c", [1,2,4]) except Exception: print "Caught" print d # c is now in d ``` #### Problem description The above call set_value (correctly) fails and throw an exception. However, the dataframe has been modified. It has a new 'c' column of type float. Because the operation failed, it probably should have remained unchanged. #### Expected Output print d should print an empty dataframe. #### Output of ``pd.show_versions()`` <details> INSTALLED VERSIONS ------------------ commit: None python: 2.7.6.final.0 python-bits: 64 OS: Linux OS-release: 4.2.0-41-generic machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: en_US.UTF-8 LOCALE: None.None pandas: 0.19.1 nose: 1.3.1 pip: 1.5.4 setuptools: 3.3 Cython: 0.25.1 numpy: 1.11.2 scipy: 0.18.1 statsmodels: 0.6.1 xarray: None IPython: 4.2.1 sphinx: None patsy: 0.2.1 dateutil: 2.6.0 pytz: 2016.7 blosc: None bottleneck: None tables: 3.1.1 numexpr: 2.2.2 matplotlib: 1.3.1 openpyxl: 1.7.0 xlrd: 0.9.2 xlwt: 0.7.5 xlsxwriter: None lxml: None bs4: 4.2.1 html5lib: 0.999 httplib2: 0.8 apiclient: None sqlalchemy: 1.0.15 pymysql: None psycopg2: 2.4.5 (dt dec mx pq3 ext) jinja2: 2.8 boto: 2.41.0 pandas_datareader: None </details>
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15490/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15490/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/15491
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15491/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15491/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15491/events
https://github.com/pandas-dev/pandas/issues/15491
209,856,655
MDU6SXNzdWUyMDk4NTY2NTU=
15,491
.
{ "avatar_url": "https://avatars.githubusercontent.com/u/10137?v=4", "events_url": "https://api.github.com/users/ghost/events{/privacy}", "followers_url": "https://api.github.com/users/ghost/followers", "following_url": "https://api.github.com/users/ghost/following{/other_user}", "gists_url": "https://api.github.com/users/ghost/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/ghost", "id": 10137, "login": "ghost", "node_id": "MDQ6VXNlcjEwMTM3", "organizations_url": "https://api.github.com/users/ghost/orgs", "received_events_url": "https://api.github.com/users/ghost/received_events", "repos_url": "https://api.github.com/users/ghost/repos", "site_admin": false, "starred_url": "https://api.github.com/users/ghost/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ghost/subscriptions", "type": "User", "url": "https://api.github.com/users/ghost" }
[ { "color": "0052cc", "default": false, "description": null, "id": 34444536, "name": "Usage Question", "node_id": "MDU6TGFiZWwzNDQ0NDUzNg==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Usage%20Question" }, { "color": "006b75", "default": false, "description": "Arithmetic, Comparison, and Logical operations", "id": 47223669, "name": "Numeric Operations", "node_id": "MDU6TGFiZWw0NzIyMzY2OQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Numeric%20Operations" } ]
closed
false
null
[]
{ "closed_at": null, "closed_issues": 2361, "created_at": "2015-02-26T19:29:05Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/1020496?v=4", "events_url": "https://api.github.com/users/jorisvandenbossche/events{/privacy}", "followers_url": "https://api.github.com/users/jorisvandenbossche/followers", "following_url": "https://api.github.com/users/jorisvandenbossche/following{/other_user}", "gists_url": "https://api.github.com/users/jorisvandenbossche/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jorisvandenbossche", "id": 1020496, "login": "jorisvandenbossche", "node_id": "MDQ6VXNlcjEwMjA0OTY=", "organizations_url": "https://api.github.com/users/jorisvandenbossche/orgs", "received_events_url": "https://api.github.com/users/jorisvandenbossche/received_events", "repos_url": "https://api.github.com/users/jorisvandenbossche/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jorisvandenbossche/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jorisvandenbossche/subscriptions", "type": "User", "url": "https://api.github.com/users/jorisvandenbossche" }, "description": "A milestone for closed or open issues for which there is no action needed (eg not a bug, just a question / discussion, nothing to resolve, wontfix, etc).\r\n\r\n", "due_on": null, "html_url": "https://github.com/pandas-dev/pandas/milestone/33", "id": 997544, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/33/labels", "node_id": "MDk6TWlsZXN0b25lOTk3NTQ0", "number": 33, "open_issues": 11, "state": "open", "title": "No action", "updated_at": "2021-11-19T17:33:16Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/33" }
1
2017-02-23T19:17:21Z
2017-08-03T14:12:41Z
2017-02-23T19:22:59Z
NONE
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/15491/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15491/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/15492
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15492/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15492/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15492/events
https://github.com/pandas-dev/pandas/issues/15492
209,874,911
MDU6SXNzdWUyMDk4NzQ5MTE=
15,492
ERR: better message for HDFStore date query with non date columns
{ "avatar_url": "https://avatars.githubusercontent.com/u/1924092?v=4", "events_url": "https://api.github.com/users/chris-b1/events{/privacy}", "followers_url": "https://api.github.com/users/chris-b1/followers", "following_url": "https://api.github.com/users/chris-b1/following{/other_user}", "gists_url": "https://api.github.com/users/chris-b1/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/chris-b1", "id": 1924092, "login": "chris-b1", "node_id": "MDQ6VXNlcjE5MjQwOTI=", "organizations_url": "https://api.github.com/users/chris-b1/orgs", "received_events_url": "https://api.github.com/users/chris-b1/received_events", "repos_url": "https://api.github.com/users/chris-b1/repos", "site_admin": false, "starred_url": "https://api.github.com/users/chris-b1/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/chris-b1/subscriptions", "type": "User", "url": "https://api.github.com/users/chris-b1" }
[ { "color": "ffa0ff", "default": false, "description": "Incorrect or improved errors from pandas", "id": 42670965, "name": "Error Reporting", "node_id": "MDU6TGFiZWw0MjY3MDk2NQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Error%20Reporting" }, { "color": "5319e7", "default": false, "description": "read_hdf, HDFStore", "id": 47229190, "name": "IO HDF5", "node_id": "MDU6TGFiZWw0NzIyOTE5MA==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20HDF5" } ]
closed
false
null
[]
{ "closed_at": "2017-05-06T10:20:19Z", "closed_issues": 987, "created_at": "2016-02-08T15:30:21Z", "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": "after 0.19.x series", "due_on": "2017-05-12T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/39", "id": 1570595, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39/labels", "node_id": "MDk6TWlsZXN0b25lMTU3MDU5NQ==", "number": 39, "open_issues": 0, "state": "closed", "title": "0.20.0", "updated_at": "2018-10-28T08:18:42Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39" }
2
2017-02-23T20:27:33Z
2017-03-03T15:07:47Z
2017-03-03T15:07:47Z
CONTRIBUTOR
null
When querying a `HDFStore` with a timestamp, on a column that (in my case, inadvertently) isn't a datetime, the error message isn't helpful; I think we can trap and show something better here. ```python df = pd.DataFrame({'date': ['2014-01-01', '2014-01-02'], 'values': [1, 2]}) df.to_hdf('store.h5', 'df', format='t', data_columns=['date']) ts = pd.Timestamp('2014-01-01') In [18]: pd.read_hdf('store.h5', 'df', where='date > ts') File "<string>", line 1 (date > 1970-01-01 00:00:01.388556) ^ SyntaxError: invalid token ``` pandas 0.19.2
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15492/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15492/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/15493
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15493/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15493/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15493/events
https://github.com/pandas-dev/pandas/pull/15493
209,890,777
MDExOlB1bGxSZXF1ZXN0MTA3NzE3NjUy
15,493
msgpack supports CategoricalIndex
{ "avatar_url": "https://avatars.githubusercontent.com/u/20513804?v=4", "events_url": "https://api.github.com/users/abast/events{/privacy}", "followers_url": "https://api.github.com/users/abast/followers", "following_url": "https://api.github.com/users/abast/following{/other_user}", "gists_url": "https://api.github.com/users/abast/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/abast", "id": 20513804, "login": "abast", "node_id": "MDQ6VXNlcjIwNTEzODA0", "organizations_url": "https://api.github.com/users/abast/orgs", "received_events_url": "https://api.github.com/users/abast/received_events", "repos_url": "https://api.github.com/users/abast/repos", "site_admin": false, "starred_url": "https://api.github.com/users/abast/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/abast/subscriptions", "type": "User", "url": "https://api.github.com/users/abast" }
[ { "color": "0052cc", "default": false, "description": "pandas objects compatability with Numpy or Python functions", "id": 76865106, "name": "Compat", "node_id": "MDU6TGFiZWw3Njg2NTEwNg==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Compat" }, { "color": "e11d21", "default": false, "description": "Categorical Data Type", "id": 78527356, "name": "Categorical", "node_id": "MDU6TGFiZWw3ODUyNzM1Ng==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Categorical" } ]
closed
false
null
[]
{ "closed_at": "2017-05-06T10:20:19Z", "closed_issues": 987, "created_at": "2016-02-08T15:30:21Z", "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": "after 0.19.x series", "due_on": "2017-05-12T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/39", "id": 1570595, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39/labels", "node_id": "MDk6TWlsZXN0b25lMTU3MDU5NQ==", "number": 39, "open_issues": 0, "state": "closed", "title": "0.20.0", "updated_at": "2018-10-28T08:18:42Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39" }
1
2017-02-23T21:33:50Z
2017-02-24T20:41:47Z
2017-02-24T20:41:47Z
CONTRIBUTOR
null
- [x] closes #15487 - [x] tests added / passed - [x] passes ``git diff upstream/master | flake8 --diff`` - [x] whatsnew entry This allows `read_msgpack` to read DataFrames with a categorical index. I'd assume that my testcase needs some improvement. Where can I find some information where and how to add the "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/15493/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15493/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/15493.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/15493", "merged_at": null, "patch_url": "https://github.com/pandas-dev/pandas/pull/15493.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/15493" }
https://api.github.com/repos/pandas-dev/pandas/issues/15494
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15494/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15494/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15494/events
https://github.com/pandas-dev/pandas/issues/15494
209,936,967
MDU6SXNzdWUyMDk5MzY5Njc=
15,494
BUG: dt.strftime causes TypeError when there is only one row in DataFrame
{ "avatar_url": "https://avatars.githubusercontent.com/u/25993728?v=4", "events_url": "https://api.github.com/users/yp514/events{/privacy}", "followers_url": "https://api.github.com/users/yp514/followers", "following_url": "https://api.github.com/users/yp514/following{/other_user}", "gists_url": "https://api.github.com/users/yp514/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/yp514", "id": 25993728, "login": "yp514", "node_id": "MDQ6VXNlcjI1OTkzNzI4", "organizations_url": "https://api.github.com/users/yp514/orgs", "received_events_url": "https://api.github.com/users/yp514/received_events", "repos_url": "https://api.github.com/users/yp514/repos", "site_admin": false, "starred_url": "https://api.github.com/users/yp514/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/yp514/subscriptions", "type": "User", "url": "https://api.github.com/users/yp514" }
[ { "color": "e10c02", "default": false, "description": null, "id": 76811, "name": "Bug", "node_id": "MDU6TGFiZWw3NjgxMQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug" }, { "color": "0b02e1", "default": false, "description": "Related to indexing on series/frames, not to indexes themselves", "id": 2822098, "name": "Indexing", "node_id": "MDU6TGFiZWwyODIyMDk4", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Indexing" }, { "color": "e102d8", "default": false, "description": "Unexpected or buggy dtype conversions", "id": 31404521, "name": "Dtype Conversions", "node_id": "MDU6TGFiZWwzMTQwNDUyMQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Dtype%20Conversions" } ]
closed
false
null
[]
{ "closed_at": "2018-05-16T03:09:58Z", "closed_issues": 1645, "created_at": "2017-10-20T10:17:09Z", "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": "after 0.22", "due_on": "2018-05-15T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/53", "id": 2853937, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/53/labels", "node_id": "MDk6TWlsZXN0b25lMjg1MzkzNw==", "number": 53, "open_issues": 0, "state": "closed", "title": "0.23.0", "updated_at": "2018-08-20T06:48:57Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/53" }
5
2017-02-24T01:43:47Z
2018-01-10T00:17:29Z
2018-01-10T00:17:29Z
NONE
null
Code below outlines the issue, if I have a DataFrame with a date column and want to transfer the datetime to string using df.loc[:,'date'] = df['date'].dt.strftime('%Y-%m-%d'), it works fine as long as there is more than 1 row in the Data Frame. If there is only one row then you get a Type Error (see below for full error). If, on the other hand, I use df['date']=df['date'].dt.strftime('%Y-%m-%d') then it works fine for one or more rows. This was observed on both 0.17.1 and 0.19.2. ----- Error Generated ----- Traceback (most recent call last): File "/usr/local/lib/python3.4/site-packages/pandas/core/internals.py", line 2265, in _try_coerce_args other = other.astype('i8', copy=False).view('i8') ValueError: invalid literal for int() with base 10: '2017-02-23' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "./testpd.py", line 35, in <module> do_stuff(d1) File "./testpd.py", line 17, in do_stuff df.loc[:,'date'] = df['date'].dt.strftime('%Y-%m-%d') File "/usr/local/lib/python3.4/site-packages/pandas/core/indexing.py", line 141, in __setitem__ self._setitem_with_indexer(indexer, value) File "/usr/local/lib/python3.4/site-packages/pandas/core/indexing.py", line 533, in _setitem_with_indexer setter(labels[0], value) File "/usr/local/lib/python3.4/site-packages/pandas/core/indexing.py", line 473, in setter s._data = s._data.setitem(indexer=pi, value=v) File "/usr/local/lib/python3.4/site-packages/pandas/core/internals.py", line 3168, in setitem return self.apply('setitem', **kwargs) File "/usr/local/lib/python3.4/site-packages/pandas/core/internals.py", line 3056, in apply applied = getattr(b, f)(**kwargs) File "/usr/local/lib/python3.4/site-packages/pandas/core/internals.py", line 668, in setitem values, _, value, _ = self._try_coerce_args(self.values, value) File "/usr/local/lib/python3.4/site-packages/pandas/core/internals.py", line 2270, in _try_coerce_args raise TypeError TypeError ----- Code to Reproduce Issue ----- ``` #!/usr/bin/env python3 """ Demonstrate Pandas issue """ import datetime as dt import pandas as pd def do_stuff(d): df = pd.DataFrame(d) df['date'] = df['date'].dt.strftime('%Y-%m-%d') df['id'] = df['id'].astype(str) df['fl'] = df['fl'].astype(str) print("df[df]: " + str(df)) df = pd.DataFrame(d) df.loc[:,'id'] = df['id'].astype(str) df.loc[:,'fl'] = df['fl'].astype(str) df.loc[:,'date'] = df['date'].dt.strftime('%Y-%m-%d') print("df.loc[df]: " + str(df)) """ With 2 rows in Data Frame, works fine """ d2 = { 'date': pd.Series([dt.datetime.today(), dt.datetime.today()]), 'bsym': pd.Series(['blah', 'blah2']), 'id': pd.Series([1, 2]), 'fl': pd.Series([1.5, 3]) } print("D2...") do_stuff(d2) """ With 1 row in Data Frame, exception occurs on date column """ d1 = { 'date': pd.Series([dt.datetime.today()]), 'bsym': pd.Series(['blah']), 'id': pd.Series([1]), 'fl': pd.Series([1.5]) } print("D1...") do_stuff(d1) ```
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15494/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15494/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/15495
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15495/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15495/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15495/events
https://github.com/pandas-dev/pandas/issues/15495
209,944,482
MDU6SXNzdWUyMDk5NDQ0ODI=
15,495
Update plotting functions to use the new Matplotlib default styles
{ "avatar_url": "https://avatars.githubusercontent.com/u/22940964?v=4", "events_url": "https://api.github.com/users/apcamargo/events{/privacy}", "followers_url": "https://api.github.com/users/apcamargo/followers", "following_url": "https://api.github.com/users/apcamargo/following{/other_user}", "gists_url": "https://api.github.com/users/apcamargo/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/apcamargo", "id": 22940964, "login": "apcamargo", "node_id": "MDQ6VXNlcjIyOTQwOTY0", "organizations_url": "https://api.github.com/users/apcamargo/orgs", "received_events_url": "https://api.github.com/users/apcamargo/received_events", "repos_url": "https://api.github.com/users/apcamargo/repos", "site_admin": false, "starred_url": "https://api.github.com/users/apcamargo/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/apcamargo/subscriptions", "type": "User", "url": "https://api.github.com/users/apcamargo" }
[ { "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": "2017-10-28T18:54:27Z", "closed_issues": 764, "created_at": "2017-03-23T13:26:25Z", "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": "2017-10-27T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/46", "id": 2406656, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/46/labels", "node_id": "MDk6TWlsZXN0b25lMjQwNjY1Ng==", "number": 46, "open_issues": 0, "state": "closed", "title": "0.21.0", "updated_at": "2018-07-08T21:53:21Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/46" }
11
2017-02-24T02:40:04Z
2017-09-24T10:11:29Z
2017-09-24T10:11:25Z
NONE
null
In version 2.0.0, Matplotlib introduced several changes in it's default style. Pandas plotting functions should be updated to use the new style. http://matplotlib.org/users/dflt_style_changes.html
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15495/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15495/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/15496
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15496/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15496/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15496/events
https://github.com/pandas-dev/pandas/pull/15496
209,987,346
MDExOlB1bGxSZXF1ZXN0MTA3Nzg2NTM5
15,496
BUG: reindex_like after shape comparison
{ "avatar_url": "https://avatars.githubusercontent.com/u/25999205?v=4", "events_url": "https://api.github.com/users/jojomdt/events{/privacy}", "followers_url": "https://api.github.com/users/jojomdt/followers", "following_url": "https://api.github.com/users/jojomdt/following{/other_user}", "gists_url": "https://api.github.com/users/jojomdt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jojomdt", "id": 25999205, "login": "jojomdt", "node_id": "MDQ6VXNlcjI1OTk5MjA1", "organizations_url": "https://api.github.com/users/jojomdt/orgs", "received_events_url": "https://api.github.com/users/jojomdt/received_events", "repos_url": "https://api.github.com/users/jojomdt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jojomdt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jojomdt/subscriptions", "type": "User", "url": "https://api.github.com/users/jojomdt" }
[ { "color": "C4A000", "default": false, "description": "pandas testing functions or related to the test suite", "id": 127685, "name": "Testing", "node_id": "MDU6TGFiZWwxMjc2ODU=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Testing" } ]
closed
false
null
[]
{ "closed_at": "2017-05-06T10:20:19Z", "closed_issues": 987, "created_at": "2016-02-08T15:30:21Z", "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": "after 0.19.x series", "due_on": "2017-05-12T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/39", "id": 1570595, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39/labels", "node_id": "MDk6TWlsZXN0b25lMTU3MDU5NQ==", "number": 39, "open_issues": 0, "state": "closed", "title": "0.20.0", "updated_at": "2018-10-28T08:18:42Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39" }
5
2017-02-24T08:27:50Z
2017-02-27T19:50:46Z
2017-02-27T19:50:03Z
CONTRIBUTOR
null
in assert_frame_equal, if check_like, the former code reindex_like before shape comparison. for example: if left.shape=(2,2), right.shpae=(2.0), after reindex_like, left.shape=(2,0),right.shape=(2,0),then the shape comparison will not find out that the two dataframes are different. For that, the assert_frame_equal will not raise assertion errors. But in fact it should raise. @jreback
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15496/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15496/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/15496.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/15496", "merged_at": null, "patch_url": "https://github.com/pandas-dev/pandas/pull/15496.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/15496" }
https://api.github.com/repos/pandas-dev/pandas/issues/15497
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15497/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15497/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15497/events
https://github.com/pandas-dev/pandas/pull/15497
210,012,069
MDExOlB1bGxSZXF1ZXN0MTA3ODAzODUy
15,497
ENH: Native conversion from/to scipy.sparse matrix to SparseDataFrame
{ "avatar_url": "https://avatars.githubusercontent.com/u/684364?v=4", "events_url": "https://api.github.com/users/kernc/events{/privacy}", "followers_url": "https://api.github.com/users/kernc/followers", "following_url": "https://api.github.com/users/kernc/following{/other_user}", "gists_url": "https://api.github.com/users/kernc/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kernc", "id": 684364, "login": "kernc", "node_id": "MDQ6VXNlcjY4NDM2NA==", "organizations_url": "https://api.github.com/users/kernc/orgs", "received_events_url": "https://api.github.com/users/kernc/received_events", "repos_url": "https://api.github.com/users/kernc/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kernc/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kernc/subscriptions", "type": "User", "url": "https://api.github.com/users/kernc" }
[ { "color": "4E9A06", "default": false, "description": null, "id": 76812, "name": "Enhancement", "node_id": "MDU6TGFiZWw3NjgxMg==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Enhancement" }, { "color": "e102d8", "default": false, "description": "Unexpected or buggy dtype conversions", "id": 31404521, "name": "Dtype Conversions", "node_id": "MDU6TGFiZWwzMTQwNDUyMQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Dtype%20Conversions" }, { "color": "009800", "default": false, "description": "Sparse Data Type", "id": 49182326, "name": "Sparse", "node_id": "MDU6TGFiZWw0OTE4MjMyNg==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Sparse" } ]
closed
false
null
[]
{ "closed_at": "2017-05-06T10:20:19Z", "closed_issues": 987, "created_at": "2016-02-08T15:30:21Z", "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": "after 0.19.x series", "due_on": "2017-05-12T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/39", "id": 1570595, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39/labels", "node_id": "MDk6TWlsZXN0b25lMTU3MDU5NQ==", "number": 39, "open_issues": 0, "state": "closed", "title": "0.20.0", "updated_at": "2018-10-28T08:18:42Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39" }
27
2017-02-24T10:28:38Z
2018-10-23T16:34:39Z
2017-03-10T14:36:34Z
CONTRIBUTOR
null
- [x] closes #4343 - [x] tests added / passed - [X] passes ``git diff upstream/master | 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/15497/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15497/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/15497.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/15497", "merged_at": null, "patch_url": "https://github.com/pandas-dev/pandas/pull/15497.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/15497" }
https://api.github.com/repos/pandas-dev/pandas/issues/15498
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15498/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15498/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15498/events
https://github.com/pandas-dev/pandas/issues/15498
210,050,254
MDU6SXNzdWUyMTAwNTAyNTQ=
15,498
PERF: categorical rank
{ "avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4", "events_url": "https://api.github.com/users/jreback/events{/privacy}", "followers_url": "https://api.github.com/users/jreback/followers", "following_url": "https://api.github.com/users/jreback/following{/other_user}", "gists_url": "https://api.github.com/users/jreback/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jreback", "id": 953992, "login": "jreback", "node_id": "MDQ6VXNlcjk1Mzk5Mg==", "organizations_url": "https://api.github.com/users/jreback/orgs", "received_events_url": "https://api.github.com/users/jreback/received_events", "repos_url": "https://api.github.com/users/jreback/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jreback/subscriptions", "type": "User", "url": "https://api.github.com/users/jreback" }
[ { "color": "a10c02", "default": false, "description": "Memory or execution speed performance", "id": 8935311, "name": "Performance", "node_id": "MDU6TGFiZWw4OTM1MzEx", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Performance" }, { "color": "e11d21", "default": false, "description": "Categorical Data Type", "id": 78527356, "name": "Categorical", "node_id": "MDU6TGFiZWw3ODUyNzM1Ng==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Categorical" } ]
closed
false
null
[]
{ "closed_at": "2017-05-06T10:20:19Z", "closed_issues": 987, "created_at": "2016-02-08T15:30:21Z", "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": "after 0.19.x series", "due_on": "2017-05-12T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/39", "id": 1570595, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39/labels", "node_id": "MDk6TWlsZXN0b25lMTU3MDU5NQ==", "number": 39, "open_issues": 0, "state": "closed", "title": "0.20.0", "updated_at": "2018-10-28T08:18:42Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39" }
5
2017-02-24T13:38:39Z
2017-03-01T21:56:17Z
2017-03-01T21:56:17Z
CONTRIBUTOR
null
xref https://github.com/pandas-dev/pandas/pull/15422#discussion_r102941126 easy enough after #15422 to rank the categories themselves rather than using expanded values; prob most relevant for ``object`` dtypes. ``` In [15]: s = Series(tm.makeCategoricalIndex(100000)) In [16]: res = Series(np.array(s.cat.rename_categories(Series(s.cat.categories).rank()))).rank() In [17]: res2 = s.rank() In [18]: res.equals(res2) Out[18]: True In [19]: %timeit Series(np.array(s.cat.rename_categories(Series(s.cat.categories).rank()))).rank() 100 loops, best of 3: 4.39 ms per loop In [20]: %timeit s.rank() 10 loops, best of 3: 132 ms per loop ```
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15498/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15498/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/15499
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15499/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15499/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15499/events
https://github.com/pandas-dev/pandas/pull/15499
210,071,833
MDExOlB1bGxSZXF1ZXN0MTA3ODQ1NzY5
15,499
DOC: Fix to docstrings of is_type_factory and is_instance_factory
{ "avatar_url": "https://avatars.githubusercontent.com/u/8450892?v=4", "events_url": "https://api.github.com/users/fumitoh/events{/privacy}", "followers_url": "https://api.github.com/users/fumitoh/followers", "following_url": "https://api.github.com/users/fumitoh/following{/other_user}", "gists_url": "https://api.github.com/users/fumitoh/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/fumitoh", "id": 8450892, "login": "fumitoh", "node_id": "MDQ6VXNlcjg0NTA4OTI=", "organizations_url": "https://api.github.com/users/fumitoh/orgs", "received_events_url": "https://api.github.com/users/fumitoh/received_events", "repos_url": "https://api.github.com/users/fumitoh/repos", "site_admin": false, "starred_url": "https://api.github.com/users/fumitoh/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/fumitoh/subscriptions", "type": "User", "url": "https://api.github.com/users/fumitoh" }
[ { "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": "2017-05-06T10:20:19Z", "closed_issues": 987, "created_at": "2016-02-08T15:30:21Z", "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": "after 0.19.x series", "due_on": "2017-05-12T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/39", "id": 1570595, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39/labels", "node_id": "MDk6TWlsZXN0b25lMTU3MDU5NQ==", "number": 39, "open_issues": 0, "state": "closed", "title": "0.20.0", "updated_at": "2018-10-28T08:18:42Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39" }
2
2017-02-24T15:07:46Z
2017-02-25T04:40:24Z
2017-02-24T19:53:44Z
CONTRIBUTOR
null
- [X] closes #15485 - [ ] tests added / passed - [ ] passes ``git diff upstream/master | 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/15499/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15499/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/15499.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/15499", "merged_at": "2017-02-24T19:53:43Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/15499.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/15499" }
https://api.github.com/repos/pandas-dev/pandas/issues/15500
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15500/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15500/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15500/events
https://github.com/pandas-dev/pandas/issues/15500
210,134,583
MDU6SXNzdWUyMTAxMzQ1ODM=
15,500
PeriodIndex becomes DatetimeIndex on multiple BDay resampling
{ "avatar_url": "https://avatars.githubusercontent.com/u/10658783?v=4", "events_url": "https://api.github.com/users/erbian/events{/privacy}", "followers_url": "https://api.github.com/users/erbian/followers", "following_url": "https://api.github.com/users/erbian/following{/other_user}", "gists_url": "https://api.github.com/users/erbian/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/erbian", "id": 10658783, "login": "erbian", "node_id": "MDQ6VXNlcjEwNjU4Nzgz", "organizations_url": "https://api.github.com/users/erbian/orgs", "received_events_url": "https://api.github.com/users/erbian/received_events", "repos_url": "https://api.github.com/users/erbian/repos", "site_admin": false, "starred_url": "https://api.github.com/users/erbian/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/erbian/subscriptions", "type": "User", "url": "https://api.github.com/users/erbian" }
[ { "color": "009800", "default": false, "description": "Duplicate issue or pull request", "id": 40153326, "name": "Duplicate Report", "node_id": "MDU6TGFiZWw0MDE1MzMyNg==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Duplicate%20Report" }, { "color": "eb6420", "default": false, "description": "Period data type", "id": 60635328, "name": "Period", "node_id": "MDU6TGFiZWw2MDYzNTMyOA==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Period" }, { "color": "207de5", "default": false, "description": "resample method", "id": 74975453, "name": "Resample", "node_id": "MDU6TGFiZWw3NDk3NTQ1Mw==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Resample" } ]
closed
false
null
[]
{ "closed_at": null, "closed_issues": 2361, "created_at": "2015-02-26T19:29:05Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/1020496?v=4", "events_url": "https://api.github.com/users/jorisvandenbossche/events{/privacy}", "followers_url": "https://api.github.com/users/jorisvandenbossche/followers", "following_url": "https://api.github.com/users/jorisvandenbossche/following{/other_user}", "gists_url": "https://api.github.com/users/jorisvandenbossche/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jorisvandenbossche", "id": 1020496, "login": "jorisvandenbossche", "node_id": "MDQ6VXNlcjEwMjA0OTY=", "organizations_url": "https://api.github.com/users/jorisvandenbossche/orgs", "received_events_url": "https://api.github.com/users/jorisvandenbossche/received_events", "repos_url": "https://api.github.com/users/jorisvandenbossche/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jorisvandenbossche/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jorisvandenbossche/subscriptions", "type": "User", "url": "https://api.github.com/users/jorisvandenbossche" }, "description": "A milestone for closed or open issues for which there is no action needed (eg not a bug, just a question / discussion, nothing to resolve, wontfix, etc).\r\n\r\n", "due_on": null, "html_url": "https://github.com/pandas-dev/pandas/milestone/33", "id": 997544, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/33/labels", "node_id": "MDk6TWlsZXN0b25lOTk3NTQ0", "number": 33, "open_issues": 11, "state": "open", "title": "No action", "updated_at": "2021-11-19T17:33:16Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/33" }
1
2017-02-24T19:18:59Z
2017-02-24T19:29:09Z
2017-02-24T19:28:55Z
CONTRIBUTOR
null
#### Code Sample, a copy-pastable example if possible ```python import pandas as pd series = pd.Series(1., pd.period_range('2015', '2016', freq='B')) resampled = series.resample('3B').sum() print type(series.index) print type(resampled.index) ``` #### Problem description A `PeriodIndex` when resampled by a multiple of BusinessDays becomes a `DatetimeIndex`. #### Expected Output I would expect it to be a 3B `PeriodIndex` #### Output of ``pd.show_versions()`` <details> INSTALLED VERSIONS ------------------ commit: None python: 2.7.12.final.0 python-bits: 64 OS: Linux OS-release: 4.4.0-36-generic machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: en_US.UTF-8 LOCALE: None.None pandas: 0.19.2 nose: 1.3.7 pip: 9.0.1 setuptools: 27.2.0 Cython: 0.24 numpy: 1.12.0 scipy: 0.18.1 statsmodels: 0.6.1 xarray: 0.8.2 IPython: 4.1.1 sphinx: None patsy: 0.4.1 dateutil: 2.6.0 pytz: 2016.10 blosc: None bottleneck: 1.2.0 tables: None numexpr: 2.5 matplotlib: 1.5.1 openpyxl: 2.3.3 xlrd: 0.9.4 xlwt: 1.0.0 xlsxwriter: None lxml: 3.5.0 bs4: 4.5.1 html5lib: None httplib2: 0.9.2 apiclient: None sqlalchemy: 1.0.12 pymysql: None psycopg2: None jinja2: 2.8 boto: 2.45.0 pandas_datareader: None </details>
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15500/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15500/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/15501
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15501/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15501/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15501/events
https://github.com/pandas-dev/pandas/pull/15501
210,210,800
MDExOlB1bGxSZXF1ZXN0MTA3OTQ2NzI1
15,501
DEPR: rename to _consolidate and create deprecation warning
{ "avatar_url": "https://avatars.githubusercontent.com/u/10288252?v=4", "events_url": "https://api.github.com/users/GuessWhoSamFoo/events{/privacy}", "followers_url": "https://api.github.com/users/GuessWhoSamFoo/followers", "following_url": "https://api.github.com/users/GuessWhoSamFoo/following{/other_user}", "gists_url": "https://api.github.com/users/GuessWhoSamFoo/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/GuessWhoSamFoo", "id": 10288252, "login": "GuessWhoSamFoo", "node_id": "MDQ6VXNlcjEwMjg4MjUy", "organizations_url": "https://api.github.com/users/GuessWhoSamFoo/orgs", "received_events_url": "https://api.github.com/users/GuessWhoSamFoo/received_events", "repos_url": "https://api.github.com/users/GuessWhoSamFoo/repos", "site_admin": false, "starred_url": "https://api.github.com/users/GuessWhoSamFoo/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/GuessWhoSamFoo/subscriptions", "type": "User", "url": "https://api.github.com/users/GuessWhoSamFoo" }
[ { "color": "5319e7", "default": false, "description": "Functionality to remove in pandas", "id": 87485152, "name": "Deprecate", "node_id": "MDU6TGFiZWw4NzQ4NTE1Mg==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Deprecate" } ]
closed
false
null
[]
null
5
2017-02-25T04:51:58Z
2017-03-05T08:04:55Z
2017-02-28T10:43:23Z
CONTRIBUTOR
null
- [x] closes #15483 - [x] tests added / passed - [x] passes ``git diff upstream/master | flake8 --diff`` - [x] whatsnew entry Test output: ``` running: pytest --skip-slow --skip-network pandas ============================= test session starts ============================== platform linux2 -- Python 2.7.13, pytest-3.0.6, py-1.4.32, pluggy-0.4.0 rootdir: /home/sfoo/pandas, inifile: setup.cfg collected 11882 items / 4 skipped 10147 passed, 1662 skipped, 77 xfailed, 2084 pytest-warnings in 407.18 seconds ```
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15501/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15501/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/15501.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/15501", "merged_at": "2017-02-28T10:43:23Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/15501.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/15501" }
https://api.github.com/repos/pandas-dev/pandas/issues/15502
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15502/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15502/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15502/events
https://github.com/pandas-dev/pandas/issues/15502
210,224,086
MDU6SXNzdWUyMTAyMjQwODY=
15,502
Allow Enums in place of certain parameters values
{ "avatar_url": "https://avatars.githubusercontent.com/u/2225828?v=4", "events_url": "https://api.github.com/users/jimmycallin/events{/privacy}", "followers_url": "https://api.github.com/users/jimmycallin/followers", "following_url": "https://api.github.com/users/jimmycallin/following{/other_user}", "gists_url": "https://api.github.com/users/jimmycallin/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jimmycallin", "id": 2225828, "login": "jimmycallin", "node_id": "MDQ6VXNlcjIyMjU4Mjg=", "organizations_url": "https://api.github.com/users/jimmycallin/orgs", "received_events_url": "https://api.github.com/users/jimmycallin/received_events", "repos_url": "https://api.github.com/users/jimmycallin/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jimmycallin/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jimmycallin/subscriptions", "type": "User", "url": "https://api.github.com/users/jimmycallin" }
[ { "color": "AD7FA8", "default": false, "description": null, "id": 35818298, "name": "API Design", "node_id": "MDU6TGFiZWwzNTgxODI5OA==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/API%20Design" }, { "color": "207de5", "default": false, "description": "Requires discussion from core team before further action", "id": 219960758, "name": "Needs Discussion", "node_id": "MDU6TGFiZWwyMTk5NjA3NTg=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Needs%20Discussion" } ]
closed
false
null
[]
null
5
2017-02-25T09:38:03Z
2020-02-11T22:28:01Z
2020-02-11T22:28:01Z
CONTRIBUTOR
null
I have a suggestion for how to use Enums to codify less transparent parameter values. Since 3.4, Python comes with built-in support for Enums, which could be useful in certain instances for Pandas. One example is allowing enums in place of integers for axis values, which frankly to this day I cannot seem to remember which is which. These could for instance be stored in an attribute in each function. This could potentially work like this: import pandas as pd df = pd.DataFrame({'a': [1,2,3], 'b': [2,3,4]}) df.sum(axis=df.sum.axis.COLUMNWISE) a 6 b 9 dtype: int64 Another example is having support for enums in place of string values. This would be useful as a way to codify all supported string values outside of documentation, and also enabling autocomplete support in REPLs. Another example: import pandas as pd from pandas import axis df = pd.DataFrame({'a': [1,2,3,5], 'b': [2,3,4,None]}) df.sort_values('b', na_position=df.sort_values.na_position.FIRST) a b 3 5 NaN 0 1 2.0 1 2 3.0 2 3 4.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/15502/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15502/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/15503
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15503/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15503/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15503/events
https://github.com/pandas-dev/pandas/issues/15503
210,232,974
MDU6SXNzdWUyMTAyMzI5NzQ=
15,503
PERF/API: fast paths for product MultiIndex?
{ "avatar_url": "https://avatars.githubusercontent.com/u/7279321?v=4", "events_url": "https://api.github.com/users/adbull/events{/privacy}", "followers_url": "https://api.github.com/users/adbull/followers", "following_url": "https://api.github.com/users/adbull/following{/other_user}", "gists_url": "https://api.github.com/users/adbull/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/adbull", "id": 7279321, "login": "adbull", "node_id": "MDQ6VXNlcjcyNzkzMjE=", "organizations_url": "https://api.github.com/users/adbull/orgs", "received_events_url": "https://api.github.com/users/adbull/received_events", "repos_url": "https://api.github.com/users/adbull/repos", "site_admin": false, "starred_url": "https://api.github.com/users/adbull/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/adbull/subscriptions", "type": "User", "url": "https://api.github.com/users/adbull" }
[ { "color": "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": "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": "2017-05-06T10:20:19Z", "closed_issues": 987, "created_at": "2016-02-08T15:30:21Z", "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": "after 0.19.x series", "due_on": "2017-05-12T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/39", "id": 1570595, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39/labels", "node_id": "MDk6TWlsZXN0b25lMTU3MDU5NQ==", "number": 39, "open_issues": 0, "state": "closed", "title": "0.20.0", "updated_at": "2018-10-28T08:18:42Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39" }
5
2017-02-25T12:52:38Z
2017-03-05T22:11:29Z
2017-03-05T22:11:28Z
CONTRIBUTOR
null
#### Feature Proposal At the moment, we have a few different methods for storing indexed higher-dimensional arrays: - DataFrame/Series with a product MultiIndex (**PMI**), which can be slow - Panel, which is fast, but less flexible, and may be deprecated soon (#13563) - xarray, which is designed for this, but has a smaller API For some datasets, I've found the PMI to be the best option, together with occasional workarounds for performance bottlenecks. Operations which are slow for a general MultiIndex, like `unstack()` or `swaplevel().sortlevel()`, can be sped up for PMIs (see below). It would be great if we could do something like this more generally, with fast paths for PMIs. We could maybe have `MultiIndex.from_product()` return a PMI object, which would upcast to MultiIndex when necessary. We could also have `stack()` and `unstack()` create PMI objects where possible, and perhaps add an argument to `concat()` and `set_index()` to create PMIs. Slow MultiIndex operations could then have a fast path for PMI objects. #### Code Sample ```python import numpy as np import pandas as pd m = 100 n = 1000 levels = np.arange(m) index = pd.MultiIndex.from_product([levels]*2) columns = np.arange(n) values = np.arange(m*m*n).reshape(m*m, n) df = pd.DataFrame(values, index, columns) # >>> timeit slow_unstack() # 1 loop, best of 3: 363 ms per loop def slow_unstack(): return df.unstack() # >>> timeit fast_unstack() # 10 loops, best of 3: 55 ms per loop def fast_unstack(): columns = pd.MultiIndex.from_product([df.columns, levels]) values = df.values.reshape(m, m, n).swapaxes(1, 2).reshape(m, m*n) return pd.DataFrame(values, levels, columns) # >>> timeit slow_swaplevel_sortlevel() # 1 loop, best of 3: 213 ms per loop def slow_swaplevel_sortlevel(): return df.swaplevel().sortlevel() # >>> timeit fast_swaplevel_sortlevel() # 10 loops, best of 3: 38.7 ms per loop def fast_swaplevel_sortlevel(): values = df.values.reshape(m, m, n).swapaxes(0, 1).reshape(m*m, n) index = df.index.swaplevel().sortlevel()[0] return pd.DataFrame(values, index, df.columns) ```
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15503/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15503/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/15504
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15504/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15504/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15504/events
https://github.com/pandas-dev/pandas/pull/15504
210,248,052
MDExOlB1bGxSZXF1ZXN0MTA3OTY4NjQ5
15,504
PERF: improve iloc list indexing
{ "avatar_url": "https://avatars.githubusercontent.com/u/1020496?v=4", "events_url": "https://api.github.com/users/jorisvandenbossche/events{/privacy}", "followers_url": "https://api.github.com/users/jorisvandenbossche/followers", "following_url": "https://api.github.com/users/jorisvandenbossche/following{/other_user}", "gists_url": "https://api.github.com/users/jorisvandenbossche/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jorisvandenbossche", "id": 1020496, "login": "jorisvandenbossche", "node_id": "MDQ6VXNlcjEwMjA0OTY=", "organizations_url": "https://api.github.com/users/jorisvandenbossche/orgs", "received_events_url": "https://api.github.com/users/jorisvandenbossche/received_events", "repos_url": "https://api.github.com/users/jorisvandenbossche/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jorisvandenbossche/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jorisvandenbossche/subscriptions", "type": "User", "url": "https://api.github.com/users/jorisvandenbossche" }
[ { "color": "0b02e1", "default": false, "description": "Related to indexing on series/frames, not to indexes themselves", "id": 2822098, "name": "Indexing", "node_id": "MDU6TGFiZWwyODIyMDk4", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Indexing" }, { "color": "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": "2017-05-06T10:20:19Z", "closed_issues": 987, "created_at": "2016-02-08T15:30:21Z", "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": "after 0.19.x series", "due_on": "2017-05-12T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/39", "id": 1570595, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39/labels", "node_id": "MDk6TWlsZXN0b25lMTU3MDU5NQ==", "number": 39, "open_issues": 0, "state": "closed", "title": "0.20.0", "updated_at": "2018-10-28T08:18:42Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39" }
11
2017-02-25T17:20:11Z
2017-10-16T09:45:07Z
2017-04-01T21:51:44Z
MEMBER
null
Did a profile of `iloc` using a list indexer, and noticed a few parts that seemingly can be optimized rather easily: - convert early to array, and keep as array - do not validate the input for out of bounds (this validation is also (and much faster) done in `np.take`) - do not validate kwargs (for numpy compat) (-> could define a `_take` method that does not do this for internal usage?) - use fastpath for resulting Series creation The failing tests are currently just the ones that checked for the kwarg validation (and one failing test due to the fastpath taken where object datetimes are not coerced to datetime64). Compared to master, I get up to 40 to 60% improvement on some simple tests: PR: ``` In [1]: s = pd.Series(np.random.randn(10000)) In [2]: s.iloc[10] Out[2]: 0.91268983379322421 In [3]: %timeit s.iloc[[10]] The slowest run took 14.18 times longer than the fastest. This could mean that an intermediate result is being cached. 10000 loops, best of 3: 47.3 µs per loop In [4]: indexer = list(range(10, 30)) + list(range(50,80)) In [5]: %timeit s.iloc[indexer] The slowest run took 5.92 times longer than the fastest. This could mean that an intermediate result is being cached. 10000 loops, best of 3: 49.8 µs per loop In [6]: indexer = list(range(10, 30)) + list(range(50,800)) In [7]: %timeit s.iloc[indexer] 10000 loops, best of 3: 104 µs per loop ``` master: ``` In [1]: s = pd.Series(np.random.randn(10000)) In [2]: s.iloc[10] Out[2]: -1.4152272792497846 In [3]: %timeit s.iloc[[10]] The slowest run took 6.70 times longer than the fastest. This could mean that an intermediate result is being cached. 10000 loops, best of 3: 103 µs per loop In [4]: indexer = list(range(10, 30)) + list(range(50,80)) In [5]: %timeit s.iloc[indexer] The slowest run took 4.12 times longer than the fastest. This could mean that an intermediate result is being cached. 10000 loops, best of 3: 131 µs per loop In [6]: indexer = list(range(10, 30)) + list(range(50,800)) In [7]: %timeit s.iloc[indexer] The slowest run took 17.01 times longer than the fastest. This could mean that an intermediate result is being cached. 1000 loops, best of 3: 247 µs per loop ``` There are some details to work out, but already putting it up here for discussion (and need to run the benchmark suite). From the remaining time that iloc takes, a large part is spent in the creation of the actual result (the new series): creating a new index (~ 17%), creating a new series based on the values and index (~ 32%). So in total almost half of the time, and thus wondering if this is not possible to speedup.
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15504/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15504/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/15504.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/15504", "merged_at": null, "patch_url": "https://github.com/pandas-dev/pandas/pull/15504.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/15504" }
https://api.github.com/repos/pandas-dev/pandas/issues/15505
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15505/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15505/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15505/events
https://github.com/pandas-dev/pandas/pull/15505
210,260,126
MDExOlB1bGxSZXF1ZXN0MTA3OTc1OTE5
15,505
DOC: fix doc build warnings
{ "avatar_url": "https://avatars.githubusercontent.com/u/1020496?v=4", "events_url": "https://api.github.com/users/jorisvandenbossche/events{/privacy}", "followers_url": "https://api.github.com/users/jorisvandenbossche/followers", "following_url": "https://api.github.com/users/jorisvandenbossche/following{/other_user}", "gists_url": "https://api.github.com/users/jorisvandenbossche/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jorisvandenbossche", "id": 1020496, "login": "jorisvandenbossche", "node_id": "MDQ6VXNlcjEwMjA0OTY=", "organizations_url": "https://api.github.com/users/jorisvandenbossche/orgs", "received_events_url": "https://api.github.com/users/jorisvandenbossche/received_events", "repos_url": "https://api.github.com/users/jorisvandenbossche/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jorisvandenbossche/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jorisvandenbossche/subscriptions", "type": "User", "url": "https://api.github.com/users/jorisvandenbossche" }
[ { "color": "3465A4", "default": false, "description": null, "id": 134699, "name": "Docs", "node_id": "MDU6TGFiZWwxMzQ2OTk=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Docs" } ]
closed
false
null
[]
{ "closed_at": "2017-05-06T10:20:19Z", "closed_issues": 987, "created_at": "2016-02-08T15:30:21Z", "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": "after 0.19.x series", "due_on": "2017-05-12T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/39", "id": 1570595, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39/labels", "node_id": "MDk6TWlsZXN0b25lMTU3MDU5NQ==", "number": 39, "open_issues": 0, "state": "closed", "title": "0.20.0", "updated_at": "2018-10-28T08:18:42Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39" }
3
2017-02-25T20:35:27Z
2017-02-25T21:38:57Z
2017-02-25T21:38:57Z
MEMBER
null
Bunch of small fixes that caused warnings/errors
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/15505/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15505/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/15505.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/15505", "merged_at": "2017-02-25T21:38:57Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/15505.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/15505" }
https://api.github.com/repos/pandas-dev/pandas/issues/15506
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15506/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15506/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15506/events
https://github.com/pandas-dev/pandas/pull/15506
210,261,199
MDExOlB1bGxSZXF1ZXN0MTA3OTc2NTQ3
15,506
Added FrozenList subtraction
{ "avatar_url": "https://avatars.githubusercontent.com/u/6099299?v=4", "events_url": "https://api.github.com/users/benthayer/events{/privacy}", "followers_url": "https://api.github.com/users/benthayer/followers", "following_url": "https://api.github.com/users/benthayer/following{/other_user}", "gists_url": "https://api.github.com/users/benthayer/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/benthayer", "id": 6099299, "login": "benthayer", "node_id": "MDQ6VXNlcjYwOTkyOTk=", "organizations_url": "https://api.github.com/users/benthayer/orgs", "received_events_url": "https://api.github.com/users/benthayer/received_events", "repos_url": "https://api.github.com/users/benthayer/repos", "site_admin": false, "starred_url": "https://api.github.com/users/benthayer/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/benthayer/subscriptions", "type": "User", "url": "https://api.github.com/users/benthayer" }
[ { "color": "4E9A06", "default": false, "description": null, "id": 76812, "name": "Enhancement", "node_id": "MDU6TGFiZWw3NjgxMg==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Enhancement" }, { "color": "AD7FA8", "default": false, "description": null, "id": 35818298, "name": "API Design", "node_id": "MDU6TGFiZWwzNTgxODI5OA==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/API%20Design" } ]
closed
false
{ "avatar_url": "https://avatars.githubusercontent.com/u/417981?v=4", "events_url": "https://api.github.com/users/cpcloud/events{/privacy}", "followers_url": "https://api.github.com/users/cpcloud/followers", "following_url": "https://api.github.com/users/cpcloud/following{/other_user}", "gists_url": "https://api.github.com/users/cpcloud/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/cpcloud", "id": 417981, "login": "cpcloud", "node_id": "MDQ6VXNlcjQxNzk4MQ==", "organizations_url": "https://api.github.com/users/cpcloud/orgs", "received_events_url": "https://api.github.com/users/cpcloud/received_events", "repos_url": "https://api.github.com/users/cpcloud/repos", "site_admin": false, "starred_url": "https://api.github.com/users/cpcloud/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/cpcloud/subscriptions", "type": "User", "url": "https://api.github.com/users/cpcloud" }
[ { "avatar_url": "https://avatars.githubusercontent.com/u/417981?v=4", "events_url": "https://api.github.com/users/cpcloud/events{/privacy}", "followers_url": "https://api.github.com/users/cpcloud/followers", "following_url": "https://api.github.com/users/cpcloud/following{/other_user}", "gists_url": "https://api.github.com/users/cpcloud/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/cpcloud", "id": 417981, "login": "cpcloud", "node_id": "MDQ6VXNlcjQxNzk4MQ==", "organizations_url": "https://api.github.com/users/cpcloud/orgs", "received_events_url": "https://api.github.com/users/cpcloud/received_events", "repos_url": "https://api.github.com/users/cpcloud/repos", "site_admin": false, "starred_url": "https://api.github.com/users/cpcloud/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/cpcloud/subscriptions", "type": "User", "url": "https://api.github.com/users/cpcloud" } ]
{ "closed_at": "2017-05-06T10:20:19Z", "closed_issues": 987, "created_at": "2016-02-08T15:30:21Z", "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": "after 0.19.x series", "due_on": "2017-05-12T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/39", "id": 1570595, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39/labels", "node_id": "MDk6TWlsZXN0b25lMTU3MDU5NQ==", "number": 39, "open_issues": 0, "state": "closed", "title": "0.20.0", "updated_at": "2018-10-28T08:18:42Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39" }
17
2017-02-25T20:52:16Z
2018-10-28T06:47:43Z
2017-03-02T13:25:17Z
CONTRIBUTOR
null
- [x] closes #15475 - [x] tests added / passed - [x] passes ``git diff upstream/master | 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/15506/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15506/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/15506.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/15506", "merged_at": null, "patch_url": "https://github.com/pandas-dev/pandas/pull/15506.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/15506" }
https://api.github.com/repos/pandas-dev/pandas/issues/15507
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/15507/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/15507/comments
https://api.github.com/repos/pandas-dev/pandas/issues/15507/events
https://github.com/pandas-dev/pandas/pull/15507
210,263,356
MDExOlB1bGxSZXF1ZXN0MTA3OTc3ODA3
15,507
BUG: Fix nansum overflow on Windows with bottleneck
{ "avatar_url": "https://avatars.githubusercontent.com/u/15252789?v=4", "events_url": "https://api.github.com/users/JaviSorribes/events{/privacy}", "followers_url": "https://api.github.com/users/JaviSorribes/followers", "following_url": "https://api.github.com/users/JaviSorribes/following{/other_user}", "gists_url": "https://api.github.com/users/JaviSorribes/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/JaviSorribes", "id": 15252789, "login": "JaviSorribes", "node_id": "MDQ6VXNlcjE1MjUyNzg5", "organizations_url": "https://api.github.com/users/JaviSorribes/orgs", "received_events_url": "https://api.github.com/users/JaviSorribes/received_events", "repos_url": "https://api.github.com/users/JaviSorribes/repos", "site_admin": false, "starred_url": "https://api.github.com/users/JaviSorribes/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/JaviSorribes/subscriptions", "type": "User", "url": "https://api.github.com/users/JaviSorribes" }
[ { "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, and Logical operations", "id": 47223669, "name": "Numeric Operations", "node_id": "MDU6TGFiZWw0NzIyMzY2OQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Numeric%20Operations" }, { "color": "fbca04", "default": false, "description": "Windows OS", "id": 57186974, "name": "Windows", "node_id": "MDU6TGFiZWw1NzE4Njk3NA==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Windows" } ]
closed
false
{ "avatar_url": "https://avatars.githubusercontent.com/u/417981?v=4", "events_url": "https://api.github.com/users/cpcloud/events{/privacy}", "followers_url": "https://api.github.com/users/cpcloud/followers", "following_url": "https://api.github.com/users/cpcloud/following{/other_user}", "gists_url": "https://api.github.com/users/cpcloud/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/cpcloud", "id": 417981, "login": "cpcloud", "node_id": "MDQ6VXNlcjQxNzk4MQ==", "organizations_url": "https://api.github.com/users/cpcloud/orgs", "received_events_url": "https://api.github.com/users/cpcloud/received_events", "repos_url": "https://api.github.com/users/cpcloud/repos", "site_admin": false, "starred_url": "https://api.github.com/users/cpcloud/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/cpcloud/subscriptions", "type": "User", "url": "https://api.github.com/users/cpcloud" }
[ { "avatar_url": "https://avatars.githubusercontent.com/u/417981?v=4", "events_url": "https://api.github.com/users/cpcloud/events{/privacy}", "followers_url": "https://api.github.com/users/cpcloud/followers", "following_url": "https://api.github.com/users/cpcloud/following{/other_user}", "gists_url": "https://api.github.com/users/cpcloud/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/cpcloud", "id": 417981, "login": "cpcloud", "node_id": "MDQ6VXNlcjQxNzk4MQ==", "organizations_url": "https://api.github.com/users/cpcloud/orgs", "received_events_url": "https://api.github.com/users/cpcloud/received_events", "repos_url": "https://api.github.com/users/cpcloud/repos", "site_admin": false, "starred_url": "https://api.github.com/users/cpcloud/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/cpcloud/subscriptions", "type": "User", "url": "https://api.github.com/users/cpcloud" } ]
null
8
2017-02-25T21:28:09Z
2017-08-20T18:12:17Z
2017-08-20T18:12:17Z
NONE
null
Bottleneck used in nansum produces overflow error on Windows. Temporary fix that could be undone once the error in bottleneck is fixed and released, to avoid platform specificity. - [x] closes #15453 - [x] tests added / passed - [x] passes ``git diff upstream/master | 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/15507/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/15507/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/15507.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/15507", "merged_at": null, "patch_url": "https://github.com/pandas-dev/pandas/pull/15507.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/15507" }