{ "cells": [ { "cell_type": "code", "execution_count": 5, "id": "14e514ae-83fd-4311-82dd-0f4a44a9a7b0", "metadata": { "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Магазинов с форматом магазина \"Стрит\": 4\n" ] } ], "source": [ "#1\n", "import numpy as np\n", "import pandas as pd\n", "\n", "dr = pd.read_excel('ООО_Внимание_к_деталям (2).xlsx')\n", "d = df.loc[dr[\"Формат магазина\"] == \"Стрит\"]\n", "dr_result = d['Формат магазина'].count()\n", "print('Магазинов с форматом магазина \"Стрит\":', dr_result)" ] }, { "cell_type": "code", "execution_count": 6, "id": "fdf1aa6e-4524-4add-ae8d-8353d32c9da8", "metadata": { "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Магазинов с бесплатной парковкой: 157\n" ] } ], "source": [ "#3\n", "p = dr.loc[dr['Парковка'] == 'бесплатная парковка']\n", "p2 = dr.loc[dr['Парковка'] == 'бесплатная паpковка']\n", "result = p['Парковка'].count()\n", "result2 = p2['Парковка'].count()\n", "print('Магазинов с бесплатной парковкой:', result + result2)" ] }, { "cell_type": "code", "execution_count": null, "id": "09d7edb6-43d9-4ab7-98a8-0cbd14fc30dc", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.11.5" } }, "nbformat": 4, "nbformat_minor": 5 }