{"action":"created","issue":{"url":"https://api.github.com/repos/pydata/pandas/issues/11441","labels_url":"https://api.github.com/repos/pydata/pandas/issues/11441/labels{/name}","comments_url":"https://api.github.com/repos/pydata/pandas/issues/11441/comments","events_url":"https://api.github.com/repos/pydata/pandas/issues/11441/events","html_url":"https://github.com/pydata/pandas/pull/11441","id":113594865,"number":11441,"title":"Fix for DataFrame.hist() with by- and weights-keyword","user":{"login":"Twizzledrizzle","id":6655099,"avatar_url":"https://avatars.githubusercontent.com/u/6655099?v=3","gravatar_id":"","url":"https://api.github.com/users/Twizzledrizzle","html_url":"https://github.com/Twizzledrizzle","followers_url":"https://api.github.com/users/Twizzledrizzle/followers","following_url":"https://api.github.com/users/Twizzledrizzle/following{/other_user}","gists_url":"https://api.github.com/users/Twizzledrizzle/gists{/gist_id}","starred_url":"https://api.github.com/users/Twizzledrizzle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Twizzledrizzle/subscriptions","organizations_url":"https://api.github.com/users/Twizzledrizzle/orgs","repos_url":"https://api.github.com/users/Twizzledrizzle/repos","events_url":"https://api.github.com/users/Twizzledrizzle/events{/privacy}","received_events_url":"https://api.github.com/users/Twizzledrizzle/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/pydata/pandas/labels/Visualization","name":"Visualization","color":"8AE234"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-10-27T14:23:49Z","updated_at":"2015-10-28T21:04:16Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/pydata/pandas/pulls/11441","html_url":"https://github.com/pydata/pandas/pull/11441","diff_url":"https://github.com/pydata/pandas/pull/11441.diff","patch_url":"https://github.com/pydata/pandas/pull/11441.patch"},"body":"will make the following work\r\n\r\n```python\r\nimport numpy as np\r\nimport pandas as pd\r\nd = {'one' : ['A', 'A', 'B', 'B', 'C'],\r\n     'two' : [4., 3., 2., 1., np.nan],\r\n     'three' : [10., 8., np.nan, 5., 7.]}     \r\ndf = pd.DataFrame(d)\r\ndf.hist('two', by='one', weights='three', bins=range(0, 10))\r\n# or\r\ndf.hist('two', by=df.one.values, weights='three', bins=range(0, 10))\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/pydata/pandas/issues/comments/151989556","html_url":"https://github.com/pydata/pandas/pull/11441#issuecomment-151989556","issue_url":"https://api.github.com/repos/pydata/pandas/issues/11441","id":151989556,"user":{"login":"Twizzledrizzle","id":6655099,"avatar_url":"https://avatars.githubusercontent.com/u/6655099?v=3","gravatar_id":"","url":"https://api.github.com/users/Twizzledrizzle","html_url":"https://github.com/Twizzledrizzle","followers_url":"https://api.github.com/users/Twizzledrizzle/followers","following_url":"https://api.github.com/users/Twizzledrizzle/following{/other_user}","gists_url":"https://api.github.com/users/Twizzledrizzle/gists{/gist_id}","starred_url":"https://api.github.com/users/Twizzledrizzle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Twizzledrizzle/subscriptions","organizations_url":"https://api.github.com/users/Twizzledrizzle/orgs","repos_url":"https://api.github.com/users/Twizzledrizzle/repos","events_url":"https://api.github.com/users/Twizzledrizzle/events{/privacy}","received_events_url":"https://api.github.com/users/Twizzledrizzle/received_events","type":"User","site_admin":false},"created_at":"2015-10-28T21:04:16Z","updated_at":"2015-10-28T21:04:16Z","body":"Oh also, as a side, the new function df.plot.hist() will miss a lot of this functionality.\r\n\r\ndf.plot.hist() seem to have problems using the by- keyword. Also missing column keyword. I tried working with the code, but it was more complex than the one I have been editing. I could not get my head around making the by-keyword work. \r\n\r\nShould I open a discussion around this perhaps in a separate thread?"}}