edb-noumea 0.2.9__tar.gz → 0.2.11__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {edb_noumea-0.2.9 → edb_noumea-0.2.11}/PKG-INFO +1 -1
- {edb_noumea-0.2.9 → edb_noumea-0.2.11}/edb_noumea/details.py +12 -22
- {edb_noumea-0.2.9 → edb_noumea-0.2.11}/edb_noumea.egg-info/PKG-INFO +1 -1
- {edb_noumea-0.2.9 → edb_noumea-0.2.11}/pyproject.toml +1 -1
- {edb_noumea-0.2.9 → edb_noumea-0.2.11}/README.md +0 -0
- {edb_noumea-0.2.9 → edb_noumea-0.2.11}/edb_noumea/__init__.py +0 -0
- {edb_noumea-0.2.9 → edb_noumea-0.2.11}/edb_noumea/main.py +0 -0
- {edb_noumea-0.2.9 → edb_noumea-0.2.11}/edb_noumea.egg-info/SOURCES.txt +0 -0
- {edb_noumea-0.2.9 → edb_noumea-0.2.11}/edb_noumea.egg-info/dependency_links.txt +0 -0
- {edb_noumea-0.2.9 → edb_noumea-0.2.11}/edb_noumea.egg-info/requires.txt +0 -0
- {edb_noumea-0.2.9 → edb_noumea-0.2.11}/edb_noumea.egg-info/top_level.txt +0 -0
- {edb_noumea-0.2.9 → edb_noumea-0.2.11}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: edb-noumea
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.11
|
|
4
4
|
Summary: Un scraper pour la qualité des eaux de baignade à Nouméa.
|
|
5
5
|
Project-URL: Homepage, https://github.com/adriens/edb-noumea
|
|
6
6
|
Project-URL: Repository, https://github.com/adriens/edb-noumea
|
|
@@ -96,27 +96,17 @@ def get_detailed_results():
|
|
|
96
96
|
print("\nColonnes:", list(df.columns))
|
|
97
97
|
print("Shape:", df.shape)
|
|
98
98
|
|
|
99
|
-
# Sélectionne et
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
cleaned_df = df[
|
|
109
|
-
|
|
110
|
-
cleaned_df = cleaned_df.iloc[1:].reset_index(drop=True)
|
|
111
|
-
# Renomme les colonnes pour correspondre au style Python
|
|
112
|
-
cleaned_df = cleaned_df.rename(columns={
|
|
113
|
-
"Nom du site de baignade": "site",
|
|
114
|
-
"Point de prélèvement": "point_de_prelevement",
|
|
115
|
-
"Date du prélèvement": "date",
|
|
116
|
-
"Heure du prélèvement": "heure",
|
|
117
|
-
"Escherichia coli (NPP/100ml)": "e_coli_npp_100ml",
|
|
118
|
-
"Entérocoques intestinaux (NPP/100ml)": "enterocoques_npp_100ml"
|
|
119
|
-
})
|
|
99
|
+
# Sélectionne les colonnes par position et applique le mapping fixe
|
|
100
|
+
expected_columns = [
|
|
101
|
+
"site",
|
|
102
|
+
"point_de_prelevement",
|
|
103
|
+
"date",
|
|
104
|
+
"heure",
|
|
105
|
+
"e_coli_npp_100ml",
|
|
106
|
+
"enterocoques_npp_100ml"
|
|
107
|
+
]
|
|
108
|
+
cleaned_df = df.iloc[:, :6].copy()
|
|
109
|
+
cleaned_df.columns = expected_columns
|
|
120
110
|
|
|
121
111
|
# Ajoute deux colonnes issues du split de 'point_de_prelevement'
|
|
122
112
|
split_points = cleaned_df["point_de_prelevement"].str.split(",", n=1, expand=True)
|
|
@@ -130,7 +120,7 @@ def get_detailed_results():
|
|
|
130
120
|
# Nettoyer et convertir les colonnes e_coli_npp_100ml et enterocoques_npp_100ml
|
|
131
121
|
for col in ["e_coli_npp_100ml", "enterocoques_npp_100ml"]:
|
|
132
122
|
if col in cleaned_df.columns:
|
|
133
|
-
cleaned_df[col] = cleaned_df[col].replace(r"<\s*10", "10", regex=True)
|
|
123
|
+
cleaned_df[col] = cleaned_df[col].astype(str).str.replace(r"<\s*10", "10", regex=True)
|
|
134
124
|
cleaned_df[col] = pd.to_numeric(cleaned_df[col], errors="coerce").astype('Int64')
|
|
135
125
|
|
|
136
126
|
return cleaned_df
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: edb-noumea
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.11
|
|
4
4
|
Summary: Un scraper pour la qualité des eaux de baignade à Nouméa.
|
|
5
5
|
Project-URL: Homepage, https://github.com/adriens/edb-noumea
|
|
6
6
|
Project-URL: Repository, https://github.com/adriens/edb-noumea
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|