{"id":273859,"date":"2016-02-09T10:34:02","date_gmt":"2016-02-09T07:34:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=273859"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=273859","title":{"rendered":"\u0421\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u043c \u0446\u0435\u043d\u044b \u0432 \u043a\u043d\u0438\u0436\u043d\u044b\u0445 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430\u0445 c \u043f\u043e\u043c\u043e\u0449\u044c\u044e python, pandas \u0438 matplotlib"},"content":{"rendered":"<p>       \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043d\u0430\u0439\u0442\u0438 \u0441\u0430\u043c\u044b\u0439 \u0434\u0435\u0448\u0435\u0432\u044b\u0439 \u0438 \u0441\u0430\u043c\u044b\u0439 \u0434\u043e\u0440\u043e\u0433\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u043c\u0430\u0433\u0430\u0437\u0438\u043d \u043a\u043d\u0438\u0433.<br \/>  \u0421\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c \u0431\u0443\u0434\u0435\u043c \u0431\u0443\u043c\u0430\u0436\u043d\u044b\u0435 \u043a\u043d\u0438\u0433\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0435\u0441\u0442\u044c \u0432 \u043d\u0430\u043b\u0438\u0447\u0438\u0438. \u0412 \u0440\u0430\u0437\u043d\u044b\u0445 \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430\u0445 \u043e\u0447\u0435\u043d\u044c \u0440\u0430\u0437\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043d\u0438\u0433. \u0413\u0434\u0435-\u0442\u043e \u043c\u0435\u043d\u0435\u0435 1000, \u0430 \u0433\u0434\u0435-\u0442\u043e \u0431\u043e\u043b\u0435\u0435 200 000 \u043a\u043d\u0438\u0433. <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/1e8\/ecc\/fee\/1e8eccfeeb0b4f9489e3aba762949dc1.png\"\/><\/p>\n<p>  \u041a\u0441\u0442\u0430\u0442\u0438, \u0433\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0430\u044f. \u041a\u0430\u043a \u043e\u043d\u0430 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u0437\u0430\u043a\u043e\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0441\u043f\u0438\u0441\u043e\u043a \u043a\u043d\u0438\u0433, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0435\u0441\u0442\u044c \u0432\u043e \u0432\u0441\u0435\u0445 \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430\u0445.<\/p>\n<p>  \u042f \u0432\u044b\u0433\u0440\u0443\u0437\u0438\u043b \u0431\u0430\u0437\u0443 \u0441 \u0441\u0430\u0439\u0442\u0430 <a href=\"http:\/\/bookradar.org\/\">bookradar.org<\/a>, \u0432 \u0432\u0438\u0434\u0435 csv \u0444\u0430\u0439\u043b\u0430. \u041a\u043e\u043d\u0435\u0447\u043d\u043e \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u0433\u0440\u0443\u0437\u0438\u043b, \u0430 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Python, \u0447\u0442\u043e\u0431\u044b \u0443\u0434\u043e\u0431\u043d\u043e \u0431\u044b\u043b\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c. \u0421\u0442\u043e\u043b\u0431\u0446\u044b \u0443 \u043d\u0430\u0441 \u2014 \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u044b, \u0441\u0442\u0440\u043e\u043a\u0438 \u2014 \u044d\u0442\u043e \u043a\u043d\u0438\u0433\u0438, \u044f\u0447\u0435\u0439\u043a\u0438 \u0441\u0442\u0440\u043e\u043a \u2014 \u0446\u0435\u043d\u044b \u043d\u0430 \u044d\u0442\u0443 \u043a\u043d\u0438\u0433\u0443 \u0432 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0435. \u0415\u0441\u043b\u0438 \u043a\u043d\u0438\u0433\u0438 \u0432 \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0435 \u043d\u0435\u0442, \u0442\u043e \u043f\u0443\u0441\u0442\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 (NaN).<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/9df\/8dd\/58e\/9df8dd58ef744ccea315cee1b0294da8.png\"\/><\/p>\n<p>  \u0412\u044b\u0433\u0440\u0443\u0436\u0435\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u0443\u043c\u0430\u0436\u043d\u044b\u0435 \u043a\u043d\u0438\u0433\u0438, \u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0443\u043a\u0430\u0437\u0430\u043d ISBN. \u041a\u043d\u0438\u0433\u0438 \u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 ISBN \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d \u043d\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u044d\u0442\u043e \u043e\u0434\u043d\u0430 \u0438 \u0442\u0430\u043a \u0436\u0435 \u043a\u043d\u0438\u0433\u0430. \u0414\u0430\u0436\u0435 \u043a\u043d\u0438\u0433\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e \u0438 \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e \u043c\u043e\u0433\u0443\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f \u0446\u0435\u043d\u043e\u0439, \u0435\u0441\u043b\u0438 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u044d\u0442\u043e \u0438\u0437\u0434\u0430\u043d\u0438\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u043b\u0435\u0442. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435 \u043a\u043d\u0438\u0433\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043b\u0435\u0433\u043a\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c.<\/p>\n<p>  \u041a\u043e\u0433\u0434\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0440\u0430\u0437 \u0440\u0438\u0441\u043e\u0432\u0430\u043b \u0433\u0440\u0430\u0444\u0438\u043a\u0438, \u043c\u0430\u0441\u0448\u0442\u0430\u0431 \u0431\u044b\u043b \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043d\u0435\u0447\u0438\u0442\u0430\u0435\u043c\u044b\u0439, \u0442.\u043a. \u0435\u0441\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0442\u043e\u044f\u0442 30-50 \u0442\u044b\u0441 \u0440\u0443\u0431. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0435 \u044f \u0443\u0434\u0430\u043b\u0438\u043b \u043a\u043d\u0438\u0433\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0442\u043e\u044f\u0442 \u0434\u043e\u0440\u043e\u0436\u0435 1500 \u0440\u0443\u0431.<\/p>\n<h2>\u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u044b \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430<\/h2>\n<p>  \u0421\u0434\u0435\u043b\u0430\u0435\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0438\u043c\u043f\u043e\u0440\u0442\u044b \u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043c \u0444\u0430\u0439\u043b \u0432 DataFrame:<\/p>\n<pre><code class=\"python\">import numpy as np import pandas as pd import matplotlib.pyplot as plt from IPython.display import HTML plt.style.use('ggplot') %matplotlib inline  filename = 'books.csv' data = pd.read_csv(filename, header=0, na_values=None, low_memory=False) data.head() <\/code><\/pre>\n<p>  \u0422\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u043f\u0435\u0440\u0432\u044b\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0440\u043e\u043a \u043d\u0430\u0448\u0435\u0433\u043e DataFrame.  <\/p>\n<table>\n<thead>\n<tr>\n<th><\/th>\n<th>isbn<\/th>\n<th>dmkpress.com<\/th>\n<th>rufanbook.ru<\/th>\n<th>read.ru<\/th>\n<th>setbook.ru<\/th>\n<th>moymir.ru<\/th>\n<th>boffo.ru<\/th>\n<th>my-shop.ru<\/th>\n<th>&#8230;<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<th>1<\/th>\n<td>9785994911389<\/td>\n<td>NaN<\/td>\n<td>NaN<\/td>\n<td>69<\/td>\n<td>100<\/td>\n<td>NaN<\/td>\n<td>NaN<\/td>\n<td>NaN<\/td>\n<td>&#8230;<\/td>\n<\/tr>\n<tr>\n<th>2<\/th>\n<td>9789855497791<\/td>\n<td>NaN<\/td>\n<td>NaN<\/td>\n<td>NaN<\/td>\n<td>310<\/td>\n<td>NaN<\/td>\n<td>NaN<\/td>\n<td>403<\/td>\n<td>&#8230;<\/td>\n<\/tr>\n<tr>\n<th>3<\/th>\n<td>9785942802943<\/td>\n<td>NaN<\/td>\n<td>NaN<\/td>\n<td>NaN<\/td>\n<td>NaN<\/td>\n<td>NaN<\/td>\n<td>NaN<\/td>\n<td>NaN<\/td>\n<td>&#8230;<\/td>\n<\/tr>\n<tr>\n<th>4<\/th>\n<td>9785779717533<\/td>\n<td>NaN<\/td>\n<td>NaN<\/td>\n<td>177<\/td>\n<td>160<\/td>\n<td>NaN<\/td>\n<td>NaN<\/td>\n<td>177<\/td>\n<td>&#8230;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>  \u041f\u043e\u0441\u0447\u0438\u0442\u0430\u0435\u043c \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043d\u0438\u0433 \u043a \u043a\u0430\u0436\u0434\u043e\u043c \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0435:<\/p>\n<pre><code class=\"python\">desc = data.describe() l = [] for colname in desc:     count = desc[colname][0]     l.append((count, colname))      for t in sorted(l, reverse=True):     print(&quot;{:16} {}&quot;.format(t[1], int(t[0]))) <\/code><\/pre>\n<pre> \u043c\u0430\u0433\u0430\u0437\u0438\u043d          \u043a\u043e\u043b-\u0432\u043e \u043a\u043d\u0438\u0433 ozon.ru          220962 setbook.ru       208039 my-shop.ru       203200 books.ru         181817 book-stock.ru    124308 bookvoed.ru      117494 labirint.ru      114803 read.ru          93720 spbdk.ru         43714 chaconne.ru      42993 biblion.ru       41898 eksmo.ru         40582 knigosvet.com    34645 rufanbook.ru     6071 combook.ru       4716 bookmail.ru      2356 boffo.ru         2341 moymir.ru        740 dmkpress.com     722 <\/pre>\n<p>  \u0421\u043e\u0432\u0441\u0435\u043c \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0435 \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u044b \u0441\u043c\u044b\u0441\u043b\u0430 \u0431\u0440\u0430\u0442\u044c \u043d\u0435\u0442, \u0442.\u043a. \u043f\u0435\u0440\u0435\u0441\u0435\u043a\u0430\u044e\u0449\u0438\u0445\u0441\u044f \u043a\u043d\u0438\u0433 \u0431\u0443\u0434\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u043c\u0430\u043b\u043e \u0438\u043b\u0438 \u0432\u043e\u0432\u0441\u0435 \u043d\u043e\u043b\u044c. \u0412\u044b\u0431\u0435\u0440\u0435\u043c \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u044b \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u043e\u0442 100 \u0442\u044b\u0441 \u043a\u043d\u0438\u0433 \u0438\u043b\u0438 \u0447\u0443\u0442\u044c \u043c\u0435\u043d\u044c\u0448\u0435<\/p>\n<pre><code class=\"python\"># \u041e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u0443\u0436\u043d\u044b\u0435 \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u044b stores = ['books.ru', 'labirint.ru', 'ozon.ru', 'my-shop.ru',            'read.ru', 'bookvoed.ru', 'book-stock.ru', 'setbook.ru'] data = data[stores]  # \u0423\u0434\u0430\u043b\u044f\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0435\u0441\u0442\u044c \u043f\u0443\u0441\u0442\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.  # \u0422.\u0435. \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435 \u043a\u043d\u0438\u0433\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0432\u043e \u0432\u0441\u0435\u0445 \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430\u0445. data = data.dropna(axis=0)  # \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c data.describe() <\/code><\/pre>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0441\u0432\u043e\u0434\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0442\u0430\u0431\u043b\u0438\u0446\u0435:  <\/p>\n<table border=\"1\">\n<thead>\n<tr>\n<th><\/th>\n<th>books.ru<\/th>\n<th>labirint.ru<\/th>\n<th>ozon.ru<\/th>\n<th>my-shop.ru<\/th>\n<th>read.ru<\/th>\n<th>bookvoed.ru<\/th>\n<th>book-stock.ru<\/th>\n<th>setbook.ru<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<th>count<\/th>\n<td>17834.000000<\/td>\n<td>17834.000000<\/td>\n<td>17834.000000<\/td>\n<td>17834.000000<\/td>\n<td>17834.000000<\/td>\n<td>17834.000000<\/td>\n<td>17834.000000<\/td>\n<td>17834.000000<\/td>\n<\/tr>\n<tr>\n<th>mean<\/th>\n<td>340.154312<\/td>\n<td>343.349333<\/td>\n<td>308.639677<\/td>\n<td>294.602108<\/td>\n<td>309.796400<\/td>\n<td>315.771504<\/td>\n<td>291.266794<\/td>\n<td>286.433722<\/td>\n<\/tr>\n<tr>\n<th>std<\/th>\n<td>189.347516<\/td>\n<td>235.526318<\/td>\n<td>209.594445<\/td>\n<td>206.383899<\/td>\n<td>208.093532<\/td>\n<td>208.651959<\/td>\n<td>204.553104<\/td>\n<td>191.038253<\/td>\n<\/tr>\n<tr>\n<th>min<\/th>\n<td>40.000000<\/td>\n<td>17.000000<\/td>\n<td>26.000000<\/td>\n<td>14.000000<\/td>\n<td>69.000000<\/td>\n<td>13.000000<\/td>\n<td>14.000000<\/td>\n<td>77.000000<\/td>\n<\/tr>\n<tr>\n<th>25%<\/th>\n<td>210.000000<\/td>\n<td>169.250000<\/td>\n<td>153.000000<\/td>\n<td>142.000000<\/td>\n<td>155.000000<\/td>\n<td>162.000000<\/td>\n<td>142.000000<\/td>\n<td>140.000000<\/td>\n<\/tr>\n<tr>\n<th>50%<\/th>\n<td>308.000000<\/td>\n<td>293.500000<\/td>\n<td>264.000000<\/td>\n<td>248.000000<\/td>\n<td>267.000000<\/td>\n<td>271.000000<\/td>\n<td>248.000000<\/td>\n<td>240.000000<\/td>\n<\/tr>\n<tr>\n<th>75%<\/th>\n<td>429.000000<\/td>\n<td>435.000000<\/td>\n<td>391.000000<\/td>\n<td>380.750000<\/td>\n<td>391.000000<\/td>\n<td>402.000000<\/td>\n<td>373.000000<\/td>\n<td>360.000000<\/td>\n<\/tr>\n<tr>\n<th>max<\/th>\n<td>1460.000000<\/td>\n<td>1497.000000<\/td>\n<td>1478.000000<\/td>\n<td>1474.000000<\/td>\n<td>1485.000000<\/td>\n<td>1456.000000<\/td>\n<td>1474.000000<\/td>\n<td>1490.000000<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>  \u041a\u043d\u0438\u0433, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0435\u0441\u0442\u044c \u0432\u043e \u0432\u0441\u0435\u0445 \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430\u0445, \u0443 \u043d\u0430\u0441 \u043d\u0430\u0448\u043b\u043e\u0441\u044c 17834.<br \/>  \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u044f:  <\/p>\n<ul>\n<li><b>mean<\/b> \u2014 \u0441\u0440\u0435\u0434\u043d\u0435\u0435<\/li>\n<li><b>std<\/b> \u2014 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435<\/li>\n<li><b>50%, 25% \u0438 75%<\/b> \u2014 \u043c\u0435\u0434\u0438\u0430\u043d\u044b \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e, \u043d\u0438\u0436\u043d\u0435\u0433\u043e \u0438 \u0432\u0435\u0440\u0445\u043d\u0435\u0433\u043e \u043a\u0432\u0430\u043d\u0438\u0442\u0438\u043b\u0435\u0439<\/li>\n<\/ul>\n<p>  \u041f\u043e \u044d\u0442\u0438\u043c \u0434\u0430\u043d\u043d\u044b\u043c \u0443\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0432\u044b\u0432\u043e\u0434\u044b. \u0415\u0441\u043b\u0438 \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043f\u043e \u043c\u0435\u0434\u0438\u0430\u043d\u0435, \u0442\u043e \u043b\u0443\u0447\u0448\u0443\u044e \u0446\u0435\u043d\u0443 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 setbook.ru \u0441 240, \u0437\u0430\u0442\u0435\u043c \u0438\u0434\u0443\u0442 my-shop.ru \u0438 book-stock.ru \u0441 \u043c\u0435\u0434\u0438\u0430\u043d\u043e\u0439 248.<\/p>\n<h2>\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0446\u0435\u043d<\/h2>\n<p>  \u041f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u0433\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0432 \u043a\u0430\u043a\u043e\u043c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u043a\u043d\u0438\u0433. \u042d\u0442\u0430 \u0433\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u043f\u043e\u0441\u0442\u0430, \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0434\u0435\u0441\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u0441\u0442\u043e\u043b\u0431\u0438\u043a\u043e\u0432.<\/p>\n<pre><code class=\"python\">plt.figure(figsize=(10, 6)) plt.xlabel('\u0446\u0435\u043d\u0430 \u043a\u043d\u0438\u0433\u0438, \u0440\u0443\u0431') plt.ylabel('\u043a\u043e\u043b-\u0432\u043e, \u0448\u0442')  data3 = data[stores] x = data3.as_matrix().reshape(data3.size)  # \u0441\u043a\u043b\u0435\u0438\u0432\u0430\u0435\u043c \u0441\u0442\u043e\u043b\u0431\u0446\u044b \u0441 \u0446\u0435\u043d\u0430\u043c\u0438 \u0432 \u043e\u0434\u043d\u043e\u043c\u0435\u0440\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 count, bins, ignored = plt.hist(x, bins=30) <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/11d\/dae\/a90\/11ddaea9051e483284528e836cb49420.png\"\/><\/p>\n<p>  \u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0434\u0432\u0430 \u043f\u0438\u043a\u0430, \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0432 75 \u0440\u0443\u0431 \u0438 215 \u0440\u0443\u0431.<\/p>\n<p>  \u0410 \u0438\u0441\u043a\u0430\u0436\u0435\u043d\u043d\u044b\u0439 \u0432\u0438\u0434 \u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u043f\u0430\u0440\u044b \u0441\u0442\u0440\u043e\u043a \u0432\u043d\u0430\u0447\u0430\u043b\u0435 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u043a\u0443\u0441\u043a\u0430 \u043a\u043e\u0434\u0430:  <\/p>\n<pre><code class=\"python\">plt.xkcd() # \u0438\u0441\u043a\u0430\u0436\u0435\u043d\u043d\u044b\u0439 \u0441\u0442\u0438\u043b\u044c \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f plt.style.use('ggplot') # \u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u043c \u0446\u0432\u0435\u0442\u043e\u0432\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u043a\u0438 xkcd, \u0442.\u043a. \u0446\u0432\u0435\u0442\u043e\u0432\u0430\u044f \u0441\u0445\u0435\u043c\u0430 xkcd \u0441\u0438\u043d\u044f\u044f <\/code><\/pre>\n<h2>\u041a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u044f \u0446\u0435\u043d<\/h2>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u044e \u0446\u0435\u043d \u0432 \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430\u0445:  <\/p>\n<pre><code class=\"python\">data.corr() <\/code><\/pre>\n<p>  <\/p>\n<table border=\"1\">\n<thead>\n<tr>\n<th><\/th>\n<th>books.ru<\/th>\n<th>labirint.ru<\/th>\n<th>ozon.ru<\/th>\n<th>my-shop.ru<\/th>\n<th>read.ru<\/th>\n<th>bookvoed.ru<\/th>\n<th>book-stock.ru<\/th>\n<th>setbook.ru<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<th>books.ru<\/th>\n<td>1.000000<\/td>\n<td>0.971108<\/td>\n<td>0.969906<\/td>\n<td>0.965291<\/td>\n<td>0.978453<\/td>\n<td>0.970747<\/td>\n<td>0.965809<\/td>\n<td>0.966226<\/td>\n<\/tr>\n<tr>\n<th>labirint.ru<\/th>\n<td>0.971108<\/td>\n<td>1.000000<\/td>\n<td>0.973731<\/td>\n<td>0.968637<\/td>\n<td>0.979923<\/td>\n<td>0.970600<\/td>\n<td>0.969971<\/td>\n<td>0.965970<\/td>\n<\/tr>\n<tr>\n<th>ozon.ru<\/th>\n<td>0.969906<\/td>\n<td>0.973731<\/td>\n<td>1.000000<\/td>\n<td>0.973783<\/td>\n<td>0.979620<\/td>\n<td>0.967151<\/td>\n<td>0.974792<\/td>\n<td>0.971946<\/td>\n<\/tr>\n<tr>\n<th>my-shop.ru<\/th>\n<td>0.965291<\/td>\n<td>0.968637<\/td>\n<td>0.973783<\/td>\n<td>1.000000<\/td>\n<td>0.976491<\/td>\n<td>0.956980<\/td>\n<td>0.996946<\/td>\n<td>0.970588<\/td>\n<\/tr>\n<tr>\n<th>read.ru<\/th>\n<td>0.978453<\/td>\n<td>0.979923<\/td>\n<td>0.979620<\/td>\n<td>0.976491<\/td>\n<td>1.000000<\/td>\n<td>0.974892<\/td>\n<td>0.976164<\/td>\n<td>0.974129<\/td>\n<\/tr>\n<tr>\n<th>bookvoed.ru<\/th>\n<td>0.970747<\/td>\n<td>0.970600<\/td>\n<td>0.967151<\/td>\n<td>0.956980<\/td>\n<td>0.974892<\/td>\n<td>1.000000<\/td>\n<td>0.958787<\/td>\n<td>0.961217<\/td>\n<\/tr>\n<tr>\n<th>book-stock.ru<\/th>\n<td>0.965809<\/td>\n<td>0.969971<\/td>\n<td>0.974792<\/td>\n<td>0.996946<\/td>\n<td>0.976164<\/td>\n<td>0.958787<\/td>\n<td>1.000000<\/td>\n<td>0.972701<\/td>\n<\/tr>\n<tr>\n<th>setbook.ru<\/th>\n<td>0.966226<\/td>\n<td>0.965970<\/td>\n<td>0.971946<\/td>\n<td>0.970588<\/td>\n<td>0.974129<\/td>\n<td>0.961217<\/td>\n<td>0.972701<\/td>\n<td>1.000000<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>  \u0412\u0438\u0434\u043d\u0430 \u0445\u043e\u0440\u043e\u0448\u0430\u044f \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u0446\u0435\u043d\u0430\u043c\u0438 \u0432\u0441\u0435\u0445 \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u043e\u0432. \u0410 \u0435\u0441\u043b\u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u043f\u0430\u0440\u0443 my-shop.ru \u0438 book-stock.ru, \u0442\u043e \u0442\u0443\u0442 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u044f \u0430\u0436 0.996946, \u0442.\u0435. \u0446\u0435\u043ds \u0432 \u043d\u0438\u0445 \u043f\u043e\u0447\u0442\u0438 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0435.<\/p>\n<p>  \u041f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u0433\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0446\u0435\u043d\u044b \u043d\u0430 \u043a\u043d\u0438\u0433\u0438 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0435 \u0438 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0443 \u0440\u0430\u0441\u0441\u0435\u044f\u043d\u0438\u044f \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u043f\u0430\u0440\u044b \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u043e\u0432:<\/p>\n<pre><code class=\"python\">from pandas.tools.plotting import scatter_matrix scatter_matrix(data, alpha=0.05, figsize=(14, 14)); <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/54f\/671\/03d\/54f67103da264a57924d45382f7ee55f.png\"\/><\/p>\n<p>  \u041f\u043e \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0430\u043c \u0440\u0430\u0441\u0441\u0435\u044f\u043d\u0438\u044f \u043e\u043f\u044f\u0442\u044c \u0432\u0438\u0434\u0438\u043c \u0442\u0443 \u0436\u0435 \u043a\u0430\u0440\u0442\u0438\u043d\u0443, \u0447\u0442\u043e \u0438 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0438. \u041a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u044f \u044f\u0432\u043d\u043e \u0435\u0441\u0442\u044c, \u0435\u0435 \u0445\u043e\u0440\u043e\u0448\u043e \u0432\u0438\u0434\u043d\u043e. \u0423\u0432\u0435\u043b\u0438\u0447\u0438\u043c \u043f\u0430\u0440\u0443 \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u043e\u0432 \u0434\u043b\u044f \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0441\u0442\u0438.<\/p>\n<pre><code class=\"python\">scatter_matrix(data[['ozon.ru', 'labirint.ru']], alpha=0.05, figsize=(14, 14)); <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/205\/404\/413\/20540441355342d7ab561ad5a5c5875c.png\"\/><\/p>\n<p>  \u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u043d\u0430\u0448\u0443 \u043f\u0430\u0440\u0443 \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u043e\u0432 \u0441 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u0445\u043e\u0436\u0438\u043c\u0438 \u0446\u0435\u043d\u0430\u043c\u0438:<\/p>\n<pre><code class=\"python\">scatter_matrix(data[['my-shop.ru', 'book-stock.ru']], alpha=0.05, figsize=(14, 14)); <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/c7b\/fa7\/466\/c7bfa746649d4bfcb306191304854e48.png\"\/><\/p>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u043f\u043e\u0447\u0442\u0438 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u0440\u044f\u043c\u0430\u044f. \u041d\u043e \u0432\u0441\u0435 \u0442\u0430\u043a\u0438 \u0435\u0441\u0442\u044c \u0442\u043e\u0447\u043a\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0438\u043b\u0438\u0441\u044c \u0432\u043d\u0435 \u0435\u0435, \u0442.\u0435. \u043d\u0435 100% \u0446\u0435\u043d \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b.<\/p>\n<h2>\u0413\u0440\u0430\u0444\u0438\u043a \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u0446\u0435\u043d\u0430\u043c\u0438<\/h2>\n<p>  \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0438\u0437\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u043d\u0430\u0448\u0443 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438.  <\/p>\n<pre><code class=\"python\">plt.figure(figsize=(14, 6))  # \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u043e\u0432\u044b\u0435 \u043d\u043e\u043c\u0435\u0440\u0430 \u043f\u043e \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u043e\u0441\u0438 x = list(range(data['books.ru'].count()))  colors = ['red', 'blue', 'green', 'orange', 'yellow', 'pink', 'brown', 'purple']  for index,store in enumerate(stores):     plt.scatter(x,             data[store],             alpha=0.5,             color=colors[index],             label=store)  plt.xlabel('n') plt.ylabel('price') plt.legend(loc='best'); <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/b96\/b98\/d8e\/b96b98d8e884467599a13017cb955724.png\"\/><\/p>\n<p>  \u0414\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0430 \u043a\u0440\u0430\u0441\u0438\u0432\u0430\u044f, \u043d\u043e \u0431\u0435\u0441\u043f\u043e\u043b\u0435\u0437\u043d\u0430\u044f. \u0422\u043e\u0447\u043a\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u043a\u0440\u044b\u0432\u0430\u044e\u0442 \u0434\u0440\u0443\u0433 \u0434\u0440\u0443\u0433\u0430. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0441\u043b\u043e\u0439 \u0444\u0438\u043e\u043b\u0435\u0442\u043e\u0432\u044b\u0439, \u044f\u0432\u043d\u043e \u0437\u0430\u043a\u0440\u0430\u0441\u0438\u043b \u0432\u0441\u0435 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435.<\/p>\n<h2>\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043d\u0438\u0433 \u043f\u043e \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0446\u0435\u043d\u0435<\/h2>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0442\u0435\u043f\u0435\u0440\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043d\u0438\u0433 \u043f\u043e \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0446\u0435\u043d\u0435 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0435. \u041d\u0443\u0436\u043d\u043e \u0443\u0447\u0435\u0441\u0442\u044c, \u0447\u0442\u043e \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0446\u0435\u043d\u0430 \u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0443\u044e \u043a\u043d\u0438\u0433\u0443 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0441\u0440\u0430\u0437\u0443 \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430\u0445. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043a\u043e\u043b\u043e\u043d\u043a\u0438 \u0432\u0438\u0434\u0430 \u00abmin_ozon.ru\u00bb \u2014 \u0435\u0441\u043b\u0438 \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0435 \u043d\u0430 \u0434\u0430\u043d\u043d\u0443\u044e \u043a\u043d\u0438\u0433\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0446\u0435\u043d\u0430 \u0441\u0440\u0435\u0434\u0438 \u0432\u0441\u0435\u0445 \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u043e\u0432, \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c 1 \u0438\u043d\u0430\u0447\u0435 NaN. \u0422\u0430\u043a\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432\u044b\u0431\u0440\u0430\u043d\u044b \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u043f\u043e\u0434\u0441\u0447\u0435\u0442\u0430.<\/p>\n<pre><code class=\"python\">import random  def has_min_price(store):     def inner(row):         prices = list(row[:len(stores)])         min_price = min(prices)         store_price = prices[stores.index(store)]          return 1 if store_price == min_price else np.nan     return inner  # \u043d\u0435\u043c\u043d\u043e\u0436\u043a\u043e \u043a\u043e\u043f\u0438\u043f\u0430\u0441\u0442\u044b \u0434\u043b\u044f \u0440\u0430\u0437\u043e\u0432\u043e\u0439 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0438 \u043d\u0435 \u043f\u043e\u0432\u0440\u0435\u0434\u0438\u0442 ;) def has_max_price(store):     def inner(row):         prices = list(row[:len(stores)])         max_price = max(prices)         store_price = prices[stores.index(store)]          return 1 if store_price == max_price else np.nan     return inner      for store in stores:     data['min_' + store] = data.apply(has_min_price(store), axis=1)     data['max_' + store] = data.apply(has_max_price(store), axis=1)  HTML(data.head(10).to_html()) <\/code><\/pre>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u0442\u0430\u043a\u0430\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0430<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/5f2\/d95\/59a\/5f2d9559a27d481ea98d4c551da9145f.png\"\/><\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u044b\u0432\u0435\u0434\u0435\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043d\u0438\u0433 \u043c\u043e \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0446\u0435\u043d\u0435 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0435:<\/p>\n<pre><code class=\"python\">desc = data.describe()  def show_count(prefix):     l = []     for column_name in desc:         if prefix in column_name:             cnt = desc[column_name][0]             l.append((cnt, column_name))     for t in sorted(l, reverse=True):         print(t[1].replace(prefix, ''), int(t[0]))  print('\u0412\u0441\u0435\u0433\u043e \u043a\u043d\u0438\u0433:', desc[stores[0]][0]) print() print('\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043d\u0438\u0433 \u043f\u043e \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0446\u0435\u043d\u0435:') show_count('min_') print() print('\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043d\u0438\u0433 \u043f\u043e \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0446\u0435\u043d\u0435:') show_count('max_') <\/code><\/pre>\n<pre> \u0412\u0441\u0435\u0433\u043e \u043a\u043d\u0438\u0433: 17834.0  \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043d\u0438\u0433 \u043f\u043e \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0446\u0435\u043d\u0435: book-stock.ru   8411 my-shop.ru      7735 setbook.ru      6359 bookvoed.ru     1884 ozon.ru         1015 read.ru         914 books.ru        379 labirint.ru     335  \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043d\u0438\u0433 \u043f\u043e \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0446\u0435\u043d\u0435: books.ru        10323 labirint.ru     4383 bookvoed.ru     1143 setbook.ru      1052 ozon.ru         676 book-stock.ru   372 my-shop.ru      351 read.ru         265 <\/pre>\n<p>  \u041f\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443 \u043a\u043d\u0438\u0433 \u0441 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0446\u0435\u043d\u043e\u0439 \u043b\u0438\u0434\u0438\u0440\u0443\u044e\u0442 book-stock.ru, my-shop.ru, setbook.ru. \u0427\u0442\u043e \u043f\u043e\u0445\u043e\u0436\u0435 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u043c\u044b \u0443\u0436\u0435 \u0432\u0438\u0434\u0435\u043b\u0438 \u0438\u0437 \u043c\u0435\u0434\u0438\u0430\u043d, \u043d\u043e \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u043f\u043e\u043c\u0435\u043d\u044f\u043b\u0441\u044f.<\/p>\n<p>  \u0418 \u043f\u043e \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u0446\u0435\u043d\u0430\u043c \u043b\u0438\u0434\u0440\u0438\u0443\u044e\u0442 books.ru, labirint.ru \u0438 bookvoed.ru.<\/p>\n<h2>\u041e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u043f\u043e \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0446\u0435\u043d\u0435<\/h2>\n<p>  \u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0442\u043e\u0447\u043a\u0438 \u043d\u0435 \u0437\u0430\u0442\u0438\u0440\u0430\u043b\u0438 \u0434\u0440\u0443\u0433 \u0434\u0440\u0443\u0433\u0430, \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u043c\u0441\u044f \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u043a\u043d\u0438\u0433.<\/p>\n<pre><code class=\"python\">def get_min(row):     prices = list(row[:len(stores)])     return min(prices)      # \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0442\u043e\u043b\u0431\u0435\u0446 \u0441 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0446\u0435\u043d\u043e\u0439 \u0434\u043b\u044f \u043a\u043d\u0438\u0433\u0438 data['min'] = data.apply(get_min, axis=1)  # \u0421\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u044d\u0442\u043e\u043c\u0443 \u0441\u0442\u043e\u043b\u0431\u0446\u0443, # \u0412\u043e\u0437\u044c\u043c\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u0430\u0436\u0434\u0443\u044e 300-\u044e \u043a\u043d\u0438\u0433\u0443, \u0438\u043d\u0430\u0447\u0435 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0442\u043e\u0447\u0435\u043a \u0443 \u043d\u0430\u0441 \u043d\u0430 \u0433\u0440\u0430\u0444\u0438\u043a \u043e\u043f\u044f\u0442\u044c \u043d\u0435 \u0432\u043b\u0435\u0437\u0443\u0442 data2 = data.sort_values(['min'])[::300]  # \u0420\u0438\u0441\u0443\u0435\u043c \u0433\u0440\u0430\u0444\u0438\u043a\u0438 plt.figure(figsize=(14, 10))  colors = ['red', 'blue', 'green', 'orange', 'yellow', 'pink', 'brown', 'purple']  for index,store in enumerate(stores):     plt.scatter(x[:len(data2)],             data2[store],             alpha=1.0,             color=colors[index],             label=store)  plt.xlabel('n') plt.ylabel('price') plt.legend(loc='upper left'); <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/c1e\/4b0\/49b\/c1e4b049b6b94a88bc1b4262cd2a61fe.png\"\/><\/p>\n<p>  \u041d\u0430 \u0433\u0440\u0430\u0444\u0438\u043a\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u044b \u0446\u0435\u043d\u0430 \u043d\u0430 \u043f\u043e\u0447\u0442\u0438 60 \u043a\u043d\u0438\u0433, \u0432\u0437\u044f\u0442\u044b\u0445 \u0438\u0437 \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u0430 \u043d\u0430 \u0440\u0430\u0432\u043d\u044b\u0445 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0430\u0445. \u0412\u0438\u0434\u043d\u043e \u0447\u0442\u043e \u0446\u0435\u043d\u044b \u0432 \u0441\u0440\u0435\u0434\u043d\u0435\u043c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u043e\u0445\u043e\u0436\u0438. \u041e\u0434\u043d\u0430\u043a\u043e \u0435\u0441\u043b\u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0437\u0435\u043b\u0435\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443, \u0442\u043e \u0446\u0435\u043d\u0430 \u0442\u0430\u043c \u044f\u0432\u043d\u043e \u043d\u0435\u043f\u043e\u043c\u0435\u0440\u043d\u043e \u0437\u0430\u0432\u044b\u0448\u0435\u043d\u0430. \u0415\u0441\u043b\u0438 \u0431\u044b \u043c\u044b \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u043b\u0438 \u043d\u0435 60 \u0442\u043e\u0447\u0435\u043a, \u0430 \u0432\u0441\u0435 17 \u0442\u044b\u0441. \u0422\u043e \u0442\u0430\u043a\u0438\u0445 \u0432\u044b\u0431\u0440\u043e\u0441\u043e\u0432 \u0431\u044b\u043b\u043e \u0431\u044b \u044f\u0432\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0435.<\/p>\n<h2>\u0412\u044b\u0432\u043e\u0434\u044b<\/h2>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0432 \u0441\u0440\u0435\u0434\u043d\u0435\u043c \u0446\u0435\u043d\u0430 \u043d\u0430 \u043a\u043d\u0438\u0433\u0438 \u0432 \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430\u0445 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0441\u0438\u043b\u044c\u043d\u043e, \u0433\u0440\u0443\u0431\u043e \u0433\u043e\u0432\u043e\u0440\u044f \u0438\u0437 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 100-150 \u0440\u0443\u0431. \u0421 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u2014 \u044d\u0442\u043e \u043a\u0430\u043a \u0441\u0440\u0435\u0434\u043d\u044f\u044f \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430 \u043f\u043e \u0431\u043e\u043b\u044c\u043d\u0438\u0446\u0435. \u0426\u0435\u043d\u044b \u0432\u0440\u043e\u0434\u0435 \u043f\u043e\u0447\u0442\u0438 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0435, \u0430 \u0437\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0443\u044e \u043a\u043d\u0438\u0433\u0443 \u0442\u043e\u0433\u043e \u0438 \u0433\u043b\u044f\u0434\u0438 \u0441\u0434\u0435\u0440\u0443\u0442 \u0432 3 \u0440\u0430\u0437\u0430 \u0434\u043e\u0440\u043e\u0436\u0435. \u0410\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043f\u043e \u0446\u0435\u043d\u0435 \u043d\u0430 \u0442\u0443 \u043b\u0438 \u0438\u043d\u0443\u044e \u043a\u043d\u0438\u0433\u0443, \u0432\u0441\u0435\u0433\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c <a href=\"http:\/\/bookradar.org\/\">\u043d\u0430 \u0441\u0430\u0439\u0442\u0435<\/a>.<\/p>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u043c\u044b \u043d\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u043b\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438 (\u0446\u0435\u043d\u0443 \u0438 \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u043e) \u0438 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u043a\u0438\u0434\u043a\u0438.               <\/p>\n<div class=\"clear\"><\/div>\n<p> \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:\/\/habrahabr.ru\/post\/276745\/\"> https:\/\/habrahabr.ru\/post\/276745\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043d\u0430\u0439\u0442\u0438 \u0441\u0430\u043c\u044b\u0439 \u0434\u0435\u0448\u0435\u0432\u044b\u0439 \u0438 \u0441\u0430\u043c\u044b\u0439 \u0434\u043e\u0440\u043e\u0433\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u043c\u0430\u0433\u0430\u0437\u0438\u043d \u043a\u043d\u0438\u0433.<br \/>  \u0421\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c \u0431\u0443\u0434\u0435\u043c \u0431\u0443\u043c\u0430\u0436\u043d\u044b\u0435 \u043a\u043d\u0438\u0433\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0435\u0441\u0442\u044c \u0432 \u043d\u0430\u043b\u0438\u0447\u0438\u0438. \u0412 \u0440\u0430\u0437\u043d\u044b\u0445 \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430\u0445 \u043e\u0447\u0435\u043d\u044c \u0440\u0430\u0437\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043d\u0438\u0433. \u0413\u0434\u0435-\u0442\u043e \u043c\u0435\u043d\u0435\u0435 1000, \u0430 \u0433\u0434\u0435-\u0442\u043e \u0431\u043e\u043b\u0435\u0435 200 000 \u043a\u043d\u0438\u0433. <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/1e8\/ecc\/fee\/1e8eccfeeb0b4f9489e3aba762949dc1.png\"\/><\/p>\n<p>  \u041a\u0441\u0442\u0430\u0442\u0438, \u0433\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0430\u044f. \u041a\u0430\u043a \u043e\u043d\u0430 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u0437\u0430\u043a\u043e\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c.  <\/p>\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-273859","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/273859","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=273859"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/273859\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=273859"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=273859"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=273859"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}