{"id":424,"date":"2018-08-23T07:45:55","date_gmt":"2018-08-23T07:45:55","guid":{"rendered":"http:\/\/datadigging.ru\/?p=424"},"modified":"2018-08-23T07:45:55","modified_gmt":"2018-08-23T07:45:55","slug":"\u043f\u0435\u0440\u0435\u0432\u043e\u0434-\u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0430\u043b\u044c\u043d\u044b\u0445-\u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432-\u0434\u0430\u0442\u0430\u0444\u0440\u0435\u0439\u043c\u0430-\u0432-\u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0435","status":"publish","type":"post","link":"https:\/\/datadigging.ru\/?p=424","title":{"rendered":"\u041f\u0435\u0440\u0435\u0432\u043e\u0434 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u0434\u0430\u0442\u0430\u0444\u0440\u0435\u0439\u043c\u0430 \u0432 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0435"},"content":{"rendered":"<pre class=\"lang:python decode:true\">test_df\r\n<\/pre>\n<table class=\"dataframe\" border=\"1\">\n<thead>\n<tr>\n<th><\/th>\n<th>\u043d\u043e\u043c\u0435\u0440<\/th>\n<th>\u0433\u043e\u0440\u043e\u0434<\/th>\n<th>\u043a\u043e\u043b\u0438\u0447. \u043f\u0440\u0438\u0437\u043d\u0430\u043a<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<th>0<\/th>\n<td>2<\/td>\n<td>\u043c\u043e\u0441\u043a\u0432\u0430<\/td>\n<td>1<\/td>\n<\/tr>\n<tr>\n<th>1<\/th>\n<td>3<\/td>\n<td>\u043f\u0438\u0442\u0435\u0440<\/td>\n<td>2<\/td>\n<\/tr>\n<tr>\n<th>2<\/th>\n<td>4<\/td>\n<td>\u0441\u0430\u0440\u0430\u0442\u043e\u0432<\/td>\n<td>3<\/td>\n<\/tr>\n<tr>\n<th>3<\/th>\n<td>5<\/td>\n<td>\u043c\u043e\u0441\u043a\u0432\u0430<\/td>\n<td>4<\/td>\n<\/tr>\n<tr>\n<th>4<\/th>\n<td>6<\/td>\n<td>\u043f\u0438\u0442\u0435\u0440<\/td>\n<td>3<\/td>\n<\/tr>\n<tr>\n<th>5<\/th>\n<td>7<\/td>\n<td>\u043c\u043e\u0441\u043a\u0432\u0430<\/td>\n<td>4<\/td>\n<\/tr>\n<tr>\n<th>6<\/th>\n<td>8<\/td>\n<td>\u0441\u044b\u043a\u0442\u044b\u0432\u043a\u0430\u0440<\/td>\n<td>5<\/td>\n<\/tr>\n<tr>\n<th>7<\/th>\n<td>9<\/td>\n<td>\u0441\u0430\u0440\u0430\u0442\u043e\u0432<\/td>\n<td>6<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<pre class=\"lang:python decode:true\">df_nonbinary = pd.get_dummies(test_df['\u0433\u043e\u0440\u043e\u0434'], )\r\ndf_nonbinary \r\n<\/pre>\n<table class=\"dataframe\" border=\"1\">\n<thead>\n<tr>\n<th><\/th>\n<th>\u043c\u043e\u0441\u043a\u0432\u0430<\/th>\n<th>\u043f\u0438\u0442\u0435\u0440<\/th>\n<th>\u0441\u0430\u0440\u0430\u0442\u043e\u0432<\/th>\n<th>\u0441\u044b\u043a\u0442\u044b\u0432\u043a\u0430\u0440<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<th>0<\/th>\n<td>1.0<\/td>\n<td>0.0<\/td>\n<td>0.0<\/td>\n<td>0.0<\/td>\n<\/tr>\n<tr>\n<th>1<\/th>\n<td>0.0<\/td>\n<td>1.0<\/td>\n<td>0.0<\/td>\n<td>0.0<\/td>\n<\/tr>\n<tr>\n<th>2<\/th>\n<td>0.0<\/td>\n<td>0.0<\/td>\n<td>1.0<\/td>\n<td>0.0<\/td>\n<\/tr>\n<tr>\n<th>3<\/th>\n<td>1.0<\/td>\n<td>0.0<\/td>\n<td>0.0<\/td>\n<td>0.0<\/td>\n<\/tr>\n<tr>\n<th>4<\/th>\n<td>0.0<\/td>\n<td>1.0<\/td>\n<td>0.0<\/td>\n<td>0.0<\/td>\n<\/tr>\n<tr>\n<th>5<\/th>\n<td>1.0<\/td>\n<td>0.0<\/td>\n<td>0.0<\/td>\n<td>0.0<\/td>\n<\/tr>\n<tr>\n<th>6<\/th>\n<td>0.0<\/td>\n<td>0.0<\/td>\n<td>0.0<\/td>\n<td>1.0<\/td>\n<\/tr>\n<tr>\n<th>7<\/th>\n<td>0.0<\/td>\n<td>0.0<\/td>\n<td>1.0<\/td>\n<td>0.0<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<pre class=\"lang:python decode:true\">new_df = pd.concat([test_df, df_nonbinary], axis=1 )\r\nnew_df\r\n<\/pre>\n<table class=\"dataframe\" border=\"1\">\n<thead>\n<tr>\n<th><\/th>\n<th>\u043d\u043e\u043c\u0435\u0440<\/th>\n<th>\u0433\u043e\u0440\u043e\u0434<\/th>\n<th>\u043a\u043e\u043b\u0438\u0447. \u043f\u0440\u0438\u0437\u043d\u0430\u043a<\/th>\n<th>\u043c\u043e\u0441\u043a\u0432\u0430<\/th>\n<th>\u043f\u0438\u0442\u0435\u0440<\/th>\n<th>\u0441\u0430\u0440\u0430\u0442\u043e\u0432<\/th>\n<th>\u0441\u044b\u043a\u0442\u044b\u0432\u043a\u0430\u0440<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<th>0<\/th>\n<td>2<\/td>\n<td>\u043c\u043e\u0441\u043a\u0432\u0430<\/td>\n<td>1<\/td>\n<td>1.0<\/td>\n<td>0.0<\/td>\n<td>0.0<\/td>\n<td>0.0<\/td>\n<\/tr>\n<tr>\n<th>1<\/th>\n<td>3<\/td>\n<td>\u043f\u0438\u0442\u0435\u0440<\/td>\n<td>2<\/td>\n<td>0.0<\/td>\n<td>1.0<\/td>\n<td>0.0<\/td>\n<td>0.0<\/td>\n<\/tr>\n<tr>\n<th>2<\/th>\n<td>4<\/td>\n<td>\u0441\u0430\u0440\u0430\u0442\u043e\u0432<\/td>\n<td>3<\/td>\n<td>0.0<\/td>\n<td>0.0<\/td>\n<td>1.0<\/td>\n<td>0.0<\/td>\n<\/tr>\n<tr>\n<th>3<\/th>\n<td>5<\/td>\n<td>\u043c\u043e\u0441\u043a\u0432\u0430<\/td>\n<td>4<\/td>\n<td>1.0<\/td>\n<td>0.0<\/td>\n<td>0.0<\/td>\n<td>0.0<\/td>\n<\/tr>\n<tr>\n<th>4<\/th>\n<td>6<\/td>\n<td>\u043f\u0438\u0442\u0435\u0440<\/td>\n<td>3<\/td>\n<td>0.0<\/td>\n<td>1.0<\/td>\n<td>0.0<\/td>\n<td>0.0<\/td>\n<\/tr>\n<tr>\n<th>5<\/th>\n<td>7<\/td>\n<td>\u043c\u043e\u0441\u043a\u0432\u0430<\/td>\n<td>4<\/td>\n<td>1.0<\/td>\n<td>0.0<\/td>\n<td>0.0<\/td>\n<td>0.0<\/td>\n<\/tr>\n<tr>\n<th>6<\/th>\n<td>8<\/td>\n<td>\u0441\u044b\u043a\u0442\u044b\u0432\u043a\u0430\u0440<\/td>\n<td>5<\/td>\n<td>0.0<\/td>\n<td>0.0<\/td>\n<td>0.0<\/td>\n<td>1.0<\/td>\n<\/tr>\n<tr>\n<th>7<\/th>\n<td>9<\/td>\n<td>\u0441\u0430\u0440\u0430\u0442\u043e\u0432<\/td>\n<td>6<\/td>\n<td>0.0<\/td>\n<td>0.0<\/td>\n<td>1.0<\/td>\n<td>0.0<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>test_df \u043d\u043e\u043c\u0435\u0440 \u0433\u043e\u0440\u043e\u0434 \u043a\u043e\u043b\u0438\u0447. \u043f\u0440\u0438\u0437\u043d\u0430\u043a 0 2 \u043c\u043e\u0441\u043a\u0432\u0430 1 1 3 \u043f\u0438\u0442\u0435\u0440 2 2 4 \u0441\u0430\u0440\u0430\u0442\u043e\u0432 3 3 5 \u043c\u043e\u0441\u043a\u0432\u0430 4 4 6 \u043f\u0438\u0442\u0435\u0440 3 5 7 \u043c\u043e\u0441\u043a\u0432\u0430 4 6 8 \u0441\u044b\u043a\u0442\u044b\u0432\u043a\u0430\u0440 5 7 9 \u0441\u0430\u0440\u0430\u0442\u043e\u0432 6 df_nonbinary = pd.get_dummies(test_df[&#8216;\u0433\u043e\u0440\u043e\u0434&#8217;], &hellip; <a href=\"https:\/\/datadigging.ru\/?p=424\">\u0427\u0438\u0442\u0430\u0442\u044c \u0434\u0430\u043b\u0435\u0435 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"aside","meta":{"_exactmetrics_skip_tracking":false,"footnotes":""},"categories":[1],"tags":[12,9],"class_list":["post-424","post","type-post","status-publish","format-aside","hentry","category-uncategorized","tag-pandas","tag-python","post_format-post-format-aside"],"_links":{"self":[{"href":"https:\/\/datadigging.ru\/index.php?rest_route=\/wp\/v2\/posts\/424","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/datadigging.ru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/datadigging.ru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/datadigging.ru\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/datadigging.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=424"}],"version-history":[{"count":1,"href":"https:\/\/datadigging.ru\/index.php?rest_route=\/wp\/v2\/posts\/424\/revisions"}],"predecessor-version":[{"id":425,"href":"https:\/\/datadigging.ru\/index.php?rest_route=\/wp\/v2\/posts\/424\/revisions\/425"}],"wp:attachment":[{"href":"https:\/\/datadigging.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=424"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/datadigging.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=424"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/datadigging.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=424"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}