commit fa0597a63b93efc1c8ed8880ce41f98082de93d2 Author: sanek Date: Fri Dec 13 18:12:22 2024 +0000 app diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..2c5a619 --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,15 @@ + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000..105ce2d --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..709e800 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..ba85a53 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/pythonProject_pandas.iml b/.idea/pythonProject_pandas.iml new file mode 100644 index 0000000..2c80e12 --- /dev/null +++ b/.idea/pythonProject_pandas.iml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..7bfd20e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,6 @@ +FROM python:3.9-slim +#COPY . . +COPY . /app +WORKDIR /app +RUN pip install pandas +CMD ["python", "app.py"] \ No newline at end of file diff --git a/app.py b/app.py new file mode 100644 index 0000000..d2ead8c --- /dev/null +++ b/app.py @@ -0,0 +1,7 @@ +import pandas as pd + +df = pd.read_csv('data.csv') + +print(f'Средняя зарплата сотрудников: {df.salary.mean()}') +print('Сотрудники старше 30 лет:') +print(df[df.age > 30]) \ No newline at end of file diff --git a/data.csv b/data.csv new file mode 100644 index 0000000..e457d87 --- /dev/null +++ b/data.csv @@ -0,0 +1,21 @@ +name,age,salary +Alice,30,70000 +Bob,25,50000 +Charlie,35,100000 +David,40,120000 +Eve,28,60000 +Frank,50,150000 +Grace,33,80000 +Hank,29,55000 +Ivy,42,110000 +Jack,31,90000 +Kathy,36,95000 +Leo,24,48000 +Mona,34,87000 +Nina,26,65000 +Oscar,45,140000 +Paul,38,102000 +Quinn,37,98000 +Rachel,27,62000 +Steve,32,93000 +Tom,41,113000 \ No newline at end of file