{"action":"created","comment":{"url":"https://api.github.com/repos/v0dro/daru/pulls/comments/65591238","id":65591238,"diff_hunk":"@@ -925,8 +926,9 @@ def all? axis=:vector, &block\n     #\n     # @param [Fixnum] quantity (10) The number of elements to display from the top.\n     def head quantity=10\n-      return Daru::DataFrame.new [self.row[0].to_a].transpose,\n-        index: [@index.at(0)], order: @vectors if quantity == 1\n+      return Daru::DataFrame.rows [row[0]],\n+        index: [@index.at(0)],\n+        order: @vectors if quantity == 1\n       self[0..(quantity-1), :row]","path":"lib/daru/dataframe.rb","position":null,"original_position":40,"commit_id":"89c1f60580b56f689904ed6cae85ca4f1418862e","original_commit_id":"89c1f60580b56f689904ed6cae85ca4f1418862e","user":{"login":"zverok","id":129656,"avatar_url":"https://avatars.githubusercontent.com/u/129656?v=3","gravatar_id":"","url":"https://api.github.com/users/zverok","html_url":"https://github.com/zverok","followers_url":"https://api.github.com/users/zverok/followers","following_url":"https://api.github.com/users/zverok/following{/other_user}","gists_url":"https://api.github.com/users/zverok/gists{/gist_id}","starred_url":"https://api.github.com/users/zverok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zverok/subscriptions","organizations_url":"https://api.github.com/users/zverok/orgs","repos_url":"https://api.github.com/users/zverok/repos","events_url":"https://api.github.com/users/zverok/events{/privacy}","received_events_url":"https://api.github.com/users/zverok/received_events","type":"User","site_admin":false},"body":"The modifying `if` on multiline statement looks ugly (even if it makes rubocop happy).\r\nIt hink, something like this should look better (and better state the logic):\r\n```ruby\r\nif quantity == 1\r\n  Daru::DataFrame.rows [row[0]],\r\n    index: [@index.at(0)],\r\n    order: @vectors\r\nelse\r\n  self[0..(quantity-1), :row]\r\nend\r\n```","created_at":"2016-06-02T18:18:08Z","updated_at":"2016-06-02T18:18:08Z","html_url":"https://github.com/v0dro/daru/pull/134#discussion_r65591238","pull_request_url":"https://api.github.com/repos/v0dro/daru/pulls/134","_links":{"self":{"href":"https://api.github.com/repos/v0dro/daru/pulls/comments/65591238"},"html":{"href":"https://github.com/v0dro/daru/pull/134#discussion_r65591238"},"pull_request":{"href":"https://api.github.com/repos/v0dro/daru/pulls/134"}}},"pull_request":{"url":"https://api.github.com/repos/v0dro/daru/pulls/134","id":71005450,"html_url":"https://github.com/v0dro/daru/pull/134","diff_url":"https://github.com/v0dro/daru/pull/134.diff","patch_url":"https://github.com/v0dro/daru/pull/134.patch","issue_url":"https://api.github.com/repos/v0dro/daru/issues/134","number":134,"state":"open","locked":false,"title":"[WIP] Categorical Index","user":{"login":"lokeshh","id":7677524,"avatar_url":"https://avatars.githubusercontent.com/u/7677524?v=3","gravatar_id":"","url":"https://api.github.com/users/lokeshh","html_url":"https://github.com/lokeshh","followers_url":"https://api.github.com/users/lokeshh/followers","following_url":"https://api.github.com/users/lokeshh/following{/other_user}","gists_url":"https://api.github.com/users/lokeshh/gists{/gist_id}","starred_url":"https://api.github.com/users/lokeshh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lokeshh/subscriptions","organizations_url":"https://api.github.com/users/lokeshh/orgs","repos_url":"https://api.github.com/users/lokeshh/repos","events_url":"https://api.github.com/users/lokeshh/events{/privacy}","received_events_url":"https://api.github.com/users/lokeshh/received_events","type":"User","site_admin":false},"body":"The coding begins!\r\n\r\nThis PR adds `CategoricalIndex` to Daru. ","created_at":"2016-05-23T05:08:33Z","updated_at":"2016-06-02T18:18:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"79b93b4224a8e3923ab3e9af1e40fc1b99f8b5aa","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/v0dro/daru/pulls/134/commits","review_comments_url":"https://api.github.com/repos/v0dro/daru/pulls/134/comments","review_comment_url":"https://api.github.com/repos/v0dro/daru/pulls/comments{/number}","comments_url":"https://api.github.com/repos/v0dro/daru/issues/134/comments","statuses_url":"https://api.github.com/repos/v0dro/daru/statuses/89c1f60580b56f689904ed6cae85ca4f1418862e","head":{"label":"lokeshh:cat_index","ref":"cat_index","sha":"89c1f60580b56f689904ed6cae85ca4f1418862e","user":{"login":"lokeshh","id":7677524,"avatar_url":"https://avatars.githubusercontent.com/u/7677524?v=3","gravatar_id":"","url":"https://api.github.com/users/lokeshh","html_url":"https://github.com/lokeshh","followers_url":"https://api.github.com/users/lokeshh/followers","following_url":"https://api.github.com/users/lokeshh/following{/other_user}","gists_url":"https://api.github.com/users/lokeshh/gists{/gist_id}","starred_url":"https://api.github.com/users/lokeshh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lokeshh/subscriptions","organizations_url":"https://api.github.com/users/lokeshh/orgs","repos_url":"https://api.github.com/users/lokeshh/repos","events_url":"https://api.github.com/users/lokeshh/events{/privacy}","received_events_url":"https://api.github.com/users/lokeshh/received_events","type":"User","site_admin":false},"repo":{"id":51312435,"name":"daru","full_name":"lokeshh/daru","owner":{"login":"lokeshh","id":7677524,"avatar_url":"https://avatars.githubusercontent.com/u/7677524?v=3","gravatar_id":"","url":"https://api.github.com/users/lokeshh","html_url":"https://github.com/lokeshh","followers_url":"https://api.github.com/users/lokeshh/followers","following_url":"https://api.github.com/users/lokeshh/following{/other_user}","gists_url":"https://api.github.com/users/lokeshh/gists{/gist_id}","starred_url":"https://api.github.com/users/lokeshh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lokeshh/subscriptions","organizations_url":"https://api.github.com/users/lokeshh/orgs","repos_url":"https://api.github.com/users/lokeshh/repos","events_url":"https://api.github.com/users/lokeshh/events{/privacy}","received_events_url":"https://api.github.com/users/lokeshh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lokeshh/daru","description":"Data Analysis in RUby","fork":true,"url":"https://api.github.com/repos/lokeshh/daru","forks_url":"https://api.github.com/repos/lokeshh/daru/forks","keys_url":"https://api.github.com/repos/lokeshh/daru/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lokeshh/daru/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lokeshh/daru/teams","hooks_url":"https://api.github.com/repos/lokeshh/daru/hooks","issue_events_url":"https://api.github.com/repos/lokeshh/daru/issues/events{/number}","events_url":"https://api.github.com/repos/lokeshh/daru/events","assignees_url":"https://api.github.com/repos/lokeshh/daru/assignees{/user}","branches_url":"https://api.github.com/repos/lokeshh/daru/branches{/branch}","tags_url":"https://api.github.com/repos/lokeshh/daru/tags","blobs_url":"https://api.github.com/repos/lokeshh/daru/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lokeshh/daru/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lokeshh/daru/git/refs{/sha}","trees_url":"https://api.github.com/repos/lokeshh/daru/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lokeshh/daru/statuses/{sha}","languages_url":"https://api.github.com/repos/lokeshh/daru/languages","stargazers_url":"https://api.github.com/repos/lokeshh/daru/stargazers","contributors_url":"https://api.github.com/repos/lokeshh/daru/contributors","subscribers_url":"https://api.github.com/repos/lokeshh/daru/subscribers","subscription_url":"https://api.github.com/repos/lokeshh/daru/subscription","commits_url":"https://api.github.com/repos/lokeshh/daru/commits{/sha}","git_commits_url":"https://api.github.com/repos/lokeshh/daru/git/commits{/sha}","comments_url":"https://api.github.com/repos/lokeshh/daru/comments{/number}","issue_comment_url":"https://api.github.com/repos/lokeshh/daru/issues/comments{/number}","contents_url":"https://api.github.com/repos/lokeshh/daru/contents/{+path}","compare_url":"https://api.github.com/repos/lokeshh/daru/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lokeshh/daru/merges","archive_url":"https://api.github.com/repos/lokeshh/daru/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lokeshh/daru/downloads","issues_url":"https://api.github.com/repos/lokeshh/daru/issues{/number}","pulls_url":"https://api.github.com/repos/lokeshh/daru/pulls{/number}","milestones_url":"https://api.github.com/repos/lokeshh/daru/milestones{/number}","notifications_url":"https://api.github.com/repos/lokeshh/daru/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lokeshh/daru/labels{/name}","releases_url":"https://api.github.com/repos/lokeshh/daru/releases{/id}","deployments_url":"https://api.github.com/repos/lokeshh/daru/deployments","created_at":"2016-02-08T17:09:21Z","updated_at":"2016-05-28T07:11:32Z","pushed_at":"2016-06-02T18:14:58Z","git_url":"git://github.com/lokeshh/daru.git","ssh_url":"git@github.com:lokeshh/daru.git","clone_url":"https://github.com/lokeshh/daru.git","svn_url":"https://github.com/lokeshh/daru","homepage":null,"size":3338,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"v0dro:master","ref":"master","sha":"9f31896a561c822593e2918213274859ddc0f10c","user":{"login":"v0dro","id":2629909,"avatar_url":"https://avatars.githubusercontent.com/u/2629909?v=3","gravatar_id":"","url":"https://api.github.com/users/v0dro","html_url":"https://github.com/v0dro","followers_url":"https://api.github.com/users/v0dro/followers","following_url":"https://api.github.com/users/v0dro/following{/other_user}","gists_url":"https://api.github.com/users/v0dro/gists{/gist_id}","starred_url":"https://api.github.com/users/v0dro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/v0dro/subscriptions","organizations_url":"https://api.github.com/users/v0dro/orgs","repos_url":"https://api.github.com/users/v0dro/repos","events_url":"https://api.github.com/users/v0dro/events{/privacy}","received_events_url":"https://api.github.com/users/v0dro/received_events","type":"User","site_admin":false},"repo":{"id":24784998,"name":"daru","full_name":"v0dro/daru","owner":{"login":"v0dro","id":2629909,"avatar_url":"https://avatars.githubusercontent.com/u/2629909?v=3","gravatar_id":"","url":"https://api.github.com/users/v0dro","html_url":"https://github.com/v0dro","followers_url":"https://api.github.com/users/v0dro/followers","following_url":"https://api.github.com/users/v0dro/following{/other_user}","gists_url":"https://api.github.com/users/v0dro/gists{/gist_id}","starred_url":"https://api.github.com/users/v0dro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/v0dro/subscriptions","organizations_url":"https://api.github.com/users/v0dro/orgs","repos_url":"https://api.github.com/users/v0dro/repos","events_url":"https://api.github.com/users/v0dro/events{/privacy}","received_events_url":"https://api.github.com/users/v0dro/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/v0dro/daru","description":"Data Analysis in RUby","fork":false,"url":"https://api.github.com/repos/v0dro/daru","forks_url":"https://api.github.com/repos/v0dro/daru/forks","keys_url":"https://api.github.com/repos/v0dro/daru/keys{/key_id}","collaborators_url":"https://api.github.com/repos/v0dro/daru/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/v0dro/daru/teams","hooks_url":"https://api.github.com/repos/v0dro/daru/hooks","issue_events_url":"https://api.github.com/repos/v0dro/daru/issues/events{/number}","events_url":"https://api.github.com/repos/v0dro/daru/events","assignees_url":"https://api.github.com/repos/v0dro/daru/assignees{/user}","branches_url":"https://api.github.com/repos/v0dro/daru/branches{/branch}","tags_url":"https://api.github.com/repos/v0dro/daru/tags","blobs_url":"https://api.github.com/repos/v0dro/daru/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/v0dro/daru/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/v0dro/daru/git/refs{/sha}","trees_url":"https://api.github.com/repos/v0dro/daru/git/trees{/sha}","statuses_url":"https://api.github.com/repos/v0dro/daru/statuses/{sha}","languages_url":"https://api.github.com/repos/v0dro/daru/languages","stargazers_url":"https://api.github.com/repos/v0dro/daru/stargazers","contributors_url":"https://api.github.com/repos/v0dro/daru/contributors","subscribers_url":"https://api.github.com/repos/v0dro/daru/subscribers","subscription_url":"https://api.github.com/repos/v0dro/daru/subscription","commits_url":"https://api.github.com/repos/v0dro/daru/commits{/sha}","git_commits_url":"https://api.github.com/repos/v0dro/daru/git/commits{/sha}","comments_url":"https://api.github.com/repos/v0dro/daru/comments{/number}","issue_comment_url":"https://api.github.com/repos/v0dro/daru/issues/comments{/number}","contents_url":"https://api.github.com/repos/v0dro/daru/contents/{+path}","compare_url":"https://api.github.com/repos/v0dro/daru/compare/{base}...{head}","merges_url":"https://api.github.com/repos/v0dro/daru/merges","archive_url":"https://api.github.com/repos/v0dro/daru/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/v0dro/daru/downloads","issues_url":"https://api.github.com/repos/v0dro/daru/issues{/number}","pulls_url":"https://api.github.com/repos/v0dro/daru/pulls{/number}","milestones_url":"https://api.github.com/repos/v0dro/daru/milestones{/number}","notifications_url":"https://api.github.com/repos/v0dro/daru/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/v0dro/daru/labels{/name}","releases_url":"https://api.github.com/repos/v0dro/daru/releases{/id}","deployments_url":"https://api.github.com/repos/v0dro/daru/deployments","created_at":"2014-10-04T08:23:21Z","updated_at":"2016-06-01T21:20:29Z","pushed_at":"2016-06-02T18:14:58Z","git_url":"git://github.com/v0dro/daru.git","ssh_url":"git@github.com:v0dro/daru.git","clone_url":"https://github.com/v0dro/daru.git","svn_url":"https://github.com/v0dro/daru","homepage":null,"size":3619,"stargazers_count":113,"watchers_count":113,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":32,"mirror_url":null,"open_issues_count":27,"forks":32,"open_issues":27,"watchers":113,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/v0dro/daru/pulls/134"},"html":{"href":"https://github.com/v0dro/daru/pull/134"},"issue":{"href":"https://api.github.com/repos/v0dro/daru/issues/134"},"comments":{"href":"https://api.github.com/repos/v0dro/daru/issues/134/comments"},"review_comments":{"href":"https://api.github.com/repos/v0dro/daru/pulls/134/comments"},"review_comment":{"href":"https://api.github.com/repos/v0dro/daru/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/v0dro/daru/pulls/134/commits"},"statuses":{"href":"https://api.github.com/repos/v0dro/daru/statuses/89c1f60580b56f689904ed6cae85ca4f1418862e"}}}}
{"actor":{"display_login":"zverok"}}