{"action":"created","issue":{"url":"https://api.github.com/repos/pydata/pandas/issues/10291","labels_url":"https://api.github.com/repos/pydata/pandas/issues/10291/labels{/name}","comments_url":"https://api.github.com/repos/pydata/pandas/issues/10291/comments","events_url":"https://api.github.com/repos/pydata/pandas/issues/10291/events","html_url":"https://github.com/pydata/pandas/issues/10291","id":85655291,"number":10291,"title":"KeyError: '__dummy__'  for pd.crosstab in pandas","user":{"login":"songhuiming","id":1667488,"avatar_url":"https://avatars.githubusercontent.com/u/1667488?v=3","gravatar_id":"","url":"https://api.github.com/users/songhuiming","html_url":"https://github.com/songhuiming","followers_url":"https://api.github.com/users/songhuiming/followers","following_url":"https://api.github.com/users/songhuiming/following{/other_user}","gists_url":"https://api.github.com/users/songhuiming/gists{/gist_id}","starred_url":"https://api.github.com/users/songhuiming/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/songhuiming/subscriptions","organizations_url":"https://api.github.com/users/songhuiming/orgs","repos_url":"https://api.github.com/users/songhuiming/repos","events_url":"https://api.github.com/users/songhuiming/events{/privacy}","received_events_url":"https://api.github.com/users/songhuiming/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-05T23:20:24Z","updated_at":"2015-06-06T10:04:39Z","closed_at":null,"body":"get ~~ KeyError: '__dummy__' ~~ when I run the following:\r\n\r\n    np.random.seed(seed = 99)\r\n    s = np.random.randint(1,10,200)\r\n    s = pd.Series(np.where(s > 9, np.nan, s))\r\n    s1 = s[:100]\r\n    s2 = s[100:]\r\n    pd.crosstab(s1, s2)\r\n\r\n    KeyError: '__dummy__\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/pydata/pandas/issues/comments/109562340","html_url":"https://github.com/pydata/pandas/issues/10291#issuecomment-109562340","issue_url":"https://api.github.com/repos/pydata/pandas/issues/10291","id":109562340,"user":{"login":"lexual","id":410907,"avatar_url":"https://avatars.githubusercontent.com/u/410907?v=3","gravatar_id":"","url":"https://api.github.com/users/lexual","html_url":"https://github.com/lexual","followers_url":"https://api.github.com/users/lexual/followers","following_url":"https://api.github.com/users/lexual/following{/other_user}","gists_url":"https://api.github.com/users/lexual/gists{/gist_id}","starred_url":"https://api.github.com/users/lexual/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lexual/subscriptions","organizations_url":"https://api.github.com/users/lexual/orgs","repos_url":"https://api.github.com/users/lexual/repos","events_url":"https://api.github.com/users/lexual/events{/privacy}","received_events_url":"https://api.github.com/users/lexual/received_events","type":"User","site_admin":false},"created_at":"2015-06-06T10:04:39Z","updated_at":"2015-06-06T10:04:39Z","body":"Even simpler example. Perhaps something to do with the indices not overlapping at all.\r\n\r\n\r\n    s1 = pd.Series([1, 2, 3], index=[1, 2, 3])\r\n    s2 = pd.Series([4, 5, 6], index=[4, 5, 6])\r\n    pd.crosstab(s1, s2)"}}