{"id":344104,"date":"2023-01-18T03:00:25","date_gmt":"2023-01-18T03:00:25","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=344104"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=344104","title":{"rendered":"<span>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0431\u0435\u0434\u0438\u0442\u0435\u043b\u0435\u0439 \u043c\u0430\u0442\u0447\u0435\u0439 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0433\u043e \u0447\u0435\u043c\u043f\u0438\u043e\u043d\u0430\u0442\u0430 \u041a\u0425\u041b \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e ML<\/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<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/568\/2bd\/70e\/5682bd70ed0c86cb9695acb5a1c86a3a.jpg\" width=\"1396\" height=\"928\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/568\/2bd\/70e\/5682bd70ed0c86cb9695acb5a1c86a3a.jpg\" data-blurred=\"true\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442! <\/p>\n<p>\u0414\u0430\u0432\u043d\u043e \u0445\u043e\u0442\u0435\u043b \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u044b \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0441\u043f\u043e\u0440\u0442\u0438\u0432\u043d\u043e\u0439 \u0438\u043d\u0434\u0443\u0441\u0442\u0440\u0438\u0438. \u0414\u0430\u043d\u043d\u043e\u0435 \u0436\u0435\u043b\u0430\u043d\u0438\u0435 \u043e\u0431\u0443\u0441\u043b\u043e\u0432\u043b\u0435\u043d\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u043c \u043a \u0441\u0430\u043c\u043e\u043c\u0443 \u0441\u043f\u043e\u0440\u0442\u0443 \u0438 \u043a \u0442\u043e\u043c\u0443, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0445\u043e\u0440\u043e\u0448\u043e \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u044b \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0441\u043f\u043e\u0440\u0442\u0438\u0432\u043d\u044b\u0445 \u0441\u043e\u0431\u044b\u0442\u0438\u0439. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0437\u0430\u0434\u0443\u043c\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043b\u0430\u0441\u044c \u043d\u0430 \u0432\u044b\u043f\u0443\u0441\u043a\u043d\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043a\u0443\u0440\u0441\u0430 &#171;Machine Learning. Professional&#187; \u0432 Otus. \u041c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0432\u0437\u044f\u0442\u044c \u043b\u044e\u0431\u0443\u044e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0449\u0443\u044e \u0442\u0435\u043c\u0443, \u0438 \u044f \u0432\u044b\u0431\u0440\u0430\u043b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0431\u0435\u0434\u0438\u0442\u0435\u043b\u0435\u0439 \u043c\u0430\u0442\u0447\u0435\u0439 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0433\u043e \u0447\u0435\u043c\u043f\u0438\u043e\u043d\u0430\u0442\u0430 \u041a\u0425\u041b. \u0422\u0430\u043a \u043a\u0430\u043a \u043a\u0443\u0440\u0441 \u0431\u044b\u043b \u043f\u043e ML, \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0431\u0435\u0437 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439. \u0414\u0430\u0432 \u0432\u043e\u043b\u044e \u0441\u0432\u043e\u0435\u043c\u0443 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u0442\u043e\u0440\u0441\u043a\u043e\u043c\u0443 \u043d\u0430\u0447\u0430\u043b\u0443, \u044f \u043f\u0440\u0438\u043d\u044f\u043b\u0441\u044f \u0437\u0430 \u0434\u0435\u043b\u043e.<\/p>\n<h3>\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/h3>\n<p>\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043f\u0430\u0440\u0441\u0438\u043b\u0438\u0441\u044c \u0441 \u0441\u0430\u0439\u0442\u0430 khl.ru. \u00a0\u0412 \u0440\u0430\u0441\u0447\u0451\u0442 \u0431\u0440\u0430\u043b\u0430\u0441\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043f\u043e 4 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u043c \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u044b\u043c \u0441\u0435\u0437\u043e\u043d\u0430\u043c \u2013 2018\/2019, 2019\/2020, 2020\/2021 \u0438 2021\/2022.<\/p>\n<p>\u041f\u0430\u0440\u0441\u0438\u043d\u0433 \u0441\u043e\u0441\u0442\u043e\u044f\u043b \u0438\u0437 \u0434\u0432\u0443\u0445 \u0447\u0430\u0441\u0442\u0435\u0439: <\/p>\n<ol>\n<li>\n<p>\u0441\u0431\u043e\u0440 \u0441\u0441\u044b\u043b\u043e\u043a \u043d\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 (\u0440\u0435\u0437\u044e\u043c\u0435, \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b, \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u0443\u044e \u0442\u0440\u0430\u043d\u0441\u043b\u044f\u0446\u0438\u044e \u0438 \u0432\u0438\u0434\u0435\u043e \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u043c\u043e\u043c\u0435\u043d\u0442\u043e\u0432) \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u043c\u0430\u0442\u0447\u0443;<\/p>\n<pre><code class=\"python\"># \u0441\u0441\u044b\u043b\u043a\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u0441 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0441\u0435\u0437\u043e\u043d\u0443 page_links = ['https:\/\/www.khl.ru\/calendar\/1097\/00\/', 'https:\/\/www.khl.ru\/calendar\/1045\/00\/', 'https:\/\/www.khl.ru\/calendar\/851\/00\/', 'https:\/\/www.khl.ru\/calendar\/671\/00\/']  section_names = [] for link in page_links:      response = requests.get(link, headers={'User-Agent': UserAgent().chrome})     soup = BeautifulSoup(response.content, 'html.parser')     sections = soup.findAll('a', attrs={'class':'card-game__hover-link_small'})      for i in sections:         section_names.append(i.attrs['href'])  # \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0441\u0441\u044b\u043b\u043a\u0438 \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u0430 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u043c\u0430\u0442\u0447\u0435\u0439 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043a \u043d\u0438\u043c \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f links = ['https:\/\/khl.ru' + element for element in section_names if 'protocol' in element] <\/code><\/pre>\n<\/li>\n<li>\n<p>\u043f\u0430\u0440\u0441\u0438\u043d\u0433 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0449\u0435\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0430\u043c \u043d\u0430 \u0440\u0435\u0437\u044e\u043c\u0435 \u0438 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u044b \u043c\u0430\u0442\u0447\u0435\u0439.<\/p>\n<\/li>\n<\/ol>\n<pre><code class=\"python\"># \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0432\u0435\u0431-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 def connect(link):     response = requests.get(link, headers={'User-Agent': UserAgent().chrome})     if not response.ok:         return response.status_code     soup = BeautifulSoup(response.content, 'html.parser')      return soup  # \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043e\u0447\u0438\u0441\u0442\u043a\u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u0432\u0435\u0431-\u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u043e\u0442 \u043f\u0443\u0441\u0442\u044b\u0445 \u0441\u0442\u0440\u043e\u043a \u0438 \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u0432 def stats_cleaner(data):      data = [x.strip('\\n').strip(' ') for x in data]      return data  all_stats, matches_missing = [], []  for link in tqdm_notebook(links):      match_stats = []      # \u0447\u0430\u0441\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u043c\u0430\u0442\u0447\u0430 \u0432 \u0435\u0433\u043e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0435     soup_protocol = connect(link)      # \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0443\u044e \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u043c\u0430\u0442\u0447\u0435\u0439 \u0438\u0437 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430     statistics_protocol = soup_protocol.findAll('div', attrs={'class':'fineTable-totalTable d-none_768'})      # \u0447\u0430\u0441\u0442\u044c \u043c\u0430\u0442\u0447\u0435\u0439 \u043d\u0435 \u0438\u0433\u0440\u0430\u043b\u0430\u0441\u044c, \u043d\u043e \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u043f\u0443\u0441\u0442\u044b\u0435 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u044b \u0435\u0441\u0442\u044c - \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u043d\u0435 \u043f\u0443\u0441\u0442\u044b\u0435 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u044b     if statistics_protocol != []:          goals = soup_protocol.findAll('p', attrs={'class':'preview-frame__center-score roboto-condensed roboto-bold color-white title-xl'})[0].contents          # \u0447\u0430\u0441\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u043c\u0430\u0442\u0447\u0430 \u0432 \u0435\u0433\u043e \u0440\u0435\u0437\u044e\u043c\u0435         soup_resume = connect(link.replace('protocol', 'resume'))          # \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0443\u044e \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u043c\u0430\u0442\u0447\u0435\u0439 \u0438\u0437 \u0440\u0435\u0437\u044e\u043c\u0435         statistics_resume = soup_resume.findAll('p', attrs={'class':'roboto-condensed'})[1:21]         # \u043d\u043e\u043c\u0435\u0440 \u043c\u0430\u0442\u0447\u0430 \u0434\u043b\u044f \u0435\u0433\u043e \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438         match_number_resume = soup_resume.findAll('h2', attrs={'class':'roboto-condensed roboto-bold title-md color-dark title-btns__title'})          # \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u0434\u0430\u0442\u044b \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043c\u0430\u0442\u0447\u0435\u0439         soup_preview = connect(link.replace('protocol', 'preview'))         date_preview = soup_preview.findAll('div', attrs={'class':'card-infos__item-info'})          # \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u0434\u0430\u0442\u0443, \u0432\u0440\u0435\u043c\u044f \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0438 \u043d\u043e\u043c\u0435\u0440 \u043c\u0430\u0442\u0447\u0430          try:             match_stats.append(stats_cleaner(date_preview[0].contents[1].contents)[0])         except IndexError:              match_stats.append(np.NaN)          match_stats.append(match_number_resume[0].contents[0].split('\u2116')[1].replace(' ', ''))         # \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u043e\u0441\u043d\u043e\u0432\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e         for stat in statistics_resume:             clean_stat = stats_cleaner(stat.contents)             if clean_stat != [''] and clean_stat != ['n\/a']:                 match_stats.append(clean_stat[0])             else: pass          # \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e         if len(statistics_protocol[len(statistics_protocol)-2].contents) == 11 and '\u0412\u0441\u0435\u0433\u043e' in str(statistics_protocol[1].contents[9].contents[7].contents[1]):                      for stat in statistics_protocol[1].contents[9].contents:                 if stat != '\\n':                     clean_stat = stats_cleaner(stat.contents[1].contents)                      match_stats.append(clean_stat[0])                 else: pass          elif len(statistics_protocol[len(statistics_protocol)-2].contents) == 11 and '\u043e\u0432\u0435\u0440\u0442\u0430\u0439\u043c' in str(statistics_protocol[1].contents[9].contents[7].contents[1]):                      for stat in statistics_protocol[2].contents[9].contents:                 if stat != '\\n':                     clean_stat = stats_cleaner(stat.contents[1].contents)                      match_stats.append(clean_stat[0])                 else: pass          elif len(statistics_protocol) == 3 and len(statistics_protocol[len(statistics_protocol)-2].contents) == 13:              for stat in statistics_protocol[1].contents[11].contents:                 if stat != '\\n':                     clean_stat = stats_cleaner(stat.contents[1].contents)                      match_stats.append(clean_stat[0])                 else: pass          else:             for stat in statistics_protocol[2].contents[11].contents:                 if stat != '\\n':                     clean_stat = stats_cleaner(stat.contents[1].contents)                      match_stats.append(clean_stat[0])                 else: pass                  # \u0434\u043b\u044f \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043e\u0432\u0435\u0440\u0442\u0430\u0439\u043c\u043e\u0432         if len(statistics_protocol[len(statistics_protocol)-2].contents) == 11 and ('\u043e\u0432\u0435\u0440\u0442\u0430\u0439\u043c' not in statistics_protocol[0].contents[9].contents[7].contents[1].contents[0].replace(' ', '').replace('\\n', '')):             match_stats.append('main_time')         else: match_stats.append('add_time')          # \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043a\u043e\u043b-\u0432\u0435 \u0437\u0430\u0431\u0440\u043e\u0448\u0435\u043d\u043d\u044b\u0445 \u0448\u0430\u0439\u0431 \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0431\u0443\u043b\u043b\u0438\u0442\u043e\u0432         if goals[0] != '\\n':             try:                 goal_h = goals[0].replace(' ', '').replace('\\n', '')             except TypeError:                 goal_h = goals[0].contents[0]              try:                 goal_a = goals[3].replace(' ', '').replace('\\n', '')             except IndexError:                 pass             except TypeError:                 goal_a = goals[3].contents[0]          else:             goal_h = goals[1].contents[0]             goal_a = goals[4].replace(' ', '').replace('\\n', '').replace('\u0411', '').replace('OT', '')          match_stats.append(goal_h)         match_stats.append(goal_a)          # \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043e \u043f\u0440\u043e\u0439\u0434\u0435\u043d\u043d\u043e\u0439 \u0434\u0438\u0441\u0442\u0430\u043d\u0446\u0438\u0438 \u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432\u043b\u0430\u0434\u0435\u043d\u0438\u044f \u0448\u0430\u0439\u0431\u043e\u0439 (\u0435\u0441\u0442\u044c \u043d\u0435 \u0432\u043e \u0432\u0441\u0435\u0445 \u043c\u0430\u0442\u0447\u0430\u0445, \u0443\u0434\u0430\u043b\u044f\u0435\u0442\u0441\u044f)          if len(match_stats) == 32:             del match_stats[15:19]         else: pass          all_stats.append(match_stats)      else: matches_missing.append(link)  time.sleep(0.5) <\/code><\/pre>\n<p>\u0417\u0430 4 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u0441\u0435\u0437\u043e\u043d\u0430 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0433\u043e \u0447\u0435\u043c\u043f\u0438\u043e\u043d\u0430\u0442\u0430 \u041a\u0425\u041b \u0431\u044b\u043b\u043e \u0441\u044b\u0433\u0440\u0430\u043d\u043e 2789 \u043c\u0430\u0442\u0447\u0435\u0439.<\/p>\n<p>\u0418\u0437 \u0441\u043f\u0430\u0440\u0441\u0435\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d \u0434\u0430\u0442\u0430\u0441\u0435\u0442, \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043d\u0438\u0436\u0435.<\/p>\n<pre><code class=\"python\">data = pd.DataFrame(all_stats, columns=['date', 'match', 'team_h', 'score_h', 'ppp_h', 'ppp_a', 'ppk_h', 'ppk_a', 'numa_h', 'numa_a', 'wt_h', 'wt_a', 'pt_h', 'pt_a', 'sog_h', 'sog_a', 'team_a', 'score_a', 'bs_h', 'pm_h', 'at_h', 'tot', 'bs_a', 'pm_a', 'at_a', 'end', 'final_score_h', 'final_score_a'])  # \u0441\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u043f\u043e \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u043d\u043e\u0441\u0442\u0438 \u043a \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c data_sorted = data.iloc[:, [0,1,2,16,3,17,4,6,8,10,12,14,18,19,20,5,7,9,11,13,15,22,23,24,25,26,27,21]] <\/code><\/pre>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"50\" width=\"50\">\n<p align=\"center\">\n<\/td>\n<td data-colwidth=\"154\" width=\"154\">\n<p align=\"center\"><strong>date<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"70\" width=\"70\">\n<p align=\"center\"><strong>match<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"125\" width=\"125\">\n<p align=\"center\"><strong>team_h<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"90\" width=\"90\">\n<p align=\"center\"><strong>score_h<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"69\" width=\"69\">\n<p align=\"center\"><strong>ppp_h<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"72\" width=\"72\">\n<p align=\"center\"><strong>ppp_a<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"73\" width=\"73\">\n<p align=\"center\"><strong>ppk_h<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"86\" width=\"86\">\n<p align=\"center\"><strong>ppk_a<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"92\" width=\"92\">\n<p align=\"center\"><strong>numa_h<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"85\" width=\"85\">\n<p align=\"center\"><strong>numa_a<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"82\" width=\"82\">\n<p align=\"center\"><strong>wt_h<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"60\" width=\"60\">\n<p align=\"center\"><strong>wt_a<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"62\" width=\"62\">\n<p align=\"center\"><strong>pt_h<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"61\" width=\"61\">\n<p align=\"center\"><strong>pt_a<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"81\" width=\"81\">\n<p align=\"center\"><strong>sog_h<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"72\" width=\"72\">\n<p align=\"center\"><strong>sog_a<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"114\" width=\"114\">\n<p align=\"center\"><strong>team_a<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"80\" width=\"80\">\n<p align=\"center\"><strong>score_a<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"62\" width=\"62\">\n<p align=\"center\"><strong>bs_h<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"69\" width=\"69\">\n<p align=\"center\"><strong>pm_h<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"72\" width=\"72\">\n<p align=\"center\"><strong>at_h<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"70\" width=\"70\">\n<p align=\"center\"><strong>tot<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"57\" width=\"57\">\n<p align=\"center\"><strong>bs_a<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"66\" width=\"66\">\n<p align=\"center\"><strong>pm_a<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"72\" width=\"72\">\n<p align=\"center\"><strong>at_a<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"99\" width=\"99\">\n<p align=\"center\"><strong>end<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"118\" width=\"118\">\n<p align=\"center\"><strong>final_score_h<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"125\" width=\"125\">\n<p align=\"center\"><strong>final_score_a<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"50\" width=\"50\">\n<p align=\"center\"><strong>0<\/strong> <\/p>\n<\/td>\n<td data-colwidth=\"154\" width=\"154\">\n<p align=\"center\">14.01.2022 12:30<\/p>\n<\/td>\n<td data-colwidth=\"70\" width=\"70\">\n<p align=\"center\">589<\/p>\n<\/td>\n<td data-colwidth=\"125\" width=\"125\">\n<p align=\"center\">\u0410\u0434\u043c\u0438\u0440\u0430\u043b<\/p>\n<\/td>\n<td data-colwidth=\"90\" width=\"90\">\n<p align=\"center\">3<\/p>\n<\/td>\n<td data-colwidth=\"69\" width=\"69\">\n<p align=\"center\">1<\/p>\n<\/td>\n<td data-colwidth=\"72\" width=\"72\">\n<p align=\"center\">1<\/p>\n<\/td>\n<td data-colwidth=\"73\" width=\"73\">\n<p align=\"center\">0<\/p>\n<\/td>\n<td data-colwidth=\"86\" width=\"86\">\n<p align=\"center\">0<\/p>\n<\/td>\n<td data-colwidth=\"92\" width=\"92\">\n<p align=\"center\">4<\/p>\n<\/td>\n<td data-colwidth=\"85\" width=\"85\">\n<p align=\"center\">5<\/p>\n<\/td>\n<td data-colwidth=\"82\" width=\"82\">\n<p align=\"center\">29<\/p>\n<\/td>\n<td data-colwidth=\"60\" width=\"60\">\n<p align=\"center\">29<\/p>\n<\/td>\n<td data-colwidth=\"62\" width=\"62\">\n<p align=\"center\">10<\/p>\n<\/td>\n<td data-colwidth=\"61\" width=\"61\">\n<p align=\"center\">8<\/p>\n<\/td>\n<td data-colwidth=\"81\" width=\"81\">\n<p align=\"center\">16<\/p>\n<\/td>\n<td data-colwidth=\"72\" width=\"72\">\n<p align=\"center\">32<\/p>\n<\/td>\n<td data-colwidth=\"114\" width=\"114\">\n<p align=\"center\">\u0421\u0438\u0431\u0438\u0440\u044c<\/p>\n<\/td>\n<td data-colwidth=\"80\" width=\"80\">\n<p align=\"center\">2<\/p>\n<\/td>\n<td data-colwidth=\"62\" width=\"62\">\n<p align=\"center\">29<\/p>\n<\/td>\n<td data-colwidth=\"69\" width=\"69\">\n<p align=\"center\">7<\/p>\n<\/td>\n<td data-colwidth=\"72\" width=\"72\">\n<p align=\"center\">10:35<\/p>\n<\/td>\n<td data-colwidth=\"70\" width=\"70\">\n<p align=\"center\">\u0412\u0441\u0435\u0433\u043e<\/p>\n<\/td>\n<td data-colwidth=\"57\" width=\"57\">\n<p align=\"center\">10<\/p>\n<\/td>\n<td data-colwidth=\"66\" width=\"66\">\n<p align=\"center\">16<\/p>\n<\/td>\n<td data-colwidth=\"72\" width=\"72\">\n<p align=\"center\">15:06<\/p>\n<\/td>\n<td data-colwidth=\"99\" width=\"99\">\n<p align=\"center\">main_time<\/p>\n<\/td>\n<td data-colwidth=\"118\" width=\"118\">\n<p align=\"center\">3<\/p>\n<\/td>\n<td data-colwidth=\"125\" width=\"125\">\n<p align=\"center\">2<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"50\" width=\"50\">\n<p align=\"center\"><strong>1<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"154\" width=\"154\">\n<p align=\"center\">13.01.2022 17:00<\/p>\n<\/td>\n<td data-colwidth=\"70\" width=\"70\">\n<p align=\"center\">582<\/p>\n<\/td>\n<td data-colwidth=\"125\" width=\"125\">\n<p align=\"center\">\u0410\u0432\u0442\u043e\u043c\u043e\u0431\u0438\u043b\u0438\u0441\u0442<\/p>\n<\/td>\n<td data-colwidth=\"90\" width=\"90\">\n<p align=\"center\">5<\/p>\n<\/td>\n<td data-colwidth=\"69\" width=\"69\">\n<p align=\"center\">2<\/p>\n<\/td>\n<td data-colwidth=\"72\" width=\"72\">\n<p align=\"center\">0<\/p>\n<\/td>\n<td data-colwidth=\"73\" width=\"73\">\n<p align=\"center\">0<\/p>\n<\/td>\n<td data-colwidth=\"86\" width=\"86\">\n<p align=\"center\">0<\/p>\n<\/td>\n<td data-colwidth=\"92\" width=\"92\">\n<p align=\"center\">5<\/p>\n<\/td>\n<td data-colwidth=\"85\" width=\"85\">\n<p align=\"center\">4<\/p>\n<\/td>\n<td data-colwidth=\"82\" width=\"82\">\n<p align=\"center\">37<\/p>\n<\/td>\n<td data-colwidth=\"60\" width=\"60\">\n<p align=\"center\">20<\/p>\n<\/td>\n<td data-colwidth=\"62\" width=\"62\">\n<p align=\"center\">8<\/p>\n<\/td>\n<td data-colwidth=\"61\" width=\"61\">\n<p align=\"center\">10<\/p>\n<\/td>\n<td data-colwidth=\"81\" width=\"81\">\n<p align=\"center\">40<\/p>\n<\/td>\n<td data-colwidth=\"72\" width=\"72\">\n<p align=\"center\">33<\/p>\n<\/td>\n<td data-colwidth=\"114\" width=\"114\">\n<p align=\"center\">\u0421\u0435\u0432\u0435\u0440\u0441\u0442\u0430\u043b\u044c<\/p>\n<\/td>\n<td data-colwidth=\"80\" width=\"80\">\n<p align=\"center\">2<\/p>\n<\/td>\n<td data-colwidth=\"62\" width=\"62\">\n<p align=\"center\">12<\/p>\n<\/td>\n<td data-colwidth=\"69\" width=\"69\">\n<p align=\"center\">15<\/p>\n<\/td>\n<td data-colwidth=\"72\" width=\"72\">\n<p align=\"center\">16:34<\/p>\n<\/td>\n<td data-colwidth=\"70\" width=\"70\">\n<p align=\"center\">\u0412\u0441\u0435\u0433\u043e<\/p>\n<\/td>\n<td data-colwidth=\"57\" width=\"57\">\n<p align=\"center\">16<\/p>\n<\/td>\n<td data-colwidth=\"66\" width=\"66\">\n<p align=\"center\">5<\/p>\n<\/td>\n<td data-colwidth=\"72\" width=\"72\">\n<p align=\"center\">14:13<\/p>\n<\/td>\n<td data-colwidth=\"99\" width=\"99\">\n<p align=\"center\">main_time<\/p>\n<\/td>\n<td data-colwidth=\"118\" width=\"118\">\n<p align=\"center\">5<\/p>\n<\/td>\n<td data-colwidth=\"125\" width=\"125\">\n<p align=\"center\">2<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"50\" width=\"50\">\n<p align=\"center\"><strong>2<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"154\" width=\"154\">\n<p align=\"center\">13.01.2022 19:30<\/p>\n<\/td>\n<td data-colwidth=\"70\" width=\"70\">\n<p align=\"center\">588<\/p>\n<\/td>\n<td data-colwidth=\"125\" width=\"125\">\n<p align=\"center\">\u0421\u041a\u0410<\/p>\n<\/td>\n<td data-colwidth=\"90\" width=\"90\">\n<p align=\"center\">2<\/p>\n<\/td>\n<td data-colwidth=\"69\" width=\"69\">\n<p align=\"center\">0<\/p>\n<\/td>\n<td data-colwidth=\"72\" width=\"72\">\n<p align=\"center\">0<\/p>\n<\/td>\n<td data-colwidth=\"73\" width=\"73\">\n<p align=\"center\">0<\/p>\n<\/td>\n<td data-colwidth=\"86\" width=\"86\">\n<p align=\"center\">0<\/p>\n<\/td>\n<td data-colwidth=\"92\" width=\"92\">\n<p align=\"center\">4<\/p>\n<\/td>\n<td data-colwidth=\"85\" width=\"85\">\n<p align=\"center\">2<\/p>\n<\/td>\n<td data-colwidth=\"82\" width=\"82\">\n<p align=\"center\">31<\/p>\n<\/td>\n<td data-colwidth=\"60\" width=\"60\">\n<p align=\"center\">19<\/p>\n<\/td>\n<td data-colwidth=\"62\" width=\"62\">\n<p align=\"center\">4<\/p>\n<\/td>\n<td data-colwidth=\"61\" width=\"61\">\n<p align=\"center\">8<\/p>\n<\/td>\n<td data-colwidth=\"81\" width=\"81\">\n<p align=\"center\">33<\/p>\n<\/td>\n<td data-colwidth=\"72\" width=\"72\">\n<p align=\"center\">21<\/p>\n<\/td>\n<td data-colwidth=\"114\" width=\"114\">\n<p align=\"center\">\u0425\u041a \u0421\u043e\u0447\u0438<\/p>\n<\/td>\n<td data-colwidth=\"80\" width=\"80\">\n<p align=\"center\">1<\/p>\n<\/td>\n<td data-colwidth=\"62\" width=\"62\">\n<p align=\"center\">10<\/p>\n<\/td>\n<td data-colwidth=\"69\" width=\"69\">\n<p align=\"center\">6<\/p>\n<\/td>\n<td data-colwidth=\"72\" width=\"72\">\n<p align=\"center\">21:07<\/p>\n<\/td>\n<td data-colwidth=\"70\" width=\"70\">\n<p align=\"center\">\u0412\u0441\u0435\u0433\u043e<\/p>\n<\/td>\n<td data-colwidth=\"57\" width=\"57\">\n<p align=\"center\">22<\/p>\n<\/td>\n<td data-colwidth=\"66\" width=\"66\">\n<p align=\"center\">10<\/p>\n<\/td>\n<td data-colwidth=\"72\" width=\"72\">\n<p align=\"center\">09:13<\/p>\n<\/td>\n<td data-colwidth=\"99\" width=\"99\">\n<p align=\"center\">main_time<\/p>\n<\/td>\n<td data-colwidth=\"118\" width=\"118\">\n<p align=\"center\">2<\/p>\n<\/td>\n<td data-colwidth=\"125\" width=\"125\">\n<p align=\"center\">1<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"50\" width=\"50\">\n<p align=\"center\"><strong>3<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"154\" width=\"154\">\n<p align=\"center\">12.01.2022 12:30<\/p>\n<\/td>\n<td data-colwidth=\"70\" width=\"70\">\n<p align=\"center\">578<\/p>\n<\/td>\n<td data-colwidth=\"125\" width=\"125\">\n<p align=\"center\">\u0410\u0434\u043c\u0438\u0440\u0430\u043b<\/p>\n<\/td>\n<td data-colwidth=\"90\" width=\"90\">\n<p align=\"center\">2<\/p>\n<\/td>\n<td data-colwidth=\"69\" width=\"69\">\n<p align=\"center\">0<\/p>\n<\/td>\n<td data-colwidth=\"72\" width=\"72\">\n<p align=\"center\">0<\/p>\n<\/td>\n<td data-colwidth=\"73\" width=\"73\">\n<p align=\"center\">0<\/p>\n<\/td>\n<td data-colwidth=\"86\" width=\"86\">\n<p align=\"center\">1<\/p>\n<\/td>\n<td data-colwidth=\"92\" width=\"92\">\n<p align=\"center\">2<\/p>\n<\/td>\n<td data-colwidth=\"85\" width=\"85\">\n<p align=\"center\">1<\/p>\n<\/td>\n<td data-colwidth=\"82\" width=\"82\">\n<p align=\"center\">24<\/p>\n<\/td>\n<td data-colwidth=\"60\" width=\"60\">\n<p align=\"center\">35<\/p>\n<\/td>\n<td data-colwidth=\"62\" width=\"62\">\n<p align=\"center\">4<\/p>\n<\/td>\n<td data-colwidth=\"61\" width=\"61\">\n<p align=\"center\">6<\/p>\n<\/td>\n<td data-colwidth=\"81\" width=\"81\">\n<p align=\"center\">30<\/p>\n<\/td>\n<td data-colwidth=\"72\" width=\"72\">\n<p align=\"center\">27<\/p>\n<\/td>\n<td data-colwidth=\"114\" width=\"114\">\n<p align=\"center\">\u0421\u0438\u0431\u0438\u0440\u044c<\/p>\n<\/td>\n<td data-colwidth=\"80\" width=\"80\">\n<p align=\"center\">1<\/p>\n<\/td>\n<td data-colwidth=\"62\" width=\"62\">\n<p align=\"center\">27<\/p>\n<\/td>\n<td data-colwidth=\"69\" width=\"69\">\n<p align=\"center\">10<\/p>\n<\/td>\n<td data-colwidth=\"72\" width=\"72\">\n<p align=\"center\">12:54<\/p>\n<\/td>\n<td data-colwidth=\"70\" width=\"70\">\n<p align=\"center\">\u0412\u0441\u0435\u0433\u043e<\/p>\n<\/td>\n<td data-colwidth=\"57\" width=\"57\">\n<p align=\"center\">22<\/p>\n<\/td>\n<td data-colwidth=\"66\" width=\"66\">\n<p align=\"center\">17<\/p>\n<\/td>\n<td data-colwidth=\"72\" width=\"72\">\n<p align=\"center\">13:11<\/p>\n<\/td>\n<td data-colwidth=\"99\" width=\"99\">\n<p align=\"center\">main_time<\/p>\n<\/td>\n<td data-colwidth=\"118\" width=\"118\">\n<p align=\"center\">2<\/p>\n<\/td>\n<td data-colwidth=\"125\" width=\"125\">\n<p align=\"center\">1<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"50\" width=\"50\">\n<p align=\"center\"><strong>4<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"154\" width=\"154\">\n<p align=\"center\">12.01.2022 19:00<\/p>\n<\/td>\n<td data-colwidth=\"70\" width=\"70\">\n<p align=\"center\">580<\/p>\n<\/td>\n<td data-colwidth=\"125\" width=\"125\">\n<p align=\"center\">\u041d\u0435\u0444\u0442\u0435\u0445\u0438\u043c\u0438\u043a<\/p>\n<\/td>\n<td data-colwidth=\"90\" width=\"90\">\n<p align=\"center\">4<\/p>\n<\/td>\n<td data-colwidth=\"69\" width=\"69\">\n<p align=\"center\">0<\/p>\n<\/td>\n<td data-colwidth=\"72\" width=\"72\">\n<p align=\"center\">0<\/p>\n<\/td>\n<td data-colwidth=\"73\" width=\"73\">\n<p align=\"center\">0<\/p>\n<\/td>\n<td data-colwidth=\"86\" width=\"86\">\n<p align=\"center\">0<\/p>\n<\/td>\n<td data-colwidth=\"92\" width=\"92\">\n<p align=\"center\">2<\/p>\n<\/td>\n<td data-colwidth=\"85\" width=\"85\">\n<p align=\"center\">1<\/p>\n<\/td>\n<td data-colwidth=\"82\" width=\"82\">\n<p align=\"center\">27<\/p>\n<\/td>\n<td data-colwidth=\"60\" width=\"60\">\n<p align=\"center\">31<\/p>\n<\/td>\n<td data-colwidth=\"62\" width=\"62\">\n<p align=\"center\">2<\/p>\n<\/td>\n<td data-colwidth=\"61\" width=\"61\">\n<p align=\"center\">4<\/p>\n<\/td>\n<td data-colwidth=\"81\" width=\"81\">\n<p align=\"center\">26<\/p>\n<\/td>\n<td data-colwidth=\"72\" width=\"72\">\n<p align=\"center\">24<\/p>\n<\/td>\n<td data-colwidth=\"114\" width=\"114\">\n<p align=\"center\">\u0422\u0440\u0430\u043a\u0442\u043e\u0440<\/p>\n<\/td>\n<td data-colwidth=\"80\" width=\"80\">\n<p align=\"center\">2<\/p>\n<\/td>\n<td data-colwidth=\"62\" width=\"62\">\n<p align=\"center\">23<\/p>\n<\/td>\n<td data-colwidth=\"69\" width=\"69\">\n<p align=\"center\">13<\/p>\n<\/td>\n<td data-colwidth=\"72\" width=\"72\">\n<p align=\"center\">10:02<\/p>\n<\/td>\n<td data-colwidth=\"70\" width=\"70\">\n<p align=\"center\">\u0412\u0441\u0435\u0433\u043e<\/p>\n<\/td>\n<td data-colwidth=\"57\" width=\"57\">\n<p align=\"center\">9<\/p>\n<\/td>\n<td data-colwidth=\"66\" width=\"66\">\n<p align=\"center\">13<\/p>\n<\/td>\n<td data-colwidth=\"72\" width=\"72\">\n<p align=\"center\">16:40<\/p>\n<\/td>\n<td data-colwidth=\"99\" width=\"99\">\n<p align=\"center\">main_time<\/p>\n<\/td>\n<td data-colwidth=\"118\" width=\"118\">\n<p align=\"center\">4<\/p>\n<\/td>\n<td data-colwidth=\"125\" width=\"125\">\n<p align=\"center\">2<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0421\u043e\u0431\u0440\u0430\u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0445 \u043c\u0430\u0442\u0447\u0430\u0445:<\/p>\n<ul>\n<li>\n<p>\u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043c\u044f \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043c\u0430\u0442\u0447\u0430 (<strong>date<\/strong>);<\/p>\n<\/li>\n<li>\n<p>\u043d\u043e\u043c\u0435\u0440 \u043c\u0430\u0442\u0447\u0430 \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 (<strong>match<\/strong>);<\/p>\n<\/li>\n<li>\n<p>\u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b (<strong>team<\/strong>);<\/p>\n<\/li>\n<li>\n<p>\u043a\u043e\u043b-\u0432\u043e \u0437\u0430\u0431\u0438\u0442\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 \u0448\u0430\u0439\u0431 \u0431\u0435\u0437 \u0443\u0447\u0435\u0442\u0430 \u0431\u0443\u043b\u043b\u0438\u0442\u043e\u0432 (<strong>score<\/strong>);<\/p>\n<\/li>\n<li>\n<p>\u043a\u043e\u043b-\u0432\u043e \u0448\u0430\u0439\u0431, \u0437\u0430\u0431\u0438\u0442\u044b\u0445 \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 (<strong>ppp<\/strong>);<\/p>\n<\/li>\n<li>\n<p>\u043a\u043e\u043b-\u0432\u043e \u0448\u0430\u0439\u0431, \u0437\u0430\u0431\u0438\u0442\u044b\u0445 \u0432 \u043c\u0435\u043d\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 (<strong>ppk<\/strong>);<\/p>\n<\/li>\n<li>\n<p>\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 (<strong>numa<\/strong>);<\/p>\n<\/li>\n<li>\n<p>\u0432\u044b\u0438\u0433\u0440\u0430\u043d\u043d\u044b\u0435 \u0432\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u043d\u0438\u044f (<strong>wt<\/strong>);<\/p>\n<\/li>\n<li>\n<p>\u0448\u0442\u0440\u0430\u0444\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f, \u043c\u0438\u043d\u0443\u0442 (<strong>pt<\/strong>);<\/p>\n<\/li>\n<li>\n<p>\u0431\u0440\u043e\u0441\u043a\u0438 \u043f\u043e \u0432\u043e\u0440\u043e\u0442\u0430\u043c (<strong>sog<\/strong>);<\/p>\n<\/li>\n<li>\n<p>\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0431\u0440\u043e\u0441\u043a\u0438 (<strong>bs<\/strong>);<\/p>\n<\/li>\n<li>\n<p>\u0441\u0438\u043b\u043e\u0432\u044b\u0435 \u043f\u0440\u0438\u0435\u043c\u044b (<strong>pm<\/strong>);<\/p>\n<\/li>\n<li>\n<p>\u0432\u0440\u0435\u043c\u044f \u0432 \u0430\u0442\u0430\u043a\u0435, \u043c\u0438\u043d\u0443\u0442 (<strong>at<\/strong>);<\/p>\n<\/li>\n<li>\n<p>\u043f\u0440\u0438\u0437\u043d\u0430\u043a \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 (<strong>tot<\/strong>);<\/p>\n<\/li>\n<li>\n<p>\u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f \u043c\u0430\u0442\u0447\u0430 &#8212; \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u0438\u043b\u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f (<strong>end<\/strong>);<\/p>\n<\/li>\n<li>\n<p>\u043a\u043e\u043b-\u0432\u043e \u0437\u0430\u0431\u0438\u0442\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 \u0448\u0430\u0439\u0431 \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0431\u0443\u043b\u043b\u0438\u0442\u043e\u0432 (<strong>final_score<\/strong>).<\/p>\n<\/li>\n<\/ul>\n<p>\u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u043b\u0430\u0441\u044c \u0441\u0443\u0444\u0444\u0438\u043a\u0441\u043e\u043c \u00ab<strong>_h<\/strong>\u00bb, \u0433\u043e\u0441\u0442\u0435\u0432\u043e\u0439 \u2013 \u0441\u0443\u0444\u0444\u0438\u043a\u0441\u043e\u043c \u00ab<strong>_a<\/strong>\u00bb. \u0418\u043d\u0434\u0435\u043a\u0441\u043e\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0440\u044f\u0434\u043a\u043e\u0432\u044b\u0439 \u043d\u043e\u043c\u0435\u0440 \u0441\u0442\u0440\u043e\u043a\u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430.<\/p>\n<h3>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445<\/h3>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u0430 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 \u043f\u043e \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0443 <strong>tot<\/strong>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u044b\u043b\u043e \u043e\u0434\u043d\u043e \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u00ab\u0412\u0441\u0435\u0433\u043e\u00bb \u2013 \u0441\u0432\u043e\u0435\u0433\u043e \u0440\u043e\u0434\u0430 \u043c\u0435\u0442\u043a\u0430 \u043d\u0430 \u0432\u0435\u0431-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0430\u044f \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044e \u0431\u043b\u043e\u043a\u0430 \u0441 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0439 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439.<\/p>\n<p>\u0412 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043b\u0430\u0441\u044c \u043d\u0435\u043d\u0443\u0436\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u043c\u0430\u0442\u0447\u0430\u0445 \u0432\u0441\u0435\u0445 \u0437\u0432\u0435\u0437\u0434, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432 \u0445\u043e\u0434\u0435 \u043f\u0440\u0435\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0438\u043d\u0433\u0430 \u0431\u044b\u043b\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u0430.<\/p>\n<p>\u0418\u043c\u0435\u043b\u0438\u0441\u044c \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0438 \u043f\u043e \u0440\u044f\u0434\u0443 \u043c\u0430\u0442\u0447\u0435\u0439 \u0432 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0431\u0440\u043e\u0441\u043a\u0430\u0445 \u0438 \u0441\u0438\u043b\u043e\u0432\u044b\u0445 \u043f\u0440\u0438\u0435\u043c\u0430\u0445 \u0443 \u0433\u043e\u0441\u0442\u0435\u0432\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u043b\u0438\u0441\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0445 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439 \u0434\u043e\u043c\u0430\u0448\u043d\u0438\u0445 \u043a\u043e\u043c\u0430\u043d\u0434.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u043f\u0440\u0438\u0437\u043d\u0430\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u044f\u0432\u043b\u044f\u043b\u0430\u0441\u044c \u043f\u043e\u0431\u0435\u0434\u0430 \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b (<strong>home_win<\/strong>). \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 1 \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0435 \u2013 \u043f\u043e\u0431\u0435\u0434\u0430 \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b, 0 \u2013 \u043f\u043e\u0431\u0435\u0434\u0430 \u0433\u043e\u0441\u0442\u0435\u0432\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0434\u0430\u043d\u043d\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u0441\u0432\u043e\u0434\u0438\u043b\u0430\u0441\u044c \u043a \u0440\u0435\u0448\u0435\u043d\u0438\u044e \u0437\u0430\u0434\u0430\u0447\u0438 \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u0439 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438.<\/p>\n<pre><code class=\"python\">data_sorted['home_win'] = np.where(data_sorted.final_score_h > data_sorted.final_score_a, 1, 0)<\/code><\/pre>\n<p>\u041f\u043e\u043c\u0438\u043c\u043e \u0446\u0435\u043b\u0435\u0432\u043e\u0433\u043e \u0432 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438:<\/p>\n<ul>\n<li>\n<p>\u043f\u043e\u0440\u044f\u0434\u043a\u043e\u0432\u044b\u0439 \u043d\u043e\u043c\u0435\u0440 \u0441\u0435\u0437\u043e\u043d\u0430 (<strong>season<\/strong>);<\/p>\n<pre><code class=\"python\">data_sorted['season'] = np.where(data_sorted['date'] &lt; pd.Timestamp('2019-06-01 00:00:00'), 1, np.NaN) data_sorted['season'] = np.where((data_sorted['date'] > pd.Timestamp('2019-08-01 00:00:00')) &amp; (data_sorted['date'] &lt; pd.Timestamp('2020-06-01 00:00:00')), 2, data_sorted['season']) data_sorted['season'] = np.where((data_sorted['date'] > pd.Timestamp('2020-08-01 00:00:00')) &amp; (data_sorted['date'] &lt; pd.Timestamp('2021-06-01 00:00:00')), 3, data_sorted['season']) data_sorted['season'] = np.where((data_sorted['date'] > pd.Timestamp('2021-08-01 00:00:00')), 4, data_sorted['season']) <\/code><\/pre>\n<\/li>\n<li>\n<p>\u043a\u043e\u043b-\u0432\u043e \u043e\u0447\u043a\u043e\u0432 \u0443 \u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b (<strong>tp<\/strong>);<\/p>\n<pre><code class=\"python\"># \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043e\u0447\u043a\u0438 \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043f\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c \u043c\u0430\u0442\u0447\u0430 data_sorted['points_h'] = np.where(data_sorted.home_win == 1, 2, np.NaN) data_sorted['points_h'] = np.where((data_sorted.home_win == 0) &amp; (data_sorted.end == 'add_time'), 1, data_sorted['points_h']) data_sorted['points_h'] = np.where((data_sorted.home_win == 0) &amp; (data_sorted.end == 'main_time'), 0, data_sorted['points_h'])  # \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043e\u0447\u043a\u0438 \u0433\u043e\u0441\u0442\u0435\u0432\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043f\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c \u043c\u0430\u0442\u0447\u0430 data_sorted['points_a'] = np.where(data_sorted.home_win == 0, 2, np.NaN) data_sorted['points_a'] = np.where((data_sorted.home_win == 1) &amp;  (data_sorted.end == 'add_time'), 1, data_sorted['points_a']) data_sorted['points_a'] = np.where((data_sorted.home_win == 1) &amp;  (data_sorted.end == 'main_time'), 0, data_sorted['points_a'])  data_sorted[['tp_h', 'tp_a']] = np.NaN  # \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043a\u043e\u043b\u043e\u043d\u043a\u0438 \u0434\u043b\u044f \u043f\u043e\u0434\u0441\u0447\u0435\u0442\u0430 \u043e\u0447\u043a\u043e\u0432 \u0438\u043d\u0434\u0438\u0432\u0438\u0434\u0443\u043b\u044c\u043d\u043e \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u0435 for team in data_sorted.team_h.unique():     data_sorted['p_{}'.format(team)] = np.NaN  # \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0443\u0441\u0442\u043e\u0439 \u0434\u0430\u0442\u0430\u0444\u0440\u0435\u0439\u043c \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u0447\u043a\u043e\u0432 \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0441\u0435\u0437\u043e\u043d\u0443 d = {} for i in range(len(data_sorted.dtypes)):     d[data_sorted.dtypes.index[i]] = pd.Series(dtype=data_sorted.dtypes.values[i])  data_sorted_v1 = pd.DataFrame(d)  for season in data_sorted['season'].unique():      df = data_sorted[data_sorted['season'] == season]      for team in data_sorted.team_h.unique():                  df['p_{}'.format(team)] = np.where(df.team_h == team, pd.Series(np.where(df.team_h == team, df.points_h, np.where(df.team_a == team, df.points_a, 0)).cumsum()).shift().fillna(0), df['p_{}'.format(team)]) df['p_{}'.format(team)] = np.where(df.team_a == team, pd.Series(np.where(df.team_a == team, df.points_a, np.where(df.team_h == team, df.points_h, 0)).cumsum()).shift().fillna(0), df['p_{}'.format(team)])      df['tp_h'] = np.where(df.team_h == team, df['p_{}'.format(team)], df['tp_h']) df['tp_a'] = np.where(df.team_a == team, df['p_{}'.format(team)], df['tp_a'])  data_sorted_v1 = pd.concat([data_sorted_v1, df])  data_sorted_v1.drop(columns=data_sorted_v1.columns[-29:-27].to_list() + data_sorted_v1.columns[-25:].to_list(), inplace=True) <\/code><\/pre>\n<\/li>\n<li>\n<p>\u0447\u0438\u0441\u043b\u043e, \u043c\u0435\u0441\u044f\u0446, \u0434\u0435\u043d\u044c \u043d\u0435\u0434\u0435\u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043c\u0430\u0442\u0447\u0430 \u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0438 \u0434\u0435\u043d\u044c \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u043c (<strong>day, month, day_of_week, weekend<\/strong>);<\/p>\n<pre><code class=\"python\">data_sorted_v1['day'] = data_sorted_v1.date.dt.day data_sorted_v1['month'] = data_sorted_v1.date.dt.month data_sorted_v1['day_of_week'] = data_sorted_v1.date.dt.day_of_week data_sorted_v1['weekend'] = np.where((data_sorted_v1['day_of_week'] == 5) | (data_sorted_v1['day_of_week'] == 6), 1, 0) <\/code><\/pre>\n<\/li>\n<li>\n<p>\u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043f\u0435\u0440\u0435\u0435\u0437\u0434\u0430 \u0443 \u043a\u043e\u043c\u0430\u043d\u0434 \u043f\u0435\u0440\u0435\u0434 \u043c\u0430\u0442\u0447\u0435\u043c (<strong>reloc<\/strong>);<\/p>\n<pre><code class=\"python\">teams = data_sorted_v1.team_h.unique().tolist()  # \u0441\u043f\u0438\u0441\u043e\u043a \u0433\u043e\u0440\u043e\u0434\u043e\u0432, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0438\u0433\u0440\u0430\u044e\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u044b cities = ['\u041a\u0430\u0437\u0430\u043d\u044c', '\u0427\u0435\u043b\u044f\u0431\u0438\u043d\u0441\u043a', '\u041c\u0430\u0433\u043d\u0438\u0442\u043e\u0433\u043e\u0440\u0441\u043a', '\u0415\u043a\u0430\u0442\u0435\u0440\u0438\u043d\u0431\u0443\u0440\u0433',           '\u041c\u043e\u0441\u043a\u0432\u0430', '\u041c\u043e\u0441\u043a\u0432\u0430', '\u0427\u0435\u0440\u0435\u043f\u043e\u0432\u0435\u0446', '\u042f\u0440\u043e\u0441\u043b\u0430\u0432\u043b\u044c',           '\u0425\u0435\u043b\u044c\u0441\u0438\u043d\u043a\u0438', '\u041d\u0438\u0436\u043d\u0438\u0439 \u041d\u043e\u0432\u0433\u043e\u0440\u043e\u0434', '\u041d\u0438\u0436\u043d\u0435\u043a\u0430\u043c\u0441\u043a', '\u0421\u043e\u0447\u0438',           '\u0421\u0430\u043d\u043a\u0442-\u041f\u0435\u0442\u0435\u0440\u0431\u0443\u0440\u0433', '\u0420\u0438\u0433\u0430', '\u0411\u0440\u0430\u0442\u0438\u0441\u043b\u0430\u0432\u0430', '\u041e\u043c\u0441\u043a',           '\u041c\u0438\u043d\u0441\u043a', '\u041f\u043e\u0434\u043e\u043b\u044c\u0441\u043a', '\u041d\u043e\u0432\u043e\u0441\u0438\u0431\u0438\u0440\u0441\u043a', '\u041c\u043e\u0441\u043a\u0432\u0430',           '\u0425\u0430\u0431\u0430\u0440\u043e\u0432\u0441\u043a', '\u041d\u0443\u0440-\u0421\u0443\u043b\u0442\u0430\u043d', '\u0423\u0444\u0430', '\u041f\u0435\u043a\u0438\u043d', '\u0412\u043b\u0430\u0434\u0438\u0432\u043e\u0441\u0442\u043e\u043a']  d_cities = dict(zip(teams, cities))  data_sorted_v1['city_h'] = data_sorted_v1['team_h'].map(d_cities) data_sorted_v1[['reloc_h', 'reloc_a', 'rest_h', 'rest_a', 'intense_h', 'intense_a']] = np.NaN  for team in data_sorted_v1.team_h.unique():     index = data_sorted_v1[(data_sorted_v1['team_h'] == team) | (data_sorted_v1['team_a'] == team)].index  # \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043f\u0435\u0440\u0435\u0435\u0437\u0434\u0430 \u0443 \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b     data_sorted_v1.loc[index, 'reloc_h'] = np.where(         data_sorted_v1.loc[index, 'team_h'] == team,          np.where((data_sorted_v1.loc[index, 'season'] - data_sorted_v1.loc[index, 'season'].shift()).isna() | (data_sorted_v1.loc[index, 'season'] - data_sorted_v1.loc[index, 'season'].shift() == 1),          0,          np.where(data_sorted_v1.loc[index, 'city_h'] == data_sorted_v1.loc[index, 'city_h'].shift(),          0,          1)),          data_sorted_v1.loc[index, 'reloc_h'])  # \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043f\u0435\u0440\u0435\u0435\u0437\u0434\u0430 \u0443 \u0433\u043e\u0441\u0442\u0435\u0432\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b     data_sorted_v1.loc[index, 'reloc_a'] = np.where(         data_sorted_v1.loc[index, 'team_a'] == team,         np.where((data_sorted_v1.loc[index, 'season'] - data_sorted_v1.loc[index, 'season'].shift()).isna() | (data_sorted_v1.loc[index, 'season'] - data_sorted_v1.loc[index, 'season'].shift() == 1),          1,          np.where(data_sorted_v1.loc[index, 'city_h'] == data_sorted_v1.loc[index, 'city_h'].shift(),          0,          1)),          data_sorted_v1.loc[index, 'reloc_a']) <\/code><\/pre>\n<\/li>\n<li>\n<p>\u043a\u043e\u043b-\u0432\u043e \u0434\u043d\u0435\u0439 \u043e\u0442\u0434\u044b\u0445\u0430 \u0443 \u043a\u043e\u043c\u0430\u043d\u0434 \u043c\u0435\u0436\u0434\u0443 \u0438\u0433\u0440\u0430\u043c\u0438 (<strong>rest<\/strong>);<\/p>\n<pre><code class=\"python\"># \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u043c\u0430\u043a\u0441. \u043a\u043e\u043b-\u0432\u043e \u0434\u043d\u0435\u0439 \u043e\u0442\u0434\u044b\u0445\u0430 \u0441\u0440\u0435\u0434\u0438 \u043a\u043e\u043c\u0430\u043d\u0434 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043e\u0434\u043d\u043e\u0433\u043e \u0441\u0435\u0437\u043e\u043d\u0430 (\u0438\u0441\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0421\u043b\u043e\u0432\u0430\u043d, \u0442.\u043a. \u043e\u043d\u0430 \u0438\u0433\u0440\u0430\u043b\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 1\u043c \u0441\u0435\u0437\u043e\u043d\u0435, \u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0410\u0434\u043c\u0438\u0440\u0430\u043b - \u043d\u0435 \u0438\u0433\u0440\u0430\u043b\u0430 \u0432 3\u043c \u0441\u0435\u0437\u043e\u043d\u0435) max_rest = []  for season in data_sorted_v1['season'].unique():     for team in data_sorted_v1.team_h.unique()[np.where((data_sorted_v1.team_h.unique() != '\u0421\u043b\u043e\u0432\u0430\u043d') &amp; (data_sorted_v1.team_h.unique() != '\u0410\u0434\u043c\u0438\u0440\u0430\u043b'))]:         df = data_sorted_v1[((data_sorted_v1.team_h == team) | (data_sorted_v1.team_a == team)) &amp; (data_sorted_v1.season == season)]                max_rest.append(round((df.date[1:] - df.date.shift()[1:]).max().days + (df.date[1:] - df.date.shift()[1:]).max().seconds\/86400))  # \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u043a\u043e\u043b-\u0432\u043e \u0434\u043d\u0435\u0439 \u043e\u0442\u0434\u044b\u0445\u0430 \u0443 \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b     data_sorted_v1.loc[index, 'rest_h'] = np.where(         data_sorted_v1.loc[index, 'team_h'] == team,          np.where((data_sorted_v1.loc[index, 'season'] - data_sorted_v1.loc[index, 'season'].shift()).isna() | (data_sorted_v1.loc[index, 'season'] - data_sorted_v1.loc[index, 'season'].shift() == 1),          max(max_rest), # \u0434\u043b\u044f \u043f\u0435\u0440\u0432\u044b\u0445 \u043c\u0430\u0442\u0447\u0435\u0439 \u043f\u0440\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u043c\u0430\u043a\u0441. \u043a\u043e\u043b-\u0432\u043e \u0434\u043d\u0435\u0439 \u043e\u0442\u0434\u044b\u0445\u0430 \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u0441\u0435\u0437\u043e\u043d\u0430          (data_sorted_v1.loc[index, 'date'] - data_sorted_v1.loc[index, 'date'].shift()).dt.total_seconds()\/86400),          data_sorted_v1.loc[index, 'rest_h'])  # \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u043a\u043e\u043b-\u0432\u043e \u0434\u043d\u0435\u0439 \u043e\u0442\u0434\u044b\u0445\u0430 \u0443 \u0433\u043e\u0441\u0442\u0435\u0432\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b     data_sorted_v1.loc[index, 'rest_a'] = np.where(         data_sorted_v1.loc[index, 'team_a'] == team,         np.where((data_sorted_v1.loc[index, 'season'] - data_sorted_v1.loc[index, 'season'].shift()).isna() | (data_sorted_v1.loc[index, 'season'] - data_sorted_v1.loc[index, 'season'].shift() == 1),          max(max_rest), # \u0434\u043b\u044f \u043f\u0435\u0440\u0432\u044b\u0445 \u043c\u0430\u0442\u0447\u0435\u0439 \u043f\u0440\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u043c\u0430\u043a\u0441. \u043a\u043e\u043b-\u0432\u043e \u0434\u043d\u0435\u0439 \u043e\u0442\u0434\u044b\u0445\u0430 \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u0441\u0435\u0437\u043e\u043d\u0430         (data_sorted_v1.loc[index, 'date'] - data_sorted_v1.loc[index, 'date'].shift()).dt.total_seconds()\/86400),          data_sorted_v1.loc[index, 'rest_a']) <\/code><\/pre>\n<\/li>\n<li>\n<p>\u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u043d\u043e\u0433\u043e \u043c\u0430\u0442\u0447\u0430 \u2013 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0432\u0448\u0435\u0433\u043e\u0441\u044f \u0432 \u043e\u0432\u0435\u0440\u0442\u0430\u0439\u043c\u0435 \u0438\u043b\u0438 \u043f\u043e \u0431\u0443\u043b\u043b\u0438\u0442\u0430\u043c (<strong>intense<\/strong>);<\/p>\n<pre><code class=\"python\"># \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u043d\u043e\u0433\u043e \u043c\u0430\u0442\u0447\u0430 \u0443 \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b     data_sorted_v1.loc[index, 'intense_h'] = np.where(         data_sorted_v1.loc[index, 'team_h'] == team,          np.where((data_sorted_v1.loc[index, 'season'] - data_sorted_v1.loc[index, 'season'].shift()).isna() | (data_sorted_v1.loc[index, 'season'] - data_sorted_v1.loc[index, 'season'].shift() == 1),          0,         np.where(data_sorted_v1.loc[index, 'end'].shift() == 'add_time',          1,          0)),          data_sorted_v1.loc[index, 'intense_h'])  # \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u043d\u043e\u0433\u043e \u043c\u0430\u0442\u0447\u0430 \u0443 \u0433\u043e\u0441\u0442\u0435\u0432\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b     data_sorted_v1.loc[index, 'intense_a'] = np.where(         data_sorted_v1.loc[index, 'team_a'] == team,          np.where((data_sorted_v1.loc[index, 'season'] - data_sorted_v1.loc[index, 'season'].shift()).isna() | (data_sorted_v1.loc[index, 'season'] - data_sorted_v1.loc[index, 'season'].shift() == 1),          0,         np.where(data_sorted_v1.loc[index, 'end'].shift() == 'add_time',          1,          0)),          data_sorted_v1.loc[index, 'intense_a'])  data_sorted_v1.drop(columns=['city_h'], inplace=True) <\/code><\/pre>\n<\/li>\n<li>\n<p>\u043a\u043e\u043b-\u0432\u043e \u043f\u043e\u0431\u0435\u0434 \u0434\u043e\u043c\u0430 \u0443 \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0438 \u043a\u043e\u043b-\u0432\u043e \u043f\u043e\u0431\u0435\u0434 \u0432 \u0433\u043e\u0441\u0442\u044f\u0445 \u0443 \u0433\u043e\u0441\u0442\u0435\u0432\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043c\u0430\u0442\u0447\u0430 (<strong>win<\/strong>);<\/p>\n<pre><code class=\"python\">data_sorted_v1[['win_h', 'win_a']] = np.NaN  for season in data_sorted_v1.season.unique():     for team in data_sorted_v1.team_h.unique():          index_h = data_sorted_v1[(data_sorted_v1['team_h'] == team) &amp; (data_sorted_v1['season'] == season)].index         index_a = data_sorted_v1[(data_sorted_v1['team_a'] == team) &amp; (data_sorted_v1['season'] == season)].index  # \u043a\u043e\u043b-\u0432\u043e \u043f\u043e\u0431\u0435\u0434 \u0434\u043e\u043c\u0430 \u0443 \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b         data_sorted_v1.loc[index_h, 'win_h'] = np.where((data_sorted_v1.loc[index_h, 'season'] - data_sorted_v1.loc[index_h, 'season'].shift()).isna() | (data_sorted_v1.loc[index_h, 'season'] - data_sorted_v1.loc[index_h, 'season'].shift() == 1), 0, data_sorted_v1.loc[index_h, 'home_win'].shift().cumsum()) # \u043a\u043e\u043b-\u0432\u043e \u043f\u043e\u0431\u0435\u0434 \u0432 \u0433\u043e\u0441\u0442\u044f\u0445 \u0443 \u0433\u043e\u0441\u0442\u0435\u0432\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b         data_sorted_v1.loc[index_a, 'win_a'] = np.where((data_sorted_v1.loc[index_a, 'season'] - data_sorted_v1.loc[index_a, 'season'].shift()).isna() | (data_sorted_v1.loc[index_a, 'season'] - data_sorted_v1.loc[index_a, 'season'].shift() == 1), 0, (1 - data_sorted_v1.loc[index_a, 'home_win'].shift()).cumsum()) <\/code><\/pre>\n<\/li>\n<li>\n<p>\u043a\u043e\u043b-\u0432\u043e \u043f\u043e\u0431\u0435\u0434 \u043a\u043e\u043c\u0430\u043d\u0434 \u0432 \u043e\u0447\u043d\u044b\u0445 \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f\u0445, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 1 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u0441\u0435\u0437\u043e\u043d\u0430 (<strong>ftf<\/strong>);<\/p>\n<pre><code class=\"python\">data_sorted_v1[['ftf_h', 'ftf_a']] = np.NaN  for team_h in data_sorted_v1.team_h.unique():     for team_a in data_sorted_v1.team_a.unique():          index = data_sorted_v1[((data_sorted_v1.team_h == team_h) &amp; (data_sorted_v1.team_a == team_a)) | ((data_sorted_v1.team_h == team_a) &amp; (data_sorted_v1.team_a == team_h))].index  # \u043a\u043e\u043b-\u0432\u043e \u043e\u0447\u043d\u044b\u0445 \u043f\u043e\u0431\u0435\u0434 \u0434\u043e\u043c\u0430 \u0443 \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b         data_sorted_v1.loc[index, 'ftf_h'] = np.where(         data_sorted_v1.loc[index, 'team_h'] == team_h,          pd.Series(np.where(data_sorted_v1.loc[index, 'team_h'] == team_h, data_sorted_v1.loc[index, 'home_win'], (1-data_sorted_v1.loc[index, 'home_win'])).cumsum()).shift().fillna(0),         pd.Series(np.where(data_sorted_v1.loc[index, 'team_h'] == team_a, data_sorted_v1.loc[index, 'home_win'], (1-data_sorted_v1.loc[index, 'home_win'])).cumsum()).shift().fillna(0))  # \u043a\u043e\u043b-\u0432\u043e \u043e\u0447\u043d\u044b\u0445 \u043f\u043e\u0431\u0435\u0434 \u0434\u043e\u043c\u0430 \u0443 \u0433\u043e\u0441\u0442\u0435\u0432\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b         data_sorted_v1.loc[index, 'ftf_a'] = np.where(         data_sorted_v1.loc[index, 'team_a'] == team_a,          pd.Series(np.where(data_sorted_v1.loc[index, 'team_a'] == team_a, (1-data_sorted_v1.loc[index, 'home_win']), data_sorted_v1.loc[index, 'home_win']).cumsum()).shift().fillna(0),         pd.Series(np.where(data_sorted_v1.loc[index, 'team_a'] == team_h, (1-data_sorted_v1.loc[index, 'home_win']), data_sorted_v1.loc[index, 'home_win']).cumsum()).shift().fillna(0)) <\/code><\/pre>\n<\/li>\n<li>\n<p>\u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u043a\u043e\u043b-\u0432\u043e \u043e\u0447\u043a\u043e\u0432 \u043e\u043f\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432, \u043f\u0440\u043e\u0442\u0438\u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0438\u0433\u0440\u0430\u043b\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u043e \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u043c\u0430\u0442\u0447\u0430 (<strong>mop<\/strong>).<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"python\">data_sorted_v1[['mop_h', 'mop_a']] = np.NaN  for season in data_sorted_v1.season.unique():     for team in data_sorted_v1.team_h.unique():          index_h = data_sorted_v1[(data_sorted_v1['team_h'] == team) &amp; (data_sorted_v1['season'] == season)].index         index_a = data_sorted_v1[(data_sorted_v1['team_a'] == team) &amp; (data_sorted_v1['season'] == season)].index  # \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043c\u0430\u0441\u0441\u0438\u0432 \u0438\u0437 \u043e\u0447\u043a\u043e\u0432 \u0433\u043e\u0441\u0442\u0435\u0432\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434 \u043f\u0440\u0438 \u0438\u0433\u0440\u0435 \u0434\u043e\u043c\u0430 \u0438 \u043e\u0447\u043a\u043e\u0432 \u0434\u043e\u043c\u0430\u0448\u043d\u0438\u0445 \u043a\u043e\u043c\u0430\u043d\u0434 \u043f\u0440\u0438 \u0438\u0433\u0440\u0435 \u0432 \u0433\u043e\u0441\u0442\u044f\u0445         tp = pd.concat([data_sorted_v1.loc[index_a, 'tp_h'], data_sorted_v1.loc[index_h, 'tp_a']]).sort_index()  # \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0434\u0430\u0442\u0430\u0444\u0440\u0435\u0439\u043c \u0438\u0437 \u043a\u043e\u043b-\u0432\u0430 \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0445 \u0438\u0433\u0440         games_count = pd.DataFrame(index=tp.index, columns=['number_of_games'], data=np.ones(len(tp.index)))  # \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u043a\u043e\u043b-\u0432\u043e \u043e\u0447\u043a\u043e\u0432 \u043e\u043f\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b         data_sorted_v1.loc[index_h, 'mop_h'] = np.where(((data_sorted_v1.loc[tp.index, 'season'] - data_sorted_v1.loc[tp.index, 'season'].shift()).isna() | (data_sorted_v1.loc[tp.index, 'season'] - data_sorted_v1.loc[tp.index, 'season'].shift() == 1)).loc[index_h], 0, tp.shift().cumsum()[index_h] \/ games_count.shift().cumsum().loc[index_h, 'number_of_games'].values)  # \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u043a\u043e\u043b-\u0432\u043e \u043e\u0447\u043a\u043e\u0432 \u043e\u043f\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0433\u043e\u0441\u0442\u0435\u0432\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b         data_sorted_v1.loc[index_a, 'mop_a'] = np.where(((data_sorted_v1.loc[tp.index, 'season'] - data_sorted_v1.loc[tp.index, 'season'].shift()).isna() | (data_sorted_v1.loc[tp.index, 'season'] - data_sorted_v1.loc[tp.index, 'season'].shift() == 1)).loc[index_a], 0, tp.shift().cumsum()[index_a] \/ games_count.shift().cumsum().loc[index_a, 'number_of_games'].values) <\/code><\/pre>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043c\u0430\u0442\u0447\u0435\u0439, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0441\u043f\u0430\u0440\u0441\u0435\u043d\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f, \u043d\u0443\u043c\u0435\u0440\u0430\u0446\u0438\u0438 \u043c\u0430\u0442\u0447\u0435\u0439 \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 (\u043f\u0440\u0438\u0437\u043d\u0430\u043a <strong>match<\/strong>).<\/p>\n<pre><code class=\"python\">def empty_matches_count (season, matches_missing):     if season == 1:         text = '\/671\/'     elif season == 2:         text = '\/851\/'     elif season == 3:         text = '\/1045\/'     else:         text = '\/1097\/'      return len([x for x in matches_missing if text in x])  for season in range(1, 5):     if data_sorted_v1[data_sorted_v1.season == season].match.max() != data_sorted_v1[data_sorted_v1.season == season].match.shape[0] + empty_matches_count(season, matches_missing):         print('\u041f\u043e {} \u0441\u0435\u0437\u043e\u043d\u0443 \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u043a\u043e\u043b-\u0432\u043e\u043c \u043c\u0430\u0442\u0447\u0435\u0439, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0441\u043f\u0430\u0440\u0441\u0435\u043d\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f, \u0438 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043d\u0443\u043c\u0435\u0440\u0430\u0446\u0438\u0435\u0439 \u043c\u0430\u0442\u0447\u0435\u0439'.format(season))     else:         pass <\/code><\/pre>\n<p>\u041f\u043e 4 \u0441\u0435\u0437\u043e\u043d\u0443 \u0431\u044b\u043b\u043e \u043d\u0435\u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435, \u043e\u0431\u0443\u0441\u043b\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0435 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u043c\u0438 \u0432 \u043d\u0443\u043c\u0435\u0440\u0430\u0446\u0438\u0438 \u043c\u0430\u0442\u0447\u0435\u0439 \u043d\u0430 \u0441\u0430\u0439\u0442\u0435, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043f\u043e \u0432\u0441\u0435\u043c \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u043c \u0438\u0433\u0440\u0430\u043c \u0441\u043f\u0430\u0440\u0441\u0435\u043d\u0430 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e.<\/p>\n<p>\u0423\u0434\u0430\u043b\u0435\u043d\u044b \u043d\u0435 \u043d\u0443\u0436\u043d\u044b\u0435 \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 (<strong>tot,<\/strong> <strong>date, match, score, end<\/strong>). <\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u043e \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0441\u0438\u043b\u044c\u043d\u044b\u0445 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0439 \u043c\u0435\u0436\u0434\u0443 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430\u043c\u0438, \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043d\u0438\u0436\u0435.<\/p>\n<pre><code class=\"python\">features_correlation = pd.DataFrame(columns=['feature_1', 'feature_2', 'correlation_pearson', 'correlation_spearman'])  index = 0  for i in range(3, len(data_sorted_v1.columns)):          for a in range (i+1, len(data_sorted_v1.columns)):         features_correlation.loc[index, 'feature_1'] = data_sorted_v1.columns[i]         features_correlation.loc[index, 'feature_2'] = data_sorted_v1.columns[a]         features_correlation.loc[index, 'correlation_pearson'] = data_sorted_v1[data_sorted_v1.columns[i]].corr(data_sorted_v1[data_sorted_v1.columns[a]], method='pearson')         features_correlation.loc[index, 'correlation_spearman'] = data_sorted_v1[data_sorted_v1.columns[i]].corr(data_sorted_v1[data_sorted_v1.columns[a]], method='spearman')         index += 1 <\/code><\/pre>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"68\" width=\"68\">\n<p align=\"left\">\n<\/td>\n<td data-colwidth=\"114\" width=\"114\">\n<p align=\"center\"><strong>feature_1<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"124\" width=\"124\">\n<p align=\"center\"><strong>feature_2<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"178\" width=\"178\">\n<p align=\"center\"><strong>correlation_pearson<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"193\" width=\"193\">\n<p align=\"center\"><strong>correlation_spearman<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"68\" width=\"68\">\n<p align=\"center\">609<\/p>\n<\/td>\n<td data-colwidth=\"114\" width=\"114\">\n<p align=\"center\">tp_h<\/p>\n<\/td>\n<td data-colwidth=\"124\" width=\"124\">\n<p align=\"center\">tp_a<\/p>\n<\/td>\n<td data-colwidth=\"178\" width=\"178\">\n<p align=\"center\">0.79079<\/p>\n<\/td>\n<td data-colwidth=\"193\" width=\"193\">\n<p align=\"center\">0.83210<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"68\" width=\"68\">\n<p align=\"center\">621<\/p>\n<\/td>\n<td data-colwidth=\"114\" width=\"114\">\n<p align=\"center\">tp_h<\/p>\n<\/td>\n<td data-colwidth=\"124\" width=\"124\">\n<p align=\"center\">win_h<\/p>\n<\/td>\n<td data-colwidth=\"178\" width=\"178\">\n<p align=\"center\">0.96445<\/p>\n<\/td>\n<td data-colwidth=\"193\" width=\"193\">\n<p align=\"center\">0.96560<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"68\" width=\"68\">\n<p align=\"center\">622<\/p>\n<\/td>\n<td data-colwidth=\"114\" width=\"114\">\n<p align=\"center\">tp_h<\/p>\n<\/td>\n<td data-colwidth=\"124\" width=\"124\">\n<p align=\"center\">win_a<\/p>\n<\/td>\n<td data-colwidth=\"178\" width=\"178\">\n<p align=\"center\">0.70637<\/p>\n<\/td>\n<td data-colwidth=\"193\" width=\"193\">\n<p align=\"center\">0.75680<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"68\" width=\"68\">\n<p align=\"center\">625<\/p>\n<\/td>\n<td data-colwidth=\"114\" width=\"114\">\n<p align=\"center\">tp_h<\/p>\n<\/td>\n<td data-colwidth=\"124\" width=\"124\">\n<p align=\"center\">mop_h<\/p>\n<\/td>\n<td data-colwidth=\"178\" width=\"178\">\n<p align=\"center\">0.87699<\/p>\n<\/td>\n<td data-colwidth=\"193\" width=\"193\">\n<p align=\"center\">0.89812<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"68\" width=\"68\">\n<p align=\"center\">626<\/p>\n<\/td>\n<td data-colwidth=\"114\" width=\"114\">\n<p align=\"center\">tp_h<\/p>\n<\/td>\n<td data-colwidth=\"124\" width=\"124\">\n<p align=\"center\">mop_a<\/p>\n<\/td>\n<td data-colwidth=\"178\" width=\"178\">\n<p align=\"center\">0.87744<\/p>\n<\/td>\n<td data-colwidth=\"193\" width=\"193\">\n<p align=\"center\">0.89833<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"68\" width=\"68\">\n<p align=\"center\">638<\/p>\n<\/td>\n<td data-colwidth=\"114\" width=\"114\">\n<p align=\"center\">tp_a<\/p>\n<\/td>\n<td data-colwidth=\"124\" width=\"124\">\n<p align=\"center\">win_h<\/p>\n<\/td>\n<td data-colwidth=\"178\" width=\"178\">\n<p align=\"center\">0.76446<\/p>\n<\/td>\n<td data-colwidth=\"193\" width=\"193\">\n<p align=\"center\">0.80477<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"68\" width=\"68\">\n<p align=\"center\">639<\/p>\n<\/td>\n<td data-colwidth=\"114\" width=\"114\">\n<p align=\"center\">tp_a<\/p>\n<\/td>\n<td data-colwidth=\"124\" width=\"124\">\n<p align=\"center\">win_a<\/p>\n<\/td>\n<td data-colwidth=\"178\" width=\"178\">\n<p align=\"center\">0.94854<\/p>\n<\/td>\n<td data-colwidth=\"193\" width=\"193\">\n<p align=\"center\">0.95138<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"68\" width=\"68\">\n<p align=\"center\">642<\/p>\n<\/td>\n<td data-colwidth=\"114\" width=\"114\">\n<p align=\"center\">tp_a<\/p>\n<\/td>\n<td data-colwidth=\"124\" width=\"124\">\n<p align=\"center\">mop_h<\/p>\n<\/td>\n<td data-colwidth=\"178\" width=\"178\">\n<p align=\"center\">0.88491<\/p>\n<\/td>\n<td data-colwidth=\"193\" width=\"193\">\n<p align=\"center\">0.90452<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"68\" width=\"68\">\n<p align=\"center\">643<\/p>\n<\/td>\n<td data-colwidth=\"114\" width=\"114\">\n<p align=\"center\">tp_a<\/p>\n<\/td>\n<td data-colwidth=\"124\" width=\"124\">\n<p align=\"center\">mop_a<\/p>\n<\/td>\n<td data-colwidth=\"178\" width=\"178\">\n<p align=\"center\">0.88395<\/p>\n<\/td>\n<td data-colwidth=\"193\" width=\"193\">\n<p align=\"center\">0.90257<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"68\" width=\"68\">\n<p align=\"center\">689<\/p>\n<\/td>\n<td data-colwidth=\"114\" width=\"114\">\n<p align=\"center\">day_of_week<\/p>\n<\/td>\n<td data-colwidth=\"124\" width=\"124\">\n<p align=\"center\">weekend<\/p>\n<\/td>\n<td data-colwidth=\"178\" width=\"178\">\n<p align=\"center\">0.79452<\/p>\n<\/td>\n<td data-colwidth=\"193\" width=\"193\">\n<p align=\"center\">0.78122<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"68\" width=\"68\">\n<p align=\"center\">768<\/p>\n<\/td>\n<td data-colwidth=\"114\" width=\"114\">\n<p align=\"center\">win_h<\/p>\n<\/td>\n<td data-colwidth=\"124\" width=\"124\">\n<p align=\"center\">mop_h<\/p>\n<\/td>\n<td data-colwidth=\"178\" width=\"178\">\n<p align=\"center\">0.84281<\/p>\n<\/td>\n<td data-colwidth=\"193\" width=\"193\">\n<p align=\"center\">0.86428<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"68\" width=\"68\">\n<p align=\"center\">769<\/p>\n<\/td>\n<td data-colwidth=\"114\" width=\"114\">\n<p align=\"center\">win_h<\/p>\n<\/td>\n<td data-colwidth=\"124\" width=\"124\">\n<p align=\"center\">mop_a<\/p>\n<\/td>\n<td data-colwidth=\"178\" width=\"178\">\n<p align=\"center\">0.84571<\/p>\n<\/td>\n<td data-colwidth=\"193\" width=\"193\">\n<p align=\"center\">0.86598<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"68\" width=\"68\">\n<p align=\"center\">772<\/p>\n<\/td>\n<td data-colwidth=\"114\" width=\"114\">\n<p align=\"center\">win_a<\/p>\n<\/td>\n<td data-colwidth=\"124\" width=\"124\">\n<p align=\"center\">mop_h<\/p>\n<\/td>\n<td data-colwidth=\"178\" width=\"178\">\n<p align=\"center\">0.78235<\/p>\n<\/td>\n<td data-colwidth=\"193\" width=\"193\">\n<p align=\"center\">0.81468<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"68\" width=\"68\">\n<p align=\"center\">773<\/p>\n<\/td>\n<td data-colwidth=\"114\" width=\"114\">\n<p align=\"center\">win_a<\/p>\n<\/td>\n<td data-colwidth=\"124\" width=\"124\">\n<p align=\"center\">mop_a<\/p>\n<\/td>\n<td data-colwidth=\"178\" width=\"178\">\n<p align=\"center\">0.78300<\/p>\n<\/td>\n<td data-colwidth=\"193\" width=\"193\">\n<p align=\"center\">0.81395<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"68\" width=\"68\">\n<p align=\"center\">779<\/p>\n<\/td>\n<td data-colwidth=\"114\" width=\"114\">\n<p align=\"center\">mop_h<\/p>\n<\/td>\n<td data-colwidth=\"124\" width=\"124\">\n<p align=\"center\">mop_a<\/p>\n<\/td>\n<td data-colwidth=\"178\" width=\"178\">\n<p align=\"center\">0.98748<\/p>\n<\/td>\n<td data-colwidth=\"193\" width=\"193\">\n<p align=\"center\">0.98940<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0417\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043c\u0435\u0436\u0434\u0443 \u043e\u0447\u043a\u0430\u043c\u0438 \u0438\u0433\u0440\u0430\u044e\u0449\u0438\u0445 \u043a\u043e\u043c\u0430\u043d\u0434 \u043d\u0435\u0442 (\u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 <strong>tp_h, tp_a<\/strong>) &#8212; \u0441\u0438\u043b\u044c\u043d\u0430\u044f \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u044f \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u0442\u0441\u044f \u043d\u0430\u0431\u043e\u0440\u043e\u043c \u043e\u0447\u043a\u043e\u0432 \u043f\u043e \u0445\u043e\u0434\u0443 \u0441\u0435\u0437\u043e\u043d\u0430. \u0422\u0435\u043c \u0436\u0435 \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u0442\u0441\u044f \u0441\u0438\u043b\u044c\u043d\u0430\u044f \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u044f \u0432 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u044f\u0445 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 <strong>tp, win <\/strong>\u0438<strong> mop<\/strong>. \u0423\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439.<\/p>\n<p>\u041c\u0435\u0436\u0434\u0443 \u0434\u043d\u0435\u043c \u043d\u0435\u0434\u0435\u043b\u0438 \u0438 \u043d\u0430\u043b\u0438\u0447\u0438\u0435\u043c \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0433\u043e (\u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 <strong>day_of_week, weekend<\/strong>) \u0441\u0432\u044f\u0437\u044c \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u0430 &#8212; \u043f\u0440\u0438\u0437\u043d\u0430\u043a <strong>weekend<\/strong> \u0443\u0434\u0430\u043b\u0435\u043d.<\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043c\u0430\u0442\u0447\u0435\u0439 \u043d\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0432\u044b\u0431\u0440\u043e\u0441\u043e\u0432, \u0430\u043d\u043e\u043c\u0430\u043b\u0438\u0439, \u043e\u0448\u0438\u0431\u043e\u043a \u0438 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u044b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435:<\/p>\n<ul>\n<li>\n<p>\u0432 \u043c\u0430\u0442\u0447\u0435 \u0441 <strong>ppk_h<\/strong> \u0440\u0430\u0432\u043d\u044b\u043c 4 &#8212; \u043e\u0448\u0438\u0431\u043a\u0430, \u0432\u0441\u0435 \u0448\u0430\u0439\u0431\u044b \u0437\u0430\u0431\u0440\u043e\u0448\u0435\u043d\u044b \u0432 \u0440\u0430\u0432\u043d\u044b\u0445 \u0441\u043e\u0441\u0442\u0430\u0432\u0430\u0445;<\/p>\n<figure class=\"bordered\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/c49\/9cf\/9df\/c499cf9df43febdea227c47904b77cd2.jpg\" width=\"431\" height=\"188\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c49\/9cf\/9df\/c499cf9df43febdea227c47904b77cd2.jpg\" data-blurred=\"true\"\/><figcaption><\/figcaption><\/figure>\n<\/li>\n<li>\n<p>\u0432 \u043c\u0430\u0442\u0447\u0435 \u0441 <strong>at_h<\/strong> \u0440\u0430\u0432\u043d\u044b\u043c 1740 &#8212; \u043e\u0448\u0438\u0431\u043a\u0430, \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u0435 \u0443 \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0432\u0440\u0435\u043c\u044f \u0432\u043b\u0430\u0434\u0435\u043d\u0438\u044f \u0448\u0430\u0439\u0431\u043e\u0439 \u0432 \u0430\u0442\u0430\u043a\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u043e 19:52 \u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435\u0440\u0435\u0430\u043b\u044c\u043d\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c. \u041c\u0430\u043a\u0441 \u0432\u0440\u0435\u043c\u044f \u0432 \u0430\u0442\u0430\u043a\u0435 \u0437\u0430 \u0432\u0435\u0441\u044c \u043c\u0430\u0442\u0447 \u0443 \u0438\u0433\u0440\u043e\u043a\u0430 \u0434\u0430\u043d\u043d\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 17:22, \u0442.\u0435. \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0432 \u0430\u0442\u0430\u043a\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0432\u043e 2\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 9:52 &#8212; \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <strong>at_h<\/strong> \u0441\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0434\u0430\u043d\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438;<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/a77\/609\/feb\/a77609febf254bbbdb1fd840115eb5f9.jpg\" width=\"452\" height=\"192\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a77\/609\/feb\/a77609febf254bbbdb1fd840115eb5f9.jpg\" data-blurred=\"true\"\/><figcaption><\/figcaption><\/figure>\n<\/li>\n<li>\n<p>\u0432 \u043c\u0430\u0442\u0447\u0435 \u0441 <strong>rest_a<\/strong> \u0440\u0430\u0432\u043d\u044b\u043c 554 &#8212; \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c \u0438\u0437-\u0437\u0430 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u00ab\u0410\u0434\u043c\u0438\u0440\u0430\u043b\u00bb \u0432 3 \u0441\u0435\u0437\u043e\u043d\u0435. \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0437\u0430\u043c\u0435\u043d\u0435\u043d\u043e \u043d\u0430 20 (\u043c\u0430\u043a\u0441. \u043a\u043e\u043b-\u0432\u043e \u0434\u043d\u0435\u0439 \u043e\u0442\u0434\u044b\u0445\u0430).<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/88b\/996\/e15\/88b996e15ef6fdb011980ceb9e998211.jpg\" alt=\"\" title=\"\" width=\"447\" height=\"192\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/88b\/996\/e15\/88b996e15ef6fdb011980ceb9e998211.jpg\" data-blurred=\"true\"\/><figcaption><\/figcaption><\/figure>\n<\/li>\n<\/ul>\n<h3>\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u043e\u0432<\/h3>\n<p>\u0427\u0430\u0441\u0442\u044c\u044e \u0434\u0430\u043d\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u044f\u0432\u043b\u044f\u043b\u043e\u0441\u044c \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u043b\u0438\u044f\u043d\u0438\u044f \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u043e\u0432 (\u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u043c\u0435\u0442\u043e\u0434\u0430 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0442.\u043a. \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u043d\u0430\u0445\u043e\u0434\u0438\u043b\u0438\u0441\u044c \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430\u0445) \u043d\u0430 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0431\u0443\u0447\u0430\u0435\u043c\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0431\u044b\u043b\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043f\u043e \u043f\u0440\u0435\u0434\u0448\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u043c\u0430\u0442\u0447\u0430\u043c \u0438\u0433\u0440\u0430\u044e\u0449\u0438\u0445 \u043a\u043e\u043c\u0430\u043d\u0434. \u0422.\u043a. \u043f\u043e \u0445\u043e\u0434\u0443 \u0441\u0435\u0437\u043e\u043d\u0430 \u0444\u043e\u0440\u043c\u0430 \u043a\u043e\u043c\u0430\u043d\u0434 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f, \u0431\u0440\u0430\u0442\u044c \u0432 \u0440\u0430\u0441\u0447\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b-\u0432\u043e \u043f\u0440\u0435\u0434\u0448\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0438\u0433\u0440 \u0432\u0438\u0434\u0435\u043b\u043e\u0441\u044c \u043d\u0435\u0446\u0435\u043b\u0435\u0441\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u044b\u043c \u2013 \u0432 \u0438\u0442\u043e\u0433\u0435 \u0438\u0445 \u043a\u043e\u043b-\u0432\u043e \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u043e 1, 3, \u0438 5.<\/p>\n<p>\u041f\u0440\u0438 1 \u043c\u0430\u0442\u0447\u0435 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043b\u043e\u0441\u044c 3 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 \u0431\u0435\u0437 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f:<\/p>\n<ul>\n<li>\n<p>\u0438\u0437 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0432 \u043f\u0440\u0435\u0434\u0448\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u043c \u043c\u0430\u0442\u0447\u0435 (<strong>df_1<\/strong>);<\/p>\n<\/li>\n<li>\n<p>\u0438\u0437 \u0440\u0430\u0437\u043d\u043e\u0441\u0442\u0438 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0438 \u0435\u0451 \u043e\u043f\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0432 \u043f\u0440\u0435\u0434\u0448\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u043c \u043c\u0430\u0442\u0447\u0435 (<strong>df_2<\/strong>);<\/p>\n<\/li>\n<li>\n<p>\u0438\u0437 \u0440\u0430\u0437\u043d\u0438\u0446\u044b \u0440\u0430\u0437\u043d\u043e\u0441\u0442\u0435\u0439 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u0438\u0433\u0440\u0430\u044e\u0449\u0438\u0445 \u043a\u043e\u043c\u0430\u043d\u0434, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0439 \u0438\u0437 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 <strong>df_2<\/strong> (<strong>df_3<\/strong>).<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438 3 \u043c\u0430\u0442\u0447\u0430\u0445 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043b\u043e\u0441\u044c 6 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u043e\u0432 \u0431\u0435\u0437 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f:<\/p>\n<ul>\n<li>\n<p>\u0438\u0437 \u0441\u0440\u0435\u0434\u043d\u0435\u0439 \u0438 \u043c\u0435\u0434\u0438\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0432 3 \u043f\u0440\u0435\u0434\u0448\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043c\u0430\u0442\u0447\u0430\u0445 (<strong>df_4, df_5<\/strong>);<\/p>\n<\/li>\n<li>\n<p>\u0438\u0437 \u0441\u0440\u0435\u0434\u043d\u0435\u0439 \u0438 \u043c\u0435\u0434\u0438\u0430\u043d\u043d\u043e\u0439 \u0440\u0430\u0437\u043d\u043e\u0441\u0442\u0438 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0438 \u0435\u0451 \u043e\u043f\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0432 3 \u043f\u0440\u0435\u0434\u0448\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043c\u0430\u0442\u0447\u0430\u0445 (<strong>df_6, df_7<\/strong>);<\/p>\n<\/li>\n<li>\n<p>\u0438\u0437 \u0440\u0430\u0437\u043d\u0438\u0446\u044b \u0441\u0440\u0435\u0434\u043d\u0435\u0439 \u0438 \u043c\u0435\u0434\u0438\u0430\u043d\u043d\u043e\u0439 \u0440\u0430\u0437\u043d\u043e\u0441\u0442\u0435\u0439 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u0432 3 \u043f\u0440\u0435\u0434\u0448\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043c\u0430\u0442\u0447\u0430\u0445, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0439 \u0438\u0437 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u043e\u0432 <strong>df_6, df_7<\/strong> (<strong>df_8, df_9<\/strong>).<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438 5 \u043c\u0430\u0442\u0447\u0430\u0445 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043b\u043e\u0441\u044c 6 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u043e\u0432 \u0431\u0435\u0437 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f:<\/p>\n<ul>\n<li>\n<p>\u0438\u0437 \u0441\u0440\u0435\u0434\u043d\u0435\u0439 \u0438 \u043c\u0435\u0434\u0438\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0432 5 \u043f\u0440\u0435\u0434\u0448\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043c\u0430\u0442\u0447\u0430\u0445 (<strong>df_10, df_11<\/strong>);<\/p>\n<\/li>\n<li>\n<p>\u0438\u0437 \u0441\u0440\u0435\u0434\u043d\u0435\u0439 \u0438 \u043c\u0435\u0434\u0438\u0430\u043d\u043d\u043e\u0439 \u0440\u0430\u0437\u043d\u043e\u0441\u0442\u0438 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0438 \u0435\u0451 \u043e\u043f\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0432 5 \u043f\u0440\u0435\u0434\u0448\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043c\u0430\u0442\u0447\u0430\u0445 (<strong>df_12, df_13<\/strong>);<\/p>\n<\/li>\n<li>\n<p>\u0438\u0437 \u0440\u0430\u0437\u043d\u0438\u0446\u044b \u0441\u0440\u0435\u0434\u043d\u0435\u0439 \u0438 \u043c\u0435\u0434\u0438\u0430\u043d\u043d\u043e\u0439 \u0440\u0430\u0437\u043d\u043e\u0441\u0442\u0435\u0439 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u0432 5 \u043f\u0440\u0435\u0434\u0448\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043c\u0430\u0442\u0447\u0430\u0445, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0439 \u0438\u0437 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u043e\u0432 <strong>df_12, df_13<\/strong> (<strong>df_14, df_15<\/strong>).<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f 15 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u043e\u0432 (\u0442\u043e\u0447\u043d\u0435\u0435 \u0433\u0440\u0443\u043f\u043f \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u043e\u0432 \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0438\u0445 \u0438 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u043d\u0430\u0431\u043e\u0440\u043e\u0432 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432) \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f <strong>df_creator<\/strong> \u0441 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0446\u0438\u043a\u043b\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 (\u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 <strong>day, month, day_of_week<\/strong>) \u0447\u0435\u0440\u0435\u0437 sin \u0438 cos \u0434\u043b\u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0438\u0445 \u043a \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043c\u043e\u0439 \u0437\u043d\u0430\u0447\u0438\u043c\u043e\u0441\u0442\u0438, \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c \u043d\u0430 \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0443\u044e, \u0442\u0435\u0441\u0442\u043e\u0432\u0443\u044e \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u0438 \u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c \u0438\u0445 \u043d\u0430 \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0438\u0435 \u0438 \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438. \u0414\u0435\u043b\u0435\u043d\u0438\u0435 \u043d\u0430 \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0443\u044e \u0438 \u0442\u0435\u0441\u0442\u043e\u0432\u0443\u044e \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b\u043e\u0441\u044c \u043f\u043e \u0441\u0435\u0437\u043e\u043d\u0430\u043c \u2013 \u043f\u0435\u0440\u0432\u044b\u0435 3 \u0448\u043b\u0438 \u0432 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435, 4 \u2013 \u043d\u0430 \u0442\u0435\u0441\u0442.<\/p>\n<pre><code class=\"python\"># df                    - \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 # match_count           - \u043a\u043e\u043b-\u0432\u043e \u043c\u0430\u0442\u0447\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0435\u0440\u0443\u0442\u0441\u044f \u0432 \u0440\u0430\u0441\u0447\u0451\u0442 # type_of_calculation   - \u0442\u0438\u043f \u0440\u0430\u0441\u0447\u0435\u0442\u0430 (None - \u0432 \u0440\u0430\u0441\u0447\u0451\u0442 \u0431\u0435\u0440\u0435\u0442\u0441\u044f \u0438\u0441\u0445\u043e\u0434\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430, 'diff' - \u0440\u0430\u0437\u043d\u043e\u0441\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043f\u043e \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u043c \u043c\u0430\u0442\u0447\u0430\u043c, 'diff_diff' - \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u0440\u0430\u0437\u043d\u043e\u0441\u0442\u0435\u0439 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043f\u043e \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u043c \u043c\u0430\u0442\u0447\u0430\u043c) # mean_median           - \u043e\u043f\u0446\u0438\u044f \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e \u0438\u043b\u0438 \u043c\u0435\u0434\u0438\u0430\u043d\u044b \u043f\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c \u043c\u0430\u0442\u0447\u0430\u043c (\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0434\u043b\u044f \u043a\u043e\u043b-\u0432\u0430 \u043c\u0430\u0442\u0447\u0435\u0439 3 \u0438 5)  def df_creator(df, match_count, type_of_calculation=None, mean_median=None):      # \u0434\u0435\u043b\u0430\u0435\u043c \u043a\u043e\u043f\u0438\u044e \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 \u0434\u043b\u044f \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438     df_main = df.copy()      if type_of_calculation == None:          # \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u0441\u0442\u043e\u043b\u0431\u0446\u044b \u0434\u043b\u044f \u0441\u0434\u0432\u0438\u0433\u0430 \u0438 \u0432\u0441\u0442\u0430\u0432\u043a\u0438 \u0443 \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b         columns_to_shift_paste_h = ['ppp_h', 'ppk_h', 'numa_h', 'wt_h', 'pt_h', 'sog_h', 'bs_h', 'pm_h', 'at_h', 'final_score_h']         # \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u0441\u0442\u043e\u043b\u0431\u0446\u044b \u0434\u043b\u044f \u0441\u0434\u0432\u0438\u0433\u0430 \u0438 \u0432\u0441\u0442\u0430\u0432\u043a\u0438 \u0443 \u0433\u043e\u0441\u0442\u0435\u0432\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b         columns_to_shift_paste_a = ['ppp_a', 'ppk_a', 'numa_a', 'wt_a', 'pt_a', 'sog_a', 'bs_a', 'pm_a', 'at_a', 'final_score_a']      elif type_of_calculation == 'diff' or type_of_calculation == 'diff_diff':                  column_prefix = ['ppp', 'ppk', 'numa', 'wt', 'pt', 'sog', 'bs', 'pm', 'at', 'final_score', 'tp', 'reloc', 'rest', 'intense', 'win', 'ftf', 'mop']         columns_to_shift_paste_h, columns_to_shift_paste_a = [], []          # \u0441\u0447\u0438\u0442\u0430\u0435\u043c \u0440\u0430\u0437\u043d\u043e\u0441\u0442\u0438 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0441\u0434\u0432\u0438\u0433\u0430\u0442\u044c\u0441\u044f         for pref in column_prefix[:10]:             df_main['d_' + pref + '_h'] = df_main[pref + '_h'] - df_main[pref + '_a']             df_main['d_' + pref + '_a'] = df_main[pref + '_a'] - df_main[pref + '_h']             df_main.drop(columns=[pref + '_h', pref + '_a'], inplace=True)              # \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u0441\u0442\u043e\u043b\u0431\u0446\u044b \u0434\u043b\u044f \u0441\u0434\u0432\u0438\u0433\u0430 \u0438 \u0432\u0441\u0442\u0430\u0432\u043a\u0438 \u0443 \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b             columns_to_shift_paste_h.append('d_' + pref + '_h')             # \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u0441\u0442\u043e\u043b\u0431\u0446\u044b \u0434\u043b\u044f \u0441\u0434\u0432\u0438\u0433\u0430 \u0438 \u0432\u0441\u0442\u0430\u0432\u043a\u0438 \u0443 \u0433\u043e\u0441\u0442\u0435\u0432\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b             columns_to_shift_paste_a.append('d_' + pref + '_a')      else:         raise TypeError(f'Type of calculation \"{type_of_calculation}\" does not exist')      def stat_shifter(team, df_team, columns_to_shift_paste):          # \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u0433\u0440\u0443\u043f\u043f\u0443 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a (\u0434\u043e\u043c\u0430\u0448\u043d\u044f\u044f \u0438\u043b\u0438 \u0433\u043e\u0441\u0442\u0435\u0432\u0430\u044f), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u044b         if 'ppp_h' in columns_to_shift_paste or 'd_ppp_h' in columns_to_shift_paste:             sec_columns_set = columns_to_shift_paste_a             home_away_team = 'team_h'                      else:             sec_columns_set = columns_to_shift_paste_h             home_away_team = 'team_a'          if match_count == 1 and mean_median == None:              df_main.loc[df_team.index, columns_to_shift_paste] = np.where((df_main.loc[df_team.index, [home_away_team]*10] == team), df_team.drop(columns=['season']).shift(), df_main.loc[df_team.index, columns_to_shift_paste])          elif (match_count == 3 or match_count == 5) and mean_median == 'mean':              df_main.loc[df_team.index, columns_to_shift_paste] = np.where((df_main.loc[df_team.index, [home_away_team]*10] == team), df_team.drop(columns=['season']).rolling(window=match_count).mean().shift(), df_main.loc[df_team.index, columns_to_shift_paste])          elif (match_count == 3 or match_count == 5) and mean_median == 'median':              df_main.loc[df_team.index, columns_to_shift_paste] = np.where((df_main.loc[df_team.index, [home_away_team]*10] == team), df_team.drop(columns=['season']).rolling(window=match_count).median().shift(), df_main.loc[df_team.index, columns_to_shift_paste])          else:             raise TypeError(f'Parameter mean_median with value \"{mean_median}\" does not exist, match count ({match_count}) is not set correctly (must be 1, 3 or 5) or their combination is set incorrectly')      for team in df_main.team_h.unique():          # \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u0441 \u043c\u0430\u0442\u0447\u0430\u043c\u0438 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b         df_team = df_main[(df_main['team_h'] == team) | (df_main['team_a'] == team)]          # \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b         df_team.drop(columns=['home_win', 'tp_h', 'tp_a', 'delta_p', 'day', 'month', 'day_of_week', 'reloc_h', 'reloc_a', 'rest_h', 'rest_a', 'intense_h', 'intense_a', 'win_h', 'win_a', 'ftf_h', 'ftf_a', 'mop_h', 'mop_a'], inplace=True)          columns_h = ['ppp_h', 'ppk_h', 'numa_h', 'wt_h', 'pt_h', 'sog_h', 'bs_h', 'pm_h', 'at_h', 'final_score_h']         columns_a = ['ppp_a', 'ppk_a', 'numa_a', 'wt_a', 'pt_a', 'sog_a', 'bs_a', 'pm_a', 'at_a', 'final_score_a']          df_team[columns_to_shift_paste_h] = np.where(df_team[['team_a'] * 10] == team, df_team[columns_to_shift_paste_a], df_team[columns_to_shift_paste_h])         df_team.drop(columns=columns_to_shift_paste_a + ['team_h', 'team_a'], inplace=True)          stat_shifter(team, df_team, columns_to_shift_paste_h)         stat_shifter(team, df_team, columns_to_shift_paste_a)              # \u043c\u0435\u0442\u0438\u043c \u043a\u043e\u043b-\u0432\u043e \u043c\u0430\u0442\u0447\u0435\u0439, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u0434\u0432\u0438\u0433, \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0441\u0435\u0437\u043e\u043d\u0443 \u0443 \u0432\u0441\u0435\u0445 \u043a\u043e\u043c\u0430\u043d\u0434 \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f         index_first_games = df_team[((df_team.season - df_team.season.shift(match_count)).isna()) | ((df_team.season - df_team.season.shift(match_count)) > 0)].index         for i in index_first_games:                 if df_main.loc[i, 'team_h'] == team:                         df_main.loc[i, 'team_h'] = np.nan                 else: df_main.loc[i, 'team_a'] = np.nan      # \u0443\u0434\u0430\u043b\u044f\u0435\u043c \u043f\u0435\u0440\u0432\u044b\u0435 \u043c\u0430\u0442\u0447\u0438 \u043a\u043e\u043c\u0430\u043d\u0434     df_main.dropna(subset=['team_h', 'team_a'], inplace=True)      # \u0441\u0447\u0438\u0442\u0430\u0435\u043c \u0440\u0430\u0437\u043d\u0438\u0446\u0443 \u0440\u0430\u0437\u043d\u043e\u0441\u0442\u0435\u0439 \u043c\u0435\u0436\u0434\u0443 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430\u043c\u0438 \u0438\u0433\u0440\u0430\u044e\u0449\u0438\u0445 \u043a\u043e\u043c\u0430\u043d\u0434 \u0434\u043b\u044f 3 \u0442\u0438\u043f\u0430 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u043e\u0432     if type_of_calculation == 'diff_diff':          for pref in column_prefix[:10]:             df_main['dd_' + pref + '_ha'] = df_main['d_' + pref + '_h'] - df_main['d_' + pref + '_a']             df_main.drop(columns=['d_' + pref + '_h', 'd_' + pref + '_a'], inplace=True)                  for pref in column_prefix[-7:]:             df_main['dd_' + pref + '_ha'] = df_main[pref + '_h'] - df_main[pref + '_a']             df_main.drop(columns=[pref + '_h', pref + '_a'], inplace=True)          df_main.drop(columns=['delta_p'], inplace=True)      else:         pass      # \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u043c \u043a \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043c\u043e\u0439 \u0437\u043d\u0430\u0447\u0438\u043c\u043e\u0441\u0442\u0438 \u0446\u0438\u043a\u043b\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f ('day', 'month', 'day_of_week') \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u0440\u0438\u0433\u043e\u043d\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c sin \u0438 cos, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u0443\u0440\u0430\u0432\u043d\u043e\u0432\u0435\u0448\u0438\u0432\u0430\u043b\u0438 \u0434\u0440\u0443\u0433 \u0434\u0440\u0443\u0433\u0430 \u0438 \u043d\u0435 \u0431\u044b\u043b\u043e \u043f\u0435\u0440\u0435\u043a\u043e\u0441\u0430 \u0432 \u0434\u0430\u043d\u043d\u044b\u0445     df_main['day_of_week_cos'], df_main['day_of_week_sin'] = np.cos(2 * np.pi * df_main['day_of_week'] \/ 6), np.sin(2 * np.pi * df_main['day_of_week'] \/ 6)     df_main['month_cos'], df_main['month_sin'] = np.cos(2 * np.pi * df_main['month'] \/ 12), np.sin(2 * np.pi * df_main['month'] \/ 12)     df_main['day_cos'], df_main['day_sin'] = np.cos(2 * np.pi * df_main['day'] \/ 31), np.sin(2 * np.pi * df_main['day'] \/ 31)      # \u0443\u0434\u0430\u043b\u044f\u0435\u043c \u0431\u043e\u043b\u0435\u0435 \u043d\u0435 \u043d\u0443\u0436\u043d\u044b\u0435 \u0441\u0442\u043e\u043b\u0431\u0446\u044b     df_main.drop(columns=['team_h', 'team_a', 'day', 'day_of_week', 'month'], inplace=True)      # \u0434\u0435\u043b\u0438\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u043d\u0430 \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0443\u044e \u0438 \u0442\u0435\u0441\u0442\u043e\u0432\u0443\u044e \u0432\u044b\u0431\u043e\u0440\u043a\u0438     df_train, df_test = df_main[df_main.season &lt; 4], df_main[df_main.season == 4]      # \u0443\u0434\u0430\u043b\u044f\u0435\u043c \u043d\u0435\u043d\u0443\u0436\u043d\u044b\u0439 \u0441\u0442\u043e\u043b\u0431\u0435\u0446 season     df_train.drop(columns=['season'], inplace=True)     df_test.drop(columns=['season'], inplace=True)      x_train, y_train = df_train.drop(columns=['home_win']), df_train['home_win']     x_test, y_test = df_test.drop(columns=['home_win']), df_test['home_win']      return x_train, y_train, x_test, y_test <\/code><\/pre>\n<p>\u0421\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0432 15 \u0433\u0440\u0443\u043f\u043f \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u043e\u0432 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043d\u0430 \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0438\u0435 \u0438 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0435 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 (\u0434\u043b\u044f \u043e\u0434\u043d\u043e- \u0438 \u0442\u0440\u0435\u0445\u043c\u0430\u0442\u0447\u0435\u0432\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0432 \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0438\u0435 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u043f\u043e\u043f\u0430\u043b\u0438 74% \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0439, \u0434\u043b\u044f \u043f\u044f\u0442\u0438\u043c\u0430\u0442\u0447\u0435\u0432\u044b\u0445 \u2013 75%), \u0431\u044b\u043b\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435, \u043d\u0435 \u043e\u0442\u043d\u043e\u0441\u044f\u0449\u0438\u0435\u0441\u044f \u043a \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0430\u043b\u044c\u043d\u044b\u043c \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430\u043c. \u041c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u0442\u0430\u043a\u0436\u0435 \u043a\u0430\u043a \u0438 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u043e\u0432, \u0431\u044b\u043b\u043e \u0432\u0430\u0440\u0438\u0430\u0442\u0438\u0432\u043d\u044b\u043c \u0434\u043b\u044f \u043e\u0446\u0435\u043d\u043a\u0438 \u043d\u0430\u0438\u043b\u0443\u0447\u0448\u0435\u0433\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430. \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u043e 3 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f:<\/p>\n<ul>\n<li>\n<p>\u043c\u0438\u043d\u0438\u043c\u0430\u043a\u0441 (MinMaxScaler);<\/p>\n<\/li>\n<li>\n<p>\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0438\u0437\u0430\u0446\u0438\u044f (StandardScaler);<\/p>\n<\/li>\n<li>\n<p>\u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f (Normalizer).<\/p>\n<\/li>\n<\/ul>\n<p>\u041c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 15 \u0433\u0440\u0443\u043f\u043f \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u043e\u0432 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b\u043e\u0441\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <strong>scaler<\/strong>.<\/p>\n<pre><code class=\"python\">def scaler(df_train, df_test):      cat_columns = ['reloc_h', 'reloc_a', 'intense_h', 'intense_a']     time_columns = ['day_of_week_cos', 'day_of_week_sin', 'month_cos', 'month_sin', 'day_cos', 'day_sin']          # \u0443\u0431\u0438\u0440\u0430\u0435\u043c \u0438\u0437 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u043c\u044b\u0445 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u043e\u0432 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 (\u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u043d\u0435 \u0432\u043e \u0432\u0441\u0435\u0445 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430\u0445) \u0438 \u0441\u043c\u0430\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f     try:         df_train_wo_cat_mm, df_train_wo_cat_st, df_train_wo_cat_norm = df_train.drop(columns=cat_columns+time_columns), df_train.drop(columns=cat_columns+time_columns), df_train.drop(columns=cat_columns+time_columns)         df_test_wo_cat_mm, df_test_wo_cat_st, df_test_wo_cat_norm = df_test.drop(columns=cat_columns+time_columns), df_test.drop(columns=cat_columns+time_columns), df_test.drop(columns=cat_columns+time_columns)         i = 0      except KeyError:         df_train_wo_cat_mm, df_train_wo_cat_st, df_train_wo_cat_norm = df_train.drop(columns=time_columns), df_train.drop(columns=time_columns), df_train.drop(columns=time_columns)         df_test_wo_cat_mm, df_test_wo_cat_st, df_test_wo_cat_norm = df_test.drop(columns=time_columns), df_test.drop(columns=time_columns), df_test.drop(columns=time_columns)         i = 1      mm_scaler = MinMaxScaler()     df_train_wo_cat_mm.loc[:, :] = mm_scaler.fit_transform(df_train_wo_cat_mm)     df_test_wo_cat_mm.loc[:, :] = mm_scaler.transform(df_test_wo_cat_mm)          st_scaler = StandardScaler()     df_train_wo_cat_st.loc[:, :] = st_scaler.fit_transform(df_train_wo_cat_st)     df_test_wo_cat_st.loc[:, :] = st_scaler.transform(df_test_wo_cat_st)      # \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c\u044e \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u043e\u0440\u043c\u0430\u043b\u0430\u0439\u0437\u0435\u0440\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e \u0441\u0442\u0440\u043e\u043a\u0430\u043c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0435\u043c train \u0438 test, \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u043d\u0438\u0440\u0443\u0435\u043c, \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u043e \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0443\u0435\u043c, \u043f\u043e\u0442\u043e\u043c \u0441\u043d\u043e\u0432\u0430 \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u043d\u0438\u0440\u0443\u0435\u043c \u0438 \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u0435\u043c \u043d\u0430 train \u0438 test     norm_scaler = Normalizer()     index = min(df_test.index)     df_train_test_wo_cat_norm = pd.concat([df_train_wo_cat_norm, df_test_wo_cat_norm])     df_train_test_wo_cat_norm = df_train_test_wo_cat_norm.transpose()     df_train_test_wo_cat_norm.loc[:, :] = norm_scaler.fit_transform(df_train_test_wo_cat_norm)     df_train_test_wo_cat_norm = df_train_test_wo_cat_norm.transpose()     df_train_wo_cat_norm = df_train_test_wo_cat_norm[df_train_test_wo_cat_norm.index &lt; index]     df_test_wo_cat_norm = df_train_test_wo_cat_norm[df_train_test_wo_cat_norm.index >= index]          # \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043a \u0441\u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0434\u0430\u043d\u043d\u044b\u043c \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 (\u0435\u0441\u043b\u0438 \u0438\u043c\u0435\u044e\u0442\u0441\u044f) \u0438 \u0441\u043c\u0430\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f     if i == 0:         df_train_mm = pd.merge(df_train_wo_cat_mm, df_train[cat_columns+time_columns], left_index=True, right_index=True)         df_test_mm = pd.merge(df_test_wo_cat_mm, df_test[cat_columns+time_columns], left_index=True, right_index=True)         df_train_st = pd.merge(df_train_wo_cat_st, df_train[cat_columns+time_columns], left_index=True, right_index=True)         df_test_st = pd.merge(df_test_wo_cat_st, df_test[cat_columns+time_columns], left_index=True, right_index=True)         df_train_norm = pd.merge(df_train_wo_cat_norm, df_train[cat_columns+time_columns], left_index=True, right_index=True)         df_test_norm = pd.merge(df_test_wo_cat_norm, df_test[cat_columns+time_columns], left_index=True, right_index=True)      else:         df_train_mm = pd.merge(df_train_wo_cat_mm, df_train[time_columns], left_index=True, right_index=True)         df_test_mm = pd.merge(df_test_wo_cat_mm, df_test[time_columns], left_index=True, right_index=True)         df_train_st = pd.merge(df_train_wo_cat_st, df_train[time_columns], left_index=True, right_index=True)         df_test_st = pd.merge(df_test_wo_cat_st, df_test[time_columns], left_index=True, right_index=True)         df_train_norm = pd.merge(df_train_wo_cat_norm, df_train[time_columns], left_index=True, right_index=True)         df_test_norm = pd.merge(df_test_wo_cat_norm, df_test[time_columns], left_index=True, right_index=True)      return df_train_mm, df_train_st, df_train_norm, df_test_mm, df_test_st, df_test_norm <\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043e 45 \u043d\u0430\u0431\u043e\u0440\u043e\u0432 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u0438 \u0441\u043e\u0431\u0440\u0430\u043d\u044b \u0432 \u043e\u0434\u043d\u043e\u043c \u0441\u043b\u043e\u0432\u0430\u0440\u0435 \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043d\u0438\u043c\u0438.<\/p>\n<pre><code class=\"python\">total_df_dict = {'1':[[df_1_x_train_mm, df_1_y_train, df_1_x_test_mm, df_1_y_test], [df_1_x_train_st, df_1_x_test_st], [df_1_x_train_norm, df_1_x_test_norm]],                 '2':[[df_2_x_train_mm, df_2_y_train, df_2_x_test_mm, df_2_y_test], [df_2_x_train_st, df_2_x_test_st], [df_2_x_train_norm, df_2_x_test_norm]],                 '3':[[df_3_x_train_mm, df_3_y_train, df_3_x_test_mm, df_3_y_test], [df_3_x_train_st, df_3_x_test_st], [df_3_x_train_norm, df_3_x_test_norm]],                 '4':[[df_4_x_train_mm, df_4_y_train, df_4_x_test_mm, df_4_y_test], [df_4_x_train_st, df_4_x_test_st], [df_4_x_train_norm, df_4_x_test_norm]],                 '5':[[df_5_x_train_mm, df_5_y_train, df_5_x_test_mm, df_5_y_test], [df_5_x_train_st, df_5_x_test_st], [df_5_x_train_norm, df_5_x_test_norm]],                 '6':[[df_6_x_train_mm, df_6_y_train, df_6_x_test_mm, df_6_y_test], [df_6_x_train_st, df_6_x_test_st], [df_6_x_train_norm, df_6_x_test_norm]],                 '7':[[df_7_x_train_mm, df_7_y_train, df_7_x_test_mm, df_7_y_test], [df_7_x_train_st, df_7_x_test_st], [df_7_x_train_norm, df_7_x_test_norm]],                 '8':[[df_8_x_train_mm, df_8_y_train, df_8_x_test_mm, df_8_y_test], [df_8_x_train_st, df_8_x_test_st], [df_8_x_train_norm, df_8_x_test_norm]],                 '9':[[df_9_x_train_mm, df_9_y_train, df_9_x_test_mm, df_9_y_test], [df_9_x_train_st, df_9_x_test_st], [df_9_x_train_norm, df_9_x_test_norm]],                 '10':[[df_10_x_train_mm, df_10_y_train, df_10_x_test_mm, df_10_y_test], [df_10_x_train_st, df_10_x_test_st], [df_10_x_train_norm, df_10_x_test_norm]],                 '11':[[df_11_x_train_mm, df_11_y_train, df_11_x_test_mm, df_11_y_test], [df_11_x_train_st, df_11_x_test_st], [df_11_x_train_norm, df_11_x_test_norm]],                 '12':[[df_12_x_train_mm, df_12_y_train, df_12_x_test_mm, df_12_y_test], [df_12_x_train_st, df_12_x_test_st], [df_12_x_train_norm, df_12_x_test_norm]],                 '13':[[df_13_x_train_mm, df_13_y_train, df_13_x_test_mm, df_13_y_test], [df_13_x_train_st, df_13_x_test_st], [df_13_x_train_norm, df_13_x_test_norm]],                 '14':[[df_14_x_train_mm, df_14_y_train, df_14_x_test_mm, df_14_y_test], [df_14_x_train_st, df_14_x_test_st], [df_14_x_train_norm, df_14_x_test_norm]],                 '15':[[df_15_x_train_mm, df_15_y_train, df_15_x_test_mm, df_15_y_test], [df_15_x_train_st, df_15_x_test_st], [df_15_x_train_norm, df_15_x_test_norm]]} <\/code><\/pre>\n<p>\u0421\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u0434\u0438\u0441\u0431\u0430\u043b\u0430\u043d\u0441\u0430 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0432 \u0446\u0435\u043b\u0435\u0432\u043e\u043c \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0435 \u043d\u0435 \u0431\u044b\u043b\u043e \u2013 \u0434\u043b\u044f \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u043e\u0432 \u0441 1 \u043c\u0430\u0442\u0447\u0435\u043c \u0431\u044b\u043b\u043e 55% \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0439 \u0441 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u043a\u043b\u0430\u0441\u0441\u043e\u043c, \u0434\u043b\u044f \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u043e\u0432 \u0441 3 \u0438 5 \u043c\u0430\u0442\u0447\u0430\u043c\u0438 \u2013 54%. \u041c\u0435\u0442\u0440\u0438\u043a\u043e\u0439 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u0432\u044b\u0431\u0440\u0430\u043d\u0430 ROC AUC, \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u044e\u0449\u0430\u044f \u043f\u043e\u0434\u0431\u043e\u0440\u0430 \u043f\u043e\u0440\u043e\u0433\u0430 \u0434\u043b\u044f \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u0443\u0435\u043c\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u044c\u044e \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0435\u0439.<\/p>\n<p>\u0414\u043b\u044f \u043e\u0446\u0435\u043d\u043a\u0438 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u043e\u0431\u0443\u0447\u0430\u0435\u043c\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438, \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u0443\u044e\u0449\u0435\u0439 \u043f\u043e\u0431\u0435\u0434\u0443 \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0432\u043e \u0432\u0441\u0435\u0445 \u043c\u0430\u0442\u0447\u0430\u0445 \u2013 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u043e\u0432 \u043e\u043d\u043e \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u043e 0.50.<\/p>\n<h3>\u041c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/h3>\n<p>\u0412 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u043e 5 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u2013 LogisticRegression, RandomForestClassifier, XGBClassifier, LGBMClassifier, CatBoostClassifier, \u043a\u0430\u0436\u0434\u0430\u044f \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u0431\u0443\u0447\u0430\u043b\u0430\u0441\u044c \u0441 \u043f\u0435\u0440\u0435\u0431\u043e\u0440\u043e\u043c \u0433\u0438\u043f\u0435\u0440\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432.<\/p>\n<pre><code class=\"python\"># \u0434\u0435\u043b\u0430\u0435\u043c 10 \u0444\u043e\u043b\u0434\u043e\u0432, \u0442.\u043a. \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0435\u043c\u043d\u043e\u0433\u043e folds = KFold(n_splits=10, shuffle=True, random_state=800)  # LogisticRegression lr_param = [{'solver': ['newton-cg'], 'penalty': ['l2', 'none'], 'C': [1e-5, 1e-3, 1e-1, 1, 10], 'max_iter': [100, 500, 1000]},             {'solver': ['lbfgs'], 'penalty': ['l2', 'none'], 'C': [1e-5, 1e-3, 1e-1, 1, 10], 'max_iter': [100, 500, 1000]},             {'solver': ['liblinear'], 'penalty': ['l1', 'l2'], 'C': [1e-5, 1e-3, 1e-1, 1, 10], 'max_iter': [100, 500, 1000], 'random_state': [800]},             {'solver': ['sag'], 'penalty': ['l2', 'none'], 'C': [1e-5, 1e-3, 1e-1, 1, 10], 'max_iter': [100, 500, 1000], 'random_state': [800]},             {'solver': ['saga'], 'penalty': ['l1', 'l2', 'elasticnet', 'none'], 'C': [1e-5, 1e-3, 1e-1, 1, 10], 'max_iter': [100, 500, 1000], 'random_state': [800]}]  lr_model = LogisticRegression() lr_model_grid = GridSearchCV(estimator=lr_model,                             param_grid=lr_param,                             scoring='roc_auc',                             n_jobs=-1,                             cv=folds,                             verbose=1,                             return_train_score=True)  # RandomForestClassifier rfc_param = {'n_estimators': [200, 500],             'max_depth': [5, 10],             'min_samples_split': [2, 5],             'min_samples_leaf': [1, 3],             'max_features': [0.5, 0.7],             'max_samples': [0.5, 0.7]}  rfc_model = RandomForestClassifier(criterion='log_loss', bootstrap=True, random_state=800) rfc_model_grid = GridSearchCV(estimator=rfc_model,                             param_grid=rfc_param,                             scoring='roc_auc',                             n_jobs=-1,                             cv=folds,                             verbose=1,                             return_train_score=True)  # XGBClassifier xgb_param = {'eta': [0.001, 0.01],             'n_estimators': [200, 500],             'max_depth': [5, 10],             'subsample': [0.5, 0.7],             'min_child_weight': [2, 5],             'colsample_bytree': [0.5, 0.7]}  xgb_model = XGBClassifier(objective='binary:logistic', eval_metric='auc', seed=800) xgb_model_grid = GridSearchCV(estimator=xgb_model,                              param_grid=xgb_param,                             scoring='roc_auc',                             n_jobs=-1,                             cv=folds,                             verbose=1,                             return_train_score=True)  # LGBMClassifier lgbm_param ={'n_estimators': [200, 500],             'max_depth': [5, 10],             'min_data_in_leaf': [5, 10],             'learning_rate': [0.001, 0.01],             'subsample': [0.5, 0.7],             'colsample_bytree': [0.5, 0.7]}  lgbm_model = LGBMClassifier(objective='binary', metric='auc', random_state=800) lgbm_model_grid = GridSearchCV(estimator=lgbm_model,                                 param_grid=lgbm_param,                                 scoring='roc_auc',                                 n_jobs=-1,                                 cv=folds,                                 verbose=1,                                 return_train_score=True)  # CatBoostClassifier cbc_param = {'iterations': [200, 500],             'learning_rate': [0.001, 0.01],             'subsample': [0.5, 0.7],             'rsm': [0.5, 0.7],             'depth': [5, 10],             'min_data_in_leaf': [1, 3]}  cbc_model = CatBoostClassifier(loss_function='Logloss', eval_metric='AUC:hints=skip_train~false', random_seed=800, verbose=0) cbc_model_grid = GridSearchCV(estimator=cbc_model,                                 param_grid=cbc_param,                                 scoring='roc_auc',                                 n_jobs=-1,                                 cv=folds,                                 verbose=1,                                 return_train_score=True) <\/code><\/pre>\n<p>\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437 45 \u043d\u0430\u0431\u043e\u0440\u043e\u0432 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u043e\u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u043b\u0430\u0441\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u0441 \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0438\u043c ROC AUC.<\/p>\n<pre><code class=\"python\">df_scores = pd.DataFrame(index=[index.replace('_x_train', '') for index in df_info.index if '_x_train' in index ], columns=['best_model_mm', 'best_score_mm', 'best_model_st', 'best_score_st','best_model_norm', 'best_score_norm']) models = [lr_model_grid, rfc_model_grid, xgb_model_grid, lgbm_model_grid, cbc_model_grid]  # \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0443 \u0441 \u043b\u0443\u0447\u0448\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u044c\u044e \u0438 \u043b\u0443\u0447\u0448\u0438\u043c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 def training(x, y):      df = pd.DataFrame(columns=['best_model', 'best_score'])      for model in models:          model.fit(x, y)         df = pd.concat([df, pd.DataFrame(columns=['best_model', 'best_score'], data=[[model.best_estimator_, model.best_score_]])], axis=0)               df.reset_index(drop=True, inplace=True)     df.sort_values(by='best_score', ascending=False, inplace=True)     df.drop(index=df.index[1:], inplace=True)      return df  for k, v in total_df_dict.items():      # \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u043b\u0443\u0447\u0448\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u043b\u044f mm-\u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430     df_scores.iloc[int(k) - 1, :2] = training(v[0][0], v[0][1])      # \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u043b\u0443\u0447\u0448\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u043b\u044f st-\u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430     df_scores.iloc[int(k) - 1, 2:4] = training(v[1][0], v[0][1])      # \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u043b\u0443\u0447\u0448\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u043b\u044f st-\u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430     df_scores.iloc[int(k) - 1, 4:6] = training(v[2][0], v[0][1]) <\/code><\/pre>\n<p>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u043d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0435 \u043d\u0438\u0436\u0435.<\/p>\n<pre><code class=\"python\">plt.figure(figsize=(11, 7)) plt.suptitle('\u041a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043b\u0443\u0447\u0448\u0438\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0432\u0438\u0434\u0443 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430', fontsize=21, y=0.99) ax = sns.heatmap(data=df_scores[['best_score_mm', 'best_score_st', 'best_score_norm']].astype('float64'), annot=True, cbar=False, linewidths=.5, fmt= '.4f') ax.xaxis.tick_top() plt.show() <\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/627\/548\/e18\/627548e18f4e8bab0802017ce0f4a4f6.png\" width=\"665\" height=\"450\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/627\/548\/e18\/627548e18f4e8bab0802017ce0f4a4f6.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041b\u0443\u0447\u0448\u0435\u0439 \u043f\u043e \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0443 \u043c\u043e\u0434\u0435\u043b\u044c\u044e \u0441\u0442\u0430\u043b\u0430:<\/p>\n<pre><code class=\"python\">print('\u041b\u0443\u0447\u0448\u0435\u0439 \u043f\u043e \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0443 \u043c\u043e\u0434\u0435\u043b\u044c\u044e \u0441\u0442\u0430\u043b\u0430: \\n\\n {}'.format(df_scores[df_scores.best_score_norm == df_scores.best_score_norm.max()]['best_model_norm'].values.tolist()[0]))<\/code><\/pre>\n<p>RandomForestClassifier (criterion=&#8217;log_loss&#8217;, max_depth=5, max_features=0.7, max_samples=0.5, min_samples_leaf=3, n_estimators=200, random_state=800).<\/p>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 ROC AUC \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u043b 0.689 \u0443 \u043c\u043e\u0434\u0435\u043b\u0438 RandomForest \u043d\u0430 \u0434\u0430\u0442\u0430c\u0435\u0442\u0435 \u0441 \u0441\u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u043c\u0438\u043d\u0438\u043c\u0430\u043a\u0441\u043e\u043c \u0434\u0430\u043d\u043d\u044b\u043c\u0438, \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0438\u043c\u0438 \u0438\u0437 \u0440\u0430\u0437\u043d\u0438\u0446\u044b \u043c\u0435\u0434\u0438\u0430\u043d\u043d\u043e\u0439 \u0440\u0430\u0437\u043d\u043e\u0441\u0442\u0438 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0438 \u0435\u0451 \u043e\u043f\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0432 5 \u043f\u0440\u0435\u0434\u0448\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043c\u0430\u0442\u0447\u0430\u0445. \u041d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044f, \u0447\u0442\u043e \u0432 \u0441\u043e\u043f\u0435\u0440\u043d\u0438\u043a\u0430\u0445 \u0443 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0433\u043e \u043b\u0435\u0441\u0430 \u0431\u044b\u043b\u0438 3 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0441\u0438\u043b\u044c\u043d\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043d\u043e\u0433\u043e \u0431\u0443\u0441\u0442\u0438\u043d\u0433\u0430. \u0412 \u0446\u0435\u043b\u043e\u043c \u0436\u0435 \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0442\u0435\u043d\u0434\u0435\u043d\u0446\u0438\u044f \u043a \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u044e \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043f\u0440\u0438 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043f\u0440\u0435\u0434\u0448\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043c\u0430\u0442\u0447\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0435\u0440\u0443\u0442\u0441\u044f \u0432 \u0440\u0430\u0441\u0447\u0451\u0442.<\/p>\n<p>\u041a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043b\u0443\u0447\u0448\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u043e 0.637, \u0447\u0442\u043e \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043e \u0435\u0451 \u043f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u2013 \u0431\u0443\u0434\u0435\u0442 \u0447\u0435\u043c \u0437\u0430\u043d\u044f\u0442\u044c\u0441\u044f \u043d\u0430 \u0434\u043e\u0441\u0443\u0433\u0435. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0434\u0430\u043d\u043d\u044b\u0439 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u0432\u044b\u0448\u0435 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0430 27%, \u0447\u0442\u043e \u0443\u0436\u0435 \u0432\u0435\u0441\u044c\u043c\u0430 \u043d\u0435\u043f\u043b\u043e\u0445\u043e.<\/p>\n<pre><code class=\"python\">best_model = df_scores[df_scores.best_score_norm == df_scores.best_score_norm.max()]['best_model_norm'].values.tolist()[0].fit(df_14_x_train_norm, df_14_y_train) # \u0441\u0447\u0438\u0442\u0430\u0435\u043c \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u043a\u043b\u0430\u0441\u0441\u043e\u0432 probs = best_model.predict_proba(df_14_x_test_norm)  # \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 probs = probs[:, 1]  # \u0441\u0447\u0438\u0442\u0430\u0435\u043c FPR \u0438 TPR, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0433\u0440\u0430\u0444\u0438\u043a\u0430 fpr, tpr, treshold = roc_curve(df_14_y_test, probs) roc_auc = auc(fpr, tpr)  # \u0441\u0442\u0440\u043e\u0438\u043c \u0433\u0440\u0430\u0444\u0438\u043a plt.figure(figsize=(11, 7)) plt.plot(fpr, tpr, color='darkorange', label='ROC AUC = %0.3f' % roc_auc) plt.plot([0, 1], [0, 1], color='navy', linestyle='--') plt.xlim([0.0, 1.0]) plt.ylim([0.0, 1.0]) plt.xlabel('False Positive Rate') plt.ylabel('True Positive Rate') plt.title('ROC-\u043a\u0440\u0438\u0432\u0430\u044f \u043b\u0443\u0447\u0448\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445') plt.legend(loc=\"upper left\") plt.show() <\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/970\/ef7\/31b\/970ef731ba3e87e3ff91989d9b021ad7.png\" width=\"674\" height=\"442\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/970\/ef7\/31b\/970ef731ba3e87e3ff91989d9b021ad7.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0437\u043d\u0430\u0447\u0438\u043c\u044b\u043c\u0438 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430\u043c\u0438 \u0434\u043b\u044f \u043b\u0443\u0447\u0448\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u0440\u0430\u0437\u043d\u043e\u0441\u0442\u044c \u043e\u0447\u043a\u043e\u0432 \u0438\u0433\u0440\u0430\u044e\u0449\u0438\u0445 \u043a\u043e\u043c\u0430\u043d\u0434 \u0438 \u0440\u0430\u0437\u043d\u043e\u0441\u0442\u044c \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u043c\u0438 \u0432 \u0430\u0442\u0430\u043a\u0435.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/385\/ef7\/be5\/385ef7be54e712411107c47323b9bf44.png\" width=\"812\" height=\"428\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/385\/ef7\/be5\/385ef7be54e712411107c47323b9bf44.png\"\/><figcaption><\/figcaption><\/figure>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>\u041f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u0430\u044f \u043f\u0435\u0440\u0435\u0434 \u0434\u0430\u043d\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u043e\u0439 \u0446\u0435\u043b\u044c \u0434\u043e\u0441\u0442\u0438\u0433\u043d\u0443\u0442\u0430 \u2013 \u043b\u0443\u0447\u0448\u0430\u044f \u0438\u0437 \u043e\u0431\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0430 \u0440\u043e\u0441\u0442 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u043d\u0430 27% \u043f\u043e \u043c\u0435\u0442\u0440\u0438\u043a\u0435 ROC AUC \u0432 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0438 \u0441 \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u044c\u044e (\u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0441 \u043f\u043e\u0431\u0435\u0434\u043e\u0439 \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b), \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u044b\u043b\u043e \u043d\u0430 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435 (ROC AUC = 0.50).<\/p>\n<p>\u041b\u0443\u0447\u0448\u0435\u0439 \u0441\u0442\u0430\u043b\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0433\u043e \u043b\u0435\u0441\u0430, \u043e\u0431\u0443\u0447\u0435\u043d\u043d\u0430\u044f \u043d\u0430 \u0434\u0430\u0442\u0430c\u0435\u0442\u0435 \u0441 \u0441\u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u043c\u0438\u043d\u0438\u043c\u0430\u043a\u0441\u043e\u043c \u0434\u0430\u043d\u043d\u044b\u043c\u0438, \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0438\u043c\u0438 \u0438\u0437 \u0440\u0430\u0437\u043d\u0438\u0446\u044b \u043c\u0435\u0434\u0438\u0430\u043d\u043d\u043e\u0439 \u0440\u0430\u0437\u043d\u043e\u0441\u0442\u0438 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0438 \u0435\u0451 \u043e\u043f\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0432 5 \u043f\u0440\u0435\u0434\u0448\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043c\u0430\u0442\u0447\u0430\u0445. \u041d\u0430 \u043a\u0440\u043e\u0441\u0441\u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u0430\u043d\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u043e 0.689, \u043d\u0430 \u0442\u0435\u0441\u0442\u0435 \u2013 0.637, \u0447\u0442\u043e \u0441\u0432\u0438\u0434\u0435\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0443\u0435\u0442 \u043e \u0435\u0451 \u043f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438. \u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0435\u0451 \u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u043d\u043a\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0433\u0438\u043f\u0435\u0440\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043d\u043e\u0433\u043e \u0431\u0443\u0441\u0442\u0438\u043d\u0433\u0430, \u043f\u0435\u0440\u0435\u0431\u0438\u0440\u0430\u0435\u043c\u044b\u0445 \u043f\u0440\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0435\u0449\u0451 \u0431\u043e\u043b\u0435\u0435 \u0432\u044b\u0441\u043e\u043a\u043e\u0435 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e.<\/p>\n<p>\u041f\u043e\u043c\u0438\u043c\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043d\u044b\u0445 \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u0435 \u043c\u043e\u0434\u0435\u043b\u0435\u0439, \u043c\u043e\u0436\u043d\u043e \u0441\u043f\u0430\u0440\u0441\u0438\u0442\u044c \u0438\/\u0438\u043b\u0438 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438, \u0432\u0437\u044f\u0442\u044c \u0432 \u0440\u0430\u0441\u0447\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0435\u0435 \u043a\u043e\u043b-\u0432\u043e \u043f\u0440\u0435\u0434\u0448\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043c\u0430\u0442\u0447\u0435\u0439 \u0438 \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u043d\u0430 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043c\u043e\u0434\u0435\u043b\u0438. \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0436\u0435 \u0440\u0430\u0431\u043e\u0442\u0435 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0437\u043d\u0430\u0447\u0438\u043c\u044b\u043c\u0438 \u0434\u043b\u044f \u043b\u0443\u0447\u0448\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u0440\u0430\u0437\u043d\u043e\u0441\u0442\u044c \u043e\u0447\u043a\u043e\u0432 \u0438\u0433\u0440\u0430\u044e\u0449\u0438\u0445 \u043a\u043e\u043c\u0430\u043d\u0434 (\u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u0440\u0438\u0437\u043d\u0430\u043a) \u0438 \u0440\u0430\u0437\u043d\u043e\u0441\u0442\u044c \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u043c\u0438 \u0432 \u0430\u0442\u0430\u043a\u0435 (\u0441\u043f\u0430\u0440\u0441\u0435\u043d\u043d\u044b\u0439 \u043f\u0440\u0438\u0437\u043d\u0430\u043a).<\/p>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u043c\u043e\u0451 \u043f\u043e\u0432\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u0435 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u2013 \u0440\u0430\u0434 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441 \u0432\u0430\u043c\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c\u0438 \u0441\u0432\u043e\u0435\u0439 \u043f\u0440\u043e\u0435\u043a\u0442\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b, \u043d\u0430\u0434\u0435\u044e\u0441\u044c \u0431\u044b\u043b\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e.<\/p>\n<p>\u0412\u0435\u0441\u044c \u043a\u043e\u0434, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0432 \u0440\u0430\u0431\u043e\u0442\u0435, \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043d\u0430 <a href=\"https:\/\/github.com\/Giproman\/DS\/blob\/main\/khl__predictor.ipynb\" rel=\"noopener noreferrer nofollow\">github<\/a>.<\/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\/post\/711286\/\"> https:\/\/habr.com\/ru\/post\/711286\/<\/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<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442! <\/p>\n<p>\u0414\u0430\u0432\u043d\u043e \u0445\u043e\u0442\u0435\u043b \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u044b \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0441\u043f\u043e\u0440\u0442\u0438\u0432\u043d\u043e\u0439 \u0438\u043d\u0434\u0443\u0441\u0442\u0440\u0438\u0438. \u0414\u0430\u043d\u043d\u043e\u0435 \u0436\u0435\u043b\u0430\u043d\u0438\u0435 \u043e\u0431\u0443\u0441\u043b\u043e\u0432\u043b\u0435\u043d\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u043c \u043a \u0441\u0430\u043c\u043e\u043c\u0443 \u0441\u043f\u043e\u0440\u0442\u0443 \u0438 \u043a \u0442\u043e\u043c\u0443, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0445\u043e\u0440\u043e\u0448\u043e \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u044b \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0441\u043f\u043e\u0440\u0442\u0438\u0432\u043d\u044b\u0445 \u0441\u043e\u0431\u044b\u0442\u0438\u0439. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0437\u0430\u0434\u0443\u043c\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043b\u0430\u0441\u044c \u043d\u0430 \u0432\u044b\u043f\u0443\u0441\u043a\u043d\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043a\u0443\u0440\u0441\u0430 &#171;Machine Learning. Professional&#187; \u0432 Otus. \u041c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0432\u0437\u044f\u0442\u044c \u043b\u044e\u0431\u0443\u044e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0449\u0443\u044e \u0442\u0435\u043c\u0443, \u0438 \u044f \u0432\u044b\u0431\u0440\u0430\u043b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0431\u0435\u0434\u0438\u0442\u0435\u043b\u0435\u0439 \u043c\u0430\u0442\u0447\u0435\u0439 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0433\u043e \u0447\u0435\u043c\u043f\u0438\u043e\u043d\u0430\u0442\u0430 \u041a\u0425\u041b. \u0422\u0430\u043a \u043a\u0430\u043a \u043a\u0443\u0440\u0441 \u0431\u044b\u043b \u043f\u043e ML, \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0431\u0435\u0437 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439. \u0414\u0430\u0432 \u0432\u043e\u043b\u044e \u0441\u0432\u043e\u0435\u043c\u0443 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u0442\u043e\u0440\u0441\u043a\u043e\u043c\u0443 \u043d\u0430\u0447\u0430\u043b\u0443, \u044f \u043f\u0440\u0438\u043d\u044f\u043b\u0441\u044f \u0437\u0430 \u0434\u0435\u043b\u043e.<\/p>\n<h3>\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/h3>\n<p>\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043f\u0430\u0440\u0441\u0438\u043b\u0438\u0441\u044c \u0441 \u0441\u0430\u0439\u0442\u0430 khl.ru. \u00a0\u0412 \u0440\u0430\u0441\u0447\u0451\u0442 \u0431\u0440\u0430\u043b\u0430\u0441\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043f\u043e 4 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u043c \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u044b\u043c \u0441\u0435\u0437\u043e\u043d\u0430\u043c \u2013 2018\/2019, 2019\/2020, 2020\/2021 \u0438 2021\/2022.<\/p>\n<p>\u041f\u0430\u0440\u0441\u0438\u043d\u0433 \u0441\u043e\u0441\u0442\u043e\u044f\u043b \u0438\u0437 \u0434\u0432\u0443\u0445 \u0447\u0430\u0441\u0442\u0435\u0439: <\/p>\n<ol>\n<li>\n<p>\u0441\u0431\u043e\u0440 \u0441\u0441\u044b\u043b\u043e\u043a \u043d\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 (\u0440\u0435\u0437\u044e\u043c\u0435, \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b, \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u0443\u044e \u0442\u0440\u0430\u043d\u0441\u043b\u044f\u0446\u0438\u044e \u0438 \u0432\u0438\u0434\u0435\u043e \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u043c\u043e\u043c\u0435\u043d\u0442\u043e\u0432) \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u043c\u0430\u0442\u0447\u0443;<\/p>\n<pre><code class=\"python\"># \u0441\u0441\u044b\u043b\u043a\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u0441 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0441\u0435\u0437\u043e\u043d\u0443 page_links = ['https:\/\/www.khl.ru\/calendar\/1097\/00\/', 'https:\/\/www.khl.ru\/calendar\/1045\/00\/', 'https:\/\/www.khl.ru\/calendar\/851\/00\/', 'https:\/\/www.khl.ru\/calendar\/671\/00\/']  section_names = [] for link in page_links:      response = requests.get(link, headers={'User-Agent': UserAgent().chrome})     soup = BeautifulSoup(response.content, 'html.parser')     sections = soup.findAll('a', attrs={'class':'card-game__hover-link_small'})      for i in sections:         section_names.append(i.attrs['href'])  # \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0441\u0441\u044b\u043b\u043a\u0438 \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u0430 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u043c\u0430\u0442\u0447\u0435\u0439 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043a \u043d\u0438\u043c \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f links = ['https:\/\/khl.ru' + element for element in section_names if 'protocol' in element] <\/code><\/pre>\n<\/li>\n<li>\n<p>\u043f\u0430\u0440\u0441\u0438\u043d\u0433 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0449\u0435\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0430\u043c \u043d\u0430 \u0440\u0435\u0437\u044e\u043c\u0435 \u0438 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u044b \u043c\u0430\u0442\u0447\u0435\u0439.<\/p>\n<\/li>\n<\/ol>\n<pre><code class=\"python\"># \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0432\u0435\u0431-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 def connect(link):     response = requests.get(link, headers={'User-Agent': UserAgent().chrome})     if not response.ok:         return response.status_code     soup = BeautifulSoup(response.content, 'html.parser')      return soup  # \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043e\u0447\u0438\u0441\u0442\u043a\u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u0432\u0435\u0431-\u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u043e\u0442 \u043f\u0443\u0441\u0442\u044b\u0445 \u0441\u0442\u0440\u043e\u043a \u0438 \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u0432 def stats_cleaner(data):      data = [x.strip('\\n').strip(' ') for x in data]      return data  all_stats, matches_missing = [], []  for link in tqdm_notebook(links):      match_stats = []      # \u0447\u0430\u0441\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u043c\u0430\u0442\u0447\u0430 \u0432 \u0435\u0433\u043e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0435     soup_protocol = connect(link)      # \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0443\u044e \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u043c\u0430\u0442\u0447\u0435\u0439 \u0438\u0437 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430     statistics_protocol = soup_protocol.findAll('div', attrs={'class':'fineTable-totalTable d-none_768'})      # \u0447\u0430\u0441\u0442\u044c \u043c\u0430\u0442\u0447\u0435\u0439 \u043d\u0435 \u0438\u0433\u0440\u0430\u043b\u0430\u0441\u044c, \u043d\u043e \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u043f\u0443\u0441\u0442\u044b\u0435 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u044b \u0435\u0441\u0442\u044c - \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u043d\u0435 \u043f\u0443\u0441\u0442\u044b\u0435 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u044b     if statistics_protocol != []:          goals = soup_protocol.findAll('p', attrs={'class':'preview-frame__center-score roboto-condensed roboto-bold color-white title-xl'})[0].contents          # \u0447\u0430\u0441\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u043c\u0430\u0442\u0447\u0430 \u0432 \u0435\u0433\u043e \u0440\u0435\u0437\u044e\u043c\u0435         soup_resume = connect(link.replace('protocol', 'resume'))          # \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0443\u044e \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u043c\u0430\u0442\u0447\u0435\u0439 \u0438\u0437 \u0440\u0435\u0437\u044e\u043c\u0435         statistics_resume = soup_resume.findAll('p', attrs={'class':'roboto-condensed'})[1:21]         # \u043d\u043e\u043c\u0435\u0440 \u043c\u0430\u0442\u0447\u0430 \u0434\u043b\u044f \u0435\u0433\u043e \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438         match_number_resume = soup_resume.findAll('h2', attrs={'class':'roboto-condensed roboto-bold title-md color-dark title-btns__title'})          # \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u0434\u0430\u0442\u044b \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043c\u0430\u0442\u0447\u0435\u0439         soup_preview = connect(link.replace('protocol', 'preview'))         date_preview = soup_preview.findAll('div', attrs={'class':'card-infos__item-info'})          # \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u0434\u0430\u0442\u0443, \u0432\u0440\u0435\u043c\u044f \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0438 \u043d\u043e\u043c\u0435\u0440 \u043c\u0430\u0442\u0447\u0430          try:             match_stats.append(stats_cleaner(date_preview[0].contents[1].contents)[0])         except IndexError:              match_stats.append(np.NaN)          match_stats.append(match_number_resume[0].contents[0].split('\u2116')[1].replace(' ', ''))         # \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u043e\u0441\u043d\u043e\u0432\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e         for stat in statistics_resume:             clean_stat = stats_cleaner(stat.contents)             if clean_stat != [''] and clean_stat != ['n\/a']:                 match_stats.append(clean_stat[0])             else: pass          # \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e         if len(statistics_protocol[len(statistics_protocol)-2].contents) == 11 and '\u0412\u0441\u0435\u0433\u043e' in str(statistics_protocol[1].contents[9].contents[7].contents[1]):                      for stat in statistics_protocol[1].contents[9].contents:                 if stat != '\\n':                     clean_stat = stats_cleaner(stat.contents[1].contents)                      match_stats.append(clean_stat[0])                 else: pass          elif len(statistics_protocol[len(statistics_protocol)-2].contents) == 11 and '\u043e\u0432\u0435\u0440\u0442\u0430\u0439\u043c' in str(statistics_protocol[1].contents[9].contents[7].contents[1]):                      for stat in statistics_protocol[2].contents[9].contents:                 if stat != '\\n':                     clean_stat = stats_cleaner(stat.contents[1].contents)                      match_stats.append(clean_stat[0])                 else: pass          elif len(statistics_protocol) == 3 and len(statistics_protocol[len(statistics_protocol)-2].contents) == 13:              for stat in statistics_protocol[1].contents[11].contents:                 if stat != '\\n':                     clean_stat = stats_cleaner(stat.contents[1].contents)                      match_stats.append(clean_stat[0])                 else: pass          else:             for stat in statistics_protocol[2].contents[11].contents:                 if stat != '\\n':                     clean_stat = stats_cleaner(stat.contents[1].contents)                      match_stats.append(clean_stat[0])                 else: pass                  # \u0434\u043b\u044f \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043e\u0432\u0435\u0440\u0442\u0430\u0439\u043c\u043e\u0432         if len(statistics_protocol[len(statistics_protocol)-2].contents) == 11 and ('\u043e\u0432\u0435\u0440\u0442\u0430\u0439\u043c' not in statistics_protocol[0].contents[9].contents[7].contents[1].contents[0].replace(' ', '').replace('\\n', '')):             match_stats.append('main_time')         else: match_stats.append('add_time')          # \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043a\u043e\u043b-\u0432\u0435 \u0437\u0430\u0431\u0440\u043e\u0448\u0435\u043d\u043d\u044b\u0445 \u0448\u0430\u0439\u0431 \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0431\u0443\u043b\u043b\u0438\u0442\u043e\u0432         if goals[0] != '\\n':             try:                 goal_h = goals[0].replace(' ', '').replace('\\n', '')             except TypeError:                 goal_h = goals[0].contents[0]              try:                 goal_a = goals[3].replace(' ', '').replace('\\n', '')             except IndexError:                 pass             except TypeError:                 goal_a = goals[3].contents[0]          else:             goal_h = goals[1].contents[0]             goal_a = goals[4].replace(' ', '').replace('\\n', '').replace('\u0411', '').replace('OT', '')          match_stats.append(goal_h)         match_stats.append(goal_a)          # \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043e \u043f\u0440\u043e\u0439\u0434\u0435\u043d\u043d\u043e\u0439 \u0434\u0438\u0441\u0442\u0430\u043d\u0446\u0438\u0438 \u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432\u043b\u0430\u0434\u0435\u043d\u0438\u044f \u0448\u0430\u0439\u0431\u043e\u0439 (\u0435\u0441\u0442\u044c \u043d\u0435 \u0432\u043e \u0432\u0441\u0435\u0445 \u043c\u0430\u0442\u0447\u0430\u0445, \u0443\u0434\u0430\u043b\u044f\u0435\u0442\u0441\u044f)          if len(match_stats) == 32:             del match_stats[15:19]         else: pass          all_stats.append(match_stats)      else: matches_missing.append(link)  time.sleep(0.5) <\/code><\/pre>\n<p>\u0417\u0430 4 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u0441\u0435\u0437\u043e\u043d\u0430 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0433\u043e \u0447\u0435\u043c\u043f\u0438\u043e\u043d\u0430\u0442\u0430 \u041a\u0425\u041b \u0431\u044b\u043b\u043e \u0441\u044b\u0433\u0440\u0430\u043d\u043e 2789 \u043c\u0430\u0442\u0447\u0435\u0439.<\/p>\n<p>\u0418\u0437 \u0441\u043f\u0430\u0440\u0441\u0435\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d \u0434\u0430\u0442\u0430\u0441\u0435\u0442, \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043d\u0438\u0436\u0435.<\/p>\n<pre><code class=\"python\">data = pd.DataFrame(all_stats, columns=['date', 'match', 'team_h', 'score_h', 'ppp_h', 'ppp_a', 'ppk_h', 'ppk_a', 'numa_h', 'numa_a', 'wt_h', 'wt_a', 'pt_h', 'pt_a', 'sog_h', 'sog_a', 'team_a', 'score_a', 'bs_h', 'pm_h', 'at_h', 'tot', 'bs_a', 'pm_a', 'at_a', 'end', 'final_score_h', 'final_score_a'])  # \u0441\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u043f\u043e \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u043d\u043e\u0441\u0442\u0438 \u043a \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c data_sorted = data.iloc[:, [0,1,2,16,3,17,4,6,8,10,12,14,18,19,20,5,7,9,11,13,15,22,23,24,25,26,27,21]] <\/code><\/pre>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"50\" width=\"50\">\n<p align=\"center\">\n<\/td>\n<td data-colwidth=\"154\" width=\"154\">\n<p align=\"center\"><strong>date<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"70\" width=\"70\">\n<p align=\"center\"><strong>match<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"125\" width=\"125\">\n<p align=\"center\"><strong>team_h<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"90\" width=\"90\">\n<p align=\"center\"><strong>score_h<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"69\" width=\"69\">\n<p align=\"center\"><strong>ppp_h<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"72\" width=\"72\">\n<p align=\"center\"><strong>ppp_a<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"73\" width=\"73\">\n<p align=\"center\"><strong>ppk_h<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"86\" width=\"86\">\n<p align=\"center\"><strong>ppk_a<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"92\" width=\"92\">\n<p align=\"center\"><strong>numa_h<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"85\" width=\"85\">\n<p align=\"center\"><strong>numa_a<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"82\" width=\"82\">\n<p align=\"center\"><strong>wt_h<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"60\" width=\"60\">\n<p align=\"center\"><strong>wt_a<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"62\" width=\"62\">\n<p align=\"center\"><strong>pt_h<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"61\" width=\"61\">\n<p align=\"center\"><strong>pt_a<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"81\" width=\"81\">\n<p align=\"center\"><strong>sog_h<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"72\" width=\"72\">\n<p align=\"center\"><strong>sog_a<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"114\" width=\"114\">\n<p align=\"center\"><strong>team_a<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"80\" width=\"80\">\n<p align=\"center\"><strong>score_a<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"62\" width=\"62\">\n<p align=\"center\"><strong>bs_h<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"69\" width=\"69\">\n<p align=\"center\"><strong>pm_h<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"72\" width=\"72\">\n<p align=\"center\"><strong>at_h<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"70\" width=\"70\">\n<p align=\"center\"><strong>tot<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"57\" width=\"57\">\n<p align=\"center\"><strong>bs_a<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"66\" width=\"66\">\n<p align=\"center\"><strong>pm_a<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"72\" width=\"72\">\n<p align=\"center\"><strong>at_a<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"99\" width=\"99\">\n<p align=\"center\"><strong>end<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"118\" width=\"118\">\n<p align=\"center\"><strong>final_score_h<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"125\" width=\"125\">\n<p align=\"center\"><strong>final_score_a<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"50\" width=\"50\">\n<p align=\"center\"><strong>0<\/strong> <\/p>\n<\/td>\n<td data-colwidth=\"154\" width=\"154\">\n<p align=\"center\">14.01.2022 12:30<\/p>\n<\/td>\n<td data-colwidth=\"70\" width=\"70\">\n<p align=\"center\">589<\/p>\n<\/td>\n<td data-colwidth=\"125\" width=\"125\">\n<p align=\"center\">\u0410\u0434\u043c\u0438\u0440\u0430\u043b<\/p>\n<\/td>\n<td data-colwidth=\"90\" width=\"90\">\n<p align=\"center\">3<\/p>\n<\/td>\n<td data-colwidth=\"69\" width=\"69\">\n<p align=\"center\">1<\/p>\n<\/td>\n<td data-colwidth=\"72\" width=\"72\">\n<p align=\"center\">1<\/p>\n<\/td>\n<td data-colwidth=\"73\" width=\"73\">\n<p align=\"center\">0<\/p>\n<\/td>\n<td data-colwidth=\"86\" width=\"86\">\n<p align=\"center\">0<\/p>\n<\/td>\n<td data-colwidth=\"92\" width=\"92\">\n<p align=\"center\">4<\/p>\n<\/td>\n<td data-colwidth=\"85\" width=\"85\">\n<p align=\"center\">5<\/p>\n<\/td>\n<td data-colwidth=\"82\" width=\"82\">\n<p align=\"center\">29<\/p>\n<\/td>\n<td data-colwidth=\"60\" width=\"60\">\n<p align=\"center\">29<\/p>\n<\/td>\n<td data-colwidth=\"62\" width=\"62\">\n<p align=\"center\">10<\/p>\n<\/td>\n<td data-colwidth=\"61\" width=\"61\">\n<p align=\"center\">8<\/p>\n<\/td>\n<td data-colwidth=\"81\" width=\"81\">\n<p align=\"center\">16<\/p>\n<\/td>\n<td data-colwidth=\"72\" width=\"72\">\n<p align=\"center\">32<\/p>\n<\/td>\n<td data-colwidth=\"114\" width=\"114\">\n<p align=\"center\">\u0421\u0438\u0431\u0438\u0440\u044c<\/p>\n<\/td>\n<td data-colwidth=\"80\" width=\"80\">\n<p align=\"center\">2<\/p>\n<\/td>\n<td data-colwidth=\"62\" width=\"62\">\n<p align=\"center\">29<\/p>\n<\/td>\n<td data-colwidth=\"69\" width=\"69\">\n<p align=\"center\">7<\/p>\n<\/td>\n<td data-colwidth=\"72\" width=\"72\">\n<p align=\"center\">10:35<\/p>\n<\/td>\n<td data-colwidth=\"70\" width=\"70\">\n<p align=\"center\">\u0412\u0441\u0435\u0433\u043e<\/p>\n<\/td>\n<td data-colwidth=\"57\" width=\"57\">\n<p align=\"center\">10<\/p>\n<\/td>\n<td data-colwidth=\"66\" width=\"66\">\n<p align=\"center\">16<\/p>\n<\/td>\n<td data-colwidth=\"72\" width=\"72\">\n<p align=\"center\">15:06<\/p>\n<\/td>\n<td data-colwidth=\"99\" width=\"99\">\n<p align=\"center\">main_time<\/p>\n<\/td>\n<td data-colwidth=\"118\" width=\"118\">\n<p align=\"center\">3<\/p>\n<\/td>\n<td data-colwidth=\"125\" width=\"125\">\n<p align=\"center\">2<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"50\" width=\"50\">\n<p align=\"center\"><strong>1<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"154\" width=\"154\">\n<p align=\"center\">13.01.2022 17:00<\/p>\n<\/td>\n<td data-colwidth=\"70\" width=\"70\">\n<p align=\"center\">582<\/p>\n<\/td>\n<td data-colwidth=\"125\" width=\"125\">\n<p align=\"center\">\u0410\u0432\u0442\u043e\u043c\u043e\u0431\u0438\u043b\u0438\u0441\u0442<\/p>\n<\/td>\n<td data-colwidth=\"90\" width=\"90\">\n<p align=\"center\">5<\/p>\n<\/td>\n<td data-colwidth=\"69\" width=\"69\">\n<p align=\"center\">2<\/p>\n<\/td>\n<td data-colwidth=\"72\" width=\"72\">\n<p align=\"center\">0<\/p>\n<\/td>\n<td data-colwidth=\"73\" width=\"73\">\n<p align=\"center\">0<\/p>\n<\/td>\n<td data-colwidth=\"86\" width=\"86\">\n<p align=\"center\">0<\/p>\n<\/td>\n<td data-colwidth=\"92\" width=\"92\">\n<p align=\"center\">5<\/p>\n<\/td>\n<td data-colwidth=\"85\" width=\"85\">\n<p align=\"center\">4<\/p>\n<\/td>\n<td data-colwidth=\"82\" width=\"82\">\n<p align=\"center\">37<\/p>\n<\/td>\n<td data-colwidth=\"60\" width=\"60\">\n<p align=\"center\">20<\/p>\n<\/td>\n<td data-colwidth=\"62\" width=\"62\">\n<p align=\"center\">8<\/p>\n<\/td>\n<td data-colwidth=\"61\" width=\"61\">\n<p align=\"center\">10<\/p>\n<\/td>\n<td data-colwidth=\"81\" width=\"81\">\n<p align=\"center\">40<\/p>\n<\/td>\n<td data-colwidth=\"72\" width=\"72\">\n<p align=\"center\">33<\/p>\n<\/td>\n<td data-colwidth=\"114\" width=\"114\">\n<p align=\"center\">\u0421\u0435\u0432\u0435\u0440\u0441\u0442\u0430\u043b\u044c<\/p>\n<\/td>\n<td data-colwidth=\"80\" width=\"80\">\n<p align=\"center\">2<\/p>\n<\/td>\n<td data-colwidth=\"62\" width=\"62\">\n<p align=\"center\">12<\/p>\n<\/td>\n<td data-colwidth=\"69\" width=\"69\">\n<p align=\"center\">15<\/p>\n<\/td>\n<td data-colwidth=\"72\" width=\"72\">\n<p align=\"center\">16:34<\/p>\n<\/td>\n<td data-colwidth=\"70\" width=\"70\">\n<p align=\"center\">\u0412\u0441\u0435\u0433\u043e<\/p>\n<\/td>\n<td data-colwidth=\"57\" width=\"57\">\n<p align=\"center\">16<\/p>\n<\/td>\n<td data-colwidth=\"66\" width=\"66\">\n<p align=\"center\">5<\/p>\n<\/td>\n<td data-colwidth=\"72\" width=\"72\">\n<p align=\"center\">14:13<\/p>\n<\/td>\n<td data-colwidth=\"99\" width=\"99\">\n<p align=\"center\">main_time<\/p>\n<\/td>\n<td data-colwidth=\"118\" width=\"118\">\n<p align=\"center\">5<\/p>\n<\/td>\n<td data-colwidth=\"125\" width=\"125\">\n<p align=\"center\">2<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"50\" width=\"50\">\n<p align=\"center\"><strong>2<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"154\" width=\"154\">\n<p align=\"center\">13.01.2022 19:30<\/p>\n<\/td>\n<td data-colwidth=\"70\" width=\"70\">\n<p align=\"center\">588<\/p>\n<\/td>\n<td data-colwidth=\"125\" width=\"125\">\n<p align=\"center\">\u0421\u041a\u0410<\/p>\n<\/td>\n<td data-colwidth=\"90\" width=\"90\">\n<p align=\"center\">2<\/p>\n<\/td>\n<td data-colwidth=\"69\" width=\"69\">\n<p align=\"center\">0<\/p>\n<\/td>\n<td data-colwidth=\"72\" width=\"72\">\n<p align=\"center\">0<\/p>\n<\/td>\n<td data-colwidth=\"73\" width=\"73\">\n<p align=\"center\">0<\/p>\n<\/td>\n<td data-colwidth=\"86\" width=\"86\">\n<p align=\"center\">0<\/p>\n<\/td>\n<td data-colwidth=\"92\" width=\"92\">\n<p align=\"center\">4<\/p>\n<\/td>\n<td data-colwidth=\"85\" width=\"85\">\n<p align=\"center\">2<\/p>\n<\/td>\n<td data-colwidth=\"82\" width=\"82\">\n<p align=\"center\">31<\/p>\n<\/td>\n<td data-colwidth=\"60\" width=\"60\">\n<p align=\"center\">19<\/p>\n<\/td>\n<td data-colwidth=\"62\" width=\"62\">\n<p align=\"center\">4<\/p>\n<\/td>\n<td data-colwidth=\"61\" width=\"61\">\n<p align=\"center\">8<\/p>\n<\/td>\n<td data-colwidth=\"81\" width=\"81\">\n<p align=\"center\">33<\/p>\n<\/td>\n<td data-colwidth=\"72\" width=\"72\">\n<p align=\"center\">21<\/p>\n<\/td>\n<td data-colwidth=\"114\" width=\"114\">\n<p align=\"center\">\u0425\u041a \u0421\u043e\u0447\u0438<\/p>\n<\/td>\n<td data-colwidth=\"80\" width=\"80\">\n<p align=\"center\">1<\/p>\n<\/td>\n<td data-colwidth=\"62\" width=\"62\">\n<p align=\"center\">10<\/p>\n<\/td>\n<td data-colwidth=\"69\" width=\"69\">\n<p align=\"center\">6<\/p>\n<\/td>\n<td data-colwidth=\"72\" width=\"72\">\n<p align=\"center\">21:07<\/p>\n<\/td>\n<td data-colwidth=\"70\" width=\"70\">\n<p align=\"center\">\u0412\u0441\u0435\u0433\u043e<\/p>\n<\/td>\n<td data-colwidth=\"57\" width=\"57\">\n<p align=\"center\">22<\/p>\n<\/td>\n<td data-colwidth=\"66\" width=\"66\">\n<p align=\"center\">10<\/p>\n<\/td>\n<td data-colwidth=\"72\" width=\"72\">\n<p align=\"center\">09:13<\/p>\n<\/td>\n<td data-colwidth=\"99\" width=\"99\">\n<p align=\"center\">main_time<\/p>\n<\/td>\n<td data-colwidth=\"118\" width=\"118\">\n<p align=\"center\">2<\/p>\n<\/td>\n<td data-colwidth=\"125\" width=\"125\">\n<p align=\"center\">1<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"50\" width=\"50\">\n<p align=\"center\"><strong>3<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"154\" width=\"154\">\n<p align=\"center\">12.01.2022 12:30<\/p>\n<\/td>\n<td data-colwidth=\"70\" width=\"70\">\n<p align=\"center\">578<\/p>\n<\/td>\n<td data-colwidth=\"125\" width=\"125\">\n<p align=\"center\">\u0410\u0434\u043c\u0438\u0440\u0430\u043b<\/p>\n<\/td>\n<td data-colwidth=\"90\" width=\"90\">\n<p align=\"center\">2<\/p>\n<\/td>\n<td data-colwidth=\"69\" width=\"69\">\n<p align=\"center\">0<\/p>\n<\/td>\n<td data-colwidth=\"72\" width=\"72\">\n<p align=\"center\">0<\/p>\n<\/td>\n<td data-colwidth=\"73\" width=\"73\">\n<p align=\"center\">0<\/p>\n<\/td>\n<td data-colwidth=\"86\" width=\"86\">\n<p align=\"center\">1<\/p>\n<\/td>\n<td data-colwidth=\"92\" width=\"92\">\n<p align=\"center\">2<\/p>\n<\/td>\n<td data-colwidth=\"85\" width=\"85\">\n<p align=\"center\">1<\/p>\n<\/td>\n<td data-colwidth=\"82\" width=\"82\">\n<p align=\"center\">24<\/p>\n<\/td>\n<td data-colwidth=\"60\" width=\"60\">\n<p align=\"center\">35<\/p>\n<\/td>\n<td data-colwidth=\"62\" width=\"62\">\n<p align=\"center\">4<\/p>\n<\/td>\n<td data-colwidth=\"61\" width=\"61\">\n<p align=\"center\">6<\/p>\n<\/td>\n<td data-colwidth=\"81\" width=\"81\">\n<p align=\"center\">30<\/p>\n<\/td>\n<td data-colwidth=\"72\" width=\"72\">\n<p align=\"center\">27<\/p>\n<\/td>\n<td data-colwidth=\"114\" width=\"114\">\n<p align=\"center\">\u0421\u0438\u0431\u0438\u0440\u044c<\/p>\n<\/td>\n<td data-colwidth=\"80\" width=\"80\">\n<p align=\"center\">1<\/p>\n<\/td>\n<td data-colwidth=\"62\" width=\"62\">\n<p align=\"center\">27<\/p>\n<\/td>\n<td data-colwidth=\"69\" width=\"69\">\n<p align=\"center\">10<\/p>\n<\/td>\n<td data-colwidth=\"72\" width=\"72\">\n<p align=\"center\">12:54<\/p>\n<\/td>\n<td data-colwidth=\"70\" width=\"70\">\n<p align=\"center\">\u0412\u0441\u0435\u0433\u043e<\/p>\n<\/td>\n<td data-colwidth=\"57\" width=\"57\">\n<p align=\"center\">22<\/p>\n<\/td>\n<td data-colwidth=\"66\" width=\"66\">\n<p align=\"center\">17<\/p>\n<\/td>\n<td data-colwidth=\"72\" width=\"72\">\n<p align=\"center\">13:11<\/p>\n<\/td>\n<td data-colwidth=\"99\" width=\"99\">\n<p align=\"center\">main_time<\/p>\n<\/td>\n<td data-colwidth=\"118\" width=\"118\">\n<p align=\"center\">2<\/p>\n<\/td>\n<td data-colwidth=\"125\" width=\"125\">\n<p align=\"center\">1<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"50\" width=\"50\">\n<p align=\"center\"><strong>4<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"154\" width=\"154\">\n<p align=\"center\">12.01.2022 19:00<\/p>\n<\/td>\n<td data-colwidth=\"70\" width=\"70\">\n<p align=\"center\">580<\/p>\n<\/td>\n<td data-colwidth=\"125\" width=\"125\">\n<p align=\"center\">\u041d\u0435\u0444\u0442\u0435\u0445\u0438\u043c\u0438\u043a<\/p>\n<\/td>\n<td data-colwidth=\"90\" width=\"90\">\n<p align=\"center\">4<\/p>\n<\/td>\n<td data-colwidth=\"69\" width=\"69\">\n<p align=\"center\">0<\/p>\n<\/td>\n<td data-colwidth=\"72\" width=\"72\">\n<p align=\"center\">0<\/p>\n<\/td>\n<td data-colwidth=\"73\" width=\"73\">\n<p align=\"center\">0<\/p>\n<\/td>\n<td data-colwidth=\"86\" width=\"86\">\n<p align=\"center\">0<\/p>\n<\/td>\n<td data-colwidth=\"92\" width=\"92\">\n<p align=\"center\">2<\/p>\n<\/td>\n<td data-colwidth=\"85\" width=\"85\">\n<p align=\"center\">1<\/p>\n<\/td>\n<td data-colwidth=\"82\" width=\"82\">\n<p align=\"center\">27<\/p>\n<\/td>\n<td data-colwidth=\"60\" width=\"60\">\n<p align=\"center\">31<\/p>\n<\/td>\n<td data-colwidth=\"62\" width=\"62\">\n<p align=\"center\">2<\/p>\n<\/td>\n<td data-colwidth=\"61\" width=\"61\">\n<p align=\"center\">4<\/p>\n<\/td>\n<td data-colwidth=\"81\" width=\"81\">\n<p align=\"center\">26<\/p>\n<\/td>\n<td data-colwidth=\"72\" width=\"72\">\n<p align=\"center\">24<\/p>\n<\/td>\n<td data-colwidth=\"114\" width=\"114\">\n<p align=\"center\">\u0422\u0440\u0430\u043a\u0442\u043e\u0440<\/p>\n<\/td>\n<td data-colwidth=\"80\" width=\"80\">\n<p align=\"center\">2<\/p>\n<\/td>\n<td data-colwidth=\"62\" width=\"62\">\n<p align=\"center\">23<\/p>\n<\/td>\n<td data-colwidth=\"69\" width=\"69\">\n<p align=\"center\">13<\/p>\n<\/td>\n<td data-colwidth=\"72\" width=\"72\">\n<p align=\"center\">10:02<\/p>\n<\/td>\n<td data-colwidth=\"70\" width=\"70\">\n<p align=\"center\">\u0412\u0441\u0435\u0433\u043e<\/p>\n<\/td>\n<td data-colwidth=\"57\" width=\"57\">\n<p align=\"center\">9<\/p>\n<\/td>\n<td data-colwidth=\"66\" width=\"66\">\n<p align=\"center\">13<\/p>\n<\/td>\n<td data-colwidth=\"72\" width=\"72\">\n<p align=\"center\">16:40<\/p>\n<\/td>\n<td data-colwidth=\"99\" width=\"99\">\n<p align=\"center\">main_time<\/p>\n<\/td>\n<td data-colwidth=\"118\" width=\"118\">\n<p align=\"center\">4<\/p>\n<\/td>\n<td data-colwidth=\"125\" width=\"125\">\n<p align=\"center\">2<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0421\u043e\u0431\u0440\u0430\u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0445 \u043c\u0430\u0442\u0447\u0430\u0445:<\/p>\n<ul>\n<li>\n<p>\u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043c\u044f \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043c\u0430\u0442\u0447\u0430 (<strong>date<\/strong>);<\/p>\n<\/li>\n<li>\n<p>\u043d\u043e\u043c\u0435\u0440 \u043c\u0430\u0442\u0447\u0430 \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 (<strong>match<\/strong>);<\/p>\n<\/li>\n<li>\n<p>\u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b (<strong>team<\/strong>);<\/p>\n<\/li>\n<li>\n<p>\u043a\u043e\u043b-\u0432\u043e \u0437\u0430\u0431\u0438\u0442\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 \u0448\u0430\u0439\u0431 \u0431\u0435\u0437 \u0443\u0447\u0435\u0442\u0430 \u0431\u0443\u043b\u043b\u0438\u0442\u043e\u0432 (<strong>score<\/strong>);<\/p>\n<\/li>\n<li>\n<p>\u043a\u043e\u043b-\u0432\u043e \u0448\u0430\u0439\u0431, \u0437\u0430\u0431\u0438\u0442\u044b\u0445 \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 (<strong>ppp<\/strong>);<\/p>\n<\/li>\n<li>\n<p>\u043a\u043e\u043b-\u0432\u043e \u0448\u0430\u0439\u0431, \u0437\u0430\u0431\u0438\u0442\u044b\u0445 \u0432 \u043c\u0435\u043d\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 (<strong>ppk<\/strong>);<\/p>\n<\/li>\n<li>\n<p>\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 (<strong>numa<\/strong>);<\/p>\n<\/li>\n<li>\n<p>\u0432\u044b\u0438\u0433\u0440\u0430\u043d\u043d\u044b\u0435 \u0432\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u043d\u0438\u044f (<strong>wt<\/strong>);<\/p>\n<\/li>\n<li>\n<p>\u0448\u0442\u0440\u0430\u0444\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f, \u043c\u0438\u043d\u0443\u0442 (<strong>pt<\/strong>);<\/p>\n<\/li>\n<li>\n<p>\u0431\u0440\u043e\u0441\u043a\u0438 \u043f\u043e \u0432\u043e\u0440\u043e\u0442\u0430\u043c (<strong>sog<\/strong>);<\/p>\n<\/li>\n<li>\n<p>\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0431\u0440\u043e\u0441\u043a\u0438 (<strong>bs<\/strong>);<\/p>\n<\/li>\n<li>\n<p>\u0441\u0438\u043b\u043e\u0432\u044b\u0435 \u043f\u0440\u0438\u0435\u043c\u044b (<strong>pm<\/strong>);<\/p>\n<\/li>\n<li>\n<p>\u0432\u0440\u0435\u043c\u044f \u0432 \u0430\u0442\u0430\u043a\u0435, \u043c\u0438\u043d\u0443\u0442 (<strong>at<\/strong>);<\/p>\n<\/li>\n<li>\n<p>\u043f\u0440\u0438\u0437\u043d\u0430\u043a \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 (<strong>tot<\/strong>);<\/p>\n<\/li>\n<li>\n<p>\u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f \u043c\u0430\u0442\u0447\u0430 &#8212; \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u0438\u043b\u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f (<strong>end<\/strong>);<\/p>\n<\/li>\n<li>\n<p>\u043a\u043e\u043b-\u0432\u043e \u0437\u0430\u0431\u0438\u0442\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 \u0448\u0430\u0439\u0431 \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0431\u0443\u043b\u043b\u0438\u0442\u043e\u0432 (<strong>final_score<\/strong>).<\/p>\n<\/li>\n<\/ul>\n<p>\u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u043b\u0430\u0441\u044c \u0441\u0443\u0444\u0444\u0438\u043a\u0441\u043e\u043c \u00ab<strong>_h<\/strong>\u00bb, \u0433\u043e\u0441\u0442\u0435\u0432\u043e\u0439 \u2013 \u0441\u0443\u0444\u0444\u0438\u043a\u0441\u043e\u043c \u00ab<strong>_a<\/strong>\u00bb. \u0418\u043d\u0434\u0435\u043a\u0441\u043e\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0440\u044f\u0434\u043a\u043e\u0432\u044b\u0439 \u043d\u043e\u043c\u0435\u0440 \u0441\u0442\u0440\u043e\u043a\u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430.<\/p>\n<h3>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445<\/h3>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u0430 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 \u043f\u043e \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0443 <strong>tot<\/strong>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u044b\u043b\u043e \u043e\u0434\u043d\u043e \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u00ab\u0412\u0441\u0435\u0433\u043e\u00bb \u2013 \u0441\u0432\u043e\u0435\u0433\u043e \u0440\u043e\u0434\u0430 \u043c\u0435\u0442\u043a\u0430 \u043d\u0430 \u0432\u0435\u0431-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0430\u044f \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044e \u0431\u043b\u043e\u043a\u0430 \u0441 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0439 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439.<\/p>\n<p>\u0412 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043b\u0430\u0441\u044c \u043d\u0435\u043d\u0443\u0436\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u043c\u0430\u0442\u0447\u0430\u0445 \u0432\u0441\u0435\u0445 \u0437\u0432\u0435\u0437\u0434, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432 \u0445\u043e\u0434\u0435 \u043f\u0440\u0435\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0438\u043d\u0433\u0430 \u0431\u044b\u043b\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u0430.<\/p>\n<p>\u0418\u043c\u0435\u043b\u0438\u0441\u044c \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0438 \u043f\u043e \u0440\u044f\u0434\u0443 \u043c\u0430\u0442\u0447\u0435\u0439 \u0432 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0431\u0440\u043e\u0441\u043a\u0430\u0445 \u0438 \u0441\u0438\u043b\u043e\u0432\u044b\u0445 \u043f\u0440\u0438\u0435\u043c\u0430\u0445 \u0443 \u0433\u043e\u0441\u0442\u0435\u0432\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u043b\u0438\u0441\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0445 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439 \u0434\u043e\u043c\u0430\u0448\u043d\u0438\u0445 \u043a\u043e\u043c\u0430\u043d\u0434.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u043f\u0440\u0438\u0437\u043d\u0430\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u044f\u0432\u043b\u044f\u043b\u0430\u0441\u044c \u043f\u043e\u0431\u0435\u0434\u0430 \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b (<strong>home_win<\/strong>). \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 1 \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0435 \u2013 \u043f\u043e\u0431\u0435\u0434\u0430 \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b, 0 \u2013 \u043f\u043e\u0431\u0435\u0434\u0430 \u0433\u043e\u0441\u0442\u0435\u0432\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0434\u0430\u043d\u043d\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u0441\u0432\u043e\u0434\u0438\u043b\u0430\u0441\u044c \u043a \u0440\u0435\u0448\u0435\u043d\u0438\u044e \u0437\u0430\u0434\u0430\u0447\u0438 \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u0439 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438.<\/p>\n<pre><code class=\"python\">data_sorted['home_win'] = np.where(data_sorted.final_score_h > data_sorted.final_score_a, 1, 0)<\/code><\/pre>\n<p>\u041f\u043e\u043c\u0438\u043c\u043e<\/p>\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-344104","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/344104","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=344104"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/344104\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=344104"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=344104"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=344104"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}