From 2385c379df1cfcaee5437630fe6df0936eff210a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A8=D0=B8=D0=BC=D1=87=D0=B5=D0=BD=D0=BA=D0=BE?= Date: Wed, 2 Jul 2025 13:10:37 +0000 Subject: [PATCH] =?UTF-8?q?=D0=97=D0=B0=D0=B3=D1=80=D1=83=D0=B7=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20=D1=84=D0=B0=D0=B9=D0=BB=D1=8B=20=D0=B2=20=C2=AB?= =?UTF-8?q?/=C2=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- count_sum_pandas.py | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 count_sum_pandas.py diff --git a/count_sum_pandas.py b/count_sum_pandas.py new file mode 100644 index 0000000..09da9a6 --- /dev/null +++ b/count_sum_pandas.py @@ -0,0 +1,4 @@ +import pandas as pd + +def count_sum(df: pd.DataFrame) -> pd.DataFrame: + return df.groupby('Товар')['Количество'].sum().reset_index() \ No newline at end of file