{ "cells": [ { "cell_type": "code", "execution_count": 4, "id": "0cc6c719-864f-4591-ac6d-d5109f2a8ff2", "metadata": { "tags": [] }, "outputs": [], "source": [ "import numpy as np\n", "import pandas as pd\n" ] }, { "cell_type": "code", "execution_count": 11, "id": "14e514ae-83fd-4311-82dd-0f4a44a9a7b0", "metadata": { "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Магазинов с форматом магазина \"Стрит\": 4\n" ] } ], "source": [ "#1\n", "df = pd.read_excel('ООО_Внимание_к_деталям (2).xlsx')\n", "d = df.loc[df[\"Формат магазина\"] == \"Стрит\"]\n", "df_result = d['Формат магазина'].count()\n", "print('Магазинов с форматом магазина \"Стрит\":', df_result)" ] }, { "cell_type": "code", "execution_count": 12, "id": "fdf1aa6e-4524-4add-ae8d-8353d32c9da8", "metadata": { "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Магазинов с бесплатной парковкой: 157\n" ] } ], "source": [ "#3\n", "d = df.loc[df['Парковка'] == 'бесплатная парковка']\n", "f = df.loc[df['Парковка'] == 'бесплатная паpковка']\n", "free_parking = d['Парковка'].count()\n", "free_parking1 = f['Парковка'].count()\n", "print('Магазинов с бесплатной парковкой:', free_parking + free_parking1)" ] }, { "cell_type": "code", "execution_count": null, "id": "bde16ef0-c582-4c3a-af7c-d0a40ebcac8a", "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "id": "53b629d4-a4b6-4448-89c4-d7cf448390ea", "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 }