{"action":"created","issue":{"url":"https://api.github.com/repos/mm-mansour/Fast-Pandas/issues/3","repository_url":"https://api.github.com/repos/mm-mansour/Fast-Pandas","labels_url":"https://api.github.com/repos/mm-mansour/Fast-Pandas/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/mm-mansour/Fast-Pandas/issues/3/comments","events_url":"https://api.github.com/repos/mm-mansour/Fast-Pandas/issues/3/events","html_url":"https://github.com/mm-mansour/Fast-Pandas/issues/3","id":306654137,"number":3,"title":"Improving the timing even more","user":{"login":"LuckyJosh","id":5610010,"avatar_url":"https://avatars0.githubusercontent.com/u/5610010?v=4","gravatar_id":"","url":"https://api.github.com/users/LuckyJosh","html_url":"https://github.com/LuckyJosh","followers_url":"https://api.github.com/users/LuckyJosh/followers","following_url":"https://api.github.com/users/LuckyJosh/following{/other_user}","gists_url":"https://api.github.com/users/LuckyJosh/gists{/gist_id}","starred_url":"https://api.github.com/users/LuckyJosh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LuckyJosh/subscriptions","organizations_url":"https://api.github.com/users/LuckyJosh/orgs","repos_url":"https://api.github.com/users/LuckyJosh/repos","events_url":"https://api.github.com/users/LuckyJosh/events{/privacy}","received_events_url":"https://api.github.com/users/LuckyJosh/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-03-19T22:02:32Z","updated_at":"2018-03-25T17:12:03Z","closed_at":"2018-03-25T17:12:02Z","author_association":"NONE","body":"I dont know the implementation details of `np.mean` and `df[\"A\"].mean()` but I guess that `np.mean(df[\"A\"])` is slow because numpy has to cast the `pd.Series` in some way.\nUsing `np.mean(df[\"A\"].values)` is probably always faster, especially for large arrays.   "},"comment":{"url":"https://api.github.com/repos/mm-mansour/Fast-Pandas/issues/comments/375986570","html_url":"https://github.com/mm-mansour/Fast-Pandas/issues/3#issuecomment-375986570","issue_url":"https://api.github.com/repos/mm-mansour/Fast-Pandas/issues/3","id":375986570,"user":{"login":"mm-mansour","id":1788694,"avatar_url":"https://avatars1.githubusercontent.com/u/1788694?v=4","gravatar_id":"","url":"https://api.github.com/users/mm-mansour","html_url":"https://github.com/mm-mansour","followers_url":"https://api.github.com/users/mm-mansour/followers","following_url":"https://api.github.com/users/mm-mansour/following{/other_user}","gists_url":"https://api.github.com/users/mm-mansour/gists{/gist_id}","starred_url":"https://api.github.com/users/mm-mansour/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mm-mansour/subscriptions","organizations_url":"https://api.github.com/users/mm-mansour/orgs","repos_url":"https://api.github.com/users/mm-mansour/repos","events_url":"https://api.github.com/users/mm-mansour/events{/privacy}","received_events_url":"https://api.github.com/users/mm-mansour/received_events","type":"User","site_admin":false},"created_at":"2018-03-25T17:12:02Z","updated_at":"2018-03-25T17:12:02Z","author_association":"OWNER","body":"Actually ```np.mean(df[\"A\"])``` is slower because it calls ```df[\"A\"].mean()```, just as @mmngreco mentioned.\r\nI have added ```df[\"A\"].values``` to mean and all other functions, check them out and thanks a lot for the suggestions. "}}
{"actor":{"display_login":"mm-mansour"}}