{
    "version": "https:\/\/jsonfeed.org\/version\/1.1",
    "title": "Yuriy Gavrilov: posts tagged Python",
    "_rss_description": "Welcome to my personal place for love, peace and happiness 🤖 Yuiry Gavrilov",
    "_rss_language": "en",
    "_itunes_email": "yvgavrilov@gmail.com",
    "_itunes_categories_xml": "",
    "_itunes_image": "https:\/\/gavrilov.info\/pictures\/userpic\/userpic-square@2x.jpg?1643451008",
    "_itunes_explicit": "no",
    "home_page_url": "https:\/\/gavrilov.info\/tags\/python\/",
    "feed_url": "https:\/\/gavrilov.info\/tags\/python\/json\/",
    "icon": "https:\/\/gavrilov.info\/pictures\/userpic\/userpic@2x.jpg?1643451008",
    "authors": [
        {
            "name": "Yuriy Gavrilov - B[u]g - for charity.gavrilov.eth",
            "url": "https:\/\/gavrilov.info\/",
            "avatar": "https:\/\/gavrilov.info\/pictures\/userpic\/userpic@2x.jpg?1643451008"
        }
    ],
    "items": [
        {
            "id": "81",
            "url": "https:\/\/gavrilov.info\/all\/kak-sdelat-scatter-plot-i-poschitat-v-kakoy-strane-est-internet\/",
            "title": "Как сделать scatter plot и посчитать В какой стране есть Интернет стоимостью почти 800 за Гб",
            "content_html": "<p>Все вроде не сложно, но вот наименование точек оказалось самым сложным)<\/p>\n<pre class=\"e2-text-code\"><code class=\"\">import pandas as pd\nimport matplotlib.pyplot as plt\ndf = pd.read_csv('https:\/\/a.gavrilov.info\/data\/python\/file.csv')\ndf.iloc[:, 6] = df.iloc[:, 6].str.replace('$','',regex=True)\ndf.iloc[:, 5] = df.iloc[:, 5].str.replace('$','',regex=True)\ndf.iloc[:, 5] = df.iloc[:, 5].astype(float)\ndf.iloc[:, 6] = df.iloc[:, 6].astype(float)\nfig, ax = plt.subplots(figsize=(10, 6))\nax.scatter(x = df[&quot;Cheapest 1GB for 30 days (USD)&quot;], y = df[&quot;Most expensive 1GB (USD)&quot;])\nfor idx, row in df.iterrows():\n ax.annotate(row['Name'], (row['Cheapest 1GB for 30 days (USD)'], row['Most expensive 1GB (USD)']))\nplt.show()<\/code><\/pre><p>Это одно из заданий, которые встречаются на курсах по питону.<\/p>\n<p>Файл данных тут: <a href=\"https:\/\/a.gavrilov.info\/data\/python\/file.csv,\">https:\/\/a.gavrilov.info\/data\/python\/file.csv,<\/a> это затраты на интернет в разных странах.<\/p>\n<p>А задание само такое: “Построим: диаграмму рассеяния по столбцам таблицы ‘Cheapest 1GB for 30 days (USD)’ и ‘Most Expensive 1GB (USD)’. В какой стране есть Интеренет стоимостью почти 800 за Гб, если верить таблице?”<\/p>\n",
            "date_published": "2023-11-12T23:10:06+03:00",
            "date_modified": "2023-11-12T23:09:20+03:00",
            "tags": [
                "Python"
            ],
            "_date_published_rfc2822": "Sun, 12 Nov 2023 23:10:06 +0300",
            "_rss_guid_is_permalink": "false",
            "_rss_guid": "81",
            "_rss_enclosures": [],
            "_e2_data": {
                "is_favourite": false,
                "links_required": [
                    "highlight\/highlight.js",
                    "highlight\/highlight.css"
                ],
                "og_images": []
            }
        },
        {
            "id": "25",
            "url": "https:\/\/gavrilov.info\/all\/risuyu-prostuyu-diagrammu-na-python\/",
            "title": "Рисую простую диаграмму на Python",
            "content_html": "<p>Вот собственно сам код:<\/p>\n<pre class=\"e2-text-code\"><code class=\"\">import pandas as pd\nimport altair as alt\n\ndf = pd.read_excel('Sample - Superstore.xls', index_col=0) \ndf2 = df.groupby('Region').sum()\ndf2 = df2.reset_index(level=0)\n\nbars = alt.Chart(df2).mark_bar().encode(\n   alt.X('Region:N', sort='-y'),\n   alt.Y('Sales:Q'),\n   color=alt.condition(  alt.datum.Region == 'West',  # If the year is 1810 this test returns True,\n   alt.value('orange'),     # which sets the bar orange.\n   alt.value('steelblue'))   \n)\n\ntext = bars.mark_text(\n    align='left',\n    baseline='middle',\n    dx=11  # Nudges text to right so it doesn't appear on top of the bar\n).encode(\n    text='mean(Sales):Q'\n)\n\n(bars + text).properties(height=300)<\/code><\/pre><div class=\"e2-text-picture\">\n<img src=\"https:\/\/gavrilov.info\/pictures\/visualization.png\" width=\"209\" height=\"370\" alt=\"\" \/>\n<\/div>\n",
            "date_published": "2022-07-09T19:36:03+03:00",
            "date_modified": "2022-07-09T20:11:14+03:00",
            "tags": [
                "Data Visualization",
                "Python"
            ],
            "image": "https:\/\/gavrilov.info\/pictures\/visualization.png",
            "_date_published_rfc2822": "Sat, 09 Jul 2022 19:36:03 +0300",
            "_rss_guid_is_permalink": "false",
            "_rss_guid": "25",
            "_rss_enclosures": [],
            "_e2_data": {
                "is_favourite": false,
                "links_required": [
                    "highlight\/highlight.js",
                    "highlight\/highlight.css"
                ],
                "og_images": [
                    "https:\/\/gavrilov.info\/pictures\/visualization.png"
                ]
            }
        }
    ],
    "_e2_version": 4171,
    "_e2_ua_string": "Aegea 11.4 (v4171e)"
}