{"id":31181,"date":"2019-10-31T21:39:55","date_gmt":"2019-10-31T18:39:55","guid":{"rendered":"https:\/\/prohoster.info\/blog\/prorabatyvaem-navyk-ispolzovaniya-gruppirovki-i-vizualizatsii-dannyh-v-python\/"},"modified":"2019-10-31T21:39:55","modified_gmt":"2019-10-31T18:39:55","slug":"prorabatyvaem-navyk-ispolzovaniya-gruppirovki-i-vizualizatsii-dannyh-v-python","status":"publish","type":"post","link":"https:\/\/prohoster.info\/de\/blog\/administrirovanie\/prorabatyvaem-navyk-ispolzovaniya-gruppirovki-i-vizualizatsii-dannyh-v-python","title":{"rendered":"Wir entwickeln die F\u00e4higkeit zur Gruppierung und Visualisierung von Daten in Python.","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p><img decoding=\"async\" alt=\"\u041f\u0440\u043e\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u043d\u0430\u0432\u044b\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0438 \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 Python\" src=\"\/wp-content\/uploads\/2019\/04\/47231f1fba64508a61b64212c63e647d.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\n\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! <\/p>\n<p>\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0431\u0443\u0434\u0435\u043c \u043f\u0440\u043e\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043d\u0430\u0432\u044b\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0440\u0435\u0434\u0441\u0442\u0432 \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 Python. \u0412 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u043c <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/wesm\/pydata-book\/tree\/2nd-edition\/datasets\/babynames\">\u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435 \u043d\u0430 Github<\/a><\/noindex> \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a \u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u043d\u0430\u0431\u043e\u0440 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439.<\/p>\n<p>\u041f\u043e \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u0438, \u0432 \u043d\u0430\u0447\u0430\u043b\u0435, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u0446\u0435\u043b\u0438:<\/p>\n<ul>\n<li>\u0421\u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u043f\u043e\u043b\u0443 \u0438 \u0433\u043e\u0434\u0443 \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u0449\u0443\u044e \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0443 \u0440\u043e\u0436\u0434\u0430\u0435\u043c\u043e\u0441\u0442\u0438 \u043e\u0431\u043e\u0438\u0445 \u043f\u043e\u043b\u043e\u0432;<\/li>\n<li>\u041d\u0430\u0439\u0442\u0438 \u0441\u0430\u043c\u044b\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u0438\u043c\u0435\u043d\u0430 \u0437\u0430 \u0432\u0441\u044e \u0438\u0441\u0442\u043e\u0440\u0438\u044e;<\/li>\n<li>\u0420\u0430\u0437\u0431\u0438\u0442\u044c \u0432\u0435\u0441\u044c \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u043a \u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 10 \u0447\u0430\u0441\u0442\u0435\u0439 \u0438 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u043d\u0430\u0439\u0442\u0438 \u0441\u0430\u043c\u043e\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0435 \u0438\u043c\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u043e\u043b\u0430. \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u043c\u0435\u043d\u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0443 \u0437\u0430 \u0432\u0441\u0435 \u0432\u0440\u0435\u043c\u044f;<\/li>\n<li>\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0433\u043e\u0434\u0430 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u043c\u0435\u043d \u043f\u043e\u043a\u0440\u044b\u0432\u0430\u0435\u0442 50% \u043b\u044e\u0434\u0435\u0439 \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c (\u043c\u044b \u0443\u0432\u0438\u0434\u0438\u043c \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u0438\u0435 \u0438\u043c\u0435\u043d \u0437\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0433\u043e\u0434);<\/li>\n<li>\u0412\u044b\u0431\u0440\u0430\u0442\u044c 4 \u0433\u043e\u0434\u0430 \u0438\u0437 \u0432\u0441\u0435\u0433\u043e \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043a\u0430 \u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0433\u043e\u0434\u0430 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043e \u043f\u0435\u0440\u0432\u043e\u0439 \u0431\u0443\u043a\u0432\u0435 \u0432 \u0438\u043c\u0435\u043d\u0438 \u0438 \u043f\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0431\u0443\u043a\u0432\u0435 \u0432 \u0438\u043c\u0435\u043d\u0438;<\/li>\n<li>\u0421\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0445 \u043b\u044e\u0434\u0435\u0439 (\u043f\u0440\u0435\u0437\u0438\u0434\u0435\u043d\u0442\u044b, \u043f\u0435\u0432\u0446\u044b, \u0430\u043a\u0442\u0435\u0440\u044b, \u043a\u0438\u043d\u043e\u0433\u0435\u0440\u043e\u0438) \u0438 \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u0438\u0445 \u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u043d\u0430 \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0443 \u0438\u043c\u0435\u043d. \u041f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u0443\u044e \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e.<\/li>\n<\/ul>\n<p>\u041c\u0435\u043d\u044c\u0448\u0435 \u0441\u043b\u043e\u0432, \u0431\u043e\u043b\u044c\u0448\u0435 \u043a\u043e\u0434\u0430!<\/p>\n<p>\u0418, \u043f\u043e\u0435\u0445\u0430\u043b\u0438.<noindex><a rel=\"nofollow\" name=\"habracut\"><\/a><\/noindex><\/p>\n<h4>\u0421\u0433\u0440\u0443\u043f\u043f\u0438\u0440\u0443\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u043f\u043e\u043b\u0443 \u0438 \u0433\u043e\u0434\u0443 \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043e\u0431\u0449\u0443\u044e \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0443 \u0440\u043e\u0436\u0434\u0430\u0435\u043c\u043e\u0441\u0442\u0438 \u043e\u0431\u043e\u0438\u0445 \u043f\u043e\u043b\u043e\u0432:<\/h4>\n<pre><code class=\"python\">import numpy as np\nimport pandas as pd \nimport matplotlib.pyplot as plt\n\nyears = np.arange(1880, 2011, 3)\ndatalist = 'https:\/\/raw.githubusercontent.com\/wesm\/pydata-book\/2nd-edition\/datasets\/babynames\/yob{year}.txt'\ndataframes = []\nfor year in years:\n    dataset = datalist.format(year=year)\n    dataframe = pd.read_csv(dataset, names=['name', 'sex', 'count'])\n    dataframes.append(dataframe.assign(year=year))\n\nresult = pd.concat(dataframes)\nsex = result.groupby('sex')\nbirths_men = sex.get_group('M').groupby('year', as_index=False)\nbirths_women = sex.get_group('F').groupby('year', as_index=False)\nbirths_men_list = births_men.aggregate(np.sum)['count'].tolist()\nbirths_women_list = births_women.aggregate(np.sum)['count'].tolist()\n\nfig, ax = plt.subplots()\nfig.set_size_inches(25,15)\n\nindex = np.arange(len(years))\nstolb1 = ax.bar(index, births_men_list, 0.4, color='c', label='\u041c\u0443\u0436\u0447\u0438\u043d\u044b')\nstolb2 = ax.bar(index + 0.4, births_women_list, 0.4, alpha=0.8, color='r', label='\u0416\u0435\u043d\u0449\u0438\u043d\u044b')\n\nax.set_title('\u0420\u043e\u0436\u0434\u0430\u0435\u043c\u043e\u0441\u0442\u044c \u043f\u043e \u043f\u043e\u043b\u0443 \u0438 \u0433\u043e\u0434\u0430\u043c')\nax.set_xlabel('\u0413\u043e\u0434\u0430')\nax.set_ylabel('\u0420\u043e\u0436\u0434\u0430\u0435\u043c\u043e\u0441\u0442\u044c')\nax.set_xticklabels(years)\nax.set_xticks(index + 0.4)\nax.legend(loc=9)\n\nfig.tight_layout()\nplt.show()\n<\/code><\/pre>\n<p><img decoding=\"async\" alt=\"\u041f\u0440\u043e\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u043d\u0430\u0432\u044b\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0438 \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 Python\" src=\"\/wp-content\/uploads\/2019\/04\/1cf23107c0add423ebe10cc7aef7f26d.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<h4>\u041d\u0430\u0439\u0434\u0435\u043c \u0441\u0430\u043c\u044b\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u0438\u043c\u0435\u043d\u0430 \u0437\u0430 \u0432\u0441\u044e \u0438\u0441\u0442\u043e\u0440\u0438\u044e:<\/h4>\n<pre><code class=\"python\">years = np.arange(1880, 2011)\n\ndataframes = []\nfor year in years:\n    dataset = datalist.format(year=year)\n    dataframe = pd.read_csv(dataset, names=['name', 'sex', 'count'])\n    dataframes.append(dataframe)\n\nresult = pd.concat(dataframes)\nnames = result.groupby('name', as_index=False).sum().sort_values('count', ascending=False)\nnames.head(10)\n<\/code><\/pre>\n<p><img decoding=\"async\" alt=\"\u041f\u0440\u043e\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u043d\u0430\u0432\u044b\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0438 \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 Python\" src=\"\/wp-content\/uploads\/2019\/04\/71ade6b6a9bc7200e252562ab698f647.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<\/p>\n<h4>\u0420\u0430\u0437\u043e\u0431\u044c\u0451\u043c \u0432\u0435\u0441\u044c \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u043a \u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 10 \u0447\u0430\u0441\u0442\u0435\u0439 \u0438 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u043d\u0430\u0439\u0434\u0435\u043c \u0441\u0430\u043c\u043e\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0435 \u0438\u043c\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u043e\u043b\u0430. \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u043c\u0435\u043d\u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0435\u0433\u043e \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0443 \u0437\u0430 \u0432\u0441\u0435 \u0432\u0440\u0435\u043c\u044f:<\/h4>\n<pre><code class=\"python\">years = np.arange(1880, 2011)\npart_size = int((years[years.size - 1] - years[0]) \/ 10) + 1\nparts = {}\ndef GetPart(year):\n    return int((year - years[0]) \/ part_size)\nfor year in years:\n    index = GetPart(year)\n    r = years[0] + part_size * index, min(years[years.size - 1], years[0] + part_size * (index + 1))\n    parts[index] = str(r[0]) + '-' + str(r[1])\n\ndataframe_parts = []\ndataframes = []\nfor year in years:\n    dataset = datalist.format(year=year)\n    dataframe = pd.read_csv(dataset, names=['name', 'sex', 'count'])\n    dataframe_parts.append(dataframe.assign(years=parts[GetPart(year)]))\n    dataframes.append(dataframe.assign(year=year))\n    \nresult_parts = pd.concat(dataframe_parts)\nresult = pd.concat(dataframes)\n\nresult_parts_sums = result_parts.groupby(['years', 'sex', 'name'], as_index=False).sum()\nresult_parts_names = result_parts_sums.iloc[result_parts_sums.groupby(['years', 'sex'], as_index=False).apply(lambda x: x['count'].idxmax())]\nresult_sums = result.groupby(['year', 'sex', 'name'], as_index=False).sum()\n\nfor groupName, groupLabels in result_parts_names.groupby(['name', 'sex']).groups.items():\n    group = result_sums.groupby(['name', 'sex']).get_group(groupName)\n    fig, ax = plt.subplots(1, 1, figsize=(18,10))\n\n    ax.set_xlabel('\u0413\u043e\u0434\u0430')\n    ax.set_ylabel('\u0420\u043e\u0436\u0434\u0430\u0435\u043c\u043e\u0441\u0442\u044c')\n    label = group['name']\n    ax.plot(group['year'], group['count'], label=label.aggregate(np.max), color='b', ls='-')\n    ax.legend(loc=9, fontsize=11)\n\n    plt.show()\n<\/code><\/pre>\n<p><img decoding=\"async\" alt=\"\u041f\u0440\u043e\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u043d\u0430\u0432\u044b\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0438 \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 Python\" src=\"\/wp-content\/uploads\/2019\/04\/07ea1024da8945da2d422919eb59ccb9.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\n<img decoding=\"async\" alt=\"\u041f\u0440\u043e\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u043d\u0430\u0432\u044b\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0438 \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 Python\" src=\"\/wp-content\/uploads\/2019\/04\/e2d55b076cb15bf57bbfb6fc9bfd4f7f.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\n<img decoding=\"async\" alt=\"\u041f\u0440\u043e\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u043d\u0430\u0432\u044b\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0438 \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 Python\" src=\"\/wp-content\/uploads\/2019\/04\/d1e18fa91fb1e64ce59a176dcbbadd6c.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\n<img decoding=\"async\" alt=\"\u041f\u0440\u043e\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u043d\u0430\u0432\u044b\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0438 \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 Python\" src=\"\/wp-content\/uploads\/2019\/04\/0fab795a91c3d06caa8934dc522f1840.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\n<img decoding=\"async\" alt=\"\u041f\u0440\u043e\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u043d\u0430\u0432\u044b\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0438 \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 Python\" src=\"\/wp-content\/uploads\/2019\/04\/2650954cc6c110931d8e154f9ce0c8e5.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\n<img decoding=\"async\" alt=\"\u041f\u0440\u043e\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u043d\u0430\u0432\u044b\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0438 \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 Python\" src=\"\/wp-content\/uploads\/2019\/04\/c6dc068f58fe5ed1d6ae52f774148610.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\n<img decoding=\"async\" alt=\"\u041f\u0440\u043e\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u043d\u0430\u0432\u044b\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0438 \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 Python\" src=\"\/wp-content\/uploads\/2019\/04\/fb1babac60e9af33452df406b667c761.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\n<img decoding=\"async\" alt=\"\u041f\u0440\u043e\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u043d\u0430\u0432\u044b\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0438 \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 Python\" src=\"\/wp-content\/uploads\/2019\/04\/1368c1672de2c4e701736f7f5c4a2fd9.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\n<img decoding=\"async\" alt=\"\u041f\u0440\u043e\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u043d\u0430\u0432\u044b\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0438 \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 Python\" src=\"\/wp-content\/uploads\/2019\/04\/b71ee4043e343923cec4917fa8cf160f.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\n<img decoding=\"async\" alt=\"\u041f\u0440\u043e\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u043d\u0430\u0432\u044b\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0438 \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 Python\" src=\"\/wp-content\/uploads\/2019\/04\/4128580d59e0637a14ccdb3d54314706.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<h4>\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0433\u043e\u0434\u0430 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0435\u043c \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u043c\u0435\u043d \u043f\u043e\u043a\u0440\u044b\u0432\u0430\u0435\u0442 50% \u043b\u044e\u0434\u0435\u0439 \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u044d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435:<\/h4>\n<pre><code class=\"python\">dataframe = pd.DataFrame({'year': [], 'count': []})\nyears = np.arange(1880, 2011)\nfor year in years:\n    dataset = datalist.format(year=year)\n    csv = pd.read_csv(dataset, names=['name', 'sex', 'count'])\n    names = csv.groupby('name', as_index=False).aggregate(np.sum)\n    names['sum'] = names.sum()['count']\n    names['percent'] = names['count'] \/ names['sum'] * 100\n    names = names.sort_values(['percent'], ascending=False)\n    names['cum_perc'] = names['percent'].cumsum()\n    names_filtered = names[names['cum_perc'] &lt;= 50]\n    dataframe = dataframe.append(pd.DataFrame({'year': [year], 'count': [names_filtered.shape[0]]}))\n\nfig, ax1 = plt.subplots(1, 1, figsize=(22,13))\nax1.set_xlabel('\u0413\u043e\u0434\u0430', fontsize = 12)\nax1.set_ylabel('\u0420\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u0438\u0435 \u0438\u043c\u0435\u043d', fontsize = 12)\nax1.plot(dataframe['year'], dataframe['count'], color='r', ls='-')\nax1.legend(loc=9, fontsize=12)\n\nplt.show()\n<\/code><\/pre>\n<p><img decoding=\"async\" alt=\"\u041f\u0440\u043e\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u043d\u0430\u0432\u044b\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0438 \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 Python\" src=\"\/wp-content\/uploads\/2019\/04\/2c71186accd91fd8df3532a385394668.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<\/p>\n<h4>\u0412\u044b\u0431\u0435\u0440\u0435\u043c 4 \u0433\u043e\u0434\u0430 \u0438\u0437 \u0432\u0441\u0435\u0433\u043e \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043a\u0430 \u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u043c \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0433\u043e\u0434\u0430 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043e \u043f\u0435\u0440\u0432\u043e\u0439 \u0431\u0443\u043a\u0432\u0435 \u0432 \u0438\u043c\u0435\u043d\u0438 \u0438 \u043f\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0431\u0443\u043a\u0432\u0435 \u0432 \u0438\u043c\u0435\u043d\u0438:<\/h4>\n<pre><code class=\"python\">from string import ascii_lowercase, ascii_uppercase\n\nfig_first, ax_first = plt.subplots(1, 1, figsize=(14,10))\nfig_last, ax_last = plt.subplots(1, 1, figsize=(14,10))\n\nindex = np.arange(len(ascii_uppercase))\nyears = [1944, 1978, 1991, 2003]\ncolors = ['r', 'g', 'b', 'y']\nn = 0\nfor year in years:\n    dataset = datalist.format(year=year)\n    csv = pd.read_csv(dataset, names=['name', 'sex', 'count'])\n    names = csv.groupby('name', as_index=False).aggregate(np.sum)\n    count = names.shape[0]\n\n    dataframe = pd.DataFrame({'letter': [], 'frequency_first': [], 'frequency_last': []})\n    for letter in ascii_uppercase:\n        countFirst = (names[names.name.str.startswith(letter)].count()['count'])\n        countLast = (names[names.name.str.endswith(letter.lower())].count()['count'])\n\n        dataframe = dataframe.append(pd.DataFrame({\n            'letter': [letter],\n            'frequency_first': [countFirst \/ count * 100],\n            'frequency_last': [countLast \/ count * 100]}))\n\n    ax_first.bar(index + 0.3 * n, dataframe['frequency_first'], 0.3, alpha=0.5, color=colors[n], label=year)\n    ax_last.bar(index + bar_width * n, dataframe['frequency_last'], 0.3, alpha=0.5, color=colors[n], label=year)\n    n += 1\n\nax_first.set_xlabel('\u0411\u0443\u043a\u0432\u0430 \u0430\u043b\u0444\u0430\u0432\u0438\u0442\u0430')\nax_first.set_ylabel('\u0427\u0430\u0441\u0442\u043e\u0442\u0430, %')\nax_first.set_title('\u041f\u0435\u0440\u0432\u0430\u044f \u0431\u0443\u043a\u0432\u0430 \u0432 \u0438\u043c\u0435\u043d\u0438')\nax_first.set_xticks(index)\nax_first.set_xticklabels(ascii_uppercase)\nax_first.legend()\n\nax_last.set_xlabel('\u0411\u0443\u043a\u0432\u0430 \u0430\u043b\u0444\u0430\u0432\u0438\u0442\u0430')\nax_last.set_ylabel('\u0427\u0430\u0441\u0442\u043e\u0442\u0430, %')\nax_last.set_title('\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0431\u0443\u043a\u0432\u0430 \u0432 \u0438\u043c\u0435\u043d\u0438')\nax_last.set_xticks(index)\nax_last.set_xticklabels(ascii_uppercase)\nax_last.legend()\n\nfig_first.tight_layout()\nfig_last.tight_layout()\n\nplt.show()\n<\/code><\/pre>\n<p><img decoding=\"async\" alt=\"\u041f\u0440\u043e\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u043d\u0430\u0432\u044b\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0438 \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 Python\" src=\"\/wp-content\/uploads\/2019\/04\/7713d6d7e8f2fbb3c3b7d25bd0a9cc2b.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\n<img decoding=\"async\" alt=\"\u041f\u0440\u043e\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u043d\u0430\u0432\u044b\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0438 \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 Python\" src=\"\/wp-content\/uploads\/2019\/04\/f949696090a24cf9ef52b36753088d04.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<h4>\u0421\u043e\u0441\u0442\u0430\u0432\u0438\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0445 \u043b\u044e\u0434\u0435\u0439 (\u043f\u0440\u0435\u0437\u0438\u0434\u0435\u043d\u0442\u044b, \u043f\u0435\u0432\u0446\u044b, \u0430\u043a\u0442\u0435\u0440\u044b, \u043a\u0438\u043d\u043e\u0433\u0435\u0440\u043e\u0438) \u0438 \u043e\u0446\u0435\u043d\u0438\u043c \u0438\u0445 \u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u043d\u0430 \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0443 \u0438\u043c\u0435\u043d:<\/h4>\n<pre><code class=\"python\">celebrities = {'Frank': 'M', 'Britney': 'F', 'Madonna': 'F', 'Bob': 'M'}\ndataframes = []\nfor year in years:\n    dataset = datalist.format(year=year)\n    dataframe = pd.read_csv(dataset, names=['name', 'sex', 'count'])\n    dataframes.append(dataframe.assign(year=year))\n\nresult = pd.concat(dataframes)\n\nfor celebrity, sex in celebrities.items():\n    names = result[result.name == celebrity]\n    dataframe = names[names.sex == sex]\n    fig, ax = plt.subplots(1, 1, figsize=(16,8))\n\n    ax.set_xlabel('\u0413\u043e\u0434\u0430', fontsize = 10)\n    ax.set_ylabel('\u0420\u043e\u0436\u0434\u0430\u0435\u043c\u043e\u0441\u0442\u044c', fontsize = 10)\n    ax.plot(dataframe['year'], dataframe['count'], label=celebrity, color='r', ls='-')\n    ax.legend(loc=9, fontsize=12)\n        \n    plt.show()\n<\/code><\/pre>\n<p>\n<img decoding=\"async\" alt=\"\u041f\u0440\u043e\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u043d\u0430\u0432\u044b\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0438 \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 Python\" src=\"\/wp-content\/uploads\/2019\/04\/5e35e4b0d9509ebc50341cdefba136f5.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\n<img decoding=\"async\" alt=\"\u041f\u0440\u043e\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u043d\u0430\u0432\u044b\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0438 \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 Python\" src=\"\/wp-content\/uploads\/2019\/04\/0fa2e5ef328ace9ba58ebf784378104c.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\n<img decoding=\"async\" alt=\"\u041f\u0440\u043e\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u043d\u0430\u0432\u044b\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0438 \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 Python\" src=\"\/wp-content\/uploads\/2019\/04\/5bff4984039f47a9d02c3130b833eca5.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\n<img decoding=\"async\" alt=\"\u041f\u0440\u043e\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u043d\u0430\u0432\u044b\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0438 \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 Python\" src=\"\/wp-content\/uploads\/2019\/04\/9adc0adc8b7892cff28a14b451cc2b30.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\n\u0414\u043b\u044f \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043a\u0438 \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0437 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043f\u0435\u0440\u0438\u043e\u0434 \u0436\u0438\u0437\u043d\u0438 \u0437\u043d\u0430\u043c\u0435\u043d\u0438\u0442\u043e\u0441\u0442\u0438, \u0447\u0442\u043e\u0431\u044b \u0434\u043b\u044f \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0441\u0442\u0438 \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u0438\u0445 \u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u043d\u0430 \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0443 \u0438\u043c\u0435\u043d.<\/p>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u0432\u0441\u0435 \u043d\u0430\u0448\u0438 \u0446\u0435\u043b\u0438 \u0431\u044b\u043b\u0438 \u0434\u043e\u0441\u0442\u0438\u0433\u043d\u0443\u0442\u044b \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u044b. \u041c\u044b \u043f\u0440\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u043d\u0430\u0432\u044b\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0440\u0435\u0434\u0441\u0442\u0432 \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 Python, \u0438 \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0434\u0430\u043b\u044c\u0448\u0435. \u0412\u044b\u0432\u043e\u0434\u044b \u043f\u043e \u0443\u0436\u0435 \u0433\u043e\u0442\u043e\u0432\u044b\u043c, \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0434\u0430\u043d\u043d\u044b\u043c \u043a\u0430\u0436\u0434\u044b\u0439 \u0441\u043c\u043e\u0436\u0435\u0442 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0430\u043c.<\/p>\n<p>\u0412\u0441\u0435\u043c \u0437\u043d\u0430\u043d\u0438\u0439!<br \/>\n<br \/>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/post\/445834\/\">habr.com<\/a><\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0431\u0443\u0434\u0435\u043c \u043f\u0440\u043e\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043d\u0430\u0432\u044b\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0440\u0435\u0434\u0441\u0442\u0432 \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 Python. \u0412 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435 \u043d\u0430 Github \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a \u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u043d\u0430\u0431\u043e\u0440 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439. \u041f\u043e \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u0438, \u0432 \u043d\u0430\u0447\u0430\u043b\u0435, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u0446\u0435\u043b\u0438: \u0421\u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u043f\u043e\u043b\u0443 \u0438 \u0433\u043e\u0434\u0443 \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u0449\u0443\u044e \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0443 \u0440\u043e\u0436\u0434\u0430\u0435\u043c\u043e\u0441\u0442\u0438 \u043e\u0431\u043e\u0438\u0445 \u043f\u043e\u043b\u043e\u0432; \u041d\u0430\u0439\u0442\u0438 \u0441\u0430\u043c\u044b\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u0438\u043c\u0435\u043d\u0430 \u0437\u0430 \u0432\u0441\u044e \u0438\u0441\u0442\u043e\u0440\u0438\u044e; \u0420\u0430\u0437\u0431\u0438\u0442\u044c \u0432\u0435\u0441\u044c \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":23148,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[688],"tags":[],"class_list":["post-31181","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-administrirovanie"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0431\u0443\u0434\u0435\u043c \u043f\u0440\u043e\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043d\u0430\u0432\u044b\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0440\u0435\u0434\u0441\u0442\u0432 \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 Python. \u0412 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435 \u043d\u0430 Github \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a \u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u043d\u0430\u0431\u043e\u0440 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439. \u041f\u043e \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u0438, \u0432 \u043d\u0430\u0447\u0430\u043b\u0435, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u0446\u0435\u043b\u0438: \u0421\u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u043f\u043e\u043b\u0443 \u0438 \u0433\u043e\u0434\u0443 \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u0449\u0443\u044e \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0443 \u0440\u043e\u0436\u0434\u0430\u0435\u043c\u043e\u0441\u0442\u0438 \u043e\u0431\u043e\u0438\u0445 \u043f\u043e\u043b\u043e\u0432; \u041d\u0430\u0439\u0442\u0438 \u0441\u0430\u043c\u044b\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u0438\u043c\u0435\u043d\u0430 \u0437\u0430 \u0432\u0441\u044e \u0438\u0441\u0442\u043e\u0440\u0438\u044e; \u0420\u0430\u0437\u0431\u0438\u0442\u044c \u0432\u0435\u0441\u044c \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/de\/blog\/administrirovanie\/prorabatyvaem-navyk-ispolzovaniya-gruppirovki-i-vizualizatsii-dannyh-v-python\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"de_DE\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47\u041f\u0440\u043e\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u043d\u0430\u0432\u044b\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0438 \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 Python | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0431\u0443\u0434\u0435\u043c \u043f\u0440\u043e\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043d\u0430\u0432\u044b\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0440\u0435\u0434\u0441\u0442\u0432 \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 Python. \u0412 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435 \u043d\u0430 Github \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a \u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u043d\u0430\u0431\u043e\u0440 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439. \u041f\u043e \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u0438, \u0432 \u043d\u0430\u0447\u0430\u043b\u0435, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u0446\u0435\u043b\u0438: \u0421\u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u043f\u043e\u043b\u0443 \u0438 \u0433\u043e\u0434\u0443 \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u0449\u0443\u044e \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0443 \u0440\u043e\u0436\u0434\u0430\u0435\u043c\u043e\u0441\u0442\u0438 \u043e\u0431\u043e\u0438\u0445 \u043f\u043e\u043b\u043e\u0432; \u041d\u0430\u0439\u0442\u0438 \u0441\u0430\u043c\u044b\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u0438\u043c\u0435\u043d\u0430 \u0437\u0430 \u0432\u0441\u044e \u0438\u0441\u0442\u043e\u0440\u0438\u044e; \u0420\u0430\u0437\u0431\u0438\u0442\u044c \u0432\u0435\u0441\u044c \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/de\/blog\/administrirovanie\/prorabatyvaem-navyk-ispolzovaniya-gruppirovki-i-vizualizatsii-dannyh-v-python\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2019-10-31T18:39:55+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2019-10-31T18:39:55+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47Wir vertiefen die F\u00e4higkeiten in der Nutzung von Datenaggregation und -visualisierung in Python | ProHoster","description":"Hallo, Habr! Heute werden wir die F\u00e4higkeiten in der Verwendung von Datenaggregation und -visualisierung in Python vertiefen. Im bereitgestellten Datensatz auf GitHub analysieren wir einige Merkmale und erstellen eine Reihe von Visualisierungen. Wie gewohnt beginnen wir mit den Zielen: Die Daten nach Geschlecht und Jahr gruppieren und die Gesamtdynamik der Geburtenraten beider Geschlechter visualisieren; Die beliebtesten Namen in der gesamten Geschichte finden; Den gesamten Zeitrahmen aufteilen.","canonical_url":"https:\/\/prohoster.info\/de\/blog\/administrirovanie\/prorabatyvaem-navyk-ispolzovaniya-gruppirovki-i-vizualizatsii-dannyh-v-python","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"de_DE","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47\u041f\u0440\u043e\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u043d\u0430\u0432\u044b\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0438 \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 Python | ProHoster","og:description":"\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0431\u0443\u0434\u0435\u043c \u043f\u0440\u043e\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043d\u0430\u0432\u044b\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0440\u0435\u0434\u0441\u0442\u0432 \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 Python. \u0412 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435 \u043d\u0430 Github \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a \u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u043d\u0430\u0431\u043e\u0440 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439. \u041f\u043e \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u0438, \u0432 \u043d\u0430\u0447\u0430\u043b\u0435, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u0446\u0435\u043b\u0438: \u0421\u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u043f\u043e\u043b\u0443 \u0438 \u0433\u043e\u0434\u0443 \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u0449\u0443\u044e \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0443 \u0440\u043e\u0436\u0434\u0430\u0435\u043c\u043e\u0441\u0442\u0438 \u043e\u0431\u043e\u0438\u0445 \u043f\u043e\u043b\u043e\u0432; \u041d\u0430\u0439\u0442\u0438 \u0441\u0430\u043c\u044b\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u0438\u043c\u0435\u043d\u0430 \u0437\u0430 \u0432\u0441\u044e \u0438\u0441\u0442\u043e\u0440\u0438\u044e; \u0420\u0430\u0437\u0431\u0438\u0442\u044c \u0432\u0435\u0441\u044c \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439","og:url":"https:\/\/prohoster.info\/de\/blog\/administrirovanie\/prorabatyvaem-navyk-ispolzovaniya-gruppirovki-i-vizualizatsii-dannyh-v-python","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2019-10-31T18:39:55+00:00","article:modified_time":"2019-10-31T18:39:55+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"31181","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":"2026-01-21 04:54:24","breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2021-02-28 17:51:16","updated":"2026-01-21 04:54:24"},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/posts\/31181","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/comments?post=31181"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/posts\/31181\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/media\/23148"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/media?parent=31181"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/categories?post=31181"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/tags?post=31181"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}