{"action":"created","issue":{"url":"https://api.github.com/repos/pydata/pandas/issues/14320","repository_url":"https://api.github.com/repos/pydata/pandas","labels_url":"https://api.github.com/repos/pydata/pandas/issues/14320/labels{/name}","comments_url":"https://api.github.com/repos/pydata/pandas/issues/14320/comments","events_url":"https://api.github.com/repos/pydata/pandas/issues/14320/events","html_url":"https://github.com/pydata/pandas/issues/14320","id":179982946,"number":14320,"title":"BUG: Frequency not set for empty Series","user":{"login":"jluttine","id":2195834,"avatar_url":"https://avatars.githubusercontent.com/u/2195834?v=3","gravatar_id":"","url":"https://api.github.com/users/jluttine","html_url":"https://github.com/jluttine","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}","starred_url":"https://api.github.com/users/jluttine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jluttine/subscriptions","organizations_url":"https://api.github.com/users/jluttine/orgs","repos_url":"https://api.github.com/users/jluttine/repos","events_url":"https://api.github.com/users/jluttine/events{/privacy}","received_events_url":"https://api.github.com/users/jluttine/received_events","type":"User","site_admin":false},"labels":[{"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/Timeseries","name":"Timeseries","color":"AFEEEE"}],"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":1064,"closed_issues":144,"state":"open","created_at":"2015-01-13T10:53:19Z","updated_at":"2016-10-03T18:03:24Z","due_on":"2017-08-31T04:00:00Z","closed_at":null},"comments":6,"created_at":"2016-09-29T08:27:01Z","updated_at":"2016-10-03T22:31:27Z","closed_at":null,"body":"Pandas doesn't set frequency properly for empty series. This is probably related to #14313.\r\n\r\n#### A small, complete example of the issue\r\n\r\nIt works for non-empty series:\r\n\r\n```python\r\n>>> pd.Series(index=pd.DatetimeIndex([\"2016-09-29 11:00\"]), data=[3]).asfreq('H').index\r\nDatetimeIndex(['2016-09-29 11:00:00'], dtype='datetime64[ns]', freq='H')\r\n```\r\n\r\nBut for empty series, `freq` is `None`:\r\n\r\n```python\r\n>>> pd.Series(index=pd.DatetimeIndex([]), data=[]).asfreq('H').index\r\nDatetimeIndex([], dtype='datetime64[ns]', freq=None)\r\n```\r\n\r\n#### Expected Output\r\n\r\nI expected the following output:\r\n\r\n```python\r\n>>> pd.Series(index=pd.DatetimeIndex([]), data=[]).asfreq('H').index\r\nDatetimeIndex([], dtype='datetime64[ns]', freq='H')\r\n```\r\n\r\n#### Output of ``pd.show_versions()``\r\n\r\n<details>\r\nINSTALLED VERSIONS\r\n------------------\r\ncommit: None\r\npython: 3.5.2.final.0\r\npython-bits: 64\r\nOS: Linux\r\nOS-release: 4.7.5-gnu-1\r\nmachine: x86_64\r\nprocessor: \r\nbyteorder: little\r\nLC_ALL: None\r\nLANG: en_US.UTF-8\r\nLOCALE: en_US.UTF-8\r\n\r\npandas: 0.19.0rc1\r\nnose: 1.3.6\r\npip: 8.1.2\r\nsetuptools: 27.3.0\r\nCython: 0.24.1\r\nnumpy: 1.11.1\r\nscipy: 0.18.1\r\nstatsmodels: None\r\nxarray: None\r\nIPython: 5.0.0\r\nsphinx: 1.4.5\r\npatsy: None\r\ndateutil: 2.5.3\r\npytz: 2016.6.1\r\nblosc: None\r\nbottleneck: None\r\ntables: 3.2.3.1\r\nnumexpr: 2.6.1\r\nmatplotlib: 1.5.2\r\nopenpyxl: None\r\nxlrd: 1.0.0\r\nxlwt: None\r\nxlsxwriter: None\r\nlxml: None\r\nbs4: 4.5.1\r\nhtml5lib: None\r\nhttplib2: 0.9.2\r\napiclient: 1.5.1\r\nsqlalchemy: 1.0.15\r\npymysql: None\r\npsycopg2: 2.6.2 (dt dec pq3 ext lo64)\r\njinja2: 2.8\r\nboto: None\r\npandas_datareader: None\r\n</details>\r\n"},"comment":{"url":"https://api.github.com/repos/pydata/pandas/issues/comments/251246325","html_url":"https://github.com/pydata/pandas/issues/14320#issuecomment-251246325","issue_url":"https://api.github.com/repos/pydata/pandas/issues/14320","id":251246325,"user":{"login":"sahildua2305","id":5206277,"avatar_url":"https://avatars.githubusercontent.com/u/5206277?v=3","gravatar_id":"","url":"https://api.github.com/users/sahildua2305","html_url":"https://github.com/sahildua2305","followers_url":"https://api.github.com/users/sahildua2305/followers","following_url":"https://api.github.com/users/sahildua2305/following{/other_user}","gists_url":"https://api.github.com/users/sahildua2305/gists{/gist_id}","starred_url":"https://api.github.com/users/sahildua2305/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sahildua2305/subscriptions","organizations_url":"https://api.github.com/users/sahildua2305/orgs","repos_url":"https://api.github.com/users/sahildua2305/repos","events_url":"https://api.github.com/users/sahildua2305/events{/privacy}","received_events_url":"https://api.github.com/users/sahildua2305/received_events","type":"User","site_admin":false},"created_at":"2016-10-03T22:31:27Z","updated_at":"2016-10-03T22:31:27Z","body":"I got this one! I will write tests to verify the expected behavior and create a PR. Thanks 😄 "}}
{"actor":{"display_login":"sahildua2305"}}