{"id":371096,"date":"2024-05-21T04:40:23","date_gmt":"2024-05-21T04:40:23","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=371096"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=371096","title":{"rendered":"<span>\u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u0440\u0435\u0434\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0433\u043e \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u0430 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u0438. \u041d\u043e \u0434\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0440\u043e\u044f\u0441\u043d\u0438\u043c, \u0447\u0442\u043e \u0438\u0437 \u0441\u0435\u0431\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u0438 \u0438\u0437 \u043a\u0430\u043a\u0438\u0445 \u044d\u0442\u0430\u043f\u043e\u0432 \u043e\u043d\u043e \u0441\u043e\u0441\u0442\u043e\u0438\u0442.<\/p>\n<p><em><u>\u041c\u0430\u0448\u0438\u043d\u043d\u043e\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435\u00a0<\/u><\/em>\u2013 \u044d\u0442\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440 \u0443\u0447\u0438\u0442\u0441\u044f \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435, \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0438 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u044d\u0442\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f\u00a0\u2013 \u0438 \u043f\u043e\u0437\u0436\u0435.\u00a0<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0434\u043b\u044f \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435, \u043d\u0435\u043e\u0431\u044a\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u0438\u043b\u0438 \u043d\u0435\u043f\u043e\u043b\u043d\u044b\u0435, \u0442\u043e \u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u043d\u0435\u0442\u043e\u0447\u043d\u044b\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0430.<\/p>\n<p><em><u>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445<\/u><\/em><u>\u00a0<\/u>\u2013 \u044d\u0442\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0438 \u00ab\u0441\u044b\u0440\u044b\u0445<strong>\u00bb<\/strong> (\u043d\u0435\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0445) \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0438\u0445 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430.<\/p>\n<p>\u041f\u0440\u0435\u0434\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b:<\/p>\n<ul>\n<li>\n<p>\u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445;<\/p>\n<\/li>\n<li>\n<p>\u043e\u0447\u0438\u0441\u0442\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445;<\/p>\n<\/li>\n<li>\n<p>\u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445;<\/p>\n<\/li>\n<li>\n<p>\u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445;<\/p>\n<\/li>\n<li>\n<p>\u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435;<\/p>\n<\/li>\n<li>\n<p>\u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f.<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445<\/strong> \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 <strong>\u0432\u044b\u044f\u0432\u043b\u0435\u043d\u0438\u0435:<\/strong><\/p>\n<ul>\n<li>\n<p>\u0434\u0443\u0431\u043b\u0438\u043a\u0430\u0442\u043e\u0432, \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u0440\u0435\u0447\u0438\u0439, \u043e\u0448\u0438\u0431\u043e\u043a;<\/p>\n<\/li>\n<li>\n<p>\u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0439;<\/p>\n<\/li>\n<li>\n<p>\u043f\u0440\u043e\u043f\u0443\u0441\u043a\u043e\u0432<strong>.<\/strong><\/p>\n<\/li>\n<\/ul>\n<p><strong>\u041e\u0447\u0438\u0441\u0442\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445<\/strong> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442:  <\/p>\n<ul>\n<li>\n<p>\u0443\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0434\u0443\u0431\u043b\u0438\u043a\u0430\u0442\u043e\u0432, \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u0440\u0435\u0447\u0438\u0439 \u0438 \u043e\u0448\u0438\u0431\u043e\u043a;<\/p>\n<\/li>\n<li>\n<p>\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0439;<\/p>\n<\/li>\n<li>\n<p>\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u043e\u0432.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0438. \u0418\u0445 \u043c\u043e\u0436\u043d\u043e \u0443\u0434\u0430\u043b\u044f\u0442\u044c, \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u043b\u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0442\u044c. \u041e\u0434\u043d\u0430\u043a\u043e \u043d\u0443\u0436\u043d\u043e \u043e\u0441\u0442\u043e\u0440\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u043e\u0432. \u0415\u0441\u043b\u0438 \u043e\u043d\u0438 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0434\u043e\u043b\u044e \u043f\u043e \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044e \u043a \u043e\u0431\u044a\u0435\u043c\u0443 \u0432\u0441\u0435\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445, \u0442\u043e \u043f\u0440\u0438\u0431\u0435\u0433\u0430\u0442\u044c \u043a \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044e \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u043e\u0432 \u043d\u0435 \u0441\u0442\u043e\u0438\u0442.<\/p>\n<p>\u0417\u0430\u043f\u043e\u043b\u043d\u044f\u0442\u044c <strong>\u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0438<\/strong> \u043c\u043e\u0436\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e<strong>:<\/strong><\/p>\n<ul>\n<li>\n<p>\u043d\u0443\u043b\u0435\u0439;<\/p>\n<\/li>\n<li>\n<p>\u043c\u043e\u0434\u044b, \u043c\u0435\u0434\u0438\u0430\u043d\u044b \u0438\u043b\u0438 \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f;<\/p>\n<\/li>\n<li>\n<p>\u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445.<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u0422\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445<\/strong> \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442:  <\/p>\n<ul>\n<li>\n<p>\u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432;<\/p>\n<\/li>\n<li>\n<p>\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430, \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445;<\/p>\n<\/li>\n<li>\n<p>\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445;<\/p>\n<\/li>\n<li>\n<p>\u043d\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u0414\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 <\/strong>\u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043d\u043e\u0432\u044b\u0445 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432, \u0430\u0433\u0440\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432.<\/p>\n<p><strong>\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 <\/strong>\u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442:<\/p>\n<ul>\n<li>\n<p>\u00a0\u0441\u043d\u0438\u0436\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438;<\/p>\n<\/li>\n<li>\n<p>\u0432\u044b\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0438 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043d\u0435\u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c \u0434\u043e 80\u00a0% \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0437\u0430\u0442\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u043d\u0430 \u043f\u0440\u043e\u0435\u043a\u0442 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f. \u0427\u0442\u043e\u0431\u044b \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441, \u0432\u0430\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b, \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445.\u00a0<\/p>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u044b\u0439 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f <em>Python<\/em> \u0432 \u0441\u0440\u0435\u0434\u0435 <em>Google<\/em> <em>Colaboratory<\/em>.<\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438  <\/p>\n<pre><code>import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns<\/code><\/pre>\n<p>\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0444\u0430\u0439\u043b data.csv, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435:  <\/p>\n<pre><code>df = pd.read_csv('\/content\/data.csv')<\/code><\/pre>\n<p><strong>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445<\/strong>  <\/p>\n<ul>\n<li>\n<p><em>children<\/em> \u2013 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u0435\u0442\u0435\u0439 \u0432 \u0441\u0435\u043c\u044c\u0435;<\/p>\n<\/li>\n<li>\n<p><em>days_employed<\/em> \u2013 \u043e\u0431\u0449\u0438\u0439 \u0442\u0440\u0443\u0434\u043e\u0432\u043e\u0439 \u0441\u0442\u0430\u0436 \u0432 \u0434\u043d\u044f\u0445;<\/p>\n<\/li>\n<li>\n<p><em>dob_years<\/em> \u2013 \u0432\u043e\u0437\u0440\u0430\u0441\u0442 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0432 \u0433\u043e\u0434\u0430\u0445;<\/p>\n<\/li>\n<li>\n<p><em>education<\/em> \u2013 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u0430;<\/p>\n<\/li>\n<li>\n<p><em>education_id<\/em> \u2013 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0443\u0440\u043e\u0432\u043d\u044f \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f;<\/p>\n<\/li>\n<li>\n<p><em>family_status<\/em> \u2013 \u0441\u0435\u043c\u0435\u0439\u043d\u043e\u0435 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435;<\/p>\n<\/li>\n<li>\n<p><em>family_status_id<\/em> \u2013 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0441\u0435\u043c\u0435\u0439\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f;<\/p>\n<\/li>\n<li>\n<p><em>gender<\/em> \u2013 \u043f\u043e\u043b \u043a\u043b\u0438\u0435\u043d\u0442\u0430;<\/p>\n<\/li>\n<li>\n<p><em>income_type \u2013 <\/em>\u0442\u0438\u043f \u0437\u0430\u043d\u044f\u0442\u043e\u0441\u0442\u0438;<\/p>\n<\/li>\n<li>\n<p><em>debt<\/em> \u2013 \u0438\u043c\u0435\u043b \u043b\u0438 \u0437\u0430\u0434\u043e\u043b\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u043f\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0443 \u043a\u0440\u0435\u0434\u0438\u0442\u043e\u0432 (1 \u2013 \u0438\u043c\u0435\u043b, 0 \u2013 \u043d\u0435 \u0438\u043c\u0435\u043b);<\/p>\n<\/li>\n<li>\n<p><em>total_income<\/em> \u2013 \u0435\u0436\u0435\u043c\u0435\u0441\u044f\u0447\u043d\u044b\u0439 \u0434\u043e\u0445\u043e\u0434;<\/p>\n<\/li>\n<li>\n<p><em>purpose<\/em> \u2013 \u0446\u0435\u043b\u044c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043a\u0440\u0435\u0434\u0438\u0442\u0430.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u0430<em> info()<\/em>:<\/p>\n<pre><code>df.info()<\/code><\/pre>\n<pre><code>&lt;class 'pandas.core.frame.DataFrame'> RangeIndex: 21525 entries, 0 to 21524 Data columns (total 12 columns):  #   Column            Non\u2013Null Count  Dtype   \u2013\u2013\u2013  \u2013\u2013\u2013\u2013\u2013\u2013            \u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013  \u2013\u2013\u2013\u2013\u2013    0   children          21525 non\u2013null  int64    1   days_employed    1 1935 non\u2013null  float64  2   dob_years         21525 non\u2013null  int64    3   education         21525 non\u2013null  object   4   education_id      21525 non\u2013null  int64    5   family_status     21525 non\u2013null  object   6   family_status_id  21525 non\u2013null  int64    7   gender            21525 non\u2013null  object   8   income_type       21525 non\u2013null  object   9   debt              21525 non\u2013null  int64    10  total_income      19351 non\u2013null  float64  11  purpose           21525 non\u2013null  object  dtypes: float64(2), int64(5), object(5) memory usage: 2.0+ MB<\/code><\/pre>\n<p>\u041d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0432\u044b\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u044b\u0432\u043e\u0434, \u0447\u0442\u043e \u0442\u0438\u043f \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0438\u0445 \u0441\u043c\u044b\u0441\u043b\u043e\u0432\u043e\u043c\u0443 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044e. \u041e\u0434\u043d\u0430\u043a\u043e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0432 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430\u0445 <strong><em>days_employed \u0438 total_income <\/em><\/strong>\u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u0441\u044f \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439.  <\/p>\n<h2>\u0412\u044b\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0439  <\/h2>\n<p>\u041d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0448\u0430\u0433\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u043d\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439.<\/p>\n<p><em><u>\u0410\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f\u043c\u0438<\/u><\/em> \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f \u0441\u0438\u043b\u044c\u043d\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0449\u0438\u0435\u0441\u044f \u043e\u0442 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u043e \u0438\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u043e\u043c\u0443 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0443.<\/p>\n<p>\u0414\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 <em>\u043a\u043e\u0440\u043e\u0431\u0447\u0430\u0442\u043e\u0439 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b<\/em> \u0438\u043b\u0438 <em>\u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u00ab\u044f\u0449\u0438\u043a \u0441 \u0443\u0441\u0430\u043c\u0438<\/em><strong><em>\u00bb<\/em>. <\/strong>\u041f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0442\u0430\u043a\u043e\u0433\u043e \u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u0441\u0432\u044f\u0445\u0430\u043d\u043e \u0441 \u043f\u043e\u043d\u044f\u0442\u0438\u0435\u043c <em>\u00ab\u043a\u0432\u0430\u0440\u0442\u0438\u043b\u044c<\/em><strong><em>\u00bb.\u00a0<\/em><\/strong><\/p>\n<p>\u0422\u0435\u0440\u043c\u0438\u043d <em>\u00ab\u043a\u0432\u0430\u0440\u0442\u0438\u043b\u044c<\/em><strong><em>\u00bb <\/em><\/strong>\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0434\u043b\u044f \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043a\u0432\u0430\u043d\u0442\u0438\u043b\u044f  \u043a\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u00bc.<\/p>\n<p><em><u>\u041a\u0432\u0430\u043d\u0442\u0438\u043b\u0435\u043c<\/u><\/em> \u043f\u043e\u0440\u044f\u0434\u043a\u0430  \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 x \u0442\u0430\u043a\u043e\u0435, \u0447\u0442\u043e <\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"F(x_\\alpha) =\\alpha = P(X &lt; x_\\alpha) =\\alpha \" alt=\"F(x_\\alpha) =\\alpha = P(X &lt; x_\\alpha) =\\alpha \" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/156\/460\/d3b\/156460d3b347b16a70ed4dd021ab89d3.svg\" width=\"246\" height=\"22\"\/><\/p>\n<p>\u041a\u0432\u0430\u0440\u0442\u0438\u043b\u0438 \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u044e\u0442 \u0432\u044b\u0431\u043e\u0440\u043a\u0443 \u043d\u0430 4 \u0447\u0430\u0441\u0442\u0438.<\/p>\n<p>\u041f\u0435\u0440\u0432\u044b\u0439 \u043a\u0432\u0430\u0440\u0442\u0438\u043b\u044c Q1 \u043f\u043e\u0440\u044f\u0434\u043a\u0430 0,25 \u2013 \u0447\u0438\u0441\u043b\u043e, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0449\u0435\u0435 \u00bc \u0447\u0430\u0441\u0442\u044c \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u043e\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0438, \u0442\u043e \u0435\u0441\u0442\u044c 25% \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u043e\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u043c\u0435\u043d\u044c\u0448\u0435 Q1, 75% \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u2013 \u0431\u043e\u043b\u044c\u0448\u0435 Q1.<\/p>\n<p>\u0412\u0442\u043e\u0440\u043e\u0439 \u043a\u0432\u0430\u0440\u0442\u0438\u043b\u044c Q2 \u043f\u043e\u0440\u044f\u0434\u043a\u0430 0,5 \u0438\u043b\u0438 \u043c\u0435\u0434\u0438\u0430\u043d\u0430 \u2013 \u0447\u0438\u0441\u043b\u043e, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e 50 % \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u043e\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u043c\u0435\u043d\u044c\u0448\u0435 Q2, \u0430 50% \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u2013 \u0431\u043e\u043b\u044c\u0448\u0435 Q2.<\/p>\n<p>\u0422\u0440\u0435\u0442\u0438\u0439 \u043a\u0432\u0430\u0440\u0442\u0438\u043b\u044c Q3 \u043f\u043e\u0440\u044f\u0434\u043a\u0430 0,75 \u2013 \u0447\u0438\u0441\u043b\u043e, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e 25% \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u043e\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u043c\u0435\u043d\u044c\u0448\u0435 Q3, 25% \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u2013 \u0431\u043e\u043b\u044c\u0448\u0435\u00a0 Q3.<\/p>\n<p><em><u>\u041c\u0435\u0436\u043a\u0432\u0430\u0440\u0442\u0438\u043b\u044c\u043d\u044b\u0439 \u0440\u0430\u0437\u043c\u0430\u0445<\/u><\/em> \u2013 \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u0430, \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c\u0430\u044f \u043f\u043e \u0444\u043e\u0440\u043c\u0443\u043b\u0435:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"IQR =Q3 - Q1\u00a0\" alt=\"IQR =Q3 - Q1\u00a0\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/01d\/e8c\/736\/01de8c736a3df4ba96ff3184ed379ff1.svg\" width=\"139\" height=\"20\"\/><\/p>\n<p>\u0413\u0440\u0430\u0444\u0438\u043a \u00ab\u044f\u0449\u0438\u043a \u0441 \u0443\u0441\u0430\u043c\u0438<strong>\u00bb<\/strong> \u0438\u043c\u0435\u0435\u0442 \u0432\u0438\u0434:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/46a\/3db\/2cc\/46a3db2ccf6a2fd43b792859765778ef.png\" width=\"558\" height=\"134\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/46a\/3db\/2cc\/46a3db2ccf6a2fd43b792859765778ef.png\"\/><\/figure>\n<p>\u00ab\u042f\u0449\u0438\u043a\u00bb \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d \u043a\u0432\u0430\u0440\u0442\u0438\u043b\u044f\u043c\u0438 Q1 \u0438  Q3, \u0432\u043d\u0443\u0442\u0440\u0438 \u043d\u0435\u0433\u043e \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0430 \u043c\u0435\u0434\u0438\u0430\u043d\u0430 Q2. \u00ab\u0423\u0441\u044b\u00bb \u043f\u0440\u043e\u0441\u0442\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u0432\u043b\u0435\u0432\u043e \u0438 \u0432\u043f\u0440\u0430\u0432\u043e \u043d\u0430 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 1,5 * IQR<\/p>\n<p>\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u043e\u0432 <code>head()<\/code> <em>\u0438 <\/em><code>tail()<\/code><em> <\/em>\u043c\u044b \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <strong><em>days_employed <\/em><\/strong>\u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439.\u00a0<\/p>\n<p>\u00a0<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u043e\u043f\u0438\u0441\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u043f\u043e \u0432\u0441\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c:<\/p>\n<pre><code>df.describe()<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/3b0\/f23\/ff0\/3b0f23ff0193b179c2f590493a7c80ba.png\" width=\"1110\" height=\"378\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/3b0\/f23\/ff0\/3b0f23ff0193b179c2f590493a7c80ba.png\"\/><\/figure>\n<p>\u041c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0432\u044b\u0432\u043e\u0434\u044b \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0438\u0437 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432:<\/p>\n<p>\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430 <strong><em>children<\/em><\/strong> \u0438\u043c\u0435\u0435\u0442 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u043e\u0442 \u20131\u00a0\u0434\u043e 20.<br \/>\u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u0438\u043c\u0435\u044e\u0442\u0441\u044f \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430 <strong><em>days_employed<\/em><\/strong> \u0438\u043c\u0435\u0435\u0442 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u043e\u0442 \u201318\u00a0388.9\u00a0\u0434\u043e 401\u00a0755.4.<br \/>\u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u0438\u043c\u0435\u044e\u0442\u0441\u044f \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430 <strong><em>dob_years<\/em><\/strong> \u0438\u043c\u0435\u0435\u0442 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u043e\u0442 0\u00a0\u0434\u043e 75.<br \/>\u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u0438\u043c\u0435\u044e\u0442\u0441\u044f \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430<strong><em> debt<\/em><\/strong> \u0438\u043c\u0435\u0435\u0442 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u043e\u0442 0\u00a0\u0434\u043e 1.<br \/>\u0410\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043d\u0435\u0442.<\/p>\n<p>\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430 <strong><em>total_income<\/em><\/strong> \u0438\u043c\u0435\u0435\u0442 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u043e\u0442 20\u00a0667\u00a0\u0434\u043e 2\u00a0265\u00a0604.<br \/>\u0410\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043d\u0435\u0442.<\/p>\n<p>\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 <strong><em>family_status_id<\/em><\/strong> \u0438 <strong><em>education_id <\/em><\/strong>\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430\u043c\u0438 \u0438<strong><em> <\/em><\/strong>\u043d\u0435 \u043d\u0435\u0441\u0443\u0442 \u0441\u043c\u044b\u0441\u043b\u043e\u0432\u043e\u0439 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0435\u0439, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435 \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0435\u043c \u0438\u0445 \u043d\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043c \u0430\u043d\u0430\u043b\u0438\u0437 \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u043c \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430\u043c.<br \/>\u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430 <strong><em>children. <\/em><\/strong>\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u0430 <code>.value_counts()<\/code><em> <\/em>\u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438 \u0438\u0445 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e, \u0445\u0440\u0430\u043d\u0438\u043c\u043e\u0435 \u0432 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0435.<\/p>\n<figure class=\"bordered full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/489\/ad6\/369\/489ad6369de83cb30c25a042659d9033.png\" width=\"870\" height=\"268\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/489\/ad6\/369\/489ad6369de83cb30c25a042659d9033.png\"\/><\/figure>\n<p>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c\u0438 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043e\u0448\u0438\u0431\u043e\u043a \u0432\u0432\u043e\u0434\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0437\u0430\u043c\u0435\u043d\u0438\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u2013 1 \u0438 20 \u043d\u0430 1 \u0438 2 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043c\u0435\u0442\u043e\u0434 <code>.replace()<\/code>.<\/p>\n<pre><code>df['children'] = df['children'].replace(\u20131,1) df['children'] = df['children'].replace(20,2)<\/code><\/pre>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043f\u0440\u0438\u0437\u043d\u0430\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u2013 <strong><em>days_employed.<\/em><\/strong><\/p>\n<p>\u0420\u0430\u043d\u0435\u0435, \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u044f \u043e\u043f\u0438\u0441\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443, \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0432 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0435 \u0435\u0441\u0442\u044c \u0438 \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u0435, \u0438 \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u043e \u043c\u0430\u043b\u044b\u0435 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u044b\u044f\u0432\u0438\u043c \u0442\u0438\u043f\u044b \u0437\u0430\u043d\u044f\u0442\u043e\u0441\u0442\u0438 \u0437\u0430\u0435\u043c\u0449\u0438\u043a\u043e\u0432 \u0441 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439.<\/p>\n<pre><code>df[df['days_employed'] &lt; 0]['income_type'].value_counts()<\/code><\/pre>\n<figure class=\"bordered full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f21\/e53\/5c1\/f21e535c1470c1070211fc77e8e2349a.png\" width=\"634\" height=\"186\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f21\/e53\/5c1\/f21e535c1470c1070211fc77e8e2349a.png\"\/><\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u2013 \u0441 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439.<\/p>\n<pre><code>df[df['days_employed'] > 0]['income_type'].value_counts()<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/24c\/ea0\/caf\/24cea0caf679aa16bee3f333d5014784.png\" width=\"572\" height=\"86\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/24c\/ea0\/caf\/24cea0caf679aa16bee3f333d5014784.png\"\/><\/figure>\n<p>\u0417\u0430\u043c\u0435\u043d\u0438\u043c \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u043e\u0432 <code>.loc()<\/code><em> \u0438 <\/em><code>.abs()<\/code>.<\/p>\n<pre><code>df.loc[df['days_employed'] &lt; 0, 'days_employed'] = df['days_employed'].abs()<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043e\u043f\u0438\u0441\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u043f\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439:<\/p>\n<pre><code>df['days_employed'].describe()<\/code><\/pre>\n<figure class=\"bordered full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/77a\/114\/150\/77a114150fbb013713a77476c973d65f.png\" width=\"552\" height=\"212\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/77a\/114\/150\/77a114150fbb013713a77476c973d65f.png\"\/><\/figure>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u0441\u044f \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f. \u0427\u0442\u043e\u0431\u044b \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435, \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u0433\u0440\u0430\u0444\u0438\u043a \u0441\u0442\u0430\u0436\u0430,\u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u0430 <code>.hist()<\/code><em>.<\/em><\/p>\n<pre><code>df.hist('days_employed', bins =25)<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/945\/524\/efa\/945524efa95cc6af71be5074f083213f.png\" width=\"818\" height=\"588\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/945\/524\/efa\/945524efa95cc6af71be5074f083213f.png\"\/><\/figure>\n<p>\u041f\u0440\u043e\u0432\u0435\u0434\u0435\u043c \u0430\u043d\u0430\u043b\u0438\u0437 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u0442\u0430\u0436\u0430 \u0432 \u0434\u043d\u044f\u0445 \u0438 \u0432 \u0433\u043e\u0434\u0430\u0445.<\/p>\n<pre><code>max_day = df['days_employed'].max() max_day<\/code><\/pre>\n<p><code>\u041f\u043e\u043b\u0443\u0447\u0438\u043c 401755.4<\/code><\/p>\n<p>\u041f\u0435\u0440\u0435\u0432\u0435\u0434\u0435\u043c \u0434\u043d\u0438 \u0432 \u0433\u043e\u0434\u044b.<\/p>\n<pre><code>max_year = max_day\/365 max_year<\/code><\/pre>\n<p><code>\u041f\u043e\u043b\u0443\u0447\u0438\u043c 1100.69<\/code><\/p>\n<p>\u041c\u043e\u0436\u0435\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u044b\u0432\u043e\u0434, \u0447\u0442\u043e \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0442\u0430\u0436 \u043f\u0440\u0438 5\u2013\u0434\u043d\u0435\u0432\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u043d\u0435\u0434\u0435\u043b\u0438 \u0431\u043e\u043b\u0435\u0435 1100 \u043b\u0435\u0442.\u00a0<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0441\u0440\u0435\u0434\u043d\u0438\u0439 \u0438 \u043c\u0435\u0434\u0438\u0430\u043d\u043d\u044b\u0439 \u0441\u0442\u0430\u0436 \u0432 \u0433\u043e\u0434\u0430\u0445, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u043e\u0432 <code>.mean()<\/code> \u0438 <code>.quantile()<\/code>.<\/p>\n<pre><code>mean_day = df['days_employed'].mean() mean_year = mean_day\/365 mean_year<\/code><\/pre>\n<p><code>\u041f\u043e\u043b\u0443\u0447\u0438\u043c 183.33<\/code><\/p>\n<pre><code>median_day = df['days_employed'].quantile(0.5) median_year = median_day\/365 median_year<\/code><\/pre>\n<p><code>\u041f\u043e\u043b\u0443\u0447\u0438\u043c 6.01<\/code><\/p>\n<p>\u0412\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e \u0438 \u043c\u0435\u0434\u0438\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u0442\u0430\u0436\u0430 \u0441\u0438\u043b\u044c\u043d\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f, \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0435 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435.<\/p>\n<p>\u041f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043e\u0431\u0449\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e, \u0441\u0440\u0435\u0434\u043d\u0435\u0435, \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0438 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430 <strong><em>days_employed <\/em><\/strong>\u043f\u043e \u0442\u0438\u043f\u0430\u043c \u0437\u0430\u043d\u044f\u0442\u043e\u0441\u0442\u0438 \u0437\u0430\u0435\u043c\u0449\u0438\u043a\u043e\u0432.<\/p>\n<pre><code>df_type = df.groupby(['income_type']).agg({'days_employed' : ['count', 'mean', 'max', 'min']})<\/code><\/pre>\n<figure class=\"bordered full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/fcb\/24e\/203\/fcb24e20314e7e20e7746e832a5095ce.png\" width=\"810\" height=\"458\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/fcb\/24e\/203\/fcb24e20314e7e20e7746e832a5095ce.png\"\/><\/figure>\n<p>\u0414\u0435\u043b\u0430\u0435\u043c \u0432\u044b\u0432\u043e\u0434, \u0447\u0442\u043e \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f \u0441\u0442\u0430\u0436\u0430 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u043d\u044b \u0434\u043b\u044f \u0434\u0432\u0443\u0445 \u0442\u0438\u043f\u043e\u0432 \u0437\u0430\u043d\u044f\u0442\u043e\u0441\u0442\u0438 \u00ab\u0431\u0435\u0437\u0440\u0430\u0431\u043e\u0442\u043d\u044b\u0439<strong>\u00bb<\/strong> \u0438 \u00ab\u043f\u0435\u043d\u0441\u0438\u043e\u043d\u0435\u0440<strong>\u00bb<\/strong>. \u0422\u0430\u043a \u043a\u0430\u043a \u0433\u0440\u0443\u043f\u043f\u0430 \u0437\u0430\u0435\u043c\u0449\u0438\u043a\u043e\u0432 \u00ab\u0431\u0435\u0437\u0440\u0430\u0431\u043e\u0442\u043d\u044b\u0439<strong>\u00bb<\/strong>, \u00ab\u0432 \u0434\u0435\u043a\u0440\u0435\u0442\u0435<strong>\u00bb<\/strong>, \u00ab\u043f\u0440\u0435\u0434\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c<strong>\u00bb<\/strong> \u0438 \u00ab\u0441\u0442\u0443\u0434\u0435\u043d\u0442<strong>\u00bb<\/strong> \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u043c\u0430\u043b\u044b\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0437\u0430\u043f\u0438\u0441\u0435\u0439 (\u043e\u0434\u043d\u043e\u0439), \u0442\u043e \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0438\u0437 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u044f, \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0432\u0448\u0438\u0441\u044c \u043c\u0435\u0442\u043e\u0434\u043e\u043c <code>.drop()<\/code>, \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0432 \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430.<\/p>\n<pre><code>df.drop(df[df['income_type'] == '\u0431\u0435\u0437\u0440\u0430\u0431\u043e\u0442\u043d\u044b\u0439'].index, inplace = True) df.drop(df[df['income_type'] == '\u0432 \u0434\u0435\u043a\u0440\u0435\u0442\u0435'].index, inplace = True) df.drop(df[df['income_type'] == '\u043f\u0440\u0435\u0434\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c'].index, inplace = True) df.drop(df[df['income_type'] == '\u0441\u0442\u0443\u0434\u0435\u043d\u0442'].index, inplace = True)<\/code><\/pre>\n<p>\u041f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u0437\u0430\u0435\u043c\u0449\u0438\u043a\u043e\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043c\u0435\u0442\u043e\u0434\u044b \u0438\u0437 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a <code>matplotlib<\/code> \u0438\u00a0 seaborn<em>. <\/em>\u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0440\u0430\u0437\u043e\u0431\u044c\u0435\u043c \u0434\u0430\u0442\u0430\u0444\u0440\u0435\u0439\u043c <code>df<\/code> \u043f\u043e \u0442\u0438\u043f\u0443 \u0437\u0430\u0435\u043c\u0449\u0438\u043a\u043e\u0432.<\/p>\n<pre><code>df1 = df[df['income_type'] == '\u0433\u043e\u0441\u0441\u043b\u0443\u0436\u0430\u0449\u0438\u0439'] df2 = df[df['income_type'] == '\u043a\u043e\u043c\u043f\u0430\u043d\u044c\u043e\u043d'] df3 = df[df['income_type'] == '\u043f\u0435\u043d\u0441\u0438\u043e\u043d\u0435\u0440'] df4 = df[df['income_type'] == '\u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a']<\/code><\/pre>\n<p>\u0421\u0442\u0440\u043e\u0438\u043c \u043e\u0431\u0449\u0438\u0439 \u0433\u0440\u0430\u0444\u0438\u043a \u0434\u043b\u044f \u0447\u0435\u0442\u044b\u0440\u0435\u0445 \u0433\u0440\u0443\u043f\u043f \u0437\u0430\u0435\u043c\u0449\u0438\u043a\u043e\u0432.<\/p>\n<pre><code># \u0437\u0430\u0434\u0430\u0435\u043c \u0440\u0430\u0437\u043c\u0435\u0440 \u0441\u0435\u0442\u043a\u0438 ax = plt.subplots(2,2, figsize = (18,12))  # \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0433\u0440\u0430\u0444\u0438\u043a\u0430 plt.subplot(2,2,1)  # \u0437\u0430\u0434\u0430\u043d\u0438\u0435 \u0433\u0440\u0430\u0444\u0438\u043a\u0430 ax = sns.histplot(df1['days_employed'], bins = 25, color = 'purple', kde = True)  # \u043f\u043e\u0434\u043f\u0438\u0441\u044c \u0433\u0440\u0430\u0444\u0438\u043a\u0430 ax.set_title('\u041a\u043b\u0430\u0441\u0441 \u0437\u0430\u0435\u043c\u0449\u0438\u043a\u043e\u0432: \u00ab\u0433\u043e\u0441\u0441\u043b\u0443\u0436\u0430\u0449\u0438\u0439\u00bb')  # \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0433\u0440\u0430\u0444\u0438\u043a\u0430 plt.subplot(2,2,2) ax = sns.histplot(df2['days_employed'], bins = 25, color = 'orange', kde = True)  # \u043f\u043e\u0434\u043f\u0438\u0441\u044c \u0433\u0440\u0430\u0444\u0438\u043a\u0430 ax.set_title('\u041a\u043b\u0430\u0441\u0441 \u0437\u0430\u0435\u043c\u0449\u0438\u043a\u043e\u0432: \u00ab\u043a\u043e\u043c\u043f\u0430\u043d\u044c\u043e\u043d\u00bb')  # \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u0442\u0440\u0435\u0442\u044c\u0435\u0433\u043e \u0433\u0440\u0430\u0444\u0438\u043a\u0430 plt.subplot(2,2,3) ax = sns.histplot(df3['days_employed'], bins = 25, color = 'green', kde = True)  # \u043f\u043e\u0434\u043f\u0438\u0441\u044c \u0433\u0440\u0430\u0444\u0438\u043a\u0430 ax.set_title('\u041a\u043b\u0430\u0441\u0441 \u0437\u0430\u0435\u043c\u0449\u0438\u043a\u043e\u0432: \u00ab\u043f\u0435\u043d\u0441\u0438\u043e\u043d\u0435\u0440\u00bb')  # \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043e\u0433\u043e \u0433\u0440\u0430\u0444\u0438\u043a\u0430 plt.subplot(2,2,4) ax = sns.histplot(df4['days_employed'], bins = 25, color = 'red', kde = True)  # \u043f\u043e\u0434\u043f\u0438\u0441\u044c \u0433\u0440\u0430\u0444\u0438\u043a\u0430 ax.set_title('\u041a\u043b\u0430\u0441\u0441 \u0437\u0430\u0435\u043c\u0449\u0438\u043a\u043e\u0432: \u00ab\u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u00bb')<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/237\/355\/029\/237355029e6d4ad858d313794e18a0bc.png\" width=\"1470\" height=\"1009\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/237\/355\/029\/237355029e6d4ad858d313794e18a0bc.png\"\/><\/figure>\n<p>\u041c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0432 \u0433\u0440\u0443\u043f\u043f\u0435 \u00ab\u043f\u0435\u043d\u0441\u0438\u043e\u043d\u0435\u0440<strong>\u00bb<\/strong> \u044f\u0432\u043d\u043e \u0438\u043c\u0435\u044e\u0442\u0441\u044f \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f. \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u0441\u0442\u0430\u0436 \u0432 \u044d\u0442\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u043d\u0435 \u0432 \u0434\u043d\u044f\u0445, \u0430 \u0432 \u0447\u0430\u0441\u0430\u0445.<\/p>\n<pre><code>df.loc[df['income_type'] == '\u043f\u0435\u043d\u0441\u0438\u043e\u043d\u0435\u0440', 'days_employed'] = df['days_employed']\/24<\/code><\/pre>\n<p>\u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043f\u0435\u0440\u0435\u0432\u0435\u0434\u0435\u043c \u0432 \u0441\u0442\u0430\u0436 \u0432 \u0433\u043e\u0434\u0430\u0445. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0439.<\/p>\n<pre><code>df['years_employed'] = df['days_employed']\/365 df_type1 = df.groupby(['income_type']).agg({'days_employed':['count', 'mean', 'max', 'min']}) df_type1<\/code><\/pre>\n<figure class=\"bordered full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/25a\/341\/8ab\/25a3418ab05a67182346509f8f58a9a8.png\" width=\"630\" height=\"313\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/25a\/341\/8ab\/25a3418ab05a67182346509f8f58a9a8.png\"\/><\/figure>\n<p>\u0421\u043d\u043e\u0432\u0430 \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u044b \u0437\u0430\u0451\u043c\u0449\u0438\u043a\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u043a\u0430\u043a \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0438\u0441\u044c \u0434\u0430\u043d\u043d\u044b\u0435.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/bac\/45a\/06f\/bac45a06f1831fd57e714779f2ff427e.png\" width=\"1471\" height=\"1009\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/bac\/45a\/06f\/bac45a06f1831fd57e714779f2ff427e.png\"\/><\/figure>\n<p>\u041f\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u043c \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0430\u043c \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u0447\u0442\u043e \u0432\u00a0 \u0433\u0440\u0443\u043f\u043f\u0435 \u00ab\u043f\u0435\u043d\u0441\u0438\u043e\u043d\u0435\u0440<strong>\u00bb<\/strong> \u0432\u0441\u0435 \u0435\u0449\u0435 \u0438\u043c\u0435\u044e\u0442\u0441\u044f \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p>\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u0437\u0430\u043d\u044f\u0442\u043e\u0441\u0442\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u043c \u043a\u0432\u0430\u043d\u0442\u0438\u043b\u0438 0,95 \u0438 0,05 \u0441\u0442\u0430\u0436\u0430.<\/p>\n<pre><code>print(int(df.loc[df['income_type'] == '\u0433\u043e\u0441\u0441\u043b\u0443\u0436\u0430\u0449\u0438\u0439', 'years_employed'].quantile(0.95))) print(int(df.loc[df['income_type'] == '\u043a\u043e\u043c\u043f\u0430\u043d\u044c\u043e\u043d','years_employed'].quantile(0.95))) print(int(df.loc[df['income_type'] == '\u043f\u0435\u043d\u0441\u0438\u043e\u043d\u0435\u0440','years_employed'].quantile(0.95))) print(int(df.loc[df['income_type'] == '\u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a', 'years_employed'].quantile(0.95)))<\/code><\/pre>\n<p><code>24<br \/>16<br \/>45<br \/>19<\/code><\/p>\n<pre><code>print(int(df.loc[df['income_type'] == '\u0433\u043e\u0441\u0441\u043b\u0443\u0436\u0430\u0449\u0438\u0439','years_employed'].quantile(0.05)))  print(int(df.loc[df['income_type'] == '\u043a\u043e\u043c\u043f\u0430\u043d\u044c\u043e\u043d','years_employed'].quantile(0.05)))  print(int(df.loc[df['income_type'] == '\u043f\u0435\u043d\u0441\u0438\u043e\u043d\u0435\u0440','years_employed'].quantile(0.05)))  print(int(df.loc[df['income_type'] == '\u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a',\u00a0'years_employed'].quantile(0.05)))<\/code><\/pre>\n<p><code>0<br \/>0<br \/>37<br \/>0<\/code><\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0434\u0435\u043c \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0439 \u0441\u0442\u0430\u0436\u0430. <\/p>\n<figure class=\"bordered full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a36\/4ce\/737\/a364ce73770402c267627df99659f857.png\" width=\"563\" height=\"433\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a36\/4ce\/737\/a364ce73770402c267627df99659f857.png\"\/><\/figure>\n<p>\u041f\u043e \u0433\u0440\u0430\u0444\u0438\u043a\u0443 \u00ab\u044f\u0449\u0438\u043a \u0441 \u0443\u0441\u0430\u043c\u0438<strong>\u00bb <\/strong>\u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0432\u043e \u0432\u0441\u0435\u0445 \u0433\u0440\u0443\u043f\u043f\u0430\u0445, \u043a\u0440\u043e\u043c\u0435 \u00ab\u043f\u0435\u043d\u0441\u0438\u043e\u043d\u0435\u0440<strong>\u00bb<\/strong>.<\/p>\n<p>\u041f\u0440\u043e\u0446\u0435\u043d\u0442 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0439, \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u044e\u0449\u0438\u0439 \u043a\u0432\u0430\u043d\u0442\u0438\u043b\u044c 0,95 \u0432\u0435\u043b\u0438\u043a, \u043f\u0440\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0442\u0435\u0440\u044f\u0442\u044c \u0447\u0430\u0441\u0442\u044c \u0437\u043d\u0430\u0447\u0438\u043c\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u0442\u0430\u043a\u0436\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u043c \u043a\u0432\u0430\u043d\u0442\u0438\u043b\u0438 0,99 \u0441\u0442\u0430\u0436\u0430.<\/p>\n<pre><code>print(int(df.loc[df['income_type'] == '\u0433\u043e\u0441\u0441\u043b\u0443\u0436\u0430\u0449\u0438\u0439','years_employed'].quantile(0.99))) print(int(df.loc[df['income_type'] == '\u043a\u043e\u043c\u043f\u0430\u043d\u044c\u043e\u043d',\u00a0'years_employed'].quantile(0.99))) print(int(df.loc[df['income_type'] == '\u043f\u0435\u043d\u0441\u0438\u043e\u043d\u0435\u0440','years_employed'].quantile(0.99))) print(int(df.loc[df['income_type'] == '\u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a','years_employed'].quantile(0.99)))<\/code><\/pre>\n<p><code>33<br \/>28<br \/>45<br \/>30<\/code><\/p>\n<pre><code>print(int(df.loc[df['income_type'] == '\u0433\u043e\u0441\u0441\u043b\u0443\u0436\u0430\u0449\u0438\u0439','years_employed'].quantile(0.01))) print(int(df.loc[df['income_type'] == '\u043a\u043e\u043c\u043f\u0430\u043d\u044c\u043e\u043d','years_employed'].quantile(0.01))) print(int(df.loc[df['income_type'] == '\u043f\u0435\u043d\u0441\u0438\u043e\u043d\u0435\u0440','years_employed'].quantile(0.01))) print(int(df.loc[df['income_type'] == '\u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a','years_employed'].quantile(0.01)))<\/code><\/pre>\n<p><code>0<br \/>0<br \/>37<br \/>0<\/code><\/p>\n<p>\u0423\u0434\u0430\u043b\u0438\u043c \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f, \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u044e\u0449\u0438\u0435 \u043a\u0432\u0430\u043d\u0442\u0438\u043b\u044c 0,99.<\/p>\n<pre><code>df.drop(df[(df['years_employed'] > 33) &amp;\u00a0(df['income_type'] == '\u0433\u043e\u0441\u0441\u043b\u0443\u0436\u0430\u0449\u0438\u0439')].index, inplace = True)  df.drop(df[(df['years_employed'] > 28) &amp;\u00a0(df['income_type'] == '\u043a\u043e\u043c\u043f\u0430\u043d\u044c\u043e\u043d')].index, inplace = True)  df.drop(df[(df['years_employed'] > 30 ) &amp;\u00a0(df['income_type'] == '\u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a')].index, inplace = True)  <\/code><\/pre>\n<p>\u041f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u0433\u0440\u0430\u0444\u0438\u043a \u00ab\u044f\u0449\u0438\u043a \u0441 \u0443\u0441\u0430\u043c\u0438\u00bb \u043f\u043e\u0441\u043b\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0439.<\/p>\n<pre><code> sns.boxplot(x = 'income_type', y = 'years_employed', data = df)<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/040\/a9b\/d1c\/040a9bd1c3534ed854a001ee0bc1245b.png\" width=\"563\" height=\"433\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/040\/a9b\/d1c\/040a9bd1c3534ed854a001ee0bc1245b.png\"\/><\/figure>\n<p>\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0439 \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u043b\u043e\u0441\u044c, \u043d\u043e \u0432\u0441\u0435 \u0435\u0449\u0435 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0432 \u0442\u0440\u0435\u0445 \u0433\u0440\u0443\u043f\u043f\u0430\u0445. \u041f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0432\u044b\u0441\u043e\u043a\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u0442\u0430\u0436\u0430, \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0432 \u0438\u0445 \u0441 \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u043e\u043c \u0437\u0430\u0435\u043c\u0449\u0438\u043a\u0430.<\/p>\n<p>\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <strong><em>dob_years.<\/em><\/strong><\/p>\n<pre><code>df.groupby(['income_type']).agg({'dob_years' : ['min', 'max']})<\/code><\/pre>\n<figure class=\"bordered full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/2f1\/3a3\/edf\/2f13a3edf15266a1843cac1b5a24a344.png\" width=\"643\" height=\"314\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/2f1\/3a3\/edf\/2f13a3edf15266a1843cac1b5a24a344.png\"\/><\/figure>\n<p>\u041c\u043e\u0436\u0435\u043c \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430 \u0432 \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0437 \u0433\u0440\u0443\u043f\u043f \u0440\u0430\u0432\u043d\u044f\u0435\u0442\u0441\u044f 0.<\/p>\n<p>\u041f\u043e\u0441\u0447\u0438\u0442\u0430\u0435\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043d\u0443\u043b\u0435\u0432\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430 \u043f\u043e \u0442\u0438\u043f\u0430\u043c \u0437\u0430\u043d\u044f\u0442\u043e\u0441\u0442\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u0430 <code>.value_counts()<\/code>.<\/p>\n<pre><code>df[df['dob_years'] == 0]['income_type'].value_counts()<\/code><\/pre>\n<figure class=\"bordered\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/304\/3e2\/e79\/3043e2e798c769c1e619eeb7e7144946.png\" width=\"459\" height=\"134\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/304\/3e2\/e79\/3043e2e798c769c1e619eeb7e7144946.png\"\/><\/figure>\n<p>\u042d\u0442\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043c\u0430\u043b\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0439 \u0432 \u043e\u0431\u0449\u0435\u043c \u0447\u0438\u0441\u043b\u0435 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0439 \u0433\u0440\u0443\u043f\u043f\u044b, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c.<\/p>\n<p><code>df.drop(df[df['dob_years'] == 0].index, inplace = True)<\/code><\/p>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a\u043e\u0432 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u043e\u0437\u0440\u0430\u0441\u0442 \u0442\u0435\u043f\u0435\u0440\u044c.<\/p>\n<pre><code>df.groupby(['income_type']).agg({'dob_years' : ['min', 'max']})<\/code><\/pre>\n<figure class=\"bordered full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/af1\/e13\/d1e\/af1e13d1ed4d3d983a52b6f9afd30883.png\" width=\"625\" height=\"303\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/af1\/e13\/d1e\/af1e13d1ed4d3d983a52b6f9afd30883.png\"\/><\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043a\u0432\u0430\u043d\u0442\u0438\u043b\u0438 0,95 \u0438 0,99:<\/p>\n<pre><code>print(int(df.loc[df['income_type'] == '\u0433\u043e\u0441\u0441\u043b\u0443\u0436\u0430\u0449\u0438\u0439','dob_years'].quantile(0.95))) print(int(df.loc[df['income_type'] == '\u043a\u043e\u043c\u043f\u0430\u043d\u044c\u043e\u043d',\u00a0'dob_years'].quantile(0.95))) print(int(df.loc[df['income_type'] == '\u043f\u0435\u043d\u0441\u0438\u043e\u043d\u0435\u0440','dob_years'].quantile(0.95))) print(int(df.loc[df['income_type'] == '\u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a',\u00a0'dob_years'].quantile(0.95)))<\/code><\/pre>\n<p><code>58<br \/>57<br \/>69<br \/>58<\/code><\/p>\n<pre><code>print(int(df.loc[df['income_type'] == '\u0433\u043e\u0441\u0441\u043b\u0443\u0436\u0430\u0449\u0438\u0439','dob_years'].quantile(0.99))) print(int(df.loc[df['income_type'] == '\u043a\u043e\u043c\u043f\u0430\u043d\u044c\u043e\u043d','dob_years'].quantile(0.99))) print(int(df.loc[df['income_type'] == '\u043f\u0435\u043d\u0441\u0438\u043e\u043d\u0435\u0440','dob_years'].quantile(0.99))) print(int(df.loc[df['income_type'] == '\u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a','dob_years'].quantile(0.99)))<\/code><\/pre>\n<p><code>65<br \/>64<br \/>72<br \/>63<\/code><\/p>\n<p>\u0410 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u0433\u0440\u0430\u0444\u0438\u043a \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0439.<\/p>\n<pre><code>sns.boxplot(x = 'income_type', y = 'dob_years', data = df)<\/code><\/pre>\n<figure class=\"bordered full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/8ef\/4b5\/704\/8ef4b5704127cedb3980643f02b1c296.png\" width=\"563\" height=\"433\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8ef\/4b5\/704\/8ef4b5704127cedb3980643f02b1c296.png\"\/><\/figure>\n<p>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u0433\u0440\u0430\u043d\u0438\u0446\u044b \u00ab\u0443\u0441\u043e\u0432\u00bb \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439.<\/p>\n<pre><code>Q1 = int(df.loc[df['income_type'] == '\u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a','dob_years'].quantile(0.25)) Q3 = int(df.loc[df['income_type'] == '\u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a',\u00a0'dob_years'].quantile(0.75)) IQR = Q3 \u2013 Q1 up_S = Q3 + 1.5*IQR up_S<\/code><\/pre>\n<p><code>\u041f\u043e\u043b\u0443\u0447\u0438\u043c 72.0<\/code><\/p>\n<pre><code>Q1 = int(df.loc[df['income_type'] == '\u043f\u0435\u043d\u0441\u0438\u043e\u043d\u0435\u0440',\u00a0'dob_years'].quantile(0.25)) Q3 = int(df.loc[df['income_type'] == '\u043f\u0435\u043d\u0441\u0438\u043e\u043d\u0435\u0440',\u00a0'dob_years'].quantile(0.75)) IQR = Q3 \u2013 Q1 low_P = Q1 \u2013 1.5*IQR low_P<\/code><\/pre>\n<p><code>\u041f\u043e\u043b\u0443\u0447\u0438\u043c 44.0<\/code><\/p>\n<pre><code>Q1 = int(df.loc[df['income_type'] == '\u043a\u043e\u043c\u043f\u0430\u043d\u044c\u043e\u043d',\u00a0'dob_years'].quantile(0.25)) Q3 = int(df.loc[df['income_type'] == '\u043a\u043e\u043c\u043f\u0430\u043d\u044c\u043e\u043d',\u00a0'dob_years'].quantile(0.75)) IQR = Q3 \u2013 Q1 up_K = Q3 + 1.5*IQR up_K<\/code><\/pre>\n<p><code>\u041f\u043e\u043b\u0443\u0447\u0438\u043c 71.0<\/code><\/p>\n<pre><code>Q1 = int(df.loc[df['income_type'] == '\u0433\u043e\u0441\u0441\u043b\u0443\u0436\u0430\u0449\u0438\u0439',\u00a0'dob_years'].quantile(0.25)) Q3 = int(df.loc[df['income_type'] == '\u0433\u043e\u0441\u0441\u043b\u0443\u0436\u0430\u0449\u0438\u0439',\u00a0'dob_years'].quantile(0.75)) IQR = Q3 \u2013 Q1 up_G = Q3 + 1.5*IQR up_G<\/code><\/pre>\n<p><code>\u041f\u043e\u043b\u0443\u0447\u0438\u043c 72.0<\/code><\/p>\n<p>\u0412\u044b\u0447\u0438\u0441\u043b\u0438\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0442\u0438\u043f\u0443 \u0437\u0430\u0435\u043c\u0449\u0438\u043a\u043e\u0432, \u0432\u044b\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u0437\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u044b \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u00ab\u0443\u0441\u043e\u0432\u00bb.<\/p>\n<pre><code>len(df[(df['dob_years'] > 72) &amp; (df['income_type'] == '\u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a')])<\/code><\/pre>\n<p><code>\u041f\u043e\u043b\u0443\u0447\u0438\u043c 1<\/code><\/p>\n<pre><code>len(df[(df['dob_years'] &lt; 44) &amp; (df['income_type'] == '\u043f\u0435\u043d\u0441\u0438\u043e\u043d\u0435\u0440')])<\/code><\/pre>\n<p><code>\u041f\u043e\u043b\u0443\u0447\u0438\u043c 79<\/code><\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0434\u043b\u044f \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432, \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u043e\u043c\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e. \u0412\u0432\u0438\u0434\u0443 \u043c\u0430\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439, \u0443\u0434\u0430\u043b\u0438\u043c \u0438\u0445 \u0438\u0437 \u0432\u044b\u0431\u043e\u0440\u043a\u0438.<\/p>\n<pre><code>df.drop(df[(df['dob_years'] > 72) &amp;\u00a0(df['income_type'] == '\u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a')].index, inplace = True)  df.drop(df[(df['dob_years'] &lt; 44) &amp;\u00a0(df['income_type'] == '\u043f\u0435\u043d\u0441\u0438\u043e\u043d\u0435\u0440')].index, inplace = True)  df.drop(df[(df['dob_years'] > 71) &amp;\u00a0(df['income_type'] == '\u043a\u043e\u043c\u043f\u0430\u043d\u044c\u043e\u043d')].index, inplace = True)  df.drop(df[(df['dob_years'] > 72) &amp;\u00a0(df['income_type'] == '\u0433\u043e\u0441\u0441\u043b\u0443\u0436\u0430\u0449\u0438\u0439')].index, inplace = True)<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u0430\u043a \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0430\u0441\u044c \u0432\u044b\u0431\u043e\u0440\u043a\u0430 \u043f\u043e\u0441\u043b\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0439.<\/p>\n<pre><code>sns.boxplot(x = 'income_type', y = 'dob_years', data = df)<\/code><\/pre>\n<figure class=\"bordered full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/3fc\/7b3\/f6f\/3fc7b3f6ff5f92e85d2c7cfa6f7466c4.png\" width=\"563\" height=\"433\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/3fc\/7b3\/f6f\/3fc7b3f6ff5f92e85d2c7cfa6f7466c4.png\"\/><\/figure>\n<p>\u0418\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u0434\u0430\u043d\u043d\u043e\u0439 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b, \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u044b\u0432\u043e\u0434, \u0447\u0442\u043e \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043d\u0435\u0442.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <strong><em>gender.<\/em><\/strong><\/p>\n<p>\u0415\u0441\u043b\u0438 \u043c\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0440\u0430\u043d\u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 <code>.value_counts()<\/code><em>, <\/em>\u0442\u043e \u0443\u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0435\u0441\u0442\u044c \u043e\u0434\u043d\u043e \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0435 \u0441 \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c \u043f\u043e\u043b\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0438\u0437 \u0432\u044b\u0431\u043e\u0440\u043a\u0438.<\/p>\n<h4>\u041f\u0440\u0438 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 family_status \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u0414\u043b\u044f \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0432 2 \u043a\u043b\u0430\u0441\u0441\u0430 \u2013 \u0436\u0435\u043d\u0430\u0442\/\u0437\u0430\u043c\u0443\u0436\u0435\u043c \u0438 \u0445\u043e\u043b\u043e\u0441\u0442\/\u043d\u0435 \u0437\u0430\u043c\u0443\u0436\u0435\u043c<\/h4>\n<p>\u0412 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <strong><em>total_income <\/em><\/strong>\u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0439. \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0434\u0430\u043d\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 \u0441\u0445\u043e\u0436\u0430 \u0441 \u0440\u0430\u043d\u0435\u0435 \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u043c\u0438 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430\u043c\u0438 \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0433\u0440\u0430\u043d\u0438\u0446 \u00ab\u0443\u0441\u043e\u0432<strong>\u00bb<\/strong>. \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0430\u043d\u0430\u043b\u0438\u0437 \u043a\u0432\u0430\u043d\u0442\u0438\u043b\u0435\u0439 \u0438 \u043f\u0440\u0438\u043d\u044f\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u043e \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435.<\/p>\n<h2>\u0410\u043d\u0430\u043b\u0438\u0437 \u0438 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0434\u0443\u0431\u043b\u0438\u043a\u0430\u0442\u043e\u0432<\/h2>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u044d\u0442\u0430\u043f\u043e\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0430\u043d\u0430\u043b\u0438\u0437 \u0438 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 <strong>\u0434\u0443\u0431\u043b\u0438\u043a\u0430\u0442\u043e\u0432<\/strong>.<\/p>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430 <strong><em>education<\/em><\/strong><\/p>\n<pre><code>df['education'].unique()<\/code><\/pre>\n<figure class=\"bordered full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/519\/aa9\/938\/519aa99386cbbba64f4bca47b29f40f4.png\" width=\"861\" height=\"109\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/519\/aa9\/938\/519aa99386cbbba64f4bca47b29f40f4.png\"\/><\/figure>\n<p>\u041f\u0440\u0438\u0432\u0435\u0434\u0435\u043c \u0432\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043a \u043e\u0434\u043d\u043e\u043c\u0443 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u0430 <code>.str.lower()<\/code><em> <\/em>\u0438 \u0441\u043d\u043e\u0432\u0430 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.<\/p>\n<pre><code>df['education'] = df['education'].str.lower() df['education'].unique()<\/code><\/pre>\n<figure class=\"bordered full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b10\/018\/13e\/b1001813e9614d5378e7939b2b2d6126.png\" width=\"733\" height=\"87\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b10\/018\/13e\/b1001813e9614d5378e7939b2b2d6126.png\"\/><\/figure>\n<p>\u041f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0434\u0443\u0431\u043b\u0438\u043a\u0430\u0442\u043e\u0432 (\u0431\u0435\u0437 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <strong><em>purpose<\/em><\/strong>):<\/p>\n<pre><code>df.duplicated().sum()<\/code><\/pre>\n<p><code>\u041f\u043e\u043b\u0443\u0447\u0438\u043c 71<\/code><\/p>\n<p>\u0423\u0434\u0430\u043b\u0438\u043c \u0432\u0441\u0435 \u0438\u043c\u0435\u044e\u0449\u0438\u0435\u0441\u044f \u0434\u0443\u0431\u043b\u0438\u043a\u0430\u0442\u044b, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043c\u0435\u0442\u043e\u0434 <code>.drop_duplicates()<\/code><\/p>\n<h2>\u0410\u043d\u0430\u043b\u0438\u0437 \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u043e\u0432<\/h2>\n<p>\u041a\u0430\u043a \u0431\u044b\u043b\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043e \u0440\u0430\u043d\u0435\u0435, \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0438 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0432 \u0434\u0432\u0443\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u2013 <strong><em>days_employed \u0438 total_income<\/em><\/strong>. \u0410\u043d\u0430\u043b\u0438\u0437 \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043e\u0439 <strong><em>days_employed <\/em><\/strong>\u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d \u0440\u0430\u043d\u0435\u0435, \u0432 \u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0435 \u0447\u0435\u0433\u043e \u043c\u044b \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0438 \u0435\u0435 \u043d\u0430 <strong>years_employed.<\/strong> \u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <strong><em>total_income.<\/em><\/strong><\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0434\u0430\u0442\u0430\u0444\u0440\u0435\u0439\u043c\u044b \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u043a\u043b\u0430\u0441\u0441\u0443 <strong><em>income_type<\/em><\/strong>, \u0442\u0430\u043a \u043a\u0430\u043a \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0434\u0430\u0442\u0430\u0444\u0440\u0435\u0439\u043c\u0430 <code>df<\/code> \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0430\u0441\u044c, \u043c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u043d\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 <code>df1,.. df4<\/code><\/p>\n<pre><code>df_S =\u00a0 df[df['income_type'] == '\u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a'] df_P =\u00a0 df[df['income_type'] == '\u043f\u0435\u043d\u0441\u0438\u043e\u043d\u0435\u0440'] df_K =\u00a0 df[df['income_type'] == '\u043a\u043e\u043c\u043f\u0430\u043d\u044c\u043e\u043d'] df_G =\u00a0 df[df['income_type'] == '\u0433\u043e\u0441\u0441\u043b\u0443\u0436\u0430\u0449\u0438\u0439']<\/code><\/pre>\n<p>\u041f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u0433\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0442\u0438\u043f\u0443 \u0437\u0430\u0435\u043c\u0449\u0438\u043a\u043e\u0432, \u043a\u0430\u043a \u0431\u044b\u043b\u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0440\u0430\u043d\u0435\u0435<\/p>\n<figure class=\"bordered full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/2eb\/61d\/af6\/2eb61daf6cfcd4d51d0d2287d5d9196b.png\" width=\"1490\" height=\"1009\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/2eb\/61d\/af6\/2eb61daf6cfcd4d51d0d2287d5d9196b.png\"\/><\/figure>\n<p>\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u043d\u0430\u0439\u0434\u0435\u043c <strong>\u043c\u0435\u0434\u0438\u0430\u043d\u0443 <\/strong>\u0438 <strong>\u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.<\/strong><\/p>\n<pre><code>df_S.agg({'total_income' : ['mean', 'median']}) df_P.agg({'total_income' : ['mean', 'median']}) df_K.agg({'total_income' : ['mean', 'median']}) df_G.agg({'total_income' : ['mean', 'median']})<\/code><\/pre>\n<p>\u0417\u0430\u043c\u0435\u043d\u0438\u043c \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c <strong>\u043c\u0435\u0434\u0438\u0430\u043d\u043e\u0439, <\/strong>\u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>lambda \u0445<\/code> \u0438 \u043c\u0435\u0442\u043e\u0434\u0430 <code>.fillna()<\/code><em>.<\/em><\/p>\n<pre><code>group = df.groupby('income_type') df['total_income'] = group.total_income.apply(lambda x: x.fillna(x.median()))<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u0430\u043d\u0430\u043b\u0438\u0437\u0443 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <strong>years_employed. <\/strong>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u043d\u0430\u0447\u0430\u043b\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 18 \u043b\u0435\u0442.<\/p>\n<pre><code>df.loc[df['years_employed']> df['dob_years']\u201318].shape[0]<\/code><\/pre>\n<p><code>\u041f\u043e\u043b\u0443\u0447\u0438\u043c 1908<\/code><\/p>\n<p>\u0418 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u043d\u0430\u0447\u0430\u043b\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 14 \u043b\u0435\u0442.<\/p>\n<pre><code>df.loc[df['years_employed']> df['dob_years']\u201314].shape[0]<\/code><\/pre>\n<p><code>\u041f\u043e\u043b\u0443\u0447\u0438\u043c 784<\/code><\/p>\n<p>\u041d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u043c\u043e\u0436\u0435\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u044b\u0432\u043e\u0434, \u0447\u0442\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432, \u043d\u0430\u0447\u0430\u0432\u0448\u0438\u0445 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 14 \u043b\u0435\u0442 \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u0432 2 \u0440\u0430\u0437\u0430 \u043c\u0435\u043d\u044c\u0448\u0435, \u0447\u0435\u043c \u0442\u0435\u0445, \u043a\u0442\u043e \u043d\u0430\u0447\u0430\u043b \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 18 \u043b\u0435\u0442. \u0423\u0434\u0430\u043b\u0438\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <strong>years_employed<\/strong>, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435\u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0432\u043d\u043e\u0439.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0443\u0434\u0430\u043b\u0438\u043c \u0434\u0443\u0431\u043b\u0438\u0440\u0443\u044e\u0449\u0438\u0435 \u0441\u0442\u043e\u043b\u0431\u0446\u044b, \u0441\u043e\u0437\u0434\u0430\u0432 \u043d\u043e\u0432\u044b\u0439 \u0434\u0430\u0442\u0430\u0444\u0440\u0435\u0439\u043c <code>df_new<\/code><\/p>\n<pre><code>df_new = df.drop(['education_id', 'family_status_id', 'days_employed', 'purpose', 'years_employed'], axis = 1)<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u0440\u0435\u0434\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445<\/p>\n<pre><code>df_model.info()<\/code><\/pre>\n<pre><code>&lt;class 'pandas.core.frame.DataFrame'> Int64Index: 20316 entries, 0 to 21524 Data columns (total 9 columns):  #   Column         Non\u2013Null Count  Dtype   \u2013\u2013\u2013  \u2013\u2013\u2013\u2013\u2013\u2013         \u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013  \u2013\u2013\u2013\u2013\u2013    0   children       20316 non\u2013null  int64    1   dob_years      20316 non\u2013null  int64    2   education      20316 non\u2013null  object   3   family_status  20316 non\u2013null  object   4   gender         20316 non\u2013null  object   5   income_type    20316 non\u2013null  object   6   debt           20316 non\u2013null  int64    7   total_income   20316 non\u2013null  float64  8   purpose_lem    20316 non\u2013null  object  dtypes: float64(1), int64(3), object(5) memory usage: 1.5+ MB <\/code><\/pre>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u044b\u043b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u0440\u0435\u0434\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0432 \u0431\u0430\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0439 \u0441\u0444\u0435\u0440\u0435. \u0414\u0430\u043b\u044c\u0448\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0434\u0440\u0443\u0433\u043e\u0439 \u044d\u0442\u0430\u043f \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u044f.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/800973\/\"> https:\/\/habr.com\/ru\/articles\/800973\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u0440\u0435\u0434\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0433\u043e \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u0430 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u0438. \u041d\u043e \u0434\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0440\u043e\u044f\u0441\u043d\u0438\u043c, \u0447\u0442\u043e \u0438\u0437 \u0441\u0435\u0431\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u0438 \u0438\u0437 \u043a\u0430\u043a\u0438\u0445 \u044d\u0442\u0430\u043f\u043e\u0432 \u043e\u043d\u043e \u0441\u043e\u0441\u0442\u043e\u0438\u0442.<\/p>\n<p><em><u>\u041c\u0430\u0448\u0438\u043d\u043d\u043e\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435\u00a0<\/u><\/em>\u2013 \u044d\u0442\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440 \u0443\u0447\u0438\u0442\u0441\u044f \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435, \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0438 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u044d\u0442\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f\u00a0\u2013 \u0438 \u043f\u043e\u0437\u0436\u0435.\u00a0<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0434\u043b\u044f \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435, \u043d\u0435\u043e\u0431\u044a\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u0438\u043b\u0438 \u043d\u0435\u043f\u043e\u043b\u043d\u044b\u0435, \u0442\u043e \u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u043d\u0435\u0442\u043e\u0447\u043d\u044b\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0430.<\/p>\n<p><em><u>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445<\/u><\/em><u>\u00a0<\/u>\u2013 \u044d\u0442\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0438 \u00ab\u0441\u044b\u0440\u044b\u0445<strong>\u00bb<\/strong> (\u043d\u0435\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0445) \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0438\u0445 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430.<\/p>\n<p>\u041f\u0440\u0435\u0434\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b:<\/p>\n<ul>\n<li>\n<p>\u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445;<\/p>\n<\/li>\n<li>\n<p>\u043e\u0447\u0438\u0441\u0442\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445;<\/p>\n<\/li>\n<li>\n<p>\u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445;<\/p>\n<\/li>\n<li>\n<p>\u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445;<\/p>\n<\/li>\n<li>\n<p>\u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435;<\/p>\n<\/li>\n<li>\n<p>\u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f.<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445<\/strong> \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 <strong>\u0432\u044b\u044f\u0432\u043b\u0435\u043d\u0438\u0435:<\/strong><\/p>\n<ul>\n<li>\n<p>\u0434\u0443\u0431\u043b\u0438\u043a\u0430\u0442\u043e\u0432, \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u0440\u0435\u0447\u0438\u0439, \u043e\u0448\u0438\u0431\u043e\u043a;<\/p>\n<\/li>\n<li>\n<p>\u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0439;<\/p>\n<\/li>\n<li>\n<p>\u043f\u0440\u043e\u043f\u0443\u0441\u043a\u043e\u0432<strong>.<\/strong><\/p>\n<\/li>\n<\/ul>\n<p><strong>\u041e\u0447\u0438\u0441\u0442\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445<\/strong> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442:  <\/p>\n<ul>\n<li>\n<p>\u0443\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0434\u0443\u0431\u043b\u0438\u043a\u0430\u0442\u043e\u0432, \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u0440\u0435\u0447\u0438\u0439 \u0438 \u043e\u0448\u0438\u0431\u043e\u043a;<\/p>\n<\/li>\n<li>\n<p>\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0439;<\/p>\n<\/li>\n<li>\n<p>\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u043e\u0432.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0438. \u0418\u0445 \u043c\u043e\u0436\u043d\u043e \u0443\u0434\u0430\u043b\u044f\u0442\u044c, \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u043b\u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0442\u044c. \u041e\u0434\u043d\u0430\u043a\u043e \u043d\u0443\u0436\u043d\u043e \u043e\u0441\u0442\u043e\u0440\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u043e\u0432. \u0415\u0441\u043b\u0438 \u043e\u043d\u0438 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0434\u043e\u043b\u044e \u043f\u043e \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044e \u043a \u043e\u0431\u044a\u0435\u043c\u0443 \u0432\u0441\u0435\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445, \u0442\u043e \u043f\u0440\u0438\u0431\u0435\u0433\u0430\u0442\u044c \u043a \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044e \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u043e\u0432 \u043d\u0435 \u0441\u0442\u043e\u0438\u0442.<\/p>\n<p>\u0417\u0430\u043f\u043e\u043b\u043d\u044f\u0442\u044c <strong>\u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0438<\/strong> \u043c\u043e\u0436\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e<strong>:<\/strong><\/p>\n<ul>\n<li>\n<p>\u043d\u0443\u043b\u0435\u0439;<\/p>\n<\/li>\n<li>\n<p>\u043c\u043e\u0434\u044b, \u043c\u0435\u0434\u0438\u0430\u043d\u044b \u0438\u043b\u0438 \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f;<\/p>\n<\/li>\n<li>\n<p>\u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445.<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u0422\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445<\/strong> \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442:  <\/p>\n<ul>\n<li>\n<p>\u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432;<\/p>\n<\/li>\n<li>\n<p>\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430, \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445;<\/p>\n<\/li>\n<li>\n<p>\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445;<\/p>\n<\/li>\n<li>\n<p>\u043d\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u0414\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 <\/strong>\u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043d\u043e\u0432\u044b\u0445 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432, \u0430\u0433\u0440\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432.<\/p>\n<p><strong>\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 <\/strong>\u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442:<\/p>\n<ul>\n<li>\n<p>\u00a0\u0441\u043d\u0438\u0436\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438;<\/p>\n<\/li>\n<li>\n<p>\u0432\u044b\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0438 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043d\u0435\u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c \u0434\u043e 80\u00a0% \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0437\u0430\u0442\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u043d\u0430 \u043f\u0440\u043e\u0435\u043a\u0442 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f. \u0427\u0442\u043e\u0431\u044b \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441, \u0432\u0430\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b, \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445.\u00a0<\/p>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u044b\u0439 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f <em>Python<\/em> \u0432 \u0441\u0440\u0435\u0434\u0435 <em>Google<\/em> <em>Colaboratory<\/em>.<\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438  <\/p>\n<pre><code>import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns<\/code><\/pre>\n<p>\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0444\u0430\u0439\u043b data.csv, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435:  <\/p>\n<pre><code>df = pd.read_csv('\/content\/data.csv')<\/code><\/pre>\n<p><strong>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445<\/strong>  <\/p>\n<ul>\n<li>\n<p><em>children<\/em> \u2013 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u0435\u0442\u0435\u0439 \u0432 \u0441\u0435\u043c\u044c\u0435;<\/p>\n<\/li>\n<li>\n<p><em>days_employed<\/em> \u2013 \u043e\u0431\u0449\u0438\u0439 \u0442\u0440\u0443\u0434\u043e\u0432\u043e\u0439 \u0441\u0442\u0430\u0436 \u0432 \u0434\u043d\u044f\u0445;<\/p>\n<\/li>\n<li>\n<p><em>dob_years<\/em> \u2013 \u0432\u043e\u0437\u0440\u0430\u0441\u0442 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0432 \u0433\u043e\u0434\u0430\u0445;<\/p>\n<\/li>\n<li>\n<p><em>education<\/em> \u2013 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u0430;<\/p>\n<\/li>\n<li>\n<p><em>education_id<\/em> \u2013 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0443\u0440\u043e\u0432\u043d\u044f \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f;<\/p>\n<\/li>\n<li>\n<p><em>family_status<\/em> \u2013 \u0441\u0435\u043c\u0435\u0439\u043d\u043e\u0435 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435;<\/p>\n<\/li>\n<li>\n<p><em>family_status_id<\/em> \u2013 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0441\u0435\u043c\u0435\u0439\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f;<\/p>\n<\/li>\n<li>\n<p><em>gender<\/em> \u2013 \u043f\u043e\u043b \u043a\u043b\u0438\u0435\u043d\u0442\u0430;<\/p>\n<\/li>\n<li>\n<p><em>income_type \u2013 <\/em>\u0442\u0438\u043f \u0437\u0430\u043d\u044f\u0442\u043e\u0441\u0442\u0438;<\/p>\n<\/li>\n<li>\n<p><em>debt<\/em> \u2013 \u0438\u043c\u0435\u043b \u043b\u0438 \u0437\u0430\u0434\u043e\u043b\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u043f\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0443 \u043a\u0440\u0435\u0434\u0438\u0442\u043e\u0432 (1 \u2013 \u0438\u043c\u0435\u043b, 0 \u2013 \u043d\u0435 \u0438\u043c\u0435\u043b);<\/p>\n<\/li>\n<li>\n<p><em>total_income<\/em> \u2013 \u0435\u0436\u0435\u043c\u0435\u0441\u044f\u0447\u043d\u044b\u0439 \u0434\u043e\u0445\u043e\u0434;<\/p>\n<\/li>\n<li>\n<p><em>purpose<\/em> \u2013 \u0446\u0435\u043b\u044c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043a\u0440\u0435\u0434\u0438\u0442\u0430.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u0430<em> info()<\/em>:<\/p>\n<pre><code>df.info()<\/code><\/pre>\n<pre><code>&lt;class 'pandas.core.frame.DataFrame'> RangeIndex: 21525 entries, 0 to 21524 Data columns (total 12 columns):  #   Column            Non\u2013Null Count  Dtype   \u2013\u2013\u2013  \u2013\u2013\u2013\u2013\u2013\u2013            \u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013  \u2013\u2013\u2013\u2013\u2013    0   children          21525 non\u2013null  int64    1   days_employed    1 1935 non\u2013null  float64  2   dob_years         21525 non\u2013null  int64    3   education         21525 non\u2013null  object   4   education_id      21525 non\u2013null  int64    5   family_status     21525 non\u2013null  object   6   family_status_id  21525 non\u2013null  int64    7   gender            21525 non\u2013null  object   8   income_type       21525 non\u2013null  object   9   debt              21525 non\u2013null  int64    10  total_income      19351 non\u2013null  float64  11  purpose           21525 non\u2013null  object  dtypes: float64(2), int64(5), object(5) memory usage: 2.0+ MB<\/code><\/pre>\n<p>\u041d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0432\u044b\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u044b\u0432\u043e\u0434, \u0447\u0442\u043e \u0442\u0438\u043f \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0438\u0445 \u0441\u043c\u044b\u0441\u043b\u043e\u0432\u043e\u043c\u0443 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044e. \u041e\u0434\u043d\u0430\u043a\u043e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0432 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430\u0445 <strong><em>days_employed \u0438 total_income <\/em><\/strong>\u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u0441\u044f \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439.  <\/p>\n<h2>\u0412\u044b\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0439  <\/h2>\n<p>\u041d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0448\u0430\u0433\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u043d\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439.<\/p>\n<p><em><u>\u0410\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f\u043c\u0438<\/u><\/em> \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f \u0441\u0438\u043b\u044c\u043d\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0449\u0438\u0435\u0441\u044f \u043e\u0442 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u043e \u0438\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u043e\u043c\u0443 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0443.<\/p>\n<p>\u0414\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 <em>\u043a\u043e\u0440\u043e\u0431\u0447\u0430\u0442\u043e\u0439 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b<\/em> \u0438\u043b\u0438 <em>\u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u00ab\u044f\u0449\u0438\u043a \u0441 \u0443\u0441\u0430\u043c\u0438<\/em><strong><em>\u00bb<\/em>. <\/strong>\u041f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0442\u0430\u043a\u043e\u0433\u043e \u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u0441\u0432\u044f\u0445\u0430\u043d\u043e \u0441 \u043f\u043e\u043d\u044f\u0442\u0438\u0435\u043c <em>\u00ab\u043a\u0432\u0430\u0440\u0442\u0438\u043b\u044c<\/em><strong><em>\u00bb.\u00a0<\/em><\/strong><\/p>\n<p>\u0422\u0435\u0440\u043c\u0438\u043d <em>\u00ab\u043a\u0432\u0430\u0440\u0442\u0438\u043b\u044c<\/em><strong><em>\u00bb <\/em><\/strong>\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0434\u043b\u044f \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043a\u0432\u0430\u043d\u0442\u0438\u043b\u044f  \u043a\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u00bc.<\/p>\n<p><em><u>\u041a\u0432\u0430\u043d\u0442\u0438\u043b\u0435\u043c<\/u><\/em> \u043f\u043e\u0440\u044f\u0434\u043a\u0430  \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 x \u0442\u0430\u043a\u043e\u0435, \u0447\u0442\u043e <\/p>\n<p>\u041a\u0432\u0430\u0440\u0442\u0438\u043b\u0438 \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u044e\u0442 \u0432\u044b\u0431\u043e\u0440\u043a\u0443 \u043d\u0430 4 \u0447\u0430\u0441\u0442\u0438.<\/p>\n<p>\u041f\u0435\u0440\u0432\u044b\u0439 \u043a\u0432\u0430\u0440\u0442\u0438\u043b\u044c Q1 \u043f\u043e\u0440\u044f\u0434\u043a\u0430 0,25 \u2013 \u0447\u0438\u0441\u043b\u043e, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0449\u0435\u0435 \u00bc \u0447\u0430\u0441\u0442\u044c \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u043e\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0438, \u0442\u043e \u0435\u0441\u0442\u044c 25% \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u043e\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u043c\u0435\u043d\u044c\u0448\u0435 Q1, 75% \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u2013 \u0431\u043e\u043b\u044c\u0448\u0435 Q1.<\/p>\n<p>\u0412\u0442\u043e\u0440\u043e\u0439 \u043a\u0432\u0430\u0440\u0442\u0438\u043b\u044c Q2 \u043f\u043e\u0440\u044f\u0434\u043a\u0430 0,5 \u0438\u043b\u0438 \u043c\u0435\u0434\u0438\u0430\u043d\u0430 \u2013 \u0447\u0438\u0441\u043b\u043e, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e 50 % \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u043e\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u043c\u0435\u043d\u044c\u0448\u0435 Q2, \u0430 50% \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u2013 \u0431\u043e\u043b\u044c\u0448\u0435 Q2.<\/p>\n<p>\u0422\u0440\u0435\u0442\u0438\u0439 \u043a\u0432\u0430\u0440\u0442\u0438\u043b\u044c Q3 \u043f\u043e\u0440\u044f\u0434\u043a\u0430 0,75 \u2013 \u0447\u0438\u0441\u043b\u043e, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e 25% \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u043e\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u043c\u0435\u043d\u044c\u0448\u0435 Q3, 25% \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u2013 \u0431\u043e\u043b\u044c\u0448\u0435\u00a0 Q3.<\/p>\n<p><em><u>\u041c\u0435\u0436\u043a\u0432\u0430\u0440\u0442\u0438\u043b\u044c\u043d\u044b\u0439 \u0440\u0430\u0437\u043c\u0430\u0445<\/u><\/em> \u2013 \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u0430, \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c\u0430\u044f \u043f\u043e \u0444\u043e\u0440\u043c\u0443\u043b\u0435:<\/p>\n<p>\u0413\u0440\u0430\u0444\u0438\u043a \u00ab\u044f\u0449\u0438\u043a \u0441 \u0443\u0441\u0430\u043c\u0438<strong>\u00bb<\/strong> \u0438\u043c\u0435\u0435\u0442 \u0432\u0438\u0434:<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u00ab\u042f\u0449\u0438\u043a\u00bb \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d \u043a\u0432\u0430\u0440\u0442\u0438\u043b\u044f\u043c\u0438 Q1 \u0438  Q3, \u0432\u043d\u0443\u0442\u0440\u0438 \u043d\u0435\u0433\u043e \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0430 \u043c\u0435\u0434\u0438\u0430\u043d\u0430 Q2. \u00ab\u0423\u0441\u044b\u00bb \u043f\u0440\u043e\u0441\u0442\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u0432\u043b\u0435\u0432\u043e \u0438 \u0432\u043f\u0440\u0430\u0432\u043e \u043d\u0430 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 1,5 * IQR<\/p>\n<p>\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u043e\u0432 <code>head()<\/code> <em>\u0438 <\/em><code>tail()<\/code><em> <\/em>\u043c\u044b \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <strong><em>days_employed <\/em><\/strong>\u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439.\u00a0<\/p>\n<p>\u00a0<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u043e\u043f\u0438\u0441\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u043f\u043e \u0432\u0441\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c:<\/p>\n<pre><code>df.describe()<\/code><\/pre>\n<figure class=\"full-width\"><\/figure>\n<p>\u041c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0432\u044b\u0432\u043e\u0434\u044b \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0438\u0437 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432:<\/p>\n<p>\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430 <strong><em>children<\/em><\/strong> \u0438\u043c\u0435\u0435\u0442 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u043e\u0442 \u20131\u00a0\u0434\u043e 20.<br \/>\u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u0438\u043c\u0435\u044e\u0442\u0441\u044f \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430 <strong><em>days_employed<\/em><\/strong> \u0438\u043c\u0435\u0435\u0442 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u043e\u0442 \u201318\u00a0388.9\u00a0\u0434\u043e 401\u00a0755.4.<br \/>\u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u0438\u043c\u0435\u044e\u0442\u0441\u044f \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430 <strong><em>dob_years<\/em><\/strong> \u0438\u043c\u0435\u0435\u0442 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u043e\u0442 0\u00a0\u0434\u043e 75.<br \/>\u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u0438\u043c\u0435\u044e\u0442\u0441\u044f \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430<strong><em> debt<\/em><\/strong> \u0438\u043c\u0435\u0435\u0442 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u043e\u0442 0\u00a0\u0434\u043e 1.<br \/>\u0410\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043d\u0435\u0442.<\/p>\n<p>\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430 <strong><em>total_income<\/em><\/strong> \u0438\u043c\u0435\u0435\u0442 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u043e\u0442 20\u00a0667\u00a0\u0434\u043e 2\u00a0265\u00a0604.<br \/>\u0410\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043d\u0435\u0442.<\/p>\n<p>\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 <strong><em>family_status_id<\/em><\/strong> \u0438 <strong><em>education_id <\/em><\/strong>\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430\u043c\u0438 \u0438<strong><em> <\/em><\/strong>\u043d\u0435 \u043d\u0435\u0441\u0443\u0442 \u0441\u043c\u044b\u0441\u043b\u043e\u0432\u043e\u0439 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0435\u0439, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435 \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0435\u043c \u0438\u0445 \u043d\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043c \u0430\u043d\u0430\u043b\u0438\u0437 \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u043c \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430\u043c.<br \/>\u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430 <strong><em>children. <\/em><\/strong>\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u0430 <code>.value_counts()<\/code><em> <\/em>\u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438 \u0438\u0445 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e, \u0445\u0440\u0430\u043d\u0438\u043c\u043e\u0435 \u0432 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0435.<\/p>\n<figure class=\"bordered full-width\"><\/figure>\n<p>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c\u0438 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043e\u0448\u0438\u0431\u043e\u043a \u0432\u0432\u043e\u0434\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0437\u0430\u043c\u0435\u043d\u0438\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u2013 1 \u0438 20 \u043d\u0430 1 \u0438 2 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043c\u0435\u0442\u043e\u0434 <code>.replace()<\/code>.<\/p>\n<pre><code>df['children'] = df['children'].replace(\u20131,1) df['children'] = df['children'].replace(20,2)<\/code><\/pre>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043f\u0440\u0438\u0437\u043d\u0430\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u2013 <strong><em>days_employed.<\/em><\/strong><\/p>\n<p>\u0420\u0430\u043d\u0435\u0435, \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u044f \u043e\u043f\u0438\u0441\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443, \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0432 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0435 \u0435\u0441\u0442\u044c \u0438 \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u0435, \u0438 \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u043e \u043c\u0430\u043b\u044b\u0435 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u044b\u044f\u0432\u0438\u043c \u0442\u0438\u043f\u044b \u0437\u0430\u043d\u044f\u0442\u043e\u0441\u0442\u0438 \u0437\u0430\u0435\u043c\u0449\u0438\u043a\u043e\u0432 \u0441 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439.<\/p>\n<pre><code>df[df['days_employed'] &lt; 0]['income_type'].value_counts()<\/code><\/pre>\n<figure class=\"bordered full-width\"><\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u2013 \u0441 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439.<\/p>\n<pre><code>df[df['days_employed'] > 0]['income_type'].value_counts()<\/code><\/pre>\n<figure class=\"full-width\"><\/figure>\n<p>\u0417\u0430\u043c\u0435\u043d\u0438\u043c \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u043e\u0432 <code>.loc()<\/code><em> \u0438 <\/em><code>.abs()<\/code>.<\/p>\n<pre><code>df.loc[df['days_employed'] &lt; 0, 'days_employed'] = df['days_employed'].abs()<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043e\u043f\u0438\u0441\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u043f\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439:<\/p>\n<pre><code>df['days_employed'].describe()<\/code><\/pre>\n<figure class=\"bordered full-width\"><\/figure>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u0441\u044f \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f. \u0427\u0442\u043e\u0431\u044b \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435, \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u0433\u0440\u0430\u0444\u0438\u043a \u0441\u0442\u0430\u0436\u0430,\u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u0430 <code>.hist()<\/code><em>.<\/em><\/p>\n<pre><code>df.hist('days_employed', bins =25)<\/code><\/pre>\n<figure class=\"full-width\"><\/figure>\n<p>\u041f\u0440\u043e\u0432\u0435\u0434\u0435\u043c \u0430\u043d\u0430\u043b\u0438\u0437 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u0442\u0430\u0436\u0430 \u0432 \u0434\u043d\u044f\u0445 \u0438 \u0432 \u0433\u043e\u0434\u0430\u0445.<\/p>\n<pre><code>max_day = df['days_employed'].max() max_day<\/code><\/pre>\n<p><code>\u041f\u043e\u043b\u0443\u0447\u0438\u043c 401755.4<\/code><\/p>\n<p>\u041f\u0435\u0440\u0435\u0432\u0435\u0434\u0435\u043c \u0434\u043d\u0438 \u0432 \u0433\u043e\u0434\u044b.<\/p>\n<pre><code>max_year = max_day\/365 max_year<\/code><\/pre>\n<p><code>\u041f\u043e\u043b\u0443\u0447\u0438\u043c 1100.69<\/code><\/p>\n<p>\u041c\u043e\u0436\u0435\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u044b\u0432\u043e\u0434, \u0447\u0442\u043e \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0442\u0430\u0436 \u043f\u0440\u0438 5\u2013\u0434\u043d\u0435\u0432\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u043d\u0435\u0434\u0435\u043b\u0438 \u0431\u043e\u043b\u0435\u0435 1100 \u043b\u0435\u0442.\u00a0<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0441\u0440\u0435\u0434\u043d\u0438\u0439 \u0438 \u043c\u0435\u0434\u0438\u0430\u043d\u043d\u044b\u0439 \u0441\u0442\u0430\u0436 \u0432 \u0433\u043e\u0434\u0430\u0445, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u043e\u0432 <code>.mean()<\/code> \u0438 <code>.quantile()<\/code>.<\/p>\n<pre><code>mean_day = df['days_employed'].mean() mean_year = mean_day\/365 mean_year<\/code><\/pre>\n<p><code>\u041f\u043e\u043b\u0443\u0447\u0438\u043c 183.33<\/code><\/p>\n<pre><code>median_day = df['days_employed'].quantile(0.5) median_year = median_day\/365 median_year<\/code><\/pre>\n<p><code>\u041f\u043e\u043b\u0443\u0447\u0438\u043c 6.01<\/code><\/p>\n<p>\u0412\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e \u0438 \u043c\u0435\u0434\u0438\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u0442\u0430\u0436\u0430 \u0441\u0438\u043b\u044c\u043d\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f, \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0435 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435.<\/p>\n<p>\u041f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043e\u0431\u0449\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e, \u0441\u0440\u0435\u0434\u043d\u0435\u0435, \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0438 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430 <strong><em>days_employed <\/em><\/strong>\u043f\u043e \u0442\u0438\u043f\u0430\u043c \u0437\u0430\u043d\u044f\u0442\u043e\u0441\u0442\u0438 \u0437\u0430\u0435\u043c\u0449\u0438\u043a\u043e\u0432.<\/p>\n<pre><code>df_type = df.groupby(['income_type']).agg({'days_employed' : ['count', 'mean', 'max', 'min']})<\/code><\/pre>\n<figure class=\"bordered full-width\"><\/figure>\n<p>\u0414\u0435\u043b\u0430\u0435\u043c \u0432\u044b\u0432\u043e\u0434, \u0447\u0442\u043e \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f \u0441\u0442\u0430\u0436\u0430 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u043d\u044b \u0434\u043b\u044f \u0434\u0432\u0443\u0445 \u0442\u0438\u043f\u043e\u0432 \u0437\u0430\u043d\u044f\u0442\u043e\u0441\u0442\u0438 \u00ab\u0431\u0435\u0437\u0440\u0430\u0431\u043e\u0442\u043d\u044b\u0439<strong>\u00bb<\/strong> \u0438 \u00ab\u043f\u0435\u043d\u0441\u0438\u043e\u043d\u0435\u0440<strong>\u00bb<\/strong>. \u0422\u0430\u043a \u043a\u0430\u043a \u0433\u0440\u0443\u043f\u043f\u0430 \u0437\u0430\u0435\u043c\u0449\u0438\u043a\u043e\u0432 \u00ab\u0431\u0435\u0437\u0440\u0430\u0431\u043e\u0442\u043d\u044b\u0439<strong>\u00bb<\/strong>, \u00ab\u0432 \u0434\u0435\u043a\u0440\u0435\u0442\u0435<strong>\u00bb<\/strong>, \u00ab\u043f\u0440\u0435\u0434\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c<strong>\u00bb<\/strong> \u0438 \u00ab\u0441\u0442\u0443\u0434\u0435\u043d\u0442<strong>\u00bb<\/strong> \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u043c\u0430\u043b\u044b\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0437\u0430\u043f\u0438\u0441\u0435\u0439 (\u043e\u0434\u043d\u043e\u0439), \u0442\u043e \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0438\u0437 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u044f, \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0432\u0448\u0438\u0441\u044c \u043c\u0435\u0442\u043e\u0434\u043e\u043c <code>.drop()<\/code>, \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0432 \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430.<\/p>\n<pre><code>df.drop(df[df['income_type'] == '\u0431\u0435\u0437\u0440\u0430\u0431\u043e\u0442\u043d\u044b\u0439'].index, inplace = True) df.drop(df[df['income_type'] == '\u0432 \u0434\u0435\u043a\u0440\u0435\u0442\u0435'].index, inplace = True) df.drop(df[df['income_type'] == '\u043f\u0440\u0435\u0434\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c'].index, inplace = True) df.drop(df[df['income_type'] == '\u0441\u0442\u0443\u0434\u0435\u043d\u0442'].index, inplace = True)<\/code><\/pre>\n<p>\u041f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u0437\u0430\u0435\u043c\u0449\u0438\u043a\u043e\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043c\u0435\u0442\u043e\u0434\u044b \u0438\u0437 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a <code>matplotlib<\/code> \u0438\u00a0 seaborn<em>. <\/em>\u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0440\u0430\u0437\u043e\u0431\u044c\u0435\u043c \u0434\u0430\u0442\u0430\u0444\u0440\u0435\u0439\u043c <code>df<\/code> \u043f\u043e \u0442\u0438\u043f\u0443 \u0437\u0430\u0435\u043c\u0449\u0438\u043a\u043e\u0432.<\/p>\n<pre><code>df1 = df[df['income_type'] == '\u0433\u043e\u0441\u0441\u043b\u0443\u0436\u0430\u0449\u0438\u0439'] df2 = df[df['income_type'] == '\u043a\u043e\u043c\u043f\u0430\u043d\u044c\u043e\u043d'] df3 = df[df['income_type'] == '\u043f\u0435\u043d\u0441\u0438\u043e\u043d\u0435\u0440'] df4 = df[df['income_type'] == '\u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a']<\/code><\/pre>\n<p>\u0421\u0442\u0440\u043e\u0438\u043c \u043e\u0431\u0449\u0438\u0439 \u0433\u0440\u0430\u0444\u0438\u043a \u0434\u043b\u044f \u0447\u0435\u0442\u044b\u0440\u0435\u0445 \u0433\u0440\u0443\u043f\u043f \u0437\u0430\u0435\u043c\u0449\u0438\u043a\u043e\u0432.<\/p>\n<pre><code># \u0437\u0430\u0434\u0430\u0435\u043c \u0440\u0430\u0437\u043c\u0435\u0440 \u0441\u0435\u0442\u043a\u0438 ax = plt.subplots(2,2, figsize = (18,12))  # \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0433\u0440\u0430\u0444\u0438\u043a\u0430 plt.subplot(2,2,1)  # \u0437\u0430\u0434\u0430\u043d\u0438\u0435 \u0433\u0440\u0430\u0444\u0438\u043a\u0430 ax = sns.histplot(df1['days_employed'], bins = 25, color = 'purple', kde = True)  # \u043f\u043e\u0434\u043f\u0438\u0441\u044c \u0433\u0440\u0430\u0444\u0438\u043a\u0430 ax.set_title('\u041a\u043b\u0430\u0441\u0441 \u0437\u0430\u0435\u043c\u0449\u0438\u043a\u043e\u0432: \u00ab\u0433\u043e\u0441\u0441\u043b\u0443\u0436\u0430\u0449\u0438\u0439\u00bb')  # \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0433\u0440\u0430\u0444\u0438\u043a\u0430 plt.subplot(2,2,2) ax = sns.histplot(df2['days_employed'], bins = 25, color = 'orange', kde = True)  # \u043f\u043e\u0434\u043f\u0438\u0441\u044c \u0433\u0440\u0430\u0444\u0438\u043a\u0430 ax.set_title('\u041a\u043b\u0430\u0441\u0441 \u0437\u0430\u0435\u043c\u0449\u0438\u043a\u043e\u0432: \u00ab\u043a\u043e\u043c\u043f\u0430\u043d\u044c\u043e\u043d\u00bb')  # \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u0442\u0440\u0435\u0442\u044c\u0435\u0433\u043e \u0433\u0440\u0430\u0444\u0438\u043a\u0430 plt.subplot(2,2,3) ax = sns.histplot(df3['days_employed'], bins = 25, color = 'green',<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-371096","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/371096","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=371096"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/371096\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=371096"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=371096"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=371096"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}