{"id":328034,"date":"2022-01-14T21:00:27","date_gmt":"2022-01-14T21:00:27","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=328034"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=328034","title":{"rendered":"<span>\u0421\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 Python: \u043f\u0438\u0448\u0435\u043c \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u044b\u0435 \u0442\u0435\u0441\u0442\u044b \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c \u0441\u043e\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u044f \u043e \u043a\u043e\u043c\u043c\u0438\u0442\u0430\u0445 \u0432 Git<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"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\/da3\/4f1\/567\/da34f15677b4400e040d2dd520aac834.jpg\" width=\"850\" height=\"400\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/da3\/4f1\/567\/da34f15677b4400e040d2dd520aac834.jpg\" data-blurred=\"true\"\/><figcaption><\/figcaption><\/figure>\n<p><em>\u041f\u0435\u0440\u0435\u0432\u043e\u0434 \u0431\u044b\u043b \u0441\u0434\u0435\u043b\u0430\u043d \u0434\u043b\u044f \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u043a\u0443\u0440\u0441\u043e\u0432 \u043f\u043e\u00a0<\/em>\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e<em>\u00a0<\/em><a href=\"https:\/\/ru.hexlet.io\/\" rel=\"noopener noreferrer nofollow\"><em>\u0425\u0435\u043a\u0441\u043b\u0435\u0442<\/em><\/a><\/p>\n<p><em>\u042d\u0442\u0430\u00a0<\/em><a href=\"https:\/\/www.adaltas.com\/en\/2021\/06\/24\/unit-tests-conventional-commits\/\" rel=\"noopener noreferrer nofollow\"><em><u>\u0432\u0442\u043e\u0440\u0430\u044f<\/u><\/em><\/a><em>\u00a0\u0441\u0442\u0430\u0442\u044c\u044f\u00a0<\/em><a href=\"https:\/\/ru.hexlet.io\/blog\/posts\/sovremennyy-python\" rel=\"noopener noreferrer nofollow\"><em><u>\u0438\u0437 \u0446\u0438\u043a\u043b\u0430<\/u><\/em><\/a><em>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043e \u043b\u0443\u0447\u0448\u0438\u0445 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430\u0445 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e Python. \u0412 \u044d\u0442\u043e\u043c \u0446\u0438\u043a\u043b\u0435 \u0441\u0442\u0430\u0442\u0435\u0439 \u0432\u0441\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u044b \u043d\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u044e Python, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u0443\u043c\u043c\u0438\u0440\u0443\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435, \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0432\u00a0<\/em><a href=\"https:\/\/pandas.pydata.org\/pandas-docs\/stable\/reference\/api\/pandas.DataFrame.html\" rel=\"noopener noreferrer nofollow\"><em><u>pandas DataFrame<\/u><\/em><\/a><em>. \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u0440\u043e\u043a \u0438 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 \u0438 \u0447\u0430\u0441\u0442\u043e\u0442\u0443 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0432 pandas DataFrame.<\/em><\/p>\n<p>\u0425\u043e\u0440\u043e\u0448\u0430\u044f \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0433\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0440\u0438\u043d\u043e\u0441\u0438\u0442 \u043c\u043d\u043e\u0433\u043e \u0434\u043e\u043b\u0433\u043e\u0441\u0440\u043e\u0447\u043d\u044b\u0445 \u0432\u044b\u0433\u043e\u0434. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u043a\u043e\u0434\u043e\u0432\u044b\u0435 \u0431\u0430\u0437\u044b \u0438 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442, \u0447\u0442\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u0432\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u0434\u0430 \u0432\u0435\u0434\u0435\u0442 \u0441\u0435\u0431\u044f \u0442\u0430\u043a, \u043a\u0430\u043a \u043e\u0436\u0438\u0434\u0430\u0435\u0442\u0441\u044f. \u041d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u0432 \u0432 Git \u0442\u0430\u043a\u0436\u0435 \u0443\u043b\u0443\u0447\u0448\u0430\u0435\u0442 \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043c\u0435\u0436\u0434\u0443 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0430\u043c\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0425\u043e\u0440\u043e\u0448\u043e \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u0432 Git \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0442 \u043f\u0443\u0442\u044c \u043a \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443 \u0432\u0435\u0440\u0441\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c\u044b\u043c \u0444\u0430\u0439\u043b\u0430\u043c \u0436\u0443\u0440\u043d\u0430\u043b\u0430 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0435\u0439\u0447\u0430\u0441 \u0432 \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u043f\u0440\u0435\u0434\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u043f\u044b\u0442\u043e\u043a \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u0432 \u043d\u0430\u0448\u0438\u0445 Git-\u043a\u043e\u043c\u043c\u0438\u0442\u0430\u0445.<\/p>\n<p><a href=\"https:\/\/ru.hexlet.io\/blog\/posts\/sovremennyy-python\" rel=\"noopener noreferrer nofollow\"><u>\u0412 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438<\/u><\/a>\u00a0\u044d\u0442\u043e\u0439 \u0441\u0435\u0440\u0438\u0438 \u043c\u044b \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043b\u0438 \u043d\u0430\u0448 \u043f\u0440\u043e\u0435\u043a\u0442, \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 Python \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e\u00a0<code>pyenv<\/code>, \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e Python \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e\u00a0<code>pyenv<\/code>, \u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u0438\u0440\u0443\u044f \u0435\u0433\u043e \u0432 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u0440\u0435\u0434\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e\u00a0<code>poetry<\/code>. \u0417\u0434\u0435\u0441\u044c \u043c\u044b \u043f\u043e\u043a\u0430\u0436\u0435\u043c \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e, \u043a\u0430\u043a \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u043e\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u0430\u0448\u0435\u0433\u043e Python-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u043a\u0430\u043a \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043e \u043a\u043e\u043c\u043c\u0438\u0442\u0430\u0445 \u0432 Git. \u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0439 \u0441 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435\u0439, \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d \u043d\u0430\u00a0<a href=\"https:\/\/github.com\/AABur\/summarize_dataframe\" rel=\"noopener noreferrer nofollow\"><u>GitHub<\/u><\/a>.<\/p>\n<h2>\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u0434\u0430<\/h2>\n<p>\u041f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0432 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0439\u0442\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435:<\/p>\n<pre><code class=\"bash\">cd summarize_dataframe\/ poetry shell<\/code><\/pre>\n<p><em>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0447\u0438\u043a\u0430: \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u00a0<\/em><code>numpy<\/code>\u00a0\u043a \u0432\u0435\u0440\u0441\u0438\u0438 Python \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0438\u0441\u044c, \u043f\u0435\u0440\u0435\u0434 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u043d\u0435\u0441\u0442\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0444\u0430\u0439\u043b\u00a0<code>pyproject.toml<\/code>:<\/p>\n<pre><code class=\"yaml\">[tool.poetry.dependencies] -python = \"^3.8\" +python = \">=3.8,&lt;3.11\"<\/code><\/pre>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e\u00a0<code>poetry<\/code>:<\/p>\n<pre><code class=\"bash\">poetry add -D pynvim numpy pandas<\/code><\/pre>\n<p>\u0424\u043b\u0430\u0433 -D \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043a \u0441\u0440\u0435\u0434\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438.<\/p>\n<p>\u0418\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u043d\u0430\u0448\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0442\u0440\u0435\u0445 \u0448\u0430\u0433\u043e\u0432:<\/p>\n<ol>\n<li>\n<p>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0444\u043e\u0440\u043c\u044b pandas DataFrame<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0447\u0430\u0441\u0442\u043e\u0442\u044b \u0442\u0438\u043f\u043e\u0432 pandas\u00a0<code>dtypes<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u041e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u044d\u0442\u0438\u0445 \u0434\u0432\u0443\u0445 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0432 \u0435\u0434\u0438\u043d\u044b\u0439 DataFrame, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u043e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430.<\/p>\n<\/li>\n<\/ol>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e DataFrame \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u0432\u044b\u0448\u0435. \u0412 \u0441\u0432\u044f\u0437\u0438 \u0441 \u044d\u0442\u0438\u043c \u043d\u0430\u0448 \u043a\u043e\u0434 \u043c\u043e\u0436\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<pre><code class=\"python\">import pandas as pd   def data_summary(df: pd.DataFrame) -> None:     \"\"\"     Function defined to return a DataFrame containing details     about the number of rows and columns and the column dtype     frequency of the passed pandas DataFrame     \"\"\"          def _shape(df: pd.DataFrame) -> None:         \"\"\"         Function defined to return a dataframe with details about         the number of row and columns         \"\"\"         return None           def _dtypes_freq(df: pd.DataFrame) -> None:       \"\"\"         Function defined to return a dataframe with details about         the pandas dtypes frequency         \"\"\"         return None          return None  def display_summary(df: pd.DataFrame) -> None:     \"\"\"     Function define to print out the result of the data summary     \"\"\"     result_df = True     message = '---- Data summary ----'     print(message, result_df, sep='\\n') <\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0447\u043d\u0435\u043c \u043f\u0438\u0441\u0430\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u044b\u0435 \u0442\u0435\u0441\u0442\u044b. \u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u00a0<code>unittest<\/code>, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0439 \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 Python. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0432\u044b \u043f\u043e\u043c\u043d\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u00a0<a href=\"https:\/\/ru.hexlet.io\/blog\/posts\/sovremennyy-python\" rel=\"noopener noreferrer nofollow\"><u>\u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439<\/u><\/a>\u00a0\u0441\u0442\u0430\u0442\u044c\u0435\u00a0<a href=\"https:\/\/docs.pytest.org\/en\/stable\/contents.html\" rel=\"noopener noreferrer nofollow\"><u>pytest<\/u><\/a>\u00a0\u0431\u044b\u043b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d \u043a\u0430\u043a \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u042d\u0442\u043e \u043d\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e\u00a0<code>pytest<\/code>\u00a0\u043d\u0430\u0442\u0438\u0432\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0442\u0435\u0441\u0442\u044b, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438\u00a0<code>unittest<\/code>.<\/p>\n<p>\u042e\u043d\u0438\u0442-\u0442\u0435\u0441\u0442\u044b \u2014 \u044d\u0442\u043e \u043c\u0435\u0442\u043e\u0434\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435, \u043a\u0430\u043a \u043e\u0436\u0438\u0434\u0430\u0435\u0442\u00a0<code>unittest<\/code>, \u0431\u0443\u0434\u0443\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 Python. \u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0434\u043b\u044f \u0441\u0432\u043e\u0438\u0445 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0435\u0435 \u0438\u043c\u044f \u2014 \u043e\u043d\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0442\u044c\u0441\u044f \u0441\u00a0<code>test_<\/code>. \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u00a0<code>unittest<\/code>\u00a0\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0440\u044f\u0434 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u0443\u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043e\u0442 \u043a\u043b\u0430\u0441\u0441\u0430\u00a0<code>unittest.TestCase<\/code>.<\/p>\n<p><strong>\u041d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u0442\u0435\u0441\u0442 \u0434\u043e\u043b\u0436\u0435\u043d:<\/strong><\/p>\n<ul>\n<li>\n<p>\u041e\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043e\u0434\u043d\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e<\/p>\n<\/li>\n<li>\n<p>\u0411\u044b\u0442\u044c \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u044b\u043c<\/p>\n<\/li>\n<li>\n<p>\u041d\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439<\/p>\n<\/li>\n<li>\n<p>\u0412\u043e\u0441\u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430.<\/p>\n<\/li>\n<\/ul>\n<p>\u0427\u0442\u043e\u0431\u044b \u0432\u043e\u0441\u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0443\u044e \u0440\u0430\u0431\u043e\u0447\u0443\u044e \u0441\u0440\u0435\u0434\u0443, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438. \u0415\u0441\u043b\u0438 \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u044b\u043c, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0439\u0442\u0435 \u043c\u0435\u0442\u043e\u0434\u00a0<code>setUp()<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u043f\u0435\u0440\u0435\u0434 \u043a\u0430\u0436\u0434\u044b\u043c \u0442\u0435\u0441\u0442\u043e\u043c. \u042d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e \u0434\u043b\u044f \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0440\u0435\u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043e\u0434\u0430. \u0412 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u00a0<code>tearDown()<\/code>.<\/p>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c unit-\u0442\u0435\u0441\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b\u0438 \u0434\u043b\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438\u00a0<code>data_summary()<\/code>:<\/p>\n<pre><code class=\"python\">import unittest import pandas as pd from summarize_dataframe.summarize_df import data_summary   class TestDataSummary(unittest.TestCase):    def setUp(self):        # initialize dataframe to test         df_data = [[1, 'a'], [2, 'b'], [3, 'c']] df_cols = ['numbers', 'letters'] self.df = pd.DataFrame(data=df_data, columns=df_cols)          # initialize expected dataframe         exp_col = ['Values'] exp_idx = ['Number of rows', 'Number of columns', 'int64', 'object'] exp_data = [[3], [2], [1], [1]] self.exp_df = pd.DataFrame(data=exp_data, columns=exp_col, index=exp_idx)          def test_data_summary(self):         expected_df = self.exp_df         result_df = data_summary(self.df)         self.assertTrue(expected_df.equals(result_df))          if __name__ == '__main__': unittest.main() <\/code><\/pre>\n<p>\u041c\u0435\u0442\u043e\u0434\u00a0<code>setUp()<\/code>\u00a0\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0434\u0432\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 pandas DataFrame.\u00a0<code>self.exp_df<\/code>\u00a0\u2014 \u044d\u0442\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u0439 DataFrame, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u043e\u0436\u0438\u0434\u0430\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u0437\u043e\u0432\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438\u00a0<code>data_summary()<\/code>, \u0430\u00a0<code>self.df<\/code>\u00a0\u2014 \u044d\u0442\u043e DataFrame, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430\u0448\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439. \u0421\u0435\u0439\u0447\u0430\u0441 \u043e\u0436\u0438\u0434\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0442\u0435\u0441\u0442\u044b \u043e\u043a\u0430\u0436\u0443\u0442\u0441\u044f \u043d\u0435\u0443\u0434\u0430\u0447\u043d\u044b\u043c\u0438, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043b\u043e\u0433\u0438\u043a\u0430 \u043d\u0435 \u0431\u044b\u043b\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430. \u0414\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e\u00a0<code>poetry<\/code>\u00a0\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre><code class=\"bash\">poetry run pytest -v  ==================================================== test session starts ==================================================== platform darwin -- Python 3.8.7, pytest-5.4.3, py-1.11.0, pluggy-0.13.1 -- \/Users\/aabur\/Documents\/GitHub\/AABur\/modern_python\/summarize_dataframe\/.venv\/bin\/python cachedir: .pytest_cache rootdir: \/Users\/aabur\/Documents\/GitHub\/AABur\/modern_python\/summarize_dataframe collected 1 item tests\/test_summarize_dataframe.py::TestDataSummary::test_data_summary FAILED                                          [100%] ========================================================= FAILURES ========================================================== _____________________________________________ TestDataSummary.test_data_summary _____________________________________________ self =       def test_data_summary(self):         expected_df = self.exp_df         result_df = data_summary(self.df) >       self.assertTrue(expected_df.equals(result_df)) E       AssertionError: False is not true  tests\/test_summarize_dataframe.py:21: AssertionError ================================================== short test summary info ================================================== FAILED tests\/test_summarize_dataframe.py::TestDataSummary::test_data_summary - AssertionError: False is not true ===================================================== 1 failed in 0.39s ===================================================== <\/code><\/pre>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u043b\u0430\u0433\u0430\u00a0<code>-v<\/code>\u00a0\u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u0439 \u0432\u044b\u0432\u043e\u0434 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0438\u0434\u0435\u0442\u044c, \u0447\u0442\u043e \u0442\u0435\u0441\u0442\u044b \u043f\u043e\u043c\u0435\u0447\u0435\u043d\u044b \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0438\u043c\u0435\u043d\u0430\u043c\u0438 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b \u0437\u0430\u0434\u0430\u043b\u0438. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e\u00a0<code>::TestDataSummary::test_data_summary<\/code>.<\/p>\n<p>\u041f\u043e\u043c\u0435\u043d\u044f\u0435\u043c \u043a\u043e\u0434 \u0434\u043b\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f unit-\u0442\u0435\u0441\u0442\u0430\u043c:<\/p>\n<pre><code class=\"python\">import pandas as pd   def data_summary(df: pd.DataFrame) -> pd.DataFrame:     \"\"\"     Function defined to output details about the number     of rows and columns and the column dtype frequency of     the passed pandas DataFrame     \"\"\"          def _shape(df: pd.DataFrame) -> pd.DataFrame:         \"\"\"         Function defined to return a dataframe with details about         the number of row and columns         \"\"\"         row, col = df.shape         return pd.DataFrame(data=[[row], [col]], columns=['Values'], index=['Number of rows', 'Number of columns'])      def _dtypes_freq(df: pd.DataFrame) -> pd.DataFrame:         \"\"\"         Function defined to return a dataframe with details about         the pandas dtypes frequency         \"\"\"         counter, types = {}, df.dtypes         for dtype in types:             tmp = str(dtype)             if tmp in counter.keys():                 counter[tmp] += 1             else:                 counter[tmp] = 1         values = [[value] for value in counter.values()]         return pd.DataFrame(           data=values,           columns=['Values'],           index=list(counter.keys())         )       result_df = pd.concat([_shape(df), _dtypes_freq(df)])     return result_df   def display_summary(df: pd.DataFrame) -> None:     \"\"\"     Function define to print out the result of the data summary     \"\"\"     result_df = True     message = '---- Data summary ----'     print(message, result_df, sep='\\n') <\/code><\/pre>\n<p>\u0421\u043d\u043e\u0432\u0430 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0442\u0435\u0441\u0442\u044b:<\/p>\n<pre><code class=\"bash\">poetry run pytest -v  ==================================================== test session starts ==================================================== platform darwin -- Python 3.8.7, pytest-5.4.3, py-1.11.0, pluggy-0.13.1 -- \/Users\/aabur\/Documents\/GitHub\/AABur\/modern_python\/summarize_dataframe\/.venv\/bin\/python cachedir: .pytest_cache rootdir: \/Users\/aabur\/Documents\/GitHub\/AABur\/modern_python\/summarize_dataframe collected 1 item tests\/test_summarize_dataframe.py::TestDataSummary::test_data_summary PASSED                                          [100%] ===================================================== 1 passed in 0.35s ===================================================== <\/code><\/pre>\n<p>\u0418 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435. \u0412 \u043d\u0430\u0448\u0438\u0445 \u0442\u0435\u0441\u0442\u0430\u0445 \u043c\u044b \u043d\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u043b\u0438 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0432\u044b\u0432\u043e\u0434. \u041d\u0430\u0448 \u043c\u043e\u0434\u0443\u043b\u044c \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0432\u043e\u0434\u043a\u0438 DataFrame. \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u0446\u0435\u043b\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e\u00a0<code>unittest<\/code>, \u043d\u043e \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u00a0<code>pytest<\/code>\u00a0\u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0430. \u0423\u0434\u0438\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u043d\u0435 \u043f\u0440\u0430\u0432\u0434\u0430 \u043b\u0438? \u041a\u0430\u043a \u0443\u0436\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u043b\u043e\u0441\u044c,\u00a0<code>pytest<\/code>\u00a0\u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0440\u043e\u0448\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441\u00a0<code>unittest<\/code>, \u0438 \u0441\u0435\u0439\u0447\u0430\u0441 \u043c\u044b \u044d\u0442\u043e \u043f\u0440\u043e\u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c. \u0412\u043e\u0442 \u043a\u043e\u0434 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0430:<\/p>\n<pre><code class=\"python\">import unittest import pytest import pandas as pd from summarize_dataframe.summarize_df import data_summary, display_summary   class TestDataSummary(unittest.TestCase):        def setUp(self):                # initialize dataframe to test         df_data = [[1, 'a'], [2, 'b'], [3, 'c']]         df_cols = ['numbers', 'letters']         self.df = pd.DataFrame(data=df_data, columns=df_cols)                  # initialize expected dataframe         exp_col = ['Values']         exp_idx = ['Number of rows', 'Number of columns', 'int64', 'object']         exp_data = [[3], [2], [1], [1]]         self.exp_df = pd.DataFrame(             data=exp_data, columns=exp_col, index=exp_idx)      @pytest.fixture(autouse=True)     def _pass_fixture(self, capsys):         self.capsys = capsys      def test_data_summary(self):         expected_df = self.exp_df         result_df = data_summary(self.df)         self.assertTrue(expected_df.equals(result_df))      def test_display(self):         print('---- Data summary ----', self.exp_df, sep='\\n')         expected_stdout = self.capsys.readouterr()         display_summary(self.df)         result_stdout = self.capsys.readouterr()         self.assertEqual(expected_stdout, result_stdout)  if __name__ == '__main__':     unittest.main()<\/code><\/pre>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440 <code>@pytest.fixture(autouse=True)<\/code>\u00a0\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043e\u043d \u043e\u0431\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442\u00a0<code>(_pass_fixture)<\/code>.\u00a0 \u0412 \u0442\u0435\u0440\u043c\u0438\u043d\u043e\u043b\u043e\u0433\u0438\u0438 \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u044d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0444\u0438\u043a\u0441\u0442\u0443\u0440\u043e\u0439 (<a href=\"https:\/\/docs.pytest.org\/en\/stable\/fixture.html\" rel=\"noopener noreferrer nofollow\"><u>fixture<\/u><\/a>). \u0424\u0438\u043a\u0441\u0442\u0443\u0440\u044b &#8212; \u044d\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 (\u0438\u043b\u0438 \u043c\u0435\u0442\u043e\u0434\u044b, \u0435\u0441\u043b\u0438 \u0412\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u043f\u043e\u0434\u0445\u043e\u0434 \u041e\u041e\u041f), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u043f\u0435\u0440\u0435\u0434 \u043a\u0430\u0436\u0434\u044b\u043c \u0442\u0435\u0441\u0442\u043e\u043c, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043e\u043d\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f. \u0424\u0438\u043a\u0441\u0442\u0443\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0442\u0435\u0441\u0442\u044b. \u041e\u043d\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442 \u0442\u0443 \u0436\u0435 \u0437\u0430\u0434\u0430\u0447\u0443, \u0447\u0442\u043e \u0438 \u043c\u0435\u0442\u043e\u0434\u00a0<code>setUp()<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u0440\u0430\u043d\u0435\u0435. \u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0435 \u0444\u0438\u043a\u0441\u0442\u0443\u0440\u0443 \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c\u00a0<code>capsys<\/code>\u00a0\u0434\u043b\u044f \u0437\u0430\u0445\u0432\u0430\u0442\u0430 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u0432\u044b\u0432\u043e\u0434\u0430 (<code>stdout<\/code>) \u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0435\u0433\u043e \u0432 \u043d\u0430\u0448\u0435\u043c \u0442\u0435\u0441\u0442\u0435. \u0422\u0435\u043f\u0435\u0440\u044c \u0438\u0437\u043c\u0435\u043d\u0438\u043c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e\u00a0<code>display_summary()<\/code>:<\/p>\n<pre><code class=\"python\">import pandas as pd   def data_summary(df: pd.DataFrame) -> pd.DataFrame:     \"\"\"     Function defined to output details about the number     of rows and columns and the column dtype frequency of     the passed pandas DataFrame     \"\"\"          def _shape(df: pd.DataFrame) -> pd.DataFrame:         \"\"\"         Function defined to return a dataframe with details about         the number of row and columns         \"\"\"         row, col = df.shape         return pd.DataFrame(data=[[row], [col]], columns=['Values'], index=['Number of rows', 'Number of columns'])      def _dtypes_freq(df: pd.DataFrame) -> pd.DataFrame:         \"\"\"         Function defined to return a dataframe with details about         the pandas dtypes frequency         \"\"\"         counter, types = {}, df.dtypes         for dtype in types:             tmp = str(dtype)             if tmp in counter.keys():                 counter[tmp] += 1             else:                 counter[tmp] = 1         values = [[value] for value in counter.values()]         return pd.DataFrame(           data=values,           columns=['Values'],           index=list(counter.keys())         )          result_df = pd.concat([_shape(df), _dtypes_freq(df)])     return result_df  def display_summary(df: pd.DataFrame) -> None:     \"\"\"     Function define to print out the result of the data summary     \"\"\"     result_df = data_summary(df)     message = '---- Data summary ----'     print(message, result_df, sep='\\n')<\/code><\/pre>\n<p>\u0415\u0449\u0451 \u0440\u0430\u0437 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0442\u0435\u0441\u0442\u044b:<\/p>\n<pre><code class=\"bash\">poetry run pytest -v  ==================================================== test session starts ==================================================== platform darwin -- Python 3.8.7, pytest-5.4.3, py-1.11.0, pluggy-0.13.1 -- \/Users\/aabur\/Documents\/GitHub\/AABur\/modern_python\/summarize_dataframe\/.venv\/bin\/python cachedir: .pytest_cache rootdir: \/Users\/aabur\/Documents\/GitHub\/AABur\/modern_python\/summarize_dataframe collected 2 items tests\/test_summarize_dataframe.py::TestDataSummary::test_data_summary PASSED                                          [ 50%] tests\/test_summarize_dataframe.py::TestDataSummary::test_display PASSED                                               [100%] ===================================================== 2 passed in 0.31s ===================================================== <\/code><\/pre>\n<p>\u0422\u0435\u0441\u0442\u044b \u043f\u0440\u043e\u0448\u043b\u0438 \u0443\u0441\u043f\u0435\u0448\u043d\u043e. \u041f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u0437\u0430\u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448\u0443 \u0440\u0430\u0431\u043e\u0442\u0443 \u0438 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0435\u044e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0432 \u043d\u0430 GitHub. \u041f\u0435\u0440\u0435\u0434 \u044d\u0442\u0438\u043c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0441\u043e\u043e\u0431\u0449\u0430\u0442\u044c \u043e \u043d\u0430\u0448\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u043e \u043a\u043e\u043c\u043c\u0438\u0442\u0430\u0445 Git, \u0441\u043e\u0431\u043b\u044e\u0434\u0430\u044f \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044f \u0435\u0434\u0438\u043d\u044b\u0439 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442.<\/p>\n<h2>\u041f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b \u043f\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 Git-\u043a\u043e\u043c\u043c\u0438\u0442\u043e\u0432 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 Python<\/h2>\n<p>\u041d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0445 Git-\u043a\u043e\u043c\u043c\u0438\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 &#8212; \u043d\u0435\u043f\u0440\u043e\u0441\u0442\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430. \u0421\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0447\u0435\u0442\u043a\u0438\u043c\u0438, \u0447\u0438\u0442\u0430\u0435\u043c\u044b\u043c\u0438 \u0438 \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u043c\u0438 \u0432 \u0434\u043e\u043b\u0433\u043e\u0441\u0440\u043e\u0447\u043d\u043e\u0439 \u043f\u0435\u0440\u0441\u043f\u0435\u043a\u0442\u0438\u0432\u0435. \u0421\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f\u00a0<a href=\"https:\/\/www.conventionalcommits.org\/en\/v1.0.0\/\" rel=\"noopener noreferrer nofollow\"><u>Conventional Commits<\/u><\/a>\u00a0\u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u043d\u0430\u0431\u043e\u0440 \u043f\u0440\u0430\u0432\u0438\u043b \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u043e\u0439 \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u0432. \u041d\u0430 \u0425\u0435\u043a\u0441\u043b\u0435\u0442\u0435 \u0435\u0441\u0442\u044c\u00a0<a href=\"https:\/\/ru.hexlet.io\/blog\/posts\/git-commit-message\" rel=\"noopener noreferrer nofollow\"><u>\u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f<\/u><\/a>, \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u043d\u0430\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u043c\u0443 \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u044e \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u0432.<\/p>\n<h3>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u00a0commitizen<\/h3>\n<p>\u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u043a\u0435\u0442\u00a0<a href=\"https:\/\/commitizen-tools.github.io\/commitizen\/\" rel=\"noopener noreferrer nofollow\"><u>commitizen<\/u><\/a>\u00a0\u0434\u043b\u044f \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 Conventional Commits \u0432 \u043d\u0430\u0448 \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430 Python. \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u044d\u0442\u043e\u0442 \u043f\u0430\u043a\u0435\u0442 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430:<\/p>\n<pre><code class=\"bash\">poetry add -D commitizen<\/code><\/pre>\n<p>\u0427\u0442\u043e\u0431\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c\u00a0<code>commitizen<\/code>\u00a0\u0434\u043b\u044f \u0441\u0432\u043e\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0443\u00a0<code>cz init<\/code>. \u041e\u043d\u0430 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442 \u043d\u0430\u043c \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c \u043d\u0430 \u0440\u044f\u0434 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432:<\/p>\n<pre><code class=\"bash\">cz init  ? Please choose a supported config file: (default: pyproject.toml) (Use arrow keys) \u00bb pyproject.toml   .cz.toml   .cz.json   cz.json   .cz.yaml   cz.yaml    ? Please choose a cz (commit rule): (default: cz_conventional_commits) (Use arrow keys) \u00bb cz_conventional_commits   cz_jira   cz_customize    ? Please enter the correct version format: (default: \"$version\")  ? Do you want to install pre-commit hook? (Y\/n) <\/code><\/pre>\n<p>\u0412\u044b\u0431\u0435\u0440\u0435\u043c \u0437\u0434\u0435\u0441\u044c \u0432\u0441\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d\u0438 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u043d\u0430\u0448\u0435\u0439 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0432\u043e\u043f\u0440\u043e\u0441 \u0441\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 \u043d\u0430\u0441, \u043d\u0443\u0436\u043d\u043e \u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0445\u0443\u043a\u00a0<a href=\"https:\/\/pre-commit.com\/\" rel=\"noopener noreferrer nofollow\"><u>pre-commit<\/u><\/a>. \u041c\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c\u0441\u044f \u0432\u0435\u0440\u043d\u0443\u0442\u044c\u0441\u044f \u043a \u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u0437\u0436\u0435. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u043a\u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0442\u0432\u0435\u0442\u0438\u043c \u00ab\u043d\u0435\u0442\u00bb(n). \u0415\u0441\u043b\u0438 \u043c\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0444\u0430\u0439\u043b\u00a0<code>pyproject.toml<\/code>, \u0442\u043e \u0443\u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0431\u044b\u043b\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430 \u043d\u043e\u0432\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c\u00a0<code>[tool.commitizen]<\/code>:<\/p>\n<pre><code class=\"yaml\">[tool.commitizen] name = \"cz_conventional_commits\" # \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043c\u043c\u0438\u0442-\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 version = \"0.0.1\" tag_format = \"$version\" <\/code><\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043a\u043e\u043c\u043c\u0438\u0442-\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435, \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<pre><code class=\"bash\">cz check -m \"all summarize_data tests now succeed\"  commit validation: failed! please enter a commit message in the commitizen format. commit \"\": \"all summarize_data tests now succeed\" pattern: (build|ci|docs|feat|fix|perf|refactor|style|test|chore|revert|bump)!?((\\S+))?:(\\s.*) <\/code><\/pre>\n<p>\u041d\u0430\u0448\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u043e, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d\u043e \u043d\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c \u0434\u043b\u044f \u043a\u043e\u043c\u043c\u0438\u0442-\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f. \u0423\u0434\u0435\u043b\u0438\u0442\u0435 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0447\u0442\u0435\u043d\u0438\u044e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043e\u00a0<a href=\"https:\/\/www.conventionalcommits.org\/en\/v1.0.0\/\" rel=\"noopener noreferrer nofollow\"><u>\u0441\u043e\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u0438 \u043e \u043a\u043e\u043c\u043c\u0438\u0442\u0430\u0445<\/u><\/a>\u00a0\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0443\u00a0<code>cz info<\/code>, \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0441\u043f\u0435\u0447\u0430\u0442\u0430\u0442\u044c \u043a\u0440\u0430\u0442\u043a\u0443\u044e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e:<\/p>\n<pre><code class=\"bash\">cz info  The commit contains the following structural elements, to communicate intent to the consumers of your library:  fix: a commit of the type fix patches a bug in your codebase (this correlates with PATCH in semantic versioning).  feat: a commit of the type feat introduces a new feature to the codebase (this correlates with MINOR in semantic versioning).  BREAKING CHANGE: a commit that has the text BREAKING CHANGE: at the beginning of its optional body or footer section introduces a breaking API change (correlating with MAJOR in semantic versioning). A BREAKING CHANGE can be part of commits of any type.  Others: commit types other than fix: and feat: are allowed, like chore:, docs:, style:, refactor:, perf:, test:, and others. [...] <\/code><\/pre>\n<p>\u042d\u0442\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u043f\u043e\u0434\u0441\u043a\u0430\u0436\u0435\u0442 \u0432\u0430\u043c, \u043a\u0430\u043a \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e \u043a\u043e\u043c\u043c\u0438\u0442\u0435. \u0417\u0434\u0435\u0441\u044c \u0444\u043e\u0440\u043c\u0430\u0442 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0442\u0430\u043a\u0438\u043c: \u00ab[\u0442\u0438\u043f]: [\u0421\u041e\u041e\u0411\u0429\u0415\u041d\u0418\u0415]\u00bb. \u0414\u043b\u044f \u043d\u0430\u0441 \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"bash\">cz check -m \"test: all summarize_data tests now succeed\"  Commit validation: successful! <\/code><\/pre>\n<p>\u041e\u0447\u0435\u043d\u044c \u0445\u043e\u0440\u043e\u0448\u043e, \u043d\u0430\u0448\u0435 \u043a\u043e\u043c\u043c\u0438\u0442-\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u043c. \u041d\u043e \u043f\u043e\u0434\u043e\u0436\u0434\u0438\u0442\u0435. \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u043a\u043e\u043c\u043c\u0438\u0442-\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e\u00a0<code>commitizen<\/code>\u00a0\u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0443\u0442\u043e\u043c\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u0438 \u044d\u0442\u043e \u043d\u0435 \u0434\u0430\u0451\u0442 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0438, \u0447\u0442\u043e \u043a\u043e\u043c\u043c\u0438\u0442 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043d\u044f\u0442. \u0411\u044b\u043b\u043e \u0431\u044b \u043b\u0443\u0447\u0448\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443\u00a0<code>git commit<\/code>. \u0418\u043c\u0435\u043d\u043d\u043e \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0432\u0441\u0442\u0443\u043f\u0430\u0435\u0442\u00a0<code>pre-commit<\/code>\u00a0\u0445\u0443\u043a.<\/p>\n<h3>\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0441\u043e\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0435 \u0441\u043e\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u0439 \u043e Git-\u043a\u043e\u043c\u043c\u0438\u0442\u0430\u0445 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438\u00a0pre-commit<\/h3>\n<p>\u0425\u0443\u043a\u0438 Git \u043f\u043e\u043b\u0435\u0437\u043d\u044b \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u044d\u0442\u0430\u043f\u0430\u0445 \u0436\u0438\u0437\u043d\u0435\u043d\u043d\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430 Git. \u0425\u0443\u043a\u00a0<code>pre-commit<\/code>\u00a0\u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0434\u043e \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d Git-\u043a\u043e\u043c\u043c\u0438\u0442. \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0445\u0443\u043a \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u043e \u043a\u043e\u043c\u043c\u0438\u0442\u0430\u0445 \u0438 \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f Git \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0430\u0448\u0438\u043c \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f\u043c. \u0425\u0443\u043a \u0430\u043a\u0442\u0438\u0432\u0435\u043d \u043a\u0430\u043a \u0438\u0437 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438, \u0442\u0430\u043a \u0438 \u0438\u0437 \u043b\u044e\u0431\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0441 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u043c Git, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d \u0445\u0443\u043a, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0432\u0430\u0448\u0443 \u043b\u044e\u0431\u0438\u043c\u0443\u044e IDE.<\/p>\n<p><a href=\"https:\/\/pre-commit.com\/index.html\" rel=\"noopener noreferrer nofollow\"><u>pre-commit<\/u><\/a>\u00a0\u2014 \u044d\u0442\u043e \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u043c\u043d\u043e\u0433\u043e\u044f\u0437\u044b\u0447\u043d\u044b\u0445 \u0445\u0443\u043a\u043e\u0432\u00a0<code>pre-commit<\/code>. \u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0437\u043d\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435 \u0438 \u0441\u043f\u0435\u043a\u0442\u0440\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439\u00a0<code>pre-commit<\/code>, \u0442\u043e \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c\u00a0<a href=\"https:\/\/pre-commit.com\/index.html#usage\" rel=\"noopener noreferrer nofollow\"><u>\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e<\/u><\/a>\u00a0\u043f\u043e \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c\u00a0<code>pre-commit<\/code>, \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre><code class=\"bash\">poetry add -D pre-commit <\/code><\/pre>\n<p>\u0414\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043a\u043e\u043c\u043c\u0438\u0442\u0430 Git \u043d\u0430\u043c \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b\u00a0<code>.pre-commit-config.yaml<\/code>:<\/p>\n<pre><code class=\"yaml\">--- repos:   - repo: https:\/\/github.com\/commitizen-tools\/commitizen     rev: master     hooks:       - id: commitizen         stages: [commit-msg] <\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0445\u0443\u043a \u0441 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u043c, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0435\u00a0<code>repo<\/code>:<\/p>\n<pre><code class=\"bash\">pre-commit install --hook-type commit-msg pre-commit installed at .git\/hooks\/commit-msg <\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u0432\u0441\u0435 \u0433\u043e\u0442\u043e\u0432\u043e, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448 Git-\u0445\u0443\u043a:<\/p>\n<pre><code class=\"bash\">git add tests\/test_summarize_dataframe.py  git commit -m \"test: all summarize_data tests now succeed\"  [WARNING] Unstaged files detected. [INFO] Stashing unstaged files to \/Users\/aabur\/.cache\/pre-commit\/patch1637958717. commitizen check.........................................................Passed [INFO] Initializing environment for https:\/\/github.com\/commitizen-tools\/commitizen. [INFO] Installing environment for https:\/\/github.com\/commitizen-tools\/commitizen. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... commitizen check.........................................................Passed [INFO] Restored changes from \/Users\/aabur\/.cache\/pre-commit\/patch1637958717. [main 6ef0700] test: all summarize_data tests now succeed 1 file changed, 38 insertions(+), 5 deletions(-) rewrite tests\/test_summarize_dataframe.py (98%) <\/code><\/pre>\n<p><code>pre-commit<\/code>\u00a0\u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0441\u0440\u0435\u0434\u0443 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0441\u0432\u043e\u0438\u0445 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a. \u041a\u0430\u043a \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0438\u0434\u0435\u0442\u044c \u0437\u0434\u0435\u0441\u044c, \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e \u043a\u043e\u043c\u043c\u0438\u0442\u0435 \u043f\u0440\u043e\u0448\u043b\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443. \u0412 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u043a\u043e\u043c\u043c\u0438\u0442\u0438\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u0432\u043d\u0435\u0441\u0435\u043d\u043d\u044b\u0435 \u0432 \u0444\u0430\u0439\u043b\u044b \u0441\u0431\u043e\u0440\u043a\u0438 (<code>poetry.lock<\/code>,\u00a0<code>pyproject.toml<\/code>) \u0438 \u043d\u0430\u0448 \u043c\u043e\u0434\u0443\u043b\u044c:<\/p>\n<pre><code class=\"bash\">git add poetry.lock pyproject.toml  git commit -m \"build: add developer dependencies\"  commitizen check.........................................................Passed [main 8e616bc] build: add developer dependencies 2 files changed, 664 insertions(+), 3 deletions(-)  git add .pre-commit-config.yaml  git commit -m \"build: add pre-commit hook\"  commitizen check.........................................................Passed [main 60880cb] build: add pre-commit hook 1 file changed, 7 insertions(+)  git add summarize_dataframe\/summarize_df.py  git commit -m \"feat: implementation of the summary function to summarize dataframe\"  commitizen check.........................................................Passed [main 53a82a0] feat: implementation of the summary function to summarize dataframe 1 file changed, 42 insertions(+) <\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0432\u0441\u0435 \u0432 \u043d\u0430\u0448 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 GitHub:<\/p>\n<pre><code class=\"bash\">git push origin main  Enumerating objects: 18, done. Counting objects: 100% (18\/18), done. Delta compression using up to 12 threads Compressing objects: 100% (12\/12), done. Writing objects: 100% (12\/12), 19.60 KiB | 6.53 MiB\/s, done. Total 12 (delta 3), reused 0 (delta 0), pack-reused 0 remote: Resolving deltas: 100% (3\/3), completed with 2 local objects. To github.com:AABur\/summarize_dataframe.git af38079..53a82a0  main -&amp;gt; main <\/code><\/pre>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>\u041c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u0435\u043c:<\/p>\n<ul>\n<li>\n<p>\u041d\u0430 \u043f\u0435\u0440\u0432\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u043c\u044b \u0443\u0437\u043d\u0430\u043b\u0438, \u043a\u0430\u043a \u043f\u0438\u0441\u0430\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u044b\u0435 \u0442\u0435\u0441\u0442\u044b \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u0434\u0430. \u041f\u0438\u0441\u0430\u0442\u044c \u0442\u0435\u0441\u0442\u044b \u0434\u043e \u043a\u043e\u0434\u0430 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0432\u0430\u043c \u0443\u0442\u043e\u0447\u043d\u0438\u0442\u044c API \u0438 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0434\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432 \u043a\u043e\u0434\u0435. \u041c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u00a0<code>unittest<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0436\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 Python. \u0422\u0430\u043a\u0436\u0435 \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438\u00a0<code>pytest<\/code>\u00a0\u0434\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432. \u041e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e \u0442\u043e, \u0447\u0442\u043e pytest \u0441 \u0441\u0430\u043c\u043e\u0433\u043e \u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043a\u043b\u0430\u0441\u0441\u00a0<code>unittest.TestCase<\/code>. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u0442\u0435\u0441\u0442\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043b\u044e\u0431\u043e\u0439 \u0438\u0437 \u0434\u0432\u0443\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0438\u043b\u0438 \u0434\u0430\u0436\u0435 \u0441\u043c\u0435\u0448\u0438\u0432\u0430\u0442\u044c \u0438\u0445 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0432\u0430\u0448\u0438\u0445 \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u0435\u0439 \u0438 \u0438\u043c\u0435\u0442\u044c \u043e\u0434\u043d\u0443 \u043e\u0431\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0432\u0441\u0435\u0445 \u0442\u0435\u0441\u0442\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p>\u041c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438, \u043a\u0430\u043a \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u0441\u043e\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0435 \u0445\u043e\u0440\u043e\u0448\u0438\u0445 \u043f\u0440\u0430\u043a\u0442\u0438\u043a \u043f\u0440\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u043e \u043a\u043e\u043c\u043c\u0438\u0442\u0430\u0445 \u0432 Git. \u041f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u043c\u043e\u0435 \u043d\u0430\u043c\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043e \u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0434\u0432\u0443\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 Python:\u00a0<a href=\"https:\/\/commitizen-tools.github.io\/commitizen\/\" rel=\"noopener noreferrer nofollow\"><u>commitizen<\/u><\/a>\u00a0\u0438\u00a0<a href=\"https:\/\/pre-commit.com\/\" rel=\"noopener noreferrer nofollow\"><u>pre-commit<\/u><\/a>. \u041f\u0435\u0440\u0432\u044b\u0439 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u043c \u0432\u0430\u043c\u0438 \u0441\u043e\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u044f\u043c. \u0412\u0442\u043e\u0440\u043e\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Git-\u0445\u0443\u043a\u0430.<\/p>\n<\/li>\n<\/ul>\n<h2>\u041a\u0440\u0430\u0442\u043a\u0430\u044f \u043f\u0430\u043c\u044f\u0442\u043a\u0430<\/h2>\n<h3>poetry<\/h3>\n<ul>\n<li>\n<p><em>\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/em><\/p>\n<\/li>\n<\/ul>\n<p><code>poetry add [package_name]<\/code><\/p>\n<ul>\n<li>\n<p><em>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e Python<\/em><\/p>\n<\/li>\n<\/ul>\n<p><code>pyenv global<\/code><\/p>\n<ul>\n<li>\n<p><em>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e Python<\/em><\/p>\n<\/li>\n<\/ul>\n<p><code>pyenv local<\/code><\/p>\n<h3>poetry<\/h3>\n<ul>\n<li>\n<p><em>\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/em><\/p>\n<p><code>poetry add [package_name]<\/code><\/p>\n<\/li>\n<li>\n<p><em>\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438<\/em><\/p>\n<p><code>poetry add -D [package_name]<\/code><\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a \u0442\u0435\u0441\u0442\u043e\u0432<\/p>\n<p><code>poetry run pytest<\/code><\/p>\n<\/li>\n<\/ul>\n<h3>commitizen<\/h3>\n<ul>\n<li>\n<p><em>\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f commitizen<\/em><\/p>\n<p><code>cz init<\/code><\/p>\n<\/li>\n<li>\n<p><em>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043a\u043e\u043c\u043c\u0438\u0442\u0430<\/em><\/p>\n<p><code>cz check -m \"YOUR MESSAGE\"<\/code><\/p>\n<\/li>\n<\/ul>\n<h3>pre-commit<\/h3>\n<ul>\n<li>\n<p><em>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e<\/em><\/p>\n<p><code>pre-commit sample-config<\/code><\/p>\n<\/li>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c git-\u0445\u0443\u043a<\/p>\n<p><code>pre-commit install --hook-type [hook_name]<\/code><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/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\/645721\/\"> https:\/\/habr.com\/ru\/post\/645721\/<\/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_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p><em>\u041f\u0435\u0440\u0435\u0432\u043e\u0434 \u0431\u044b\u043b \u0441\u0434\u0435\u043b\u0430\u043d \u0434\u043b\u044f \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u043a\u0443\u0440\u0441\u043e\u0432 \u043f\u043e\u00a0<\/em>\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e<em>\u00a0<\/em><a href=\"https:\/\/ru.hexlet.io\/\" rel=\"noopener noreferrer nofollow\"><em>\u0425\u0435\u043a\u0441\u043b\u0435\u0442<\/em><\/a><\/p>\n<p><em>\u042d\u0442\u0430\u00a0<\/em><a href=\"https:\/\/www.adaltas.com\/en\/2021\/06\/24\/unit-tests-conventional-commits\/\" rel=\"noopener noreferrer nofollow\"><em><u>\u0432\u0442\u043e\u0440\u0430\u044f<\/u><\/em><\/a><em>\u00a0\u0441\u0442\u0430\u0442\u044c\u044f\u00a0<\/em><a href=\"https:\/\/ru.hexlet.io\/blog\/posts\/sovremennyy-python\" rel=\"noopener noreferrer nofollow\"><em><u>\u0438\u0437 \u0446\u0438\u043a\u043b\u0430<\/u><\/em><\/a><em>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043e \u043b\u0443\u0447\u0448\u0438\u0445 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430\u0445 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e Python. \u0412 \u044d\u0442\u043e\u043c \u0446\u0438\u043a\u043b\u0435 \u0441\u0442\u0430\u0442\u0435\u0439 \u0432\u0441\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u044b \u043d\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u044e Python, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u0443\u043c\u043c\u0438\u0440\u0443\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435, \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0432\u00a0<\/em><a href=\"https:\/\/pandas.pydata.org\/pandas-docs\/stable\/reference\/api\/pandas.DataFrame.html\" rel=\"noopener noreferrer nofollow\"><em><u>pandas DataFrame<\/u><\/em><\/a><em>. \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u0440\u043e\u043a \u0438 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 \u0438 \u0447\u0430\u0441\u0442\u043e\u0442\u0443 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0432 pandas DataFrame.<\/em><\/p>\n<p>\u0425\u043e\u0440\u043e\u0448\u0430\u044f \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0433\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0440\u0438\u043d\u043e\u0441\u0438\u0442 \u043c\u043d\u043e\u0433\u043e \u0434\u043e\u043b\u0433\u043e\u0441\u0440\u043e\u0447\u043d\u044b\u0445 \u0432\u044b\u0433\u043e\u0434. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u043a\u043e\u0434\u043e\u0432\u044b\u0435 \u0431\u0430\u0437\u044b \u0438 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442, \u0447\u0442\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u0432\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u0434\u0430 \u0432\u0435\u0434\u0435\u0442 \u0441\u0435\u0431\u044f \u0442\u0430\u043a, \u043a\u0430\u043a \u043e\u0436\u0438\u0434\u0430\u0435\u0442\u0441\u044f. \u041d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u0432 \u0432 Git \u0442\u0430\u043a\u0436\u0435 \u0443\u043b\u0443\u0447\u0448\u0430\u0435\u0442 \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043c\u0435\u0436\u0434\u0443 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0430\u043c\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0425\u043e\u0440\u043e\u0448\u043e \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u0432 Git \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0442 \u043f\u0443\u0442\u044c \u043a \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443 \u0432\u0435\u0440\u0441\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c\u044b\u043c \u0444\u0430\u0439\u043b\u0430\u043c \u0436\u0443\u0440\u043d\u0430\u043b\u0430 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0435\u0439\u0447\u0430\u0441 \u0432 \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u043f\u0440\u0435\u0434\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u043f\u044b\u0442\u043e\u043a \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u0432 \u043d\u0430\u0448\u0438\u0445 Git-\u043a\u043e\u043c\u043c\u0438\u0442\u0430\u0445.<\/p>\n<p><a href=\"https:\/\/ru.hexlet.io\/blog\/posts\/sovremennyy-python\" rel=\"noopener noreferrer nofollow\"><u>\u0412 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438<\/u><\/a>\u00a0\u044d\u0442\u043e\u0439 \u0441\u0435\u0440\u0438\u0438 \u043c\u044b \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043b\u0438 \u043d\u0430\u0448 \u043f\u0440\u043e\u0435\u043a\u0442, \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 Python \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e\u00a0<code>pyenv<\/code>, \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e Python \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e\u00a0<code>pyenv<\/code>, \u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u0438\u0440\u0443\u044f \u0435\u0433\u043e \u0432 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u0440\u0435\u0434\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e\u00a0<code>poetry<\/code>. \u0417\u0434\u0435\u0441\u044c \u043c\u044b \u043f\u043e\u043a\u0430\u0436\u0435\u043c \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e, \u043a\u0430\u043a \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u043e\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u0430\u0448\u0435\u0433\u043e Python-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u043a\u0430\u043a \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043e \u043a\u043e\u043c\u043c\u0438\u0442\u0430\u0445 \u0432 Git. \u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0439 \u0441 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435\u0439, \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d \u043d\u0430\u00a0<a href=\"https:\/\/github.com\/AABur\/summarize_dataframe\" rel=\"noopener noreferrer nofollow\"><u>GitHub<\/u><\/a>.<\/p>\n<h2>\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u0434\u0430<\/h2>\n<p>\u041f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0432 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0439\u0442\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435:<\/p>\n<pre><code class=\"bash\">cd summarize_dataframe\/ poetry shell<\/code><\/pre>\n<p><em>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0447\u0438\u043a\u0430: \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u00a0<\/em><code>numpy<\/code>\u00a0\u043a \u0432\u0435\u0440\u0441\u0438\u0438 Python \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0438\u0441\u044c, \u043f\u0435\u0440\u0435\u0434 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u043d\u0435\u0441\u0442\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0444\u0430\u0439\u043b\u00a0<code>pyproject.toml<\/code>:<\/p>\n<pre><code class=\"yaml\">[tool.poetry.dependencies] -python = \"^3.8\" +python = \">=3.8,&lt;3.11\"<\/code><\/pre>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e\u00a0<code>poetry<\/code>:<\/p>\n<pre><code class=\"bash\">poetry add -D pynvim numpy pandas<\/code><\/pre>\n<p>\u0424\u043b\u0430\u0433 -D \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043a \u0441\u0440\u0435\u0434\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438.<\/p>\n<p>\u0418\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u043d\u0430\u0448\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0442\u0440\u0435\u0445 \u0448\u0430\u0433\u043e\u0432:<\/p>\n<ol>\n<li>\n<p>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0444\u043e\u0440\u043c\u044b pandas DataFrame<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0447\u0430\u0441\u0442\u043e\u0442\u044b \u0442\u0438\u043f\u043e\u0432 pandas\u00a0<code>dtypes<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u041e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u044d\u0442\u0438\u0445 \u0434\u0432\u0443\u0445 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0432 \u0435\u0434\u0438\u043d\u044b\u0439 DataFrame, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u043e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430.<\/p>\n<\/li>\n<\/ol>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e DataFrame \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u0432\u044b\u0448\u0435. \u0412 \u0441\u0432\u044f\u0437\u0438 \u0441 \u044d\u0442\u0438\u043c \u043d\u0430\u0448 \u043a\u043e\u0434 \u043c\u043e\u0436\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<pre><code class=\"python\">import pandas as pd   def data_summary(df: pd.DataFrame) -> None:     \"\"\"     Function defined to return a DataFrame containing details     about the number of rows and columns and the column dtype     frequency of the passed pandas DataFrame     \"\"\"          def _shape(df: pd.DataFrame) -> None:         \"\"\"         Function defined to return a dataframe with details about         the number of row and columns         \"\"\"         return None           def _dtypes_freq(df: pd.DataFrame) -> None:       \"\"\"         Function defined to return a dataframe with details about         the pandas dtypes frequency         \"\"\"         return None          return None  def display_summary(df: pd.DataFrame) -> None:     \"\"\"     Function define to print out the result of the data summary     \"\"\"     result_df = True     message = '---- Data summary ----'     print(message, result_df, sep='\\n') <\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0447\u043d\u0435\u043c \u043f\u0438\u0441\u0430\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u044b\u0435 \u0442\u0435\u0441\u0442\u044b. \u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u00a0<code>unittest<\/code>, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0439 \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 Python. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0432\u044b \u043f\u043e\u043c\u043d\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u00a0<a href=\"https:\/\/ru.hexlet.io\/blog\/posts\/sovremennyy-python\" rel=\"noopener noreferrer nofollow\"><u>\u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439<\/u><\/a>\u00a0\u0441\u0442\u0430\u0442\u044c\u0435\u00a0<a href=\"https:\/\/docs.pytest.org\/en\/stable\/contents.html\" rel=\"noopener noreferrer nofollow\"><u>pytest<\/u><\/a>\u00a0\u0431\u044b\u043b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d \u043a\u0430\u043a \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u042d\u0442\u043e \u043d\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e\u00a0<code>pytest<\/code>\u00a0\u043d\u0430\u0442\u0438\u0432\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0442\u0435\u0441\u0442\u044b, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438\u00a0<code>unittest<\/code>.<\/p>\n<p>\u042e\u043d\u0438\u0442-\u0442\u0435\u0441\u0442\u044b \u2014 \u044d\u0442\u043e \u043c\u0435\u0442\u043e\u0434\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435, \u043a\u0430\u043a \u043e\u0436\u0438\u0434\u0430\u0435\u0442\u00a0<code>unittest<\/code>, \u0431\u0443\u0434\u0443\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 Python. \u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0434\u043b\u044f \u0441\u0432\u043e\u0438\u0445 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0435\u0435 \u0438\u043c\u044f \u2014 \u043e\u043d\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0442\u044c\u0441\u044f \u0441\u00a0<code>test_<\/code>. \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u00a0<code>unittest<\/code>\u00a0\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0440\u044f\u0434 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u0443\u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043e\u0442 \u043a\u043b\u0430\u0441\u0441\u0430\u00a0<code>unittest.TestCase<\/code>.<\/p>\n<p><strong>\u041d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u0442\u0435\u0441\u0442 \u0434\u043e\u043b\u0436\u0435\u043d:<\/strong><\/p>\n<ul>\n<li>\n<p>\u041e\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043e\u0434\u043d\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e<\/p>\n<\/li>\n<li>\n<p>\u0411\u044b\u0442\u044c \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u044b\u043c<\/p>\n<\/li>\n<li>\n<p>\u041d\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439<\/p>\n<\/li>\n<li>\n<p>\u0412\u043e\u0441\u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430.<\/p>\n<\/li>\n<\/ul>\n<p>\u0427\u0442\u043e\u0431\u044b \u0432\u043e\u0441\u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0443\u044e \u0440\u0430\u0431\u043e\u0447\u0443\u044e \u0441\u0440\u0435\u0434\u0443, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438. \u0415\u0441\u043b\u0438 \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u044b\u043c, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0439\u0442\u0435 \u043c\u0435\u0442\u043e\u0434\u00a0<code>setUp()<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u043f\u0435\u0440\u0435\u0434 \u043a\u0430\u0436\u0434\u044b\u043c \u0442\u0435\u0441\u0442\u043e\u043c. \u042d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e \u0434\u043b\u044f \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0440\u0435\u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043e\u0434\u0430. \u0412 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u00a0<code>tearDown()<\/code>.<\/p>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c unit-\u0442\u0435\u0441\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b\u0438 \u0434\u043b\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438\u00a0<code>data_summary()<\/code>:<\/p>\n<pre><code class=\"python\">import unittest import pandas as pd from summarize_dataframe.summarize_df import data_summary   class TestDataSummary(unittest.TestCase):    def setUp(self):        # initialize dataframe to test         df_data = [[1, 'a'], [2, 'b'], [3, 'c']] df_cols = ['numbers', 'letters'] self.df = pd.DataFrame(data=df_data, columns=df_cols)          # initialize expected dataframe         exp_col = ['Values'] exp_idx = ['Number of rows', 'Number of columns', 'int64', 'object'] exp_data = [[3], [2], [1], [1]] self.exp_df = pd.DataFrame(data=exp_data, columns=exp_col, index=exp_idx)          def test_data_summary(self):         expected_df = self.exp_df         result_df = data_summary(self.df)         self.assertTrue(expected_df.equals(result_df))          if __name__ == '__main__': unittest.main() <\/code><\/pre>\n<p>\u041c\u0435\u0442\u043e\u0434\u00a0<code>setUp()<\/code>\u00a0\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0434\u0432\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 pandas DataFrame.\u00a0<code>self.exp_df<\/code>\u00a0\u2014 \u044d\u0442\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u0439 DataFrame, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u043e\u0436\u0438\u0434\u0430\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u0437\u043e\u0432\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438\u00a0<code>data_summary()<\/code>, \u0430\u00a0<code>self.df<\/code>\u00a0\u2014 \u044d\u0442\u043e DataFrame, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430\u0448\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439. \u0421\u0435\u0439\u0447\u0430\u0441 \u043e\u0436\u0438\u0434\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0442\u0435\u0441\u0442\u044b \u043e\u043a\u0430\u0436\u0443\u0442\u0441\u044f \u043d\u0435\u0443\u0434\u0430\u0447\u043d\u044b\u043c\u0438, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043b\u043e\u0433\u0438\u043a\u0430 \u043d\u0435 \u0431\u044b\u043b\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430. \u0414\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e\u00a0<code>poetry<\/code>\u00a0\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre><code class=\"bash\">poetry run pytest -v  ==================================================== test session starts ==================================================== platform darwin -- Python 3.8.7, pytest-5.4.3, py-1.11.0, pluggy-0.13.1 -- \/Users\/aabur\/Documents\/GitHub\/AABur\/modern_python\/summarize_dataframe\/.venv\/bin\/python cachedir: .pytest_cache rootdir: \/Users\/aabur\/Documents\/GitHub\/AABur\/modern_python\/summarize_dataframe collected 1 item tests\/test_summarize_dataframe.py::TestDataSummary::test_data_summary FAILED                                          [100%] ========================================================= FAILURES ========================================================== _____________________________________________ TestDataSummary.test_data_summary _____________________________________________ self =       def test_data_summary(self):         expected_df = self.exp_df         result_df = data_summary(self.df) >       self.assertTrue(expected_df.equals(result_df)) E       AssertionError: False is not true  tests\/test_summarize_dataframe.py:21: AssertionError ================================================== short test summary info ================================================== FAILED tests\/test_summarize_dataframe.py::TestDataSummary::test_data_summary - AssertionError: False is not true ===================================================== 1 failed in 0.39s ===================================================== <\/code><\/pre>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u043b\u0430\u0433\u0430\u00a0<code>-v<\/code>\u00a0\u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u0439 \u0432\u044b\u0432\u043e\u0434 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0438\u0434\u0435\u0442\u044c, \u0447\u0442\u043e \u0442\u0435\u0441\u0442\u044b \u043f\u043e\u043c\u0435\u0447\u0435\u043d\u044b \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0438\u043c\u0435\u043d\u0430\u043c\u0438 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b \u0437\u0430\u0434\u0430\u043b\u0438. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e\u00a0<code>::TestDataSummary::test_data_summary<\/code>.<\/p>\n<p>\u041f\u043e\u043c\u0435\u043d\u044f\u0435\u043c \u043a\u043e\u0434 \u0434\u043b\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f unit-\u0442\u0435\u0441\u0442\u0430\u043c:<\/p>\n<pre><code class=\"python\">import pandas as pd   def data_summary(df: pd.DataFrame) -> pd.DataFrame:     \"\"\"     Function defined to output details about the number     of rows and columns and the column dtype frequency of     the passed pandas DataFrame     \"\"\"          def _shape(df: pd.DataFrame) -> pd.DataFrame:         \"\"\"         Function defined to return a dataframe with details about         the number of row and columns         \"\"\"         row, col = df.shape         return pd.DataFrame(data=[[row], [col]], columns=['Values'], index=['Number of rows', 'Number of columns'])      def _dtypes_freq(df: pd.DataFrame) -> pd.DataFrame:         \"\"\"         Function defined to return a dataframe with details about         the pandas dtypes frequency         \"\"\"         counter, types = {}, df.dtypes         for dtype in types:             tmp = str(dtype)             if tmp in counter.keys():                 counter[tmp] += 1             else:                 counter[tmp] = 1         values = [[value] for value in counter.values()]         return pd.DataFrame(           data=values,           columns=['Values'],           index=list(counter.keys())         )       result_df = pd.concat([_shape(df), _dtypes_freq(df)])     return result_df   def display_summary(df: pd.DataFrame) -> None:     \"\"\"     Function define to print out the result of the data summary     \"\"\"     result_df = True     message = '---- Data summary ----'     print(message, result_df, sep='\\n') <\/code><\/pre>\n<p>\u0421\u043d\u043e\u0432\u0430 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0442\u0435\u0441\u0442\u044b:<\/p>\n<pre><code class=\"bash\">poetry run pytest -v  ==================================================== test session starts ==================================================== platform darwin -- Python 3.8.7, pytest-5.4.3, py-1.11.0, pluggy-0.13.1 -- \/Users\/aabur\/Documents\/GitHub\/AABur\/modern_python\/summarize_dataframe\/.venv\/bin\/python cachedir: .pytest_cache rootdir: \/Users\/aabur\/Documents\/GitHub\/AABur\/modern_python\/summarize_dataframe collected 1 item tests\/test_summarize_dataframe.py::TestDataSummary::test_data_summary PASSED                                          [100%] ===================================================== 1 passed in 0.35s ===================================================== <\/code><\/pre>\n<p>\u0418 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435. \u0412 \u043d\u0430\u0448\u0438\u0445 \u0442\u0435\u0441\u0442\u0430\u0445 \u043c\u044b \u043d\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u043b\u0438 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0432\u044b\u0432\u043e\u0434. \u041d\u0430\u0448 \u043c\u043e\u0434\u0443\u043b\u044c \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0432\u043e\u0434\u043a\u0438 DataFrame. \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u0446\u0435\u043b\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e\u00a0<code>unittest<\/code>, \u043d\u043e \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u00a0<code>pytest<\/code>\u00a0\u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0430.<\/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-328034","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/328034","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=328034"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/328034\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=328034"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=328034"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=328034"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}