{"action":"opened","issue":{"url":"https://api.github.com/repos/pandas-dev/pandas/issues/19872","repository_url":"https://api.github.com/repos/pandas-dev/pandas","labels_url":"https://api.github.com/repos/pandas-dev/pandas/issues/19872/labels{/name}","comments_url":"https://api.github.com/repos/pandas-dev/pandas/issues/19872/comments","events_url":"https://api.github.com/repos/pandas-dev/pandas/issues/19872/events","html_url":"https://github.com/pandas-dev/pandas/issues/19872","id":299830851,"number":19872,"title":"BUG: cut and qcut do not retain timezone information","user":{"login":"jschendel","id":5332445,"avatar_url":"https://avatars3.githubusercontent.com/u/5332445?v=4","gravatar_id":"","url":"https://api.github.com/users/jschendel","html_url":"https://github.com/jschendel","followers_url":"https://api.github.com/users/jschendel/followers","following_url":"https://api.github.com/users/jschendel/following{/other_user}","gists_url":"https://api.github.com/users/jschendel/gists{/gist_id}","starred_url":"https://api.github.com/users/jschendel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jschendel/subscriptions","organizations_url":"https://api.github.com/users/jschendel/orgs","repos_url":"https://api.github.com/users/jschendel/repos","events_url":"https://api.github.com/users/jschendel/events{/privacy}","received_events_url":"https://api.github.com/users/jschendel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-23T19:53:23Z","updated_at":"2018-02-23T19:53:23Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"#### Code Sample, a copy-pastable example if possible\r\nSetup:\r\n```\r\nIn [2]: s = pd.Series(pd.date_range('20180101', periods=3, tz='US/Eastern'))\r\n\r\nIn [3]: s\r\nOut[3]:\r\n0   2018-01-01 00:00:00-05:00\r\n1   2018-01-02 00:00:00-05:00\r\n2   2018-01-03 00:00:00-05:00\r\ndtype: datetime64[ns, US/Eastern]\r\n```\r\n\r\nTimezone information is lost after using `cut`:\r\n```\r\nIn [4]: pd.cut(s, 2)\r\nOut[4]:\r\n0    (2018-01-01 04:57:07.200000, 2018-01-02 05:00:00]\r\n1    (2018-01-01 04:57:07.200000, 2018-01-02 05:00:00]\r\n2           (2018-01-02 05:00:00, 2018-01-03 05:00:00]\r\ndtype: category\r\nCategories (2, interval[datetime64[ns]]): [ <\r\n                                           (2018-01-01 04:57:07.200000, 2018-01-02 05:00:00] <\r\n                                           (2018-01-02 05:00:00, 2018-01-03 05:00:00]]\r\n```\r\n\r\nTimezone information is lost after using `qcut`:\r\n```\r\nIn [5]: pd.qcut(s, 2)\r\nOut[5]:\r\n0    (2018-01-01 04:59:59.999999999, 2018-01-02 05:...\r\n1    (2018-01-01 04:59:59.999999999, 2018-01-02 05:...\r\n2           (2018-01-02 05:00:00, 2018-01-03 05:00:00]\r\ndtype: category\r\nCategories (2, interval[datetime64[ns]]): [ <\r\n                                           (2018-01-01 04:59:59.999999999, 2018-01-02 05:0... <\r\n                                           (2018-01-02 05:00:00, 2018-01-03 05:00:00]]\r\n```\r\n#### Problem description\r\nTimezone information is lost after using `cut` and `qcut`.\r\n\r\n#### Expected Output\r\nI'd except `cut` and `qcut` to retain timezone information.\r\n\r\n#### Output of ``pd.show_versions()``\r\n\r\n<details>\r\n\r\nINSTALLED VERSIONS\r\n------------------\r\ncommit: ce77b79b97d7e827f50ebd0b7ca292fc2d966cc7\r\npython: 3.6.1.final.0\r\npython-bits: 64\r\nOS: Windows\r\nOS-release: 10\r\nmachine: AMD64\r\nprocessor: Intel64 Family 6 Model 78 Stepping 3, GenuineIntel\r\nbyteorder: little\r\nLC_ALL: None\r\nLANG: None\r\nLOCALE: None.None\r\n\r\npandas: 0.23.0.dev0+364.gce77b79\r\npytest: 3.1.2\r\npip: 9.0.1\r\nsetuptools: 27.2.0\r\nCython: 0.25.2\r\nnumpy: 1.13.3\r\nscipy: 1.0.0\r\npyarrow: 0.6.0\r\nxarray: 0.9.6\r\nIPython: 6.1.0\r\nsphinx: 1.5.6\r\npatsy: 0.4.1\r\ndateutil: 2.6.0\r\npytz: 2017.2\r\nblosc: None\r\nbottleneck: None\r\ntables: 3.4.2\r\nnumexpr: 2.6.4\r\nfeather: 0.4.0\r\nmatplotlib: 2.0.2\r\nopenpyxl: 2.4.8\r\nxlrd: 1.1.0\r\nxlwt: 1.3.0\r\nxlsxwriter: 0.9.8\r\nlxml: 3.8.0\r\nbs4: None\r\nhtml5lib: 0.999\r\nsqlalchemy: 1.1.13\r\npymysql: None\r\npsycopg2: None\r\njinja2: 2.9.6\r\ns3fs: None\r\nfastparquet: 0.1.0\r\npandas_gbq: None\r\npandas_datareader: None\r\n\r\n</details>\r\n"}}
{"actor":{"display_login":"jschendel"}}