{"action":"created","issue":{"url":"https://api.github.com/repos/pydata/pandas/issues/14024","repository_url":"https://api.github.com/repos/pydata/pandas","labels_url":"https://api.github.com/repos/pydata/pandas/issues/14024/labels{/name}","comments_url":"https://api.github.com/repos/pydata/pandas/issues/14024/comments","events_url":"https://api.github.com/repos/pydata/pandas/issues/14024/events","html_url":"https://github.com/pydata/pandas/issues/14024","id":171749128,"number":14024,"title":"BUG: Truncated \"Y\" conversion with to_timedelta","user":{"login":"agartland","id":3869734,"avatar_url":"https://avatars.githubusercontent.com/u/3869734?v=3","gravatar_id":"","url":"https://api.github.com/users/agartland","html_url":"https://github.com/agartland","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}","starred_url":"https://api.github.com/users/agartland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agartland/subscriptions","organizations_url":"https://api.github.com/users/agartland/orgs","repos_url":"https://api.github.com/users/agartland/repos","events_url":"https://api.github.com/users/agartland/events{/privacy}","received_events_url":"https://api.github.com/users/agartland/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/pydata/pandas/labels/API%20Design","name":"API Design","color":"AD7FA8"},{"url":"https://api.github.com/repos/pydata/pandas/labels/Bug","name":"Bug","color":"e10c02"},{"url":"https://api.github.com/repos/pydata/pandas/labels/Difficulty%20Novice","name":"Difficulty Novice","color":"fbca04"},{"url":"https://api.github.com/repos/pydata/pandas/labels/Effort%20Low","name":"Effort Low","color":"006b75"},{"url":"https://api.github.com/repos/pydata/pandas/labels/Timedelta","name":"Timedelta","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/pydata/pandas/milestones/32","html_url":"https://github.com/pydata/pandas/milestones/Next%20Major%20Release","labels_url":"https://api.github.com/repos/pydata/pandas/milestones/32/labels","id":933188,"number":32,"title":"Next Major Release","description":"after 0.18.0 of course","creator":{"login":"jreback","id":953992,"avatar_url":"https://avatars.githubusercontent.com/u/953992?v=3","gravatar_id":"","url":"https://api.github.com/users/jreback","html_url":"https://github.com/jreback","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}","starred_url":"https://api.github.com/users/jreback/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jreback/subscriptions","organizations_url":"https://api.github.com/users/jreback/orgs","repos_url":"https://api.github.com/users/jreback/repos","events_url":"https://api.github.com/users/jreback/events{/privacy}","received_events_url":"https://api.github.com/users/jreback/received_events","type":"User","site_admin":false},"open_issues":1018,"closed_issues":139,"state":"open","created_at":"2015-01-13T10:53:19Z","updated_at":"2016-08-17T21:32:56Z","due_on":"2017-08-31T04:00:00Z","closed_at":null},"comments":6,"created_at":"2016-08-17T20:11:46Z","updated_at":"2016-08-17T22:43:02Z","closed_at":null,"body":"When converting a fractional year to a `Timedelta` object the float is truncated:\r\n\r\n```\r\nprint pd.to_timedelta(1., unit='Y')\r\n365 days 05:49:12\r\n\r\nprint pd.to_timedelta(1.5, unit='Y')\r\n365 days 05:49:12\r\n\r\nprint pd.to_timedelta(0.5, unit='Y')\r\n0 days 00:00:00\r\n\r\nprint pd.to_timedelta(0.9, unit='Y')\r\n0 days 00:00:00\r\n```\r\nUsing a float with the hour unit is OK:\r\n```\r\nprint pd.to_timedelta(0.9, unit='H')\r\n0 days 00:54:00\r\n\r\nprint pd.to_timedelta(1., unit='H')\r\n0 days 01:00:00\r\n```\r\n\r\nPandas version:\r\n```\r\nINSTALLED VERSIONS\r\n------------------\r\ncommit: None\r\npython: 2.7.11.final.0\r\npython-bits: 64\r\nOS: Windows\r\nOS-release: 7\r\nmachine: AMD64\r\nprocessor: Intel64 Family 6 Model 69 Stepping 1, GenuineIntel\r\nbyteorder: little\r\nLC_ALL: None\r\nLANG: None\r\n\r\npandas: 0.18.1\r\nnose: 1.3.7\r\npip: 8.1.1\r\nsetuptools: 21.2.1\r\nCython: 0.20.1\r\nnumpy: 1.11.0\r\nscipy: 0.16.0\r\nstatsmodels: 0.7.0.dev-51faa1a\r\nxarray: None\r\nIPython: 4.2.0\r\nsphinx: 1.2.2\r\npatsy: 0.3.0\r\ndateutil: 2.5.3\r\npytz: 2016.4\r\nblosc: None\r\nbottleneck: None\r\ntables: 3.1.1\r\nnumexpr: 2.4.4\r\nmatplotlib: 1.5.1\r\nopenpyxl: 2.0.2\r\nxlrd: 0.9.3\r\nxlwt: 0.7.5\r\nxlsxwriter: 0.5.5\r\nlxml: 3.3.5\r\nbs4: 4.3.1\r\nhtml5lib: None\r\nhttplib2: None\r\napiclient: None\r\nsqlalchemy: 0.9.4\r\npymysql: None\r\npsycopg2: None\r\njinja2: 2.8\r\nboto: 2.28.0\r\npandas_datareader: None\r\n```"},"comment":{"url":"https://api.github.com/repos/pydata/pandas/issues/comments/240571744","html_url":"https://github.com/pydata/pandas/issues/14024#issuecomment-240571744","issue_url":"https://api.github.com/repos/pydata/pandas/issues/14024","id":240571744,"user":{"login":"jreback","id":953992,"avatar_url":"https://avatars.githubusercontent.com/u/953992?v=3","gravatar_id":"","url":"https://api.github.com/users/jreback","html_url":"https://github.com/jreback","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}","starred_url":"https://api.github.com/users/jreback/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jreback/subscriptions","organizations_url":"https://api.github.com/users/jreback/orgs","repos_url":"https://api.github.com/users/jreback/repos","events_url":"https://api.github.com/users/jreback/events{/privacy}","received_events_url":"https://api.github.com/users/jreback/received_events","type":"User","site_admin":false},"created_at":"2016-08-17T22:43:02Z","updated_at":"2016-08-17T22:43:02Z","body":"hmm ok let's deprecate it then?\r\nand maybe raise on floats"}}
{"actor":{"display_login":"jreback"}}