{"action":"created","issue":{"url":"https://api.github.com/repos/pydata/pandas/issues/8822","labels_url":"https://api.github.com/repos/pydata/pandas/issues/8822/labels{/name}","comments_url":"https://api.github.com/repos/pydata/pandas/issues/8822/comments","events_url":"https://api.github.com/repos/pydata/pandas/issues/8822/events","html_url":"https://github.com/pydata/pandas/pull/8822","id":48860995,"number":8822,"title":"BUG: Error when creating sparse dataframe with nan column label","user":{"login":"artemyk","id":833768,"avatar_url":"https://avatars.githubusercontent.com/u/833768?v=3","gravatar_id":"","url":"https://api.github.com/users/artemyk","html_url":"https://github.com/artemyk","followers_url":"https://api.github.com/users/artemyk/followers","following_url":"https://api.github.com/users/artemyk/following{/other_user}","gists_url":"https://api.github.com/users/artemyk/gists{/gist_id}","starred_url":"https://api.github.com/users/artemyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artemyk/subscriptions","organizations_url":"https://api.github.com/users/artemyk/orgs","repos_url":"https://api.github.com/users/artemyk/repos","events_url":"https://api.github.com/users/artemyk/events{/privacy}","received_events_url":"https://api.github.com/users/artemyk/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/Sparse","name":"Sparse","color":"009800"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/pydata/pandas/milestones/29","html_url":"https://github.com/pydata/pandas/milestones/0.16.1","labels_url":"https://api.github.com/repos/pydata/pandas/milestones/29/labels","id":816810,"number":29,"title":"0.16.1","description":"after 0.16.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":102,"closed_issues":68,"state":"open","created_at":"2014-10-07T14:39:07Z","updated_at":"2015-04-11T18:35:12Z","due_on":"2015-04-30T07:00:00Z","closed_at":null},"comments":19,"created_at":"2014-11-15T01:33:18Z","updated_at":"2015-04-11T18:35:21Z","closed_at":"2015-04-11T18:35:12Z","pull_request":{"url":"https://api.github.com/repos/pydata/pandas/pulls/8822","html_url":"https://github.com/pydata/pandas/pull/8822","diff_url":"https://github.com/pydata/pandas/pull/8822.diff","patch_url":"https://github.com/pydata/pandas/pull/8822.patch"},"body":"Right now the following raises an exception:\r\n```\r\nfrom pandas import DataFrame, Series\r\nfrom numpy import nan\r\nnan_colname = DataFrame(Series(1.0,index=[0]),columns=[nan])\r\nnan_colname_sparse = nan_colname.to_sparse()\r\n```\r\n\r\nThis is because sparse dataframes use a dictionary to store information about columns, with the column label as the key.  `nan`'s do not equal themselves and create problems as dictionary keys. This avoids the issue by uses a dataframe to store this information."},"comment":{"url":"https://api.github.com/repos/pydata/pandas/issues/comments/91896591","html_url":"https://github.com/pydata/pandas/pull/8822#issuecomment-91896591","issue_url":"https://api.github.com/repos/pydata/pandas/issues/8822","id":91896591,"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":"2015-04-11T18:35:20Z","updated_at":"2015-04-11T18:35:20Z","body":"thanks!"}}