{"action":"created","comment":{"url":"https://api.github.com/repos/rhiever/datacleaner/pulls/comments/54921961","id":54921961,"diff_hunk":"@@ -72,11 +83,18 @@ def autoclean(input_dataframe, drop_nans=False, copy=False):\n \n         # Encode all strings with numerical equivalents\n         if str(input_dataframe[column].values.dtype) == 'object':\n-            input_dataframe[column] = LabelEncoder().fit_transform(input_dataframe[column].values)\n+            if encoder is None:\n+                input_dataframe[column] = encoder().fit_transform(input_dataframe[column].values)","path":"datacleaner/datacleaner.py","position":46,"original_position":46,"commit_id":"ae4c87bc43172892785c94246b7bcc09dcde2fa1","original_commit_id":"ae4c87bc43172892785c94246b7bcc09dcde2fa1","user":{"login":"rhiever","id":1719223,"avatar_url":"https://avatars.githubusercontent.com/u/1719223?v=3","gravatar_id":"","url":"https://api.github.com/users/rhiever","html_url":"https://github.com/rhiever","followers_url":"https://api.github.com/users/rhiever/followers","following_url":"https://api.github.com/users/rhiever/following{/other_user}","gists_url":"https://api.github.com/users/rhiever/gists{/gist_id}","starred_url":"https://api.github.com/users/rhiever/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhiever/subscriptions","organizations_url":"https://api.github.com/users/rhiever/orgs","repos_url":"https://api.github.com/users/rhiever/repos","events_url":"https://api.github.com/users/rhiever/events{/privacy}","received_events_url":"https://api.github.com/users/rhiever/received_events","type":"User","site_admin":false},"body":"I suppose it would break support for sklearn.preprocessing.PolynomialFeatures as well, but I think that's okay. The goal of datacleaner isn't necessarily to transform the features significantly, as HashingEncoder and PolynomialFeatures does.","created_at":"2016-03-03T18:16:06Z","updated_at":"2016-03-03T18:16:06Z","html_url":"https://github.com/rhiever/datacleaner/pull/4#discussion_r54921961","pull_request_url":"https://api.github.com/repos/rhiever/datacleaner/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/rhiever/datacleaner/pulls/comments/54921961"},"html":{"href":"https://github.com/rhiever/datacleaner/pull/4#discussion_r54921961"},"pull_request":{"href":"https://api.github.com/repos/rhiever/datacleaner/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/rhiever/datacleaner/pulls/4","id":61560801,"html_url":"https://github.com/rhiever/datacleaner/pull/4","diff_url":"https://github.com/rhiever/datacleaner/pull/4.diff","patch_url":"https://github.com/rhiever/datacleaner/pull/4.patch","issue_url":"https://api.github.com/repos/rhiever/datacleaner/issues/4","number":4,"state":"open","locked":false,"title":"Adding in more options for string encoding","user":{"login":"wdm0006","id":1313935,"avatar_url":"https://avatars.githubusercontent.com/u/1313935?v=3","gravatar_id":"","url":"https://api.github.com/users/wdm0006","html_url":"https://github.com/wdm0006","followers_url":"https://api.github.com/users/wdm0006/followers","following_url":"https://api.github.com/users/wdm0006/following{/other_user}","gists_url":"https://api.github.com/users/wdm0006/gists{/gist_id}","starred_url":"https://api.github.com/users/wdm0006/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wdm0006/subscriptions","organizations_url":"https://api.github.com/users/wdm0006/orgs","repos_url":"https://api.github.com/users/wdm0006/repos","events_url":"https://api.github.com/users/wdm0006/events{/privacy}","received_events_url":"https://api.github.com/users/wdm0006/received_events","type":"User","site_admin":false},"body":"Here is a first stab at an implementation of a no-extra-dependencies version to fix issue #3. If basically just takes in an optional encoder object in each script, as well as kwargs for it (if required), and then passes it the list of object columns in addition to the passed kwargs.  ","created_at":"2016-03-03T13:46:00Z","updated_at":"2016-03-03T18:16:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"730602d07759350bf04294adb3d3d4d3162f506e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rhiever/datacleaner/pulls/4/commits","review_comments_url":"https://api.github.com/repos/rhiever/datacleaner/pulls/4/comments","review_comment_url":"https://api.github.com/repos/rhiever/datacleaner/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rhiever/datacleaner/issues/4/comments","statuses_url":"https://api.github.com/repos/rhiever/datacleaner/statuses/ae4c87bc43172892785c94246b7bcc09dcde2fa1","head":{"label":"wdm0006:master","ref":"master","sha":"ae4c87bc43172892785c94246b7bcc09dcde2fa1","user":{"login":"wdm0006","id":1313935,"avatar_url":"https://avatars.githubusercontent.com/u/1313935?v=3","gravatar_id":"","url":"https://api.github.com/users/wdm0006","html_url":"https://github.com/wdm0006","followers_url":"https://api.github.com/users/wdm0006/followers","following_url":"https://api.github.com/users/wdm0006/following{/other_user}","gists_url":"https://api.github.com/users/wdm0006/gists{/gist_id}","starred_url":"https://api.github.com/users/wdm0006/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wdm0006/subscriptions","organizations_url":"https://api.github.com/users/wdm0006/orgs","repos_url":"https://api.github.com/users/wdm0006/repos","events_url":"https://api.github.com/users/wdm0006/events{/privacy}","received_events_url":"https://api.github.com/users/wdm0006/received_events","type":"User","site_admin":false},"repo":{"id":52996652,"name":"datacleaner","full_name":"wdm0006/datacleaner","owner":{"login":"wdm0006","id":1313935,"avatar_url":"https://avatars.githubusercontent.com/u/1313935?v=3","gravatar_id":"","url":"https://api.github.com/users/wdm0006","html_url":"https://github.com/wdm0006","followers_url":"https://api.github.com/users/wdm0006/followers","following_url":"https://api.github.com/users/wdm0006/following{/other_user}","gists_url":"https://api.github.com/users/wdm0006/gists{/gist_id}","starred_url":"https://api.github.com/users/wdm0006/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wdm0006/subscriptions","organizations_url":"https://api.github.com/users/wdm0006/orgs","repos_url":"https://api.github.com/users/wdm0006/repos","events_url":"https://api.github.com/users/wdm0006/events{/privacy}","received_events_url":"https://api.github.com/users/wdm0006/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wdm0006/datacleaner","description":"A Python tool that automatically cleans data sets and readies them for analysis.","fork":true,"url":"https://api.github.com/repos/wdm0006/datacleaner","forks_url":"https://api.github.com/repos/wdm0006/datacleaner/forks","keys_url":"https://api.github.com/repos/wdm0006/datacleaner/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wdm0006/datacleaner/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wdm0006/datacleaner/teams","hooks_url":"https://api.github.com/repos/wdm0006/datacleaner/hooks","issue_events_url":"https://api.github.com/repos/wdm0006/datacleaner/issues/events{/number}","events_url":"https://api.github.com/repos/wdm0006/datacleaner/events","assignees_url":"https://api.github.com/repos/wdm0006/datacleaner/assignees{/user}","branches_url":"https://api.github.com/repos/wdm0006/datacleaner/branches{/branch}","tags_url":"https://api.github.com/repos/wdm0006/datacleaner/tags","blobs_url":"https://api.github.com/repos/wdm0006/datacleaner/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wdm0006/datacleaner/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wdm0006/datacleaner/git/refs{/sha}","trees_url":"https://api.github.com/repos/wdm0006/datacleaner/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wdm0006/datacleaner/statuses/{sha}","languages_url":"https://api.github.com/repos/wdm0006/datacleaner/languages","stargazers_url":"https://api.github.com/repos/wdm0006/datacleaner/stargazers","contributors_url":"https://api.github.com/repos/wdm0006/datacleaner/contributors","subscribers_url":"https://api.github.com/repos/wdm0006/datacleaner/subscribers","subscription_url":"https://api.github.com/repos/wdm0006/datacleaner/subscription","commits_url":"https://api.github.com/repos/wdm0006/datacleaner/commits{/sha}","git_commits_url":"https://api.github.com/repos/wdm0006/datacleaner/git/commits{/sha}","comments_url":"https://api.github.com/repos/wdm0006/datacleaner/comments{/number}","issue_comment_url":"https://api.github.com/repos/wdm0006/datacleaner/issues/comments{/number}","contents_url":"https://api.github.com/repos/wdm0006/datacleaner/contents/{+path}","compare_url":"https://api.github.com/repos/wdm0006/datacleaner/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wdm0006/datacleaner/merges","archive_url":"https://api.github.com/repos/wdm0006/datacleaner/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wdm0006/datacleaner/downloads","issues_url":"https://api.github.com/repos/wdm0006/datacleaner/issues{/number}","pulls_url":"https://api.github.com/repos/wdm0006/datacleaner/pulls{/number}","milestones_url":"https://api.github.com/repos/wdm0006/datacleaner/milestones{/number}","notifications_url":"https://api.github.com/repos/wdm0006/datacleaner/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wdm0006/datacleaner/labels{/name}","releases_url":"https://api.github.com/repos/wdm0006/datacleaner/releases{/id}","deployments_url":"https://api.github.com/repos/wdm0006/datacleaner/deployments","created_at":"2016-03-02T21:09:46Z","updated_at":"2016-03-02T21:09:47Z","pushed_at":"2016-03-03T13:44:44Z","git_url":"git://github.com/wdm0006/datacleaner.git","ssh_url":"git@github.com:wdm0006/datacleaner.git","clone_url":"https://github.com/wdm0006/datacleaner.git","svn_url":"https://github.com/wdm0006/datacleaner","homepage":"","size":26,"stargazers_count":0,"watchers_count":0,"language":"Python","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":0,"default_branch":"master"}},"base":{"label":"rhiever:master","ref":"master","sha":"63f51a2ce265f59aca57655d08e0f3fb1e826782","user":{"login":"rhiever","id":1719223,"avatar_url":"https://avatars.githubusercontent.com/u/1719223?v=3","gravatar_id":"","url":"https://api.github.com/users/rhiever","html_url":"https://github.com/rhiever","followers_url":"https://api.github.com/users/rhiever/followers","following_url":"https://api.github.com/users/rhiever/following{/other_user}","gists_url":"https://api.github.com/users/rhiever/gists{/gist_id}","starred_url":"https://api.github.com/users/rhiever/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhiever/subscriptions","organizations_url":"https://api.github.com/users/rhiever/orgs","repos_url":"https://api.github.com/users/rhiever/repos","events_url":"https://api.github.com/users/rhiever/events{/privacy}","received_events_url":"https://api.github.com/users/rhiever/received_events","type":"User","site_admin":false},"repo":{"id":52671170,"name":"datacleaner","full_name":"rhiever/datacleaner","owner":{"login":"rhiever","id":1719223,"avatar_url":"https://avatars.githubusercontent.com/u/1719223?v=3","gravatar_id":"","url":"https://api.github.com/users/rhiever","html_url":"https://github.com/rhiever","followers_url":"https://api.github.com/users/rhiever/followers","following_url":"https://api.github.com/users/rhiever/following{/other_user}","gists_url":"https://api.github.com/users/rhiever/gists{/gist_id}","starred_url":"https://api.github.com/users/rhiever/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhiever/subscriptions","organizations_url":"https://api.github.com/users/rhiever/orgs","repos_url":"https://api.github.com/users/rhiever/repos","events_url":"https://api.github.com/users/rhiever/events{/privacy}","received_events_url":"https://api.github.com/users/rhiever/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rhiever/datacleaner","description":"A Python tool that automatically cleans data sets and readies them for analysis.","fork":false,"url":"https://api.github.com/repos/rhiever/datacleaner","forks_url":"https://api.github.com/repos/rhiever/datacleaner/forks","keys_url":"https://api.github.com/repos/rhiever/datacleaner/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rhiever/datacleaner/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rhiever/datacleaner/teams","hooks_url":"https://api.github.com/repos/rhiever/datacleaner/hooks","issue_events_url":"https://api.github.com/repos/rhiever/datacleaner/issues/events{/number}","events_url":"https://api.github.com/repos/rhiever/datacleaner/events","assignees_url":"https://api.github.com/repos/rhiever/datacleaner/assignees{/user}","branches_url":"https://api.github.com/repos/rhiever/datacleaner/branches{/branch}","tags_url":"https://api.github.com/repos/rhiever/datacleaner/tags","blobs_url":"https://api.github.com/repos/rhiever/datacleaner/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rhiever/datacleaner/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rhiever/datacleaner/git/refs{/sha}","trees_url":"https://api.github.com/repos/rhiever/datacleaner/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rhiever/datacleaner/statuses/{sha}","languages_url":"https://api.github.com/repos/rhiever/datacleaner/languages","stargazers_url":"https://api.github.com/repos/rhiever/datacleaner/stargazers","contributors_url":"https://api.github.com/repos/rhiever/datacleaner/contributors","subscribers_url":"https://api.github.com/repos/rhiever/datacleaner/subscribers","subscription_url":"https://api.github.com/repos/rhiever/datacleaner/subscription","commits_url":"https://api.github.com/repos/rhiever/datacleaner/commits{/sha}","git_commits_url":"https://api.github.com/repos/rhiever/datacleaner/git/commits{/sha}","comments_url":"https://api.github.com/repos/rhiever/datacleaner/comments{/number}","issue_comment_url":"https://api.github.com/repos/rhiever/datacleaner/issues/comments{/number}","contents_url":"https://api.github.com/repos/rhiever/datacleaner/contents/{+path}","compare_url":"https://api.github.com/repos/rhiever/datacleaner/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rhiever/datacleaner/merges","archive_url":"https://api.github.com/repos/rhiever/datacleaner/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rhiever/datacleaner/downloads","issues_url":"https://api.github.com/repos/rhiever/datacleaner/issues{/number}","pulls_url":"https://api.github.com/repos/rhiever/datacleaner/pulls{/number}","milestones_url":"https://api.github.com/repos/rhiever/datacleaner/milestones{/number}","notifications_url":"https://api.github.com/repos/rhiever/datacleaner/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rhiever/datacleaner/labels{/name}","releases_url":"https://api.github.com/repos/rhiever/datacleaner/releases{/id}","deployments_url":"https://api.github.com/repos/rhiever/datacleaner/deployments","created_at":"2016-02-27T14:45:22Z","updated_at":"2016-03-03T18:06:02Z","pushed_at":"2016-03-03T13:46:00Z","git_url":"git://github.com/rhiever/datacleaner.git","ssh_url":"git@github.com:rhiever/datacleaner.git","clone_url":"https://github.com/rhiever/datacleaner.git","svn_url":"https://github.com/rhiever/datacleaner","homepage":"","size":44,"stargazers_count":49,"watchers_count":49,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":4,"forks":7,"open_issues":4,"watchers":49,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rhiever/datacleaner/pulls/4"},"html":{"href":"https://github.com/rhiever/datacleaner/pull/4"},"issue":{"href":"https://api.github.com/repos/rhiever/datacleaner/issues/4"},"comments":{"href":"https://api.github.com/repos/rhiever/datacleaner/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/rhiever/datacleaner/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/rhiever/datacleaner/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rhiever/datacleaner/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/rhiever/datacleaner/statuses/ae4c87bc43172892785c94246b7bcc09dcde2fa1"}}}}