Skip to content

Commit

Permalink
add missingno-dependency, minor change (kelvin-number)
Browse files Browse the repository at this point in the history
  • Loading branch information
torave committed Mar 27, 2025
1 parent 811cc24 commit 8909500
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
7 changes: 5 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ certifi==2025.1.31
cffi==1.17.1
charset-normalizer==3.4.1
comm==0.2.2
contourpy==1.3.1
contourpy==1.2.0
cycler==0.12.1
debugpy==1.8.13
decorator==5.2.1
Expand All @@ -27,6 +27,7 @@ httpcore==1.0.7
httpx==0.28.1
idna==3.10
ipykernel==6.29.5
ipympl==0.9.7
ipython==9.0.1
ipython_pygments_lexers==1.1.1
ipywidgets==8.1.5
Expand Down Expand Up @@ -54,6 +55,7 @@ kiwisolver==1.4.8
MarkupSafe==3.0.2
matplotlib==3.10.1
matplotlib-inline==0.1.7
missingno==0.5.2
mistune==3.1.2
narwhals==1.29.0
nbclient==0.10.2
Expand All @@ -62,7 +64,7 @@ nbformat==5.10.4
nest-asyncio==1.6.0
notebook==7.3.2
notebook_shim==0.2.4
numpy==2.2.3
numpy==1.26.4
overrides==7.7.0
packaging==24.2
pandas==2.2.3
Expand Down Expand Up @@ -92,6 +94,7 @@ requests==2.32.3
rfc3339-validator==0.1.4
rfc3986-validator==0.1.1
rpds-py==0.23.1
scipy==1.15.2
seaborn==0.13.2
Send2Trash==1.8.3
setuptools==75.8.2
Expand Down
23 changes: 23 additions & 0 deletions src/my_package/get_record.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import pandas as pd

def get_records(df, city_name):
if df.empty:
print("df is empty")

else:
max_temp_mean = df['temp.mean_celsius'].max()
min_temp_mean = df['temp.mean_celsius'].min()

max_temp = df['temp.record_max'].max() - 272.15
min_temp = df['temp.record_min'].min() - 272.15

summary_data = {
"Metric": ["Max Temp mean (°C)", "Min Temp Mean (°C)", "Max Temp (°C)", "Min temp (°C)"],
"Values": [max_temp_mean, min_temp_mean, max_temp, min_temp]
}

summary_df = pd.DataFrame(summary_data)
folder = "../data/output_record"
filename = f"records_{city_name}"

return summary_df, filename, folder

0 comments on commit 8909500

Please sign in to comment.