Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
| Download
Project: math480-2016
Views: 1218[1{2"url": "https://api.github.com/repos/pydata/pandas/issues/13120",3"repository_url": "https://api.github.com/repos/pydata/pandas",4"labels_url": "https://api.github.com/repos/pydata/pandas/issues/13120/labels{/name}",5"comments_url": "https://api.github.com/repos/pydata/pandas/issues/13120/comments",6"events_url": "https://api.github.com/repos/pydata/pandas/issues/13120/events",7"html_url": "https://github.com/pydata/pandas/issues/13120",8"id": 153805107,9"number": 13120,10"title": "Index construction fails (or produces erroneous result) with memoryview as input.",11"user": {12"login": "ssanderson",13"id": 1588357,14"avatar_url": "https://avatars.githubusercontent.com/u/1588357?v=3",15"gravatar_id": "",16"url": "https://api.github.com/users/ssanderson",17"html_url": "https://github.com/ssanderson",18"followers_url": "https://api.github.com/users/ssanderson/followers",19"following_url": "https://api.github.com/users/ssanderson/following{/other_user}",20"gists_url": "https://api.github.com/users/ssanderson/gists{/gist_id}",21"starred_url": "https://api.github.com/users/ssanderson/starred{/owner}{/repo}",22"subscriptions_url": "https://api.github.com/users/ssanderson/subscriptions",23"organizations_url": "https://api.github.com/users/ssanderson/orgs",24"repos_url": "https://api.github.com/users/ssanderson/repos",25"events_url": "https://api.github.com/users/ssanderson/events{/privacy}",26"received_events_url": "https://api.github.com/users/ssanderson/received_events",27"type": "User",28"site_admin": false29},30"labels": [31{32"url": "https://api.github.com/repos/pydata/pandas/labels/Compat",33"name": "Compat",34"color": "0052cc"35},36{37"url": "https://api.github.com/repos/pydata/pandas/labels/Difficulty%20Intermediate",38"name": "Difficulty Intermediate",39"color": "fbca04"40},41{42"url": "https://api.github.com/repos/pydata/pandas/labels/Dtypes",43"name": "Dtypes",44"color": "e102d8"45},46{47"url": "https://api.github.com/repos/pydata/pandas/labels/Effort%20Medium",48"name": "Effort Medium",49"color": "006b75"50},51{52"url": "https://api.github.com/repos/pydata/pandas/labels/Timeseries",53"name": "Timeseries",54"color": "AFEEEE"55}56],57"state": "open",58"locked": false,59"assignee": null,60"milestone": {61"url": "https://api.github.com/repos/pydata/pandas/milestones/32",62"html_url": "https://github.com/pydata/pandas/milestones/Next%20Major%20Release",63"labels_url": "https://api.github.com/repos/pydata/pandas/milestones/32/labels",64"id": 933188,65"number": 32,66"title": "Next Major Release",67"description": "after 0.18.0 of course",68"creator": {69"login": "jreback",70"id": 953992,71"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=3",72"gravatar_id": "",73"url": "https://api.github.com/users/jreback",74"html_url": "https://github.com/jreback",75"followers_url": "https://api.github.com/users/jreback/followers",76"following_url": "https://api.github.com/users/jreback/following{/other_user}",77"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",78"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",79"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",80"organizations_url": "https://api.github.com/users/jreback/orgs",81"repos_url": "https://api.github.com/users/jreback/repos",82"events_url": "https://api.github.com/users/jreback/events{/privacy}",83"received_events_url": "https://api.github.com/users/jreback/received_events",84"type": "User",85"site_admin": false86},87"open_issues": 941,88"closed_issues": 133,89"state": "open",90"created_at": "2015-01-13T10:53:19Z",91"updated_at": "2016-05-09T15:54:35Z",92"due_on": "2016-08-31T04:00:00Z",93"closed_at": null94},95"comments": 11,96"created_at": "2016-05-09T15:36:11Z",97"updated_at": "2016-05-09T17:35:40Z",98"closed_at": null,99"body": "#### Code Sample, a copy-pastable example if possible\r\n\r\nFirst noted in discussion here: https://github.com/quantopian/zipline/pull/1190/files/fe5a2a888a498d838c3cc43de2c33ac08b20d2a7#r62506342. This most often matters when passing a value typed in Cython as something like `int64_t[:]`.\r\n\r\nSimple repro cases:\r\n\r\nDatetimeIndex construction fails (looks like trying to parse strings?), and vanilla Index construction returns an array of unicode strings.\r\n```\r\nIn [6]: import pandas as pd; import numpy as np\r\n\r\nIn [7]: pd.__version__, np.__version__\r\nOut[7]: ('0.18.1+20.gaf7bdd3', '1.11.0')\r\n\r\nIn [8]: m = memoryview(np.arange(5))\r\n\r\nIn [9]: pd.DatetimeIndex(m)\r\n---------------------------------------------------------------------------\r\nValueError Traceback (most recent call last)\r\n<ipython-input-9-09b855a663a4> in <module>()\r\n----> 1 pd.DatetimeIndex(m)\r\n\r\n/home/ssanderson/clones/pandas/pandas/util/decorators.pyc in wrapper(*args, **kwargs)\r\n 89 else:\r\n 90 kwargs[new_arg_name] = new_arg_value\r\n---> 91 return func(*args, **kwargs)\r\n 92 return wrapper\r\n 93 return _deprecate_kwarg\r\n\r\n/home/ssanderson/clones/pandas/pandas/tseries/index.pyc in __new__(cls, data, freq, start, end, periods, copy, name, tz, verify_integrity, normalize, closed, ambiguous, dtype, **kwargs)\r\n 283 data = tslib.parse_str_array_to_datetime(data, freq=freq,\r\n 284 dayfirst=dayfirst,\r\n--> 285 yearfirst=yearfirst)\r\n 286 else:\r\n 287 data = tools.to_datetime(data, errors='raise')\r\n\r\n/home/ssanderson/clones/pandas/pandas/tslib.pyx in pandas.tslib.parse_str_array_to_datetime (pandas/tslib.c:39610)()\r\n 2175 except ValueError:\r\n 2176 if is_coerce:\r\n-> 2177 iresult[i] = NPY_NAT\r\n 2178 continue\r\n 2179 raise\r\n\r\nValueError:\r\n\r\nIn [10]: pd.Index(m)\r\nOut[10]: Index([u'', u'', u'', u'', u''], dtype='object')\r\n```\r\n\r\n#### Expected Output\r\n\r\nI'd expect this to either error immediately or provide the same result as coercing the provided memoryview into a numpy array.\r\n\r\n#### output of ``pd.show_versions()``\r\n\r\n```\r\nIn [6]: pd.show_versions()\r\n\r\nINSTALLED VERSIONS\r\n------------------\r\ncommit: af7bdd3883c8d61e9d9388d3aa699930eee7fff8\r\npython: 2.7.10.final.0\r\npython-bits: 64\r\nOS: Linux\r\nOS-release: 4.2.0-16-generic\r\nmachine: x86_64\r\nprocessor: x86_64\r\nbyteorder: little\r\nLC_ALL: None\r\nLANG: en_US.UTF-8\r\n\r\npandas: 0.18.1+20.gaf7bdd3\r\nnose: None\r\npip: 8.1.0\r\nsetuptools: 20.2.2\r\nCython: 0.24\r\nnumpy: 1.11.0\r\nscipy: None\r\nstatsmodels: None\r\nxarray: None\r\nIPython: 4.2.0\r\nsphinx: None\r\npatsy: None\r\ndateutil: 2.5.3\r\npytz: 2016.3\r\nblosc: None\r\nbottleneck: None\r\ntables: None\r\nnumexpr: None\r\nmatplotlib: None\r\nopenpyxl: None\r\nxlrd: None\r\nxlwt: None\r\nxlsxwriter: None\r\nlxml: None\r\nbs4: None\r\nhtml5lib: None\r\nhttplib2: None\r\napiclient: None\r\nsqlalchemy: None\r\npymysql: None\r\npsycopg2: None\r\njinja2: None\r\nboto: None\r\npandas_datareader: None\r\n```\r\n\r\ncc @jbredeche"100},101{102"url": "https://api.github.com/repos/pydata/pandas/issues/13119",103"repository_url": "https://api.github.com/repos/pydata/pandas",104"labels_url": "https://api.github.com/repos/pydata/pandas/issues/13119/labels{/name}",105"comments_url": "https://api.github.com/repos/pydata/pandas/issues/13119/comments",106"events_url": "https://api.github.com/repos/pydata/pandas/issues/13119/events",107"html_url": "https://github.com/pydata/pandas/issues/13119",108"id": 153736417,109"number": 13119,110"title": "BUG: resample with datetime64 data on series looses dtype",111"user": {112"login": "jorisvandenbossche",113"id": 1020496,114"avatar_url": "https://avatars.githubusercontent.com/u/1020496?v=3",115"gravatar_id": "",116"url": "https://api.github.com/users/jorisvandenbossche",117"html_url": "https://github.com/jorisvandenbossche",118"followers_url": "https://api.github.com/users/jorisvandenbossche/followers",119"following_url": "https://api.github.com/users/jorisvandenbossche/following{/other_user}",120"gists_url": "https://api.github.com/users/jorisvandenbossche/gists{/gist_id}",121"starred_url": "https://api.github.com/users/jorisvandenbossche/starred{/owner}{/repo}",122"subscriptions_url": "https://api.github.com/users/jorisvandenbossche/subscriptions",123"organizations_url": "https://api.github.com/users/jorisvandenbossche/orgs",124"repos_url": "https://api.github.com/users/jorisvandenbossche/repos",125"events_url": "https://api.github.com/users/jorisvandenbossche/events{/privacy}",126"received_events_url": "https://api.github.com/users/jorisvandenbossche/received_events",127"type": "User",128"site_admin": false129},130"labels": [131{132"url": "https://api.github.com/repos/pydata/pandas/labels/Bug",133"name": "Bug",134"color": "e10c02"135},136{137"url": "https://api.github.com/repos/pydata/pandas/labels/Difficulty%20Intermediate",138"name": "Difficulty Intermediate",139"color": "fbca04"140},141{142"url": "https://api.github.com/repos/pydata/pandas/labels/Effort%20Low",143"name": "Effort Low",144"color": "006b75"145},146{147"url": "https://api.github.com/repos/pydata/pandas/labels/Resample",148"name": "Resample",149"color": "207de5"150}151],152"state": "open",153"locked": false,154"assignee": null,155"milestone": {156"url": "https://api.github.com/repos/pydata/pandas/milestones/40",157"html_url": "https://github.com/pydata/pandas/milestones/0.18.2",158"labels_url": "https://api.github.com/repos/pydata/pandas/milestones/40/labels",159"id": 1639795,160"number": 40,161"title": "0.18.2",162"description": "",163"creator": {164"login": "jreback",165"id": 953992,166"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=3",167"gravatar_id": "",168"url": "https://api.github.com/users/jreback",169"html_url": "https://github.com/jreback",170"followers_url": "https://api.github.com/users/jreback/followers",171"following_url": "https://api.github.com/users/jreback/following{/other_user}",172"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",173"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",174"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",175"organizations_url": "https://api.github.com/users/jreback/orgs",176"repos_url": "https://api.github.com/users/jreback/repos",177"events_url": "https://api.github.com/users/jreback/events{/privacy}",178"received_events_url": "https://api.github.com/users/jreback/received_events",179"type": "User",180"site_admin": false181},182"open_issues": 162,183"closed_issues": 27,184"state": "open",185"created_at": "2016-03-11T21:24:45Z",186"updated_at": "2016-05-09T17:09:26Z",187"due_on": "2016-06-14T04:00:00Z",188"closed_at": null189},190"comments": 1,191"created_at": "2016-05-09T09:27:49Z",192"updated_at": "2016-05-09T12:36:41Z",193"closed_at": null,194"body": "From SO: http://stackoverflow.com/questions/37106810/bug-in-python-pandas-pandas-series-resample-vs-pandas-dataframe-resample\r\n\r\n```\r\nIn [7]: import datetime as dt\r\n\r\nIn [8]: df = pd.DataFrame([[dt.datetime(2016,1,31,15)], [dt.datetime(2016,2,7,17)]], index=[dt.datetime(2016,1,31,15), dt.datetime(2016,2,7,17)], columns=['timestamp'])\r\n\r\nIn [10]: df\r\nOut[10]:\r\n timestamp\r\n2016-01-31 15:00:00 2016-01-31 15:00:00\r\n2016-02-07 17:00:00 2016-02-07 17:00:00\r\n\r\nIn [11]: df.resample('D').first().timestamp\r\nOut[11]:\r\n2016-01-31 2016-01-31 15:00:00\r\n2016-02-01 NaT\r\n2016-02-02 NaT\r\n2016-02-03 NaT\r\n2016-02-04 NaT\r\n2016-02-05 NaT\r\n2016-02-06 NaT\r\n2016-02-07 2016-02-07 17:00:00\r\nFreq: D, Name: timestamp, dtype: datetime64[ns]\r\n\r\nIn [12]: df.timestamp.resample('D').first()\r\nOut[12]:\r\n2016-01-31 1.454252e+18\r\n2016-02-01 NaN\r\n2016-02-02 NaN\r\n2016-02-03 NaN\r\n2016-02-04 NaN\r\n2016-02-05 NaN\r\n2016-02-06 NaN\r\n2016-02-07 1.454864e+18\r\nFreq: D, Name: timestamp, dtype: float64\r\n\r\n```\r\n\r\nTested it with latest master"195},196{197"url": "https://api.github.com/repos/pydata/pandas/issues/13117",198"repository_url": "https://api.github.com/repos/pydata/pandas",199"labels_url": "https://api.github.com/repos/pydata/pandas/issues/13117/labels{/name}",200"comments_url": "https://api.github.com/repos/pydata/pandas/issues/13117/comments",201"events_url": "https://api.github.com/repos/pydata/pandas/issues/13117/events",202"html_url": "https://github.com/pydata/pandas/pull/13117",203"id": 153670017,204"number": 13117,205"title": "BUG: GH12896 where extra elements are returned in MultiIndex slicing",206"user": {207"login": "kawochen",208"id": 10709573,209"avatar_url": "https://avatars.githubusercontent.com/u/10709573?v=3",210"gravatar_id": "",211"url": "https://api.github.com/users/kawochen",212"html_url": "https://github.com/kawochen",213"followers_url": "https://api.github.com/users/kawochen/followers",214"following_url": "https://api.github.com/users/kawochen/following{/other_user}",215"gists_url": "https://api.github.com/users/kawochen/gists{/gist_id}",216"starred_url": "https://api.github.com/users/kawochen/starred{/owner}{/repo}",217"subscriptions_url": "https://api.github.com/users/kawochen/subscriptions",218"organizations_url": "https://api.github.com/users/kawochen/orgs",219"repos_url": "https://api.github.com/users/kawochen/repos",220"events_url": "https://api.github.com/users/kawochen/events{/privacy}",221"received_events_url": "https://api.github.com/users/kawochen/received_events",222"type": "User",223"site_admin": false224},225"labels": [226{227"url": "https://api.github.com/repos/pydata/pandas/labels/Bug",228"name": "Bug",229"color": "e10c02"230},231{232"url": "https://api.github.com/repos/pydata/pandas/labels/Indexing",233"name": "Indexing",234"color": "0b02e1"235},236{237"url": "https://api.github.com/repos/pydata/pandas/labels/MultiIndex",238"name": "MultiIndex",239"color": "207de5"240}241],242"state": "open",243"locked": false,244"assignee": null,245"milestone": null,246"comments": 0,247"created_at": "2016-05-08T18:22:44Z",248"updated_at": "2016-05-08T18:37:38Z",249"closed_at": null,250"pull_request": {251"url": "https://api.github.com/repos/pydata/pandas/pulls/13117",252"html_url": "https://github.com/pydata/pandas/pull/13117",253"diff_url": "https://github.com/pydata/pandas/pull/13117.diff",254"patch_url": "https://github.com/pydata/pandas/pull/13117.patch"255},256"body": " - [x] closes #12896\r\n - [ ] tests added / passed\r\n - [x] passes ``git diff upstream/master | flake8 --diff``\r\n - [x] whatsnew entry\r\n\r\nIs this the right way to do this?\r\n\r\ncc @MaximilianR "257},258{259"url": "https://api.github.com/repos/pydata/pandas/issues/13116",260"repository_url": "https://api.github.com/repos/pydata/pandas",261"labels_url": "https://api.github.com/repos/pydata/pandas/issues/13116/labels{/name}",262"comments_url": "https://api.github.com/repos/pydata/pandas/issues/13116/comments",263"events_url": "https://api.github.com/repos/pydata/pandas/issues/13116/events",264"html_url": "https://github.com/pydata/pandas/pull/13116",265"id": 153661517,266"number": 13116,267"title": "Validate Timestamp with invalid offset raises ValueError",268"user": {269"login": "gliptak",270"id": 50109,271"avatar_url": "https://avatars.githubusercontent.com/u/50109?v=3",272"gravatar_id": "",273"url": "https://api.github.com/users/gliptak",274"html_url": "https://github.com/gliptak",275"followers_url": "https://api.github.com/users/gliptak/followers",276"following_url": "https://api.github.com/users/gliptak/following{/other_user}",277"gists_url": "https://api.github.com/users/gliptak/gists{/gist_id}",278"starred_url": "https://api.github.com/users/gliptak/starred{/owner}{/repo}",279"subscriptions_url": "https://api.github.com/users/gliptak/subscriptions",280"organizations_url": "https://api.github.com/users/gliptak/orgs",281"repos_url": "https://api.github.com/users/gliptak/repos",282"events_url": "https://api.github.com/users/gliptak/events{/privacy}",283"received_events_url": "https://api.github.com/users/gliptak/received_events",284"type": "User",285"site_admin": false286},287"labels": [288{289"url": "https://api.github.com/repos/pydata/pandas/labels/Error%20Reporting",290"name": "Error Reporting",291"color": "ffa0ff"292},293{294"url": "https://api.github.com/repos/pydata/pandas/labels/Timeseries",295"name": "Timeseries",296"color": "AFEEEE"297}298],299"state": "open",300"locked": false,301"assignee": null,302"milestone": null,303"comments": 0,304"created_at": "2016-05-08T15:25:36Z",305"updated_at": "2016-05-08T17:32:03Z",306"closed_at": null,307"pull_request": {308"url": "https://api.github.com/repos/pydata/pandas/pulls/13116",309"html_url": "https://github.com/pydata/pandas/pull/13116",310"diff_url": "https://github.com/pydata/pandas/pull/13116.diff",311"patch_url": "https://github.com/pydata/pandas/pull/13116.patch"312},313"body": " - [x] closes #11630\r\n - [x] tests added / passed\r\n - [x] passes ``git diff upstream/master | flake8 --diff``\r\n - [ ] whatsnew entry\r\n\r\n"314},315{316"url": "https://api.github.com/repos/pydata/pandas/issues/13115",317"repository_url": "https://api.github.com/repos/pydata/pandas",318"labels_url": "https://api.github.com/repos/pydata/pandas/issues/13115/labels{/name}",319"comments_url": "https://api.github.com/repos/pydata/pandas/issues/13115/comments",320"events_url": "https://api.github.com/repos/pydata/pandas/issues/13115/events",321"html_url": "https://github.com/pydata/pandas/pull/13115",322"id": 153658327,323"number": 13115,324"title": "[BUG] Reading multiindex, incorrectly names columns without name.",325"user": {326"login": "brandys11",327"id": 5340467,328"avatar_url": "https://avatars.githubusercontent.com/u/5340467?v=3",329"gravatar_id": "",330"url": "https://api.github.com/users/brandys11",331"html_url": "https://github.com/brandys11",332"followers_url": "https://api.github.com/users/brandys11/followers",333"following_url": "https://api.github.com/users/brandys11/following{/other_user}",334"gists_url": "https://api.github.com/users/brandys11/gists{/gist_id}",335"starred_url": "https://api.github.com/users/brandys11/starred{/owner}{/repo}",336"subscriptions_url": "https://api.github.com/users/brandys11/subscriptions",337"organizations_url": "https://api.github.com/users/brandys11/orgs",338"repos_url": "https://api.github.com/users/brandys11/repos",339"events_url": "https://api.github.com/users/brandys11/events{/privacy}",340"received_events_url": "https://api.github.com/users/brandys11/received_events",341"type": "User",342"site_admin": false343},344"labels": [345{346"url": "https://api.github.com/repos/pydata/pandas/labels/Bug",347"name": "Bug",348"color": "e10c02"349},350{351"url": "https://api.github.com/repos/pydata/pandas/labels/IO%20Excel",352"name": "IO Excel",353"color": "bfe5bf"354}355],356"state": "open",357"locked": false,358"assignee": null,359"milestone": null,360"comments": 1,361"created_at": "2016-05-08T14:18:28Z",362"updated_at": "2016-05-08T14:57:28Z",363"closed_at": null,364"pull_request": {365"url": "https://api.github.com/repos/pydata/pandas/pulls/13115",366"html_url": "https://github.com/pydata/pandas/pull/13115",367"diff_url": "https://github.com/pydata/pandas/pull/13115.diff",368"patch_url": "https://github.com/pydata/pandas/pull/13115.patch"369},370"body": " - [x] closes #12453\r\n - [x] tests added / passed\r\n - [x] passes ``git diff upstream/master | flake8 --diff``\r\n - [x] whatsnew entry\r\n\r\nFixed reading and writing of Multiindex. \r\nIn a situation where Multiindex looked like this:\r\n\r\n| One | Two |\r\n| ------ | ----- |\r\n| X | |\r\n\r\nit was changed to: \r\n\r\n| One | Two |\r\n| ------ | ----- |\r\n| X | X |"371}372]373374375