{"id":378883,"date":"2024-06-14T15:00:48","date_gmt":"2024-06-14T15:00:48","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=378883"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=378883","title":{"rendered":"<span>\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u043d\u043e\u0440\u043c\u044b \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c Python<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442! \u041d\u0430\u00a0\u0425\u0430\u0431\u0440\u0435 \u044f \u043d\u043e\u0432\u0438\u0447\u043e\u043a, \u0440\u0435\u0448\u0438\u043b\u0430 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441\u0432\u043e\u0438\u043c\u0438 \u0441\u043a\u0440\u043e\u043c\u043d\u044b\u043c\u0438 \u0438\u0434\u0435\u044f\u043c\u0438 \u0438 \u0432\u044b\u0441\u043b\u0443\u0448\u0430\u0442\u044c \u0432\u0430\u0448\u0435 \u043c\u043d\u0435\u043d\u0438\u0435, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0432\u044b \u0434\u0430\u0434\u0438\u0442\u0435 \u043c\u043d\u0435 \u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u043e\u0432\u0435\u0442\u044b.<\/p>\n<p>\u041e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u0432 \u0442\u0440\u0438 \u0433\u043e\u0434\u0430, \u043a\u0430\u043a\u00a0\u0438\u043d\u0436\u0435\u043d\u0435\u0440 \u043f\u043e\u00a0\u043d\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u0442\u0440\u0443\u0434\u0430, \u044f \u043f\u043e\u043d\u044f\u043b\u0430, \u0447\u0442\u043e\u00a0\u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u043c\u043e\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u0441\u0432\u044f\u0437\u0430\u043d\u0430 \u0441\u00a0\u0442\u0435\u043c, \u0447\u0442\u043e\u0431\u044b \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0438\u00a0\u0431\u044b\u0441\u0442\u0440\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u043e\u0431\u044a\u0451\u043c\u044b \u0434\u0430\u043d\u043d\u044b\u0445. \u041f\u043e\u0440\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445\u00a0\u0431\u044b\u043b\u043e \u0442\u0430\u043a \u043c\u043d\u043e\u0433\u043e, \u0430\u00a0\u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435\u00a0\u0445\u0432\u0430\u0442\u0430\u043b\u043e, \u043e\u0442\u0447\u0435\u0433\u043e \u0437\u0430\u0432\u0438\u0441\u0430\u043b Excel \u0438\u043b\u0438\u00a0\u043f\u0440\u043e\u0441\u0442\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u043b\u0438 \u043e\u0448\u0438\u0431\u043a\u0438 \u0432\u00a0\u0444\u043e\u0440\u043c\u0443\u043b\u0430\u0445. <\/p>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0440\u0435\u0448\u0438\u043b\u0430 \u0445\u043e\u0442\u044f\u00a0\u0431\u044b \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u043d\u043e\u0440\u043c\u044b \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430\u00a0\u0438\u0437\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u043e\u0433\u043e \u0440\u043e\u0434\u0430 \u0434\u0435\u0442\u0430\u043b\u0435\u0439.<\/p>\n<p>\u0414\u043b\u044f\u00a0\u043d\u0430\u0447\u0430\u043b\u0430 \u0443\u00a0\u043c\u0435\u043d\u044f \u0435\u0441\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u0430 Excel, \u0433\u0434\u0435 \u0432\u00a0\u043b\u0435\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0430 \u0434\u0435\u0442\u0430\u043b\u0435\u0439 \u0438\u0437\u00a0\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c CAD. \u0412\u00a0\u043c\u043e\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u044d\u0442\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u043d\u0430\u043a\u043b\u0430\u0434\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0444\u0440\u0435\u0437\u0435\u0440\u043d\u0430\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430. <\/p>\n<figure class=\"bordered full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b5e\/c75\/aaf\/b5ec75aaff5cfbec1d210e0c719b67bb.png\" width=\"535\" height=\"121\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b5e\/c75\/aaf\/b5ec75aaff5cfbec1d210e0c719b67bb.png\"\/><\/figure>\n<p>\u0412 \u043f\u0440\u0430\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u044b  \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u043b\u044f \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u0418\u0437 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u043e\u0432 \u043f\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043c\u0435\u0442\u0430\u043b\u043b\u043e\u0432 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u0447\u0442\u043e \u0444\u043e\u0440\u043c\u0443\u043b\u0430 \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043f\u0440\u0438 \u0444\u0440\u0435\u0437\u0435\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\u0422\u043c = Li \/ S,\" alt=\"\u0422\u043c = Li \/ S,\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/5aa\/3e9\/374\/5aa3e93746a59cc555ec120553823f1c.svg\" width=\"93\" height=\"22\"\/><\/p>\n<p>\u0433\u0434\u0435 \u00a0L \u2013 \u0440\u0430\u0441\u0447\u0451\u0442\u043d\u0430\u044f \u0434\u043b\u0438\u043d\u0430 \u043f\u0443\u0442\u0438 \u0440\u0435\u0436\u0443\u0449\u0435\u0433\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 \u0432 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043f\u043e\u0434\u0430\u0447\u0438, \u043c\u043c; i \u2013 \u0447\u0438\u0441\u043b\u043e \u043f\u0440\u043e\u0445\u043e\u0434\u043e\u0432; S \u2013 \u043f\u043e\u0434\u0430\u0447\u0430, \u043c\u043c\/\u043e\u0431. <\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"L = l + l1 + l2\" alt=\"L = l + l1 + l2\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/bbb\/468\/ef6\/bbb468ef61e6ee906835cfaaeedf8d02.svg\" width=\"123\" height=\"18\"\/><\/p>\n<p>\u0433\u0434\u0435 l \u2013 \u0440\u0430\u0441\u0447\u0435\u0442\u043d\u0430\u044f \u0434\u043b\u0438\u043d\u0430 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c\u043e\u0439 \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u0438, \u043c\u043c; l<sub>1<\/sub>\u00a0= t\u00a0*\u00a0ctg \u0443\u0433\u043b\u0430 \u03c6 \u2013 \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u0430 \u0432\u0440\u0435\u0437\u0430\u043d\u0438\u044f \u0440\u0435\u0437\u0446\u0430, \u043c\u043c; t \u2013 \u0433\u043b\u0443\u0431\u0438\u043d\u0430 \u0440\u0435\u0437\u0430\u043d\u0438\u044f, \u043c\u043c;\u00a0\u03c6 &#8212;\u00a0\u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u0443\u0433\u043e\u043b \u0432 \u043f\u043b\u0430\u043d\u0435 \u0440\u0435\u0437\u0446\u0430; l<sub>2<\/sub>\u00a0= 1\u20133 \u043c\u043c \u2013 \u0432\u044b\u0445\u043e\u0434 (\u043f\u0435\u0440\u0435\u0431\u0435\u0433) \u0440\u0435\u0437\u0446\u0430.<\/p>\n<figure class=\"bordered\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/542\/93b\/efa\/54293befa01e02796feda6b707c18271.png\" width=\"460\" height=\"121\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/542\/93b\/efa\/54293befa01e02796feda6b707c18271.png\"\/><\/figure>\n<p>\u0414\u043b\u044f \u0441\u0432\u043e\u0435\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0440\u0430\u043d\u0434\u043e\u043c\u043d\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u043a\u043e\u0434\u0430 \u044d\u0442\u043e \u0440\u0430\u0441\u0447\u0435\u0442 \u043d\u043e\u0440\u043c\u044b \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u041d\u0430 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0441\u0442\u0432\u0430\u0445 \u043d\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u043e\u0440\u043c\u0443\u043b, \u0442\u0430\u043a \u043a\u0430\u043a \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u0445 \u0441\u0442\u0430\u043d\u043a\u043e\u0432 \u0441 \u0427\u041f\u0423, \u0430, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0432\u0441\u0435\u0433\u0434\u0430 \u0435\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432 \u0444\u0430\u0439\u043b Excel.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043a \u043a\u043e\u0434\u0443. \u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438.<\/p>\n<pre><code class=\"python\">import numpy as np import pandas as pd import openpyxl<\/code><\/pre>\n<p>\u0423\u043a\u0430\u0436\u0435\u043c \u043f\u0443\u0442\u044c \u043a \u043d\u0430\u0448\u0435\u043c\u0443 Excel-\u0444\u0430\u0439\u043b\u0443 \u0438 \u0441\u0447\u0438\u0442\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 DataFrame \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e `pandas`. \u0412\u044b\u0432\u0435\u0434\u0435\u043c \u043f\u0435\u0440\u0432\u044b\u0435 \u043f\u044f\u0442\u044c \u0441\u0442\u0440\u043e\u043a \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u0447\u0442\u043e\u0431\u044b \u043c\u044b \u043c\u043e\u0433\u043b\u0438 \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u044b \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e.<\/p>\n<pre><code class=\"python\">file_path = 'time.xlsx' df = pd.read_excel(file_path) print(df.head())<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/173\/3a8\/4cc\/1733a84ccf93141a661e3888a86cd4f5.jpg\" width=\"634\" height=\"261\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/173\/3a8\/4cc\/1733a84ccf93141a661e3888a86cd4f5.jpg\" data-blurred=\"true\"\/><\/figure>\n<p>\u041f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043c \u0440\u0430\u0441\u0447\u0435\u0442 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432 \u043c\u0438\u043d\u0443\u0442\u0430\u0445 \u043d\u0430 \u0435\u0434\u0438\u043d\u0438\u0446\u0443 \u043f\u0440\u043e\u0434\u0443\u043a\u0446\u0438\u0438, \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0432, \u0447\u0442\u043e \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0441\u0442\u043e\u043b\u0431\u0446\u044b \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0432 \u0434\u0430\u043d\u043d\u044b\u0445. \u0415\u0441\u043b\u0438 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0441\u0442\u043e\u043b\u0431\u0435\u0446 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442, \u0432\u044b\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u0448\u0438\u0431\u043a\u0430. \u0417\u0430\u0442\u0435\u043c \u043c\u044b \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u044d\u0442\u0438\u0445 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 \u043a \u0447\u0438\u0441\u043b\u043e\u0432\u043e\u043c\u0443 \u0442\u0438\u043f\u0443, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f `pd.to_numeric()`. \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432\u044b\u0432\u043e\u0434\u0438\u043c \u0432 \u043c\u0430\u0441\u0441\u0438\u0432.<\/p>\n<pre><code class=\"python\">columns_to_extract = ['L', 'i', 'S'] missing_columns = [col for col in columns_to_extract if col not in df.columns] if missing_columns:     raise KeyError(f\"The following columns are missing from the DataFrame: {missing_columns}\") df[columns_to_extract] = df[columns_to_extract].apply(pd.to_numeric, errors='coerce') df['Tm'] = (df['L'] * df['i']) \/  df['S'] Tm_array = df['Tm'].values print(Tm_array)<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/8b1\/39e\/193\/8b139e1935f004989dc9772d0a56c69a.jpg\" width=\"590\" height=\"76\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8b1\/39e\/193\/8b139e1935f004989dc9772d0a56c69a.jpg\" data-blurred=\"true\"\/><\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043f\u043e\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u044b\u0435 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b: \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u043f\u0430\u0440\u0442\u0438\u0439\u043d\u043e\u0441\u0442\u0438, \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u0441\u0442\u0430\u043d\u043a\u043e\u0432 \u0438 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u043c\u0435\u0441\u0442\u0430. \u0414\u0430\u043d\u043d\u044b\u0435 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445 \u0432 \u043d\u043e\u0440\u043c\u0430\u0442\u0438\u0432\u043d\u043e\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0435 &#171;<em>\u041e\u0431\u0449\u0435\u043c\u0430\u0448\u0438\u043d\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435\u00a0\u0443\u043a\u0440\u0443\u043f\u043d\u0435\u043d\u043d\u044b\u0435\u00a0\u043d\u043e\u0440\u043c\u0430\u0442\u0438\u0432\u044b \u0432\u0440\u0435\u043c\u0435\u043d\u0438\u00a0\u043d\u0430\u00a0\u0440\u0430\u0431\u043e\u0442\u044b, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0435 \u043d\u0430 \u043c\u0435\u0442\u0430\u043b\u043b\u043e\u0440\u0435\u0436\u0443\u0449\u0438\u0445 \u0441\u0442\u0430\u043d\u043a\u0430\u0445&#187;.<\/em> <\/p>\n<p>\u0420\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0435\u043c \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u043f\u0430\u0440\u0442\u0438\u0439\u043d\u043e\u0441\u0442\u0438, \u043d\u0430\u043f\u0438\u0441\u0430\u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e*:<\/p>\n<p>*\u041f\u0440\u0438 \u0432\u044b\u0432\u043e\u0434\u0435 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0442\u0438\u043f \u0441\u0442\u0430\u043d\u043a\u0430, \u0432 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 &#8212; \u044d\u0442\u043e \u0441\u0442\u0430\u043d\u043a\u0438 \u0441 \u0440\u0443\u0447\u043d\u044b\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c.<\/p>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043c\u0430\u0441\u0441\u0438\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0430 \u043f\u0430\u0440\u0442\u0438\u0439\u043d\u043e\u0441\u0442\u0438 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0434\u0435\u0442\u0430\u043b\u0435\u0439.<\/p>\n<pre><code class=\"python\">data_n = {     '\u0427\u0438\u0441\u043b\u043e \u0434\u0435\u0442\u0430\u043b\u0435\u0439 \u0432 \u043f\u0430\u0440\u0442\u0438\u0438': ['1..2', '3..5', '6..10', '11..20', '21..40', '41..90', '\u0441\u0432\u044b\u0448\u0435 90'],     '\u043f\u0440\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043d\u0430 \u0441\u0442\u0430\u043d\u043a\u0430\u0445 \u0441 \u0440\u0443\u0447\u043d\u044b\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c': [1, 0.9, 0.8, 0.75, 0.7, 0.6, 0.55],     '\u043f\u0440\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043d\u0430 \u0441\u0442\u0430\u043d\u043a\u0430\u0445 \u0441 \u043f\u043e\u043b\u0443\u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0446\u0438\u043a\u043b\u043e\u043c (\u0437\u0443\u0431\u043e\u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0449\u0438\u0435, \u0434\u0438\u0441\u043a\u043e\u0432\u044b\u0435 \u043f\u0438\u043b\u044b \u0438 \u0442.\u0434.)': [1, 0.98, 0.95, 0.92, 0.9, 0.86, 0.85] } df_codes = pd.DataFrame(data_n) def get_n_value(part_counts, col_name):     if part_counts &lt;= 2:         return df_codes.loc[df_codes['\u0427\u0438\u0441\u043b\u043e \u0434\u0435\u0442\u0430\u043b\u0435\u0439 \u0432 \u043f\u0430\u0440\u0442\u0438\u0438'] == '1..2', col_name].values[0]     elif 3 &lt;= part_counts &lt;= 5:         return df_codes.loc[df_codes['\u0427\u0438\u0441\u043b\u043e \u0434\u0435\u0442\u0430\u043b\u0435\u0439 \u0432 \u043f\u0430\u0440\u0442\u0438\u0438'] == '3..5', col_name].values[0]     elif 6 &lt;= part_counts &lt;= 10:         return df_codes.loc[df_codes['\u0427\u0438\u0441\u043b\u043e \u0434\u0435\u0442\u0430\u043b\u0435\u0439 \u0432 \u043f\u0430\u0440\u0442\u0438\u0438'] == '6..10', col_name].values[0]     elif 11 &lt;= part_counts &lt;= 20:         return df_codes.loc[df_codes['\u0427\u0438\u0441\u043b\u043e \u0434\u0435\u0442\u0430\u043b\u0435\u0439 \u0432 \u043f\u0430\u0440\u0442\u0438\u0438'] == '11..20', col_name].values[0]     elif 21 &lt;= part_counts &lt;= 40:         return df_codes.loc[df_codes['\u0427\u0438\u0441\u043b\u043e \u0434\u0435\u0442\u0430\u043b\u0435\u0439 \u0432 \u043f\u0430\u0440\u0442\u0438\u0438'] == '21..40', col_name].values[0]     elif 41 &lt;= part_counts &lt;= 90:         return df_codes.loc[df_codes['\u0427\u0438\u0441\u043b\u043e \u0434\u0435\u0442\u0430\u043b\u0435\u0439 \u0432 \u043f\u0430\u0440\u0442\u0438\u0438'] == '41..90', col_name].values[0]     else:         return df_codes.loc[df_codes['\u0427\u0438\u0441\u043b\u043e \u0434\u0435\u0442\u0430\u043b\u0435\u0439 \u0432 \u043f\u0430\u0440\u0442\u0438\u0438'] == '\u0441\u0432\u044b\u0448\u0435 90', col_name].values[0] number = ['\u041a\u043e\u043b-\u0432\u043e'] data_num = df[number].values part_counts = data_num # \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u0435\u0442\u0430\u043b\u0435\u0439 \u0432 \u043f\u0430\u0440\u0442\u0438\u0438 kn = [get_n_value(count, '\u043f\u0440\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043d\u0430 \u0441\u0442\u0430\u043d\u043a\u0430\u0445 \u0441 \u0440\u0443\u0447\u043d\u044b\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c') for count in part_counts] print(kn)     <\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/f69\/862\/4c5\/f698624c5b48bbb27a576b61ed185a69.jpg\" width=\"937\" height=\"27\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f69\/862\/4c5\/f698624c5b48bbb27a576b61ed185a69.jpg\" data-blurred=\"true\"\/><\/figure>\n<p>\u0420\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0435\u043c \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u043d\u043a\u043e\u0432  \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0447\u0438\u0441\u043b\u0430  \u0441\u0442\u0430\u043d\u043a\u043e\u0432 \u0438 \u0444\u043e\u0440\u043c\u044b \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0442\u0440\u0443\u0434\u0430. \u041a\u043e\u0434\u044b 1,2,3  \u043e\u0437\u043d\u0430\u0447\u0430\u044e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u0432 \u0437\u0430\u043d\u044f\u0442\u043e\u0441\u0442\u0438 (\u0442\u0430\u0431\u043b\u0438\u0446\u0430 2, \u041a\u0430\u0440\u0442\u0430 1 \u043b\u0438\u0441\u0442 1 &#171;<em>\u041e\u0431\u0449\u0435\u043c\u0430\u0448\u0438\u043d\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435\u00a0\u0443\u043a\u0440\u0443\u043f\u043d\u0435\u043d\u043d\u044b\u0435\u00a0\u043d\u043e\u0440\u043c\u0430\u0442\u0438\u0432\u044b \u0432\u0440\u0435\u043c\u0435\u043d\u0438\u00a0\u043d\u0430\u00a0\u0440\u0430\u0431\u043e\u0442\u044b, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0435 \u043d\u0430 \u043c\u0435\u0442\u0430\u043b\u043b\u043e\u0440\u0435\u0436\u0443\u0449\u0438\u0445 \u0441\u0442\u0430\u043d\u043a\u0430\u0445&#187;.<\/em> )<\/p>\n<pre><code class=\"python\">def get_valor(\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e_\u0441\u0442\u0430\u043d\u043a\u043e\u0432, \u0442\u0438\u043f):     # \u0418\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b     data_os = {         '\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u0430\u043d\u043a\u043e\u0432': ['2', '3', '4'],         '\u0418\u043d\u0434\u0438\u0432\u0438\u0434\u0443\u0430\u043b\u044c\u043d\u0430\u044f_1': [0.56, 0.39, 0.33],         '\u0418\u043d\u0434\u0438\u0432\u0438\u0434\u0443\u0430\u043b\u044c\u043d\u0430\u044f_2': [0.65, 0.48, 0.39],         '\u0418\u043d\u0434\u0438\u0432\u0438\u0434\u0443\u0430\u043b\u044c\u043d\u0430\u044f_3': [0.75, 0.55, 0.47],         '\u0411\u0440\u0438\u0433\u0430\u0434\u043d\u0430\u044f_1': [0.53, 0.37, 0.30],         '\u0411\u0440\u0438\u0433\u0430\u0434\u043d\u0430\u044f_2': [0.60, 0.44, 0.37],         '\u0411\u0440\u0438\u0433\u0430\u0434\u043d\u0430\u044f_3': [0.67, 0.51, 0.45],     }     # \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u044f \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435     if \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e_\u0441\u0442\u0430\u043d\u043a\u043e\u0432 not in data_os['\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u0430\u043d\u043a\u043e\u0432'] or \u0442\u0438\u043f + '_1' not in data_os:         return \"\u041d\u0435\u0432\u0435\u0440\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435\"      # \u041d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0441\u0442\u0430\u043d\u043a\u043e\u0432     index = data_os['\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u0430\u043d\u043a\u043e\u0432'].index(\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e_\u0441\u0442\u0430\u043d\u043a\u043e\u0432)      # \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0441\u0442\u0430\u043d\u043a\u043e\u0432 \u0438 \u0442\u0438\u043f\u0430     return data_os[\u0442\u0438\u043f + '_1'][index] kos = get_valor('2', '\u0418\u043d\u0434\u0438\u0432\u0438\u0434\u0443\u0430\u043b\u044c\u043d\u0430\u044f') print(kos)<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0430 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0442\u0440\u0443\u0434\u0430 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0433\u0440\u0443\u043f\u043f\u044b \u0441\u0442\u0430\u043d\u043a\u043e\u0432 ( \u0432 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0433\u0440\u0443\u043f\u043f\u0430 \u0441\u0442\u0430\u043d\u043a\u043e\u0432 1):<\/p>\n<pre><code class=\"python\">data_org = {         '\u0413\u0440\u0443\u043f\u043f\u0430 \u0441\u0442\u0430\u043d\u043a\u043e\u0432': ['1', '2'],         '\u041a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438': [1, 0.80],              } def get_coeff(\u0433\u0440\u0443\u043f\u043f\u0430_\u0441\u0442\u0430\u043d\u043a\u043e\u0432):     # \u0418\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b     data_org = {         '\u0413\u0440\u0443\u043f\u043f\u0430 \u0441\u0442\u0430\u043d\u043a\u043e\u0432': ['1', '2'],         '\u041a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438': [1, 0.80],     }      # \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u044f \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435     if \u0433\u0440\u0443\u043f\u043f\u0430_\u0441\u0442\u0430\u043d\u043a\u043e\u0432 not in data_org['\u0413\u0440\u0443\u043f\u043f\u0430 \u0441\u0442\u0430\u043d\u043a\u043e\u0432']:         return \"\u041d\u0435\u0432\u0435\u0440\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435\"      # \u041d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 \u0433\u0440\u0443\u043f\u043f\u044b \u0441\u0442\u0430\u043d\u043a\u043e\u0432     index = data_org['\u0413\u0440\u0443\u043f\u043f\u0430 \u0441\u0442\u0430\u043d\u043a\u043e\u0432'].index(\u0433\u0440\u0443\u043f\u043f\u0430_\u0441\u0442\u0430\u043d\u043a\u043e\u0432)      # \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0433\u0440\u0443\u043f\u043f\u044b \u0441\u0442\u0430\u043d\u043a\u043e\u0432     return data_org['\u041a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438'][index]  # \u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 korg = get_coeff('1') print(korg)<\/code><\/pre>\n<p>\u041d\u0430 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u0442\u0435\u0445 \u0436\u0435 \u0441\u0430\u043c\u044b\u0445 <em>&#171;\u041e\u0431\u0449\u0435\u043c\u0430\u0448\u0438\u043d\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043d\u043e\u0440\u043c\u0430\u0442\u0438\u0432\u043e\u0432 &#8230;&#187; <\/em>\u0444\u043e\u0440\u043c\u0443\u043b\u0430 \u0434\u043b\u044f \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u0448\u0442\u0443\u0447\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<p><u>\u041d\u043e\u0440\u043c\u0430 \u0448\u0442\u0443\u0447\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438<\/u>\u00a0 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0443\u0442\u0435\u043c \u0441\u0443\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 \u0438 \u0441\u043d\u044f\u0442\u0438\u0435 \u0434\u0435\u0442\u0430\u043b\u0438 \u0438 \u043d\u0435\u043f\u043e\u043b\u043d\u043e\u0433\u043e \u0448\u0442\u0443\u0447\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u0435\u0439.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\u0422_\u0448=(\u0422_\u0432\u0441\u043f\u043e\u043c+\u0422_\u043d.\u0448.) )\u00d7\u041a_\u043f\u00d7\u041a_\u043e\u0441 \u00d7\u041a_\u043e\u0440\u043c,\u043c\u0438\u043d\" alt=\"\u0422_\u0448=(\u0422_\u0432\u0441\u043f\u043e\u043c+\u0422_\u043d.\u0448.) )\u00d7\u041a_\u043f\u00d7\u041a_\u043e\u0441 \u00d7\u041a_\u043e\u0440\u043c,\u043c\u0438\u043d\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/72f\/bd8\/e0c\/72fbd8e0cc1dd076f7ed01b54596d590.svg\" width=\"381\" height=\"24\"\/><\/p>\n<p>\u041f\u043e\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u044b\u0435 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b \u043c\u044b \u0443\u0436\u0435 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043b\u0438, \u0430 \u043f\u043e\u0442\u043e\u043c\u0443 \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043d\u0435\u043f\u043e\u043b\u043d\u043e\u0435 \u0448\u0442\u0443\u0447\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0438 \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f. <\/p>\n<p><u>\u041d\u043e\u0440\u043c\u0430\u0442\u0438\u0432\u044b \u043d\u0435\u043f\u043e\u043b\u043d\u043e\u0433\u043e \u0448\u0442\u0443\u0447\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u0438<\/u>\u00a0\u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0442:<\/p>\n<p>&#8212; \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f (\u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f)<\/p>\n<p>&#8212; \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0435 \u0441 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u0438 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0435\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u0432, \u0432\u0438\u0434\u0430 \u0438 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u0439 \u043d\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443;<\/p>\n<p>&#8212; \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043d\u0430 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0440\u0435\u0436\u0438\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u0442\u0430\u043d\u043a\u0430 \u0438 \u0441\u043c\u0435\u043d\u0443 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430;<\/p>\n<p>&#8212; \u0432\u0440\u0435\u043c\u044f \u043d\u0430 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u043c\u0435\u0441\u0442\u0430, \u043f\u0435\u0440\u0435\u0440\u044b\u0432\u044b \u043d\u0430 \u043e\u0442\u0434\u044b\u0445 \u0438 \u043b\u0438\u0447\u043d\u044b\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u043d\u0430\u043a\u043b\u0430\u0434\u043a\u0438 \u0432 \u043c\u043e\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0438\u043c\u0435\u044e\u0442 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u044b \u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0438 \u0442\u043e\u043c \u0436\u0435 \u0441\u0442\u0430\u043d\u043a\u0435, \u0431\u0443\u0434\u0435\u043c \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u0440\u0435\u043c\u044f \u043d\u0430 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u043c\u0435\u0441\u0442\u0430. \u0414\u0430\u043d\u043d\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b Excel<\/p>\n<pre><code class=\"python\">df1 = pd.read_excel(file_path, sheet_name ='t_\u043e\u0431\u0441\u043b') print(df1.head())<\/code><\/pre>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/e93\/ba4\/3d2\/e93ba43d2b005813919ac35a2de000d4.jpg\" width=\"453\" height=\"121\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e93\/ba4\/3d2\/e93ba43d2b005813919ac35a2de000d4.jpg\" data-blurred=\"true\"\/><\/figure>\n<p>\u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0432\u044b\u0431\u043e\u0440\u0430 \u0442\u0438\u043f\u0430 \u0441\u0442\u0430\u043d\u043a\u0430 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0430 \u043d\u0443\u043c\u0435\u0440\u0430\u0446\u0438\u044e \u043e\u0442 1 \u0434\u043e 5 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u0438\u043f\u0430 \u0441\u0442\u0430\u043d\u043a\u0430. \u0422\u0430\u043a \u043a\u0430\u043a \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0438\u0437 \u0444\u0430\u0439\u043b\u0430, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432 \u043d\u0435\u0433\u043e \u0437\u0430\u043d\u043e\u0441\u0438\u0442\u044c \u043b\u044e\u0431\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0443\u044e \u0434\u043b\u044f \u0432\u0430\u0448\u0438\u0445 \u0440\u0430\u0441\u0447\u0435\u0442\u043e\u0432. <\/p>\n<pre><code class=\"python\">Tobsl = df1.loc[df1['\u041a\u043e\u0434'] == 1, '\u0412\u0440\u0435\u043c\u044f_\u043e\u0431\u0441\u043b,%'].iloc[0] print(Tobsl) Tnsht=Tm_array+Tobsl\/100 print(Tnsht)<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0435\u043c <u>\u043d\u043e\u0440\u043c\u0430\u0442\u0438\u0432\u044b \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 \u0438 \u0441\u043d\u044f\u0442\u0438\u0435 \u0434\u0435\u0442\u0430\u043b\u0435\u0439<\/u>, \u0434\u043b\u044f \u043e\u0431\u043b\u0435\u0433\u0447\u0435\u043d\u0438\u044f \u0440\u0430\u0441\u0447\u0435\u0442\u043e\u0432 \u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0430  \u0443\u0441\u0440\u0435\u0434\u043d\u0435\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0437\u0430\u0442\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043d\u0430 \u0441\u0442\u0430\u043d\u043a\u0430\u0445, \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u0445 \u0432 \u043c\u0430\u0448\u0438\u043d\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0441\u0442\u0432\u0435 \u0438\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u0433\u043e \u0445\u0440\u043e\u043d\u043e\u043c\u0435\u0442\u0440\u0430\u0436\u0430.<\/p>\n<pre><code class=\"python\">df2 = pd.read_excel(file_path, sheet_name ='t_\u0432\u0441\u043f\u043e\u043c') print(df2.head()) t_vc = df2.loc[df2['\u041a\u043e\u0434'] == 1, '\u0412\u0440\u0435\u043c\u044f_\u0432\u0441\u043f\u043e\u043c,\u043c\u0438\u043d'].iloc[0] print(t_vc)<\/code><\/pre>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/86c\/5cf\/c60\/86c5cfc6096a8b01562b4be84747d4a0.jpg\" width=\"484\" height=\"111\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/86c\/5cf\/c60\/86c5cfc6096a8b01562b4be84747d4a0.jpg\" data-blurred=\"true\"\/><\/figure>\n<p>\u0420\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0448\u0442\u0443\u0447\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043f\u043e \u0444\u043e\u0440\u043c\u0443\u043b\u0435, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0439 \u0432\u044b\u0448\u0435:<\/p>\n<pre><code class=\"python\">Tsht=(t_vc+Tnsht)*kn*kos*korg print(Tsht)<\/code><\/pre>\n<p>\u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u043d\u043e\u0440\u043c\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u044b, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0435 \u043d\u0430 \u043c\u0435\u0442\u0430\u043b\u043b\u043e\u0440\u0435\u0436\u0443\u0449\u0438\u0445 \u0441\u0442\u0430\u043d\u043a\u0430\u0445, \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0448\u0442\u0443\u0447\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0422<sub>\u0448<\/sub>\u00a0\u0438 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e-\u0437\u0430\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 t<sub>\u043f.\u0437<\/sub>\u00a0\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e \u0444\u043e\u0440\u043c\u0443\u043b\u0435:  <\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\u041d_\u0432\u0440 =\u0422_\u0448 (1+\u0422_\u043f\u0437 \/100),\u043c\u0438\u043d\" alt=\"\u041d_\u0432\u0440 =\u0422_\u0448 (1+\u0422_\u043f\u0437 \/100),\u043c\u0438\u043d\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/72a\/1e5\/361\/72a1e536100140a0d48932c90b0437f7.svg\" width=\"222\" height=\"24\"\/><\/p>\n<pre><code class=\"python\"># \u0420\u0430\u0441\u0447\u0435\u0442 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e-\u0437\u0430\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 df3 = pd.read_excel(file_path, sheet_name ='t_\u043f\u0437\u0432') print(df3.head()) Tpz = df3.loc[df3['\u041f\u043e\u0437\u0438\u0446\u0438\u044f'] == 2, '\u041f\u0437\u0432,%'].iloc[0] print(Tpz) # \u0420\u0430\u0441\u0447\u0435\u0442 \u043d\u043e\u0440\u043c\u044b \u0432\u0440\u0435\u043c\u0435\u043d\u0438 N_vr=Tsht*(1 + Tpz\/100) print(N_vr)<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/500\/96b\/dd0\/50096bdd0aacdbaf027eae3f6ac1f732.jpg\" width=\"572\" height=\"76\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/500\/96b\/dd0\/50096bdd0aacdbaf027eae3f6ac1f732.jpg\" data-blurred=\"true\"\/><\/figure>\n<p>\u0412 \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0435\u043c \u0432\u0440\u0435\u043c\u044f \u043d\u0430 \u043f\u0430\u0440\u0442\u0438\u044e \u0432 \u0447\u0430\u0441\u0430\u0445  \u0438 \u0432\u044b\u0433\u0440\u0443\u0437\u0438\u043c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u0444\u0430\u0439\u043b Excel. <\/p>\n<pre><code class=\"python\">col=np.transpose(data_num) print(col) #\u041d\u043e\u0440\u043c\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430 \u043f\u0430\u0440\u0442\u0438\u044e, \u0432 \u0447\u0430\u0441\u0430\u0445 N_part=(N_vr*col)\/60 print(N_part) # \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043d\u043e\u0432\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 Excel workbook = openpyxl.Workbook() sheet = workbook.active # \u0417\u0430\u043f\u0438\u0441\u044c \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u044f\u0447\u0435\u0439\u043a\u0438 for row_idx, row in enumerate(N_part, start=1):     for col_idx, value in enumerate(row, start=1):         sheet.cell(row=col_idx, column=row_idx, value=value)  # \u0421\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430 Excel workbook.save(\"\u0420\u0430\u0441\u0447\u0435\u0442_\u0432\u0440\u0435\u043c\u0435\u043d\u0438.xlsx\")<\/code><\/pre>\n<p>\u042d\u0442\u0438 \u0448\u0430\u0433\u0438 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u044e\u0442, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u043d\u043e\u0440\u043c\u044b \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f Python. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u043e\u0431\u044a\u0435\u043c\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0441\u043d\u0438\u0436\u0430\u0435\u0442 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u043e\u0448\u0438\u0431\u043e\u043a.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/821745\/\"> https:\/\/habr.com\/ru\/articles\/821745\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442! \u041d\u0430\u00a0\u0425\u0430\u0431\u0440\u0435 \u044f \u043d\u043e\u0432\u0438\u0447\u043e\u043a, \u0440\u0435\u0448\u0438\u043b\u0430 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441\u0432\u043e\u0438\u043c\u0438 \u0441\u043a\u0440\u043e\u043c\u043d\u044b\u043c\u0438 \u0438\u0434\u0435\u044f\u043c\u0438 \u0438 \u0432\u044b\u0441\u043b\u0443\u0448\u0430\u0442\u044c \u0432\u0430\u0448\u0435 \u043c\u043d\u0435\u043d\u0438\u0435, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0432\u044b \u0434\u0430\u0434\u0438\u0442\u0435 \u043c\u043d\u0435 \u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u043e\u0432\u0435\u0442\u044b.<\/p>\n<p>\u041e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u0432 \u0442\u0440\u0438 \u0433\u043e\u0434\u0430, \u043a\u0430\u043a\u00a0\u0438\u043d\u0436\u0435\u043d\u0435\u0440 \u043f\u043e\u00a0\u043d\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u0442\u0440\u0443\u0434\u0430, \u044f \u043f\u043e\u043d\u044f\u043b\u0430, \u0447\u0442\u043e\u00a0\u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u043c\u043e\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u0441\u0432\u044f\u0437\u0430\u043d\u0430 \u0441\u00a0\u0442\u0435\u043c, \u0447\u0442\u043e\u0431\u044b \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0438\u00a0\u0431\u044b\u0441\u0442\u0440\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u043e\u0431\u044a\u0451\u043c\u044b \u0434\u0430\u043d\u043d\u044b\u0445. \u041f\u043e\u0440\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445\u00a0\u0431\u044b\u043b\u043e \u0442\u0430\u043a \u043c\u043d\u043e\u0433\u043e, \u0430\u00a0\u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435\u00a0\u0445\u0432\u0430\u0442\u0430\u043b\u043e, \u043e\u0442\u0447\u0435\u0433\u043e \u0437\u0430\u0432\u0438\u0441\u0430\u043b Excel \u0438\u043b\u0438\u00a0\u043f\u0440\u043e\u0441\u0442\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u043b\u0438 \u043e\u0448\u0438\u0431\u043a\u0438 \u0432\u00a0\u0444\u043e\u0440\u043c\u0443\u043b\u0430\u0445. <\/p>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0440\u0435\u0448\u0438\u043b\u0430 \u0445\u043e\u0442\u044f\u00a0\u0431\u044b \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u043d\u043e\u0440\u043c\u044b \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430\u00a0\u0438\u0437\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u043e\u0433\u043e \u0440\u043e\u0434\u0430 \u0434\u0435\u0442\u0430\u043b\u0435\u0439.<\/p>\n<p>\u0414\u043b\u044f\u00a0\u043d\u0430\u0447\u0430\u043b\u0430 \u0443\u00a0\u043c\u0435\u043d\u044f \u0435\u0441\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u0430 Excel, \u0433\u0434\u0435 \u0432\u00a0\u043b\u0435\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0430 \u0434\u0435\u0442\u0430\u043b\u0435\u0439 \u0438\u0437\u00a0\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c CAD. \u0412\u00a0\u043c\u043e\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u044d\u0442\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u043d\u0430\u043a\u043b\u0430\u0434\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0444\u0440\u0435\u0437\u0435\u0440\u043d\u0430\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430. <\/p>\n<figure class=\"bordered full-width\"><\/figure>\n<p>\u0412 \u043f\u0440\u0430\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u044b  \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u043b\u044f \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u0418\u0437 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u043e\u0432 \u043f\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043c\u0435\u0442\u0430\u043b\u043b\u043e\u0432 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u0447\u0442\u043e \u0444\u043e\u0440\u043c\u0443\u043b\u0430 \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043f\u0440\u0438 \u0444\u0440\u0435\u0437\u0435\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<p>\u0433\u0434\u0435 \u00a0L \u2013 \u0440\u0430\u0441\u0447\u0451\u0442\u043d\u0430\u044f \u0434\u043b\u0438\u043d\u0430 \u043f\u0443\u0442\u0438 \u0440\u0435\u0436\u0443\u0449\u0435\u0433\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 \u0432 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043f\u043e\u0434\u0430\u0447\u0438, \u043c\u043c; i \u2013 \u0447\u0438\u0441\u043b\u043e \u043f\u0440\u043e\u0445\u043e\u0434\u043e\u0432; S \u2013 \u043f\u043e\u0434\u0430\u0447\u0430, \u043c\u043c\/\u043e\u0431. <\/p>\n<p>\u0433\u0434\u0435 l \u2013 \u0440\u0430\u0441\u0447\u0435\u0442\u043d\u0430\u044f \u0434\u043b\u0438\u043d\u0430 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c\u043e\u0439 \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u0438, \u043c\u043c; l<sub>1<\/sub>\u00a0= t\u00a0*\u00a0ctg \u0443\u0433\u043b\u0430 \u03c6 \u2013 \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u0430 \u0432\u0440\u0435\u0437\u0430\u043d\u0438\u044f \u0440\u0435\u0437\u0446\u0430, \u043c\u043c; t \u2013 \u0433\u043b\u0443\u0431\u0438\u043d\u0430 \u0440\u0435\u0437\u0430\u043d\u0438\u044f, \u043c\u043c;\u00a0\u03c6 &#8212;\u00a0\u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u0443\u0433\u043e\u043b \u0432 \u043f\u043b\u0430\u043d\u0435 \u0440\u0435\u0437\u0446\u0430; l<sub>2<\/sub>\u00a0= 1\u20133 \u043c\u043c \u2013 \u0432\u044b\u0445\u043e\u0434 (\u043f\u0435\u0440\u0435\u0431\u0435\u0433) \u0440\u0435\u0437\u0446\u0430.<\/p>\n<figure class=\"bordered\"><\/figure>\n<p>\u0414\u043b\u044f \u0441\u0432\u043e\u0435\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0440\u0430\u043d\u0434\u043e\u043c\u043d\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u043a\u043e\u0434\u0430 \u044d\u0442\u043e \u0440\u0430\u0441\u0447\u0435\u0442 \u043d\u043e\u0440\u043c\u044b \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u041d\u0430 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0441\u0442\u0432\u0430\u0445 \u043d\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u043e\u0440\u043c\u0443\u043b, \u0442\u0430\u043a \u043a\u0430\u043a \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u0445 \u0441\u0442\u0430\u043d\u043a\u043e\u0432 \u0441 \u0427\u041f\u0423, \u0430, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0432\u0441\u0435\u0433\u0434\u0430 \u0435\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432 \u0444\u0430\u0439\u043b Excel.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043a \u043a\u043e\u0434\u0443. \u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438.<\/p>\n<pre><code class=\"python\">import numpy as np import pandas as pd import openpyxl<\/code><\/pre>\n<p>\u0423\u043a\u0430\u0436\u0435\u043c \u043f\u0443\u0442\u044c \u043a \u043d\u0430\u0448\u0435\u043c\u0443 Excel-\u0444\u0430\u0439\u043b\u0443 \u0438 \u0441\u0447\u0438\u0442\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 DataFrame \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e `pandas`. \u0412\u044b\u0432\u0435\u0434\u0435\u043c \u043f\u0435\u0440\u0432\u044b\u0435 \u043f\u044f\u0442\u044c \u0441\u0442\u0440\u043e\u043a \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u0447\u0442\u043e\u0431\u044b \u043c\u044b \u043c\u043e\u0433\u043b\u0438 \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u044b \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e.<\/p>\n<pre><code class=\"python\">file_path = 'time.xlsx' df = pd.read_excel(file_path) print(df.head())<\/code><\/pre>\n<figure class=\"full-width\"><\/figure>\n<p>\u041f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043c \u0440\u0430\u0441\u0447\u0435\u0442 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432 \u043c\u0438\u043d\u0443\u0442\u0430\u0445 \u043d\u0430 \u0435\u0434\u0438\u043d\u0438\u0446\u0443 \u043f\u0440\u043e\u0434\u0443\u043a\u0446\u0438\u0438, \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0432, \u0447\u0442\u043e \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0441\u0442\u043e\u043b\u0431\u0446\u044b \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0432 \u0434\u0430\u043d\u043d\u044b\u0445. \u0415\u0441\u043b\u0438 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0441\u0442\u043e\u043b\u0431\u0435\u0446 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442, \u0432\u044b\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u0448\u0438\u0431\u043a\u0430. \u0417\u0430\u0442\u0435\u043c \u043c\u044b \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u044d\u0442\u0438\u0445 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 \u043a \u0447\u0438\u0441\u043b\u043e\u0432\u043e\u043c\u0443 \u0442\u0438\u043f\u0443, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f `pd.to_numeric()`. \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432\u044b\u0432\u043e\u0434\u0438\u043c \u0432 \u043c\u0430\u0441\u0441\u0438\u0432.<\/p>\n<pre><code class=\"python\">columns_to_extract = ['L', 'i', 'S'] missing_columns = [col for col in columns_to_extract if col not in df.columns] if missing_columns:     raise KeyError(f\"The following columns are missing from the DataFrame: {missing_columns}\") df[columns_to_extract] = df[columns_to_extract].apply(pd.to_numeric, errors='coerce') df['Tm'] = (df['L'] * df['i']) \/  df['S'] Tm_array = df['Tm'].values print(Tm_array)<\/code><\/pre>\n<figure class=\"full-width\"><\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043f\u043e\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u044b\u0435 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b: \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u043f\u0430\u0440\u0442\u0438\u0439\u043d\u043e\u0441\u0442\u0438, \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u0441\u0442\u0430\u043d\u043a\u043e\u0432 \u0438 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u043c\u0435\u0441\u0442\u0430. \u0414\u0430\u043d\u043d\u044b\u0435 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445 \u0432 \u043d\u043e\u0440\u043c\u0430\u0442\u0438\u0432\u043d\u043e\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0435 &#171;<em>\u041e\u0431\u0449\u0435\u043c\u0430\u0448\u0438\u043d\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435\u00a0\u0443\u043a\u0440\u0443\u043f\u043d\u0435\u043d\u043d\u044b\u0435\u00a0\u043d\u043e\u0440\u043c\u0430\u0442\u0438\u0432\u044b \u0432\u0440\u0435\u043c\u0435\u043d\u0438\u00a0\u043d\u0430\u00a0\u0440\u0430\u0431\u043e\u0442\u044b, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0435 \u043d\u0430 \u043c\u0435\u0442\u0430\u043b\u043b\u043e\u0440\u0435\u0436\u0443\u0449\u0438\u0445 \u0441\u0442\u0430\u043d\u043a\u0430\u0445&#187;.<\/em> <\/p>\n<p>\u0420\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0435\u043c \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u043f\u0430\u0440\u0442\u0438\u0439\u043d\u043e\u0441\u0442\u0438, \u043d\u0430\u043f\u0438\u0441\u0430\u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e*:<\/p>\n<p>*\u041f\u0440\u0438 \u0432\u044b\u0432\u043e\u0434\u0435 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0442\u0438\u043f \u0441\u0442\u0430\u043d\u043a\u0430, \u0432 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 &#8212; \u044d\u0442\u043e \u0441\u0442\u0430\u043d\u043a\u0438 \u0441 \u0440\u0443\u0447\u043d\u044b\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c.<\/p>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043c\u0430\u0441\u0441\u0438\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0430 \u043f\u0430\u0440\u0442\u0438\u0439\u043d\u043e\u0441\u0442\u0438 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0434\u0435\u0442\u0430\u043b\u0435\u0439.<\/p>\n<pre><code class=\"python\">data_n = {     '\u0427\u0438\u0441\u043b\u043e \u0434\u0435\u0442\u0430\u043b\u0435\u0439 \u0432 \u043f\u0430\u0440\u0442\u0438\u0438': ['1..2', '3..5', '6..10', '11..20', '21..40', '41..90', '\u0441\u0432\u044b\u0448\u0435 90'],     '\u043f\u0440\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043d\u0430 \u0441\u0442\u0430\u043d\u043a\u0430\u0445 \u0441 \u0440\u0443\u0447\u043d\u044b\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c': [1, 0.9, 0.8, 0.75, 0.7, 0.6, 0.55],     '\u043f\u0440\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043d\u0430 \u0441\u0442\u0430\u043d\u043a\u0430\u0445 \u0441 \u043f\u043e\u043b\u0443\u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0446\u0438\u043a\u043b\u043e\u043c (\u0437\u0443\u0431\u043e\u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0449\u0438\u0435, \u0434\u0438\u0441\u043a\u043e\u0432\u044b\u0435 \u043f\u0438\u043b\u044b \u0438 \u0442.\u0434.)': [1, 0.98, 0.95, 0.92, 0.9, 0.86, 0.85] } df_codes = pd.DataFrame(data_n) def get_n_value(part_counts, col_name):     if part_counts &lt;= 2:         return df_codes.loc[df_codes['\u0427\u0438\u0441\u043b\u043e \u0434\u0435\u0442\u0430\u043b\u0435\u0439 \u0432 \u043f\u0430\u0440\u0442\u0438\u0438'] == '1..2', col_name].values[0]     elif 3 &lt;= part_counts &lt;= 5:         return df_codes.loc[df_codes['\u0427\u0438\u0441\u043b\u043e \u0434\u0435\u0442\u0430\u043b\u0435\u0439 \u0432 \u043f\u0430\u0440\u0442\u0438\u0438'] == '3..5', col_name].values[0]     elif 6 &lt;= part_counts &lt;= 10:         return df_codes.loc[df_codes['\u0427\u0438\u0441\u043b\u043e \u0434\u0435\u0442\u0430\u043b\u0435\u0439 \u0432 \u043f\u0430\u0440\u0442\u0438\u0438'] == '6..10', col_name].values[0]     elif 11 &lt;= part_counts &lt;= 20:         return df_codes.loc[df_codes['\u0427\u0438\u0441\u043b\u043e \u0434\u0435\u0442\u0430\u043b\u0435\u0439 \u0432 \u043f\u0430\u0440\u0442\u0438\u0438'] == '11..20', col_name].values[0]     elif 21 &lt;= part_counts &lt;= 40:         return df_codes.loc[df_codes['\u0427\u0438\u0441\u043b\u043e \u0434\u0435\u0442\u0430\u043b\u0435\u0439 \u0432 \u043f\u0430\u0440\u0442\u0438\u0438'] == '21..40', col_name].values[0]     elif 41 &lt;= part_counts &lt;= 90:         return df_codes.loc[df_codes['\u0427\u0438\u0441\u043b\u043e \u0434\u0435\u0442\u0430\u043b\u0435\u0439 \u0432 \u043f\u0430\u0440\u0442\u0438\u0438'] == '41..90', col_name].values[0]     else:         return df_codes.loc[df_codes['\u0427\u0438\u0441\u043b\u043e \u0434\u0435\u0442\u0430\u043b\u0435\u0439 \u0432 \u043f\u0430\u0440\u0442\u0438\u0438'] == '\u0441\u0432\u044b\u0448\u0435 90', col_name].values[0] number = ['\u041a\u043e\u043b-\u0432\u043e'] data_num = df[number].values part_counts = data_num # \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u0435\u0442\u0430\u043b\u0435\u0439 \u0432 \u043f\u0430\u0440\u0442\u0438\u0438 kn = [get_n_value(count, '\u043f\u0440\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043d\u0430 \u0441\u0442\u0430\u043d\u043a\u0430\u0445 \u0441 \u0440\u0443\u0447\u043d\u044b\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c') for count in part_counts] print(kn)     <\/code><\/pre>\n<figure class=\"full-width\"><\/figure>\n<p>\u0420\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0435\u043c \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u043d\u043a\u043e\u0432  \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0447\u0438\u0441\u043b\u0430  \u0441\u0442\u0430\u043d\u043a\u043e\u0432 \u0438 \u0444\u043e\u0440\u043c\u044b \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0442\u0440\u0443\u0434\u0430. \u041a\u043e\u0434\u044b 1,2,3  \u043e\u0437\u043d\u0430\u0447\u0430\u044e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u0432 \u0437\u0430\u043d\u044f\u0442\u043e\u0441\u0442\u0438 (\u0442\u0430\u0431\u043b\u0438\u0446\u0430 2, \u041a\u0430\u0440\u0442\u0430 1 \u043b\u0438\u0441\u0442 1 &#171;<em>\u041e\u0431\u0449\u0435\u043c\u0430\u0448\u0438\u043d\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435\u00a0\u0443\u043a\u0440\u0443\u043f\u043d\u0435\u043d\u043d\u044b\u0435\u00a0\u043d\u043e\u0440\u043c\u0430\u0442\u0438\u0432\u044b \u0432\u0440\u0435\u043c\u0435\u043d\u0438\u00a0\u043d\u0430\u00a0\u0440\u0430\u0431\u043e\u0442\u044b, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0435 \u043d\u0430 \u043c\u0435\u0442\u0430\u043b\u043b\u043e\u0440\u0435\u0436\u0443\u0449\u0438\u0445 \u0441\u0442\u0430\u043d\u043a\u0430\u0445&#187;.<\/em> )<\/p>\n<pre><code class=\"python\">def get_valor(\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e_\u0441\u0442\u0430\u043d\u043a\u043e\u0432, \u0442\u0438\u043f):     # \u0418\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b     data_os = {         '\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u0430\u043d\u043a\u043e\u0432': ['2', '3', '4'],         '\u0418\u043d\u0434\u0438\u0432\u0438\u0434\u0443\u0430\u043b\u044c\u043d\u0430\u044f_1': [0.56, 0.39, 0.33],         '\u0418\u043d\u0434\u0438\u0432\u0438\u0434\u0443\u0430\u043b\u044c\u043d\u0430\u044f_2': [0.65, 0.48, 0.39],         '\u0418\u043d\u0434\u0438\u0432\u0438\u0434\u0443\u0430\u043b\u044c\u043d\u0430\u044f_3': [0.75, 0.55, 0.47],         '\u0411\u0440\u0438\u0433\u0430\u0434\u043d\u0430\u044f_1': [0.53, 0.37, 0.30],         '\u0411\u0440\u0438\u0433\u0430\u0434\u043d\u0430\u044f_2': [0.60, 0.44, 0.37],         '\u0411\u0440\u0438\u0433\u0430\u0434\u043d\u0430\u044f_3': [0.67, 0.51, 0.45],     }     # \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u044f \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435     if \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e_\u0441\u0442\u0430\u043d\u043a\u043e\u0432 not in data_os['\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u0430\u043d\u043a\u043e\u0432'] or \u0442\u0438\u043f + '_1' not in data_os:         return \"\u041d\u0435\u0432\u0435\u0440\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435\"      # \u041d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0441\u0442\u0430\u043d\u043a\u043e\u0432     index = data_os['\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u0430\u043d\u043a\u043e\u0432'].index(\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e_\u0441\u0442\u0430\u043d\u043a\u043e\u0432)      # \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0441\u0442\u0430\u043d\u043a\u043e\u0432 \u0438 \u0442\u0438\u043f\u0430     return data_os[\u0442\u0438\u043f + '_1'][index] kos = get_valor('2', '\u0418\u043d\u0434\u0438\u0432\u0438\u0434\u0443\u0430\u043b\u044c\u043d\u0430\u044f') print(kos)<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0430 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0442\u0440\u0443\u0434\u0430 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0433\u0440\u0443\u043f\u043f\u044b \u0441\u0442\u0430\u043d\u043a\u043e\u0432 ( \u0432 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0433\u0440\u0443\u043f\u043f\u0430 \u0441\u0442\u0430\u043d\u043a\u043e\u0432 1):<\/p>\n<pre><code class=\"python\">data_org = {         '\u0413\u0440\u0443\u043f\u043f\u0430 \u0441\u0442\u0430\u043d\u043a\u043e\u0432': ['1', '2'],         '\u041a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438': [1, 0.80],              } def get_coeff(\u0433\u0440\u0443\u043f\u043f\u0430_\u0441\u0442\u0430\u043d\u043a\u043e\u0432):     # \u0418\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b     data_org = {         '\u0413\u0440\u0443\u043f\u043f\u0430 \u0441\u0442\u0430\u043d\u043a\u043e\u0432': ['1', '2'],         '\u041a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438': [1, 0.80],     }      # \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u044f \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435     if \u0433\u0440\u0443\u043f\u043f\u0430_\u0441\u0442\u0430\u043d\u043a\u043e\u0432 not in data_org['\u0413\u0440\u0443\u043f\u043f\u0430 \u0441\u0442\u0430\u043d\u043a\u043e\u0432']:         return \"\u041d\u0435\u0432\u0435\u0440\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435\"      # \u041d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 \u0433\u0440\u0443\u043f\u043f\u044b \u0441\u0442\u0430\u043d\u043a\u043e\u0432     index = data_org['\u0413\u0440\u0443\u043f\u043f\u0430 \u0441\u0442\u0430\u043d\u043a\u043e\u0432'].index(\u0433\u0440\u0443\u043f\u043f\u0430_\u0441\u0442\u0430\u043d\u043a\u043e\u0432)      # \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0433\u0440\u0443\u043f\u043f\u044b \u0441\u0442\u0430\u043d\u043a\u043e\u0432     return data_org['\u041a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438'][index]  # \u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 korg = get_coeff('1') print(korg)<\/code><\/pre>\n<p>\u041d\u0430 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u0442\u0435\u0445 \u0436\u0435 \u0441\u0430\u043c\u044b\u0445 <em>&#171;\u041e\u0431\u0449\u0435\u043c\u0430\u0448\u0438\u043d\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043d\u043e\u0440\u043c\u0430\u0442\u0438\u0432\u043e\u0432 &#8230;&#187; <\/em>\u0444\u043e\u0440\u043c\u0443\u043b\u0430 \u0434\u043b\u044f \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u0448\u0442\u0443\u0447\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<p><u>\u041d\u043e\u0440\u043c\u0430 \u0448\u0442\u0443\u0447\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438<\/u>\u00a0 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0443\u0442\u0435\u043c \u0441\u0443\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 \u0438 \u0441\u043d\u044f\u0442\u0438\u0435 \u0434\u0435\u0442\u0430\u043b\u0438 \u0438 \u043d\u0435\u043f\u043e\u043b\u043d\u043e\u0433\u043e \u0448\u0442\u0443\u0447\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u0435\u0439.<\/p>\n<p>\u041f\u043e\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u044b\u0435 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b \u043c\u044b \u0443\u0436\u0435 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043b\u0438, \u0430 \u043f\u043e\u0442\u043e\u043c\u0443 \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043d\u0435\u043f\u043e\u043b\u043d\u043e\u0435 \u0448\u0442\u0443\u0447\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0438 \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f. <\/p>\n<p><u>\u041d\u043e\u0440\u043c\u0430\u0442\u0438\u0432\u044b \u043d\u0435\u043f\u043e\u043b\u043d\u043e\u0433\u043e \u0448\u0442\u0443\u0447\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u0438<\/u>\u00a0\u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0442:<\/p>\n<p>&#8212; \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f (\u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f)<\/p>\n<p>&#8212; \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0435 \u0441 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u0438 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0435\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u0432, \u0432\u0438\u0434\u0430 \u0438 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u0439 \u043d\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443;<\/p>\n<p>&#8212; \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043d\u0430 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0440\u0435\u0436\u0438\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u0442\u0430\u043d\u043a\u0430 \u0438 \u0441\u043c\u0435\u043d\u0443 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430;<\/p>\n<p>&#8212; \u0432\u0440\u0435\u043c\u044f \u043d\u0430 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u043c\u0435\u0441\u0442\u0430, \u043f\u0435\u0440\u0435\u0440\u044b\u0432\u044b \u043d\u0430 \u043e\u0442\u0434\u044b\u0445 \u0438 \u043b\u0438\u0447\u043d\u044b\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u043d\u0430\u043a\u043b\u0430\u0434\u043a\u0438 \u0432 \u043c\u043e\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0438\u043c\u0435\u044e\u0442 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u044b \u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0438 \u0442\u043e\u043c \u0436\u0435 \u0441\u0442\u0430\u043d\u043a\u0435, \u0431\u0443\u0434\u0435\u043c \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u0440\u0435\u043c\u044f \u043d\u0430 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u043c\u0435\u0441\u0442\u0430. \u0414\u0430\u043d\u043d\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b Excel<\/p>\n<pre><code class=\"python\">df1 = pd.read_excel(file_path, sheet_name ='t_\u043e\u0431\u0441\u043b') print(df1.head())<\/code><\/pre>\n<figure class=\"\"><\/figure>\n<p>\u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0432\u044b\u0431\u043e\u0440\u0430 \u0442\u0438\u043f\u0430 \u0441\u0442\u0430\u043d\u043a\u0430 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0430 \u043d\u0443\u043c\u0435\u0440\u0430\u0446\u0438\u044e \u043e\u0442 1 \u0434\u043e 5 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u0438\u043f\u0430 \u0441\u0442\u0430\u043d\u043a\u0430. \u0422\u0430\u043a \u043a\u0430\u043a \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0438\u0437 \u0444\u0430\u0439\u043b\u0430, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432 \u043d\u0435\u0433\u043e \u0437\u0430\u043d\u043e\u0441\u0438\u0442\u044c \u043b\u044e\u0431\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0443\u044e \u0434\u043b\u044f \u0432\u0430\u0448\u0438\u0445 \u0440\u0430\u0441\u0447\u0435\u0442\u043e\u0432. <\/p>\n<pre><code class=\"python\">Tobsl = df1.loc[df1['\u041a\u043e\u0434'] == 1, '\u0412\u0440\u0435\u043c\u044f_\u043e\u0431\u0441\u043b,%'].iloc[0] print(Tobsl) Tnsht=Tm_array+Tobsl\/100 print(Tnsht)<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0435\u043c <u>\u043d\u043e\u0440\u043c\u0430\u0442\u0438\u0432\u044b \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 \u0438 \u0441\u043d\u044f\u0442\u0438\u0435 \u0434\u0435\u0442\u0430\u043b\u0435\u0439<\/u>, \u0434\u043b\u044f \u043e\u0431\u043b\u0435\u0433\u0447\u0435\u043d\u0438\u044f \u0440\u0430\u0441\u0447\u0435\u0442\u043e\u0432 \u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0430  \u0443\u0441\u0440\u0435\u0434\u043d\u0435\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0437\u0430\u0442\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043d\u0430 \u0441\u0442\u0430\u043d\u043a\u0430\u0445, \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u0445 \u0432 \u043c\u0430\u0448\u0438\u043d\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0441\u0442\u0432\u0435 \u0438\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u0433\u043e \u0445\u0440\u043e\u043d\u043e\u043c\u0435\u0442\u0440\u0430\u0436\u0430.<\/p>\n<pre><code class=\"python\">df2 = pd.read_excel(file_path, sheet_name ='t_\u0432\u0441\u043f\u043e\u043c') print(df2.head()) t_vc = df2.loc[df2['\u041a\u043e\u0434'] == 1, '\u0412\u0440\u0435\u043c\u044f_\u0432\u0441\u043f\u043e\u043c,\u043c\u0438\u043d'].iloc[0] print(t_vc)<\/code><\/pre>\n<figure class=\"\"><\/figure>\n<p>\u0420\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0448\u0442\u0443\u0447\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043f\u043e \u0444\u043e\u0440\u043c\u0443\u043b\u0435, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0439 \u0432\u044b\u0448\u0435:<\/p>\n<pre><code class=\"python\">Tsht=(t_vc+Tnsht)*kn*kos*korg print(Tsht)<\/code><\/pre>\n<p>\u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u043d\u043e\u0440\u043c\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u044b, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0435 \u043d\u0430 \u043c\u0435\u0442\u0430\u043b\u043b\u043e\u0440\u0435\u0436\u0443\u0449\u0438\u0445 \u0441\u0442\u0430\u043d\u043a\u0430\u0445, \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0448\u0442\u0443\u0447\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0422<sub>\u0448<\/sub>\u00a0\u0438 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e-\u0437\u0430\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 t<sub>\u043f.\u0437<\/sub>\u00a0\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e \u0444\u043e\u0440\u043c\u0443\u043b\u0435:  <\/p>\n<pre><code class=\"python\"># \u0420\u0430\u0441\u0447\u0435\u0442 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e-\u0437\u0430\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 df3 = pd.read_excel(file_path, sheet_name ='t_\u043f\u0437\u0432') print(df3.head()) Tpz = df3.loc[df3['\u041f\u043e\u0437\u0438\u0446\u0438\u044f'] == 2, '\u041f\u0437\u0432,%'].iloc[0] print(Tpz) # \u0420\u0430\u0441\u0447\u0435\u0442 \u043d\u043e\u0440\u043c\u044b \u0432\u0440\u0435\u043c\u0435\u043d\u0438 N_vr=Tsht*(1 + Tpz\/100) print(N_vr)<\/code><\/pre>\n<figure class=\"full-width\"><\/figure>\n<p>\u0412 \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0435\u043c \u0432\u0440\u0435\u043c\u044f \u043d\u0430 \u043f\u0430\u0440\u0442\u0438\u044e \u0432 \u0447\u0430\u0441\u0430\u0445  \u0438 \u0432\u044b\u0433\u0440\u0443\u0437\u0438\u043c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u0444\u0430\u0439\u043b Excel. <\/p>\n<pre><code class=\"python\">col=np.transpose(data_num) print(col) #\u041d\u043e\u0440\u043c\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430 \u043f\u0430\u0440\u0442\u0438\u044e, \u0432 \u0447\u0430\u0441\u0430\u0445 N_part=(N_vr*col)\/60 print(N_part) # \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043d\u043e\u0432\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 Excel workbook = openpyxl.Workbook() sheet = workbook.active # \u0417\u0430\u043f\u0438\u0441\u044c \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u044f\u0447\u0435\u0439\u043a\u0438 for row_idx, row in enumerate(N_part, start=1):     for col_idx, value in enumerate(row, start=1):         sheet.cell(row=col_idx, column=row_idx, value=value)  # \u0421\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430 Excel workbook.save(\"\u0420\u0430\u0441\u0447\u0435\u0442_\u0432\u0440\u0435\u043c\u0435\u043d\u0438.xlsx\")<\/code><\/pre>\n<p>\u042d\u0442\u0438 \u0448\u0430\u0433\u0438 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u044e\u0442, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u043d\u043e\u0440\u043c\u044b \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f Python. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u043e\u0431\u044a\u0435\u043c\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0441\u043d\u0438\u0436\u0430\u0435\u0442 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u043e\u0448\u0438\u0431\u043e\u043a.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> <\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-378883","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/378883","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=378883"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/378883\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=378883"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=378883"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=378883"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}