edb-noumea 0.2.7__tar.gz → 0.2.8__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.7 → edb_noumea-0.2.8}/PKG-INFO +1 -1
- {edb_noumea-0.2.7 → edb_noumea-0.2.8}/edb_noumea/details.py +36 -24
- {edb_noumea-0.2.7 → edb_noumea-0.2.8}/edb_noumea.egg-info/PKG-INFO +1 -1
- {edb_noumea-0.2.7 → edb_noumea-0.2.8}/pyproject.toml +1 -1
- {edb_noumea-0.2.7 → edb_noumea-0.2.8}/README.md +0 -0
- {edb_noumea-0.2.7 → edb_noumea-0.2.8}/edb_noumea/__init__.py +0 -0
- {edb_noumea-0.2.7 → edb_noumea-0.2.8}/edb_noumea/main.py +0 -0
- {edb_noumea-0.2.7 → edb_noumea-0.2.8}/edb_noumea.egg-info/SOURCES.txt +0 -0
- {edb_noumea-0.2.7 → edb_noumea-0.2.8}/edb_noumea.egg-info/dependency_links.txt +0 -0
- {edb_noumea-0.2.7 → edb_noumea-0.2.8}/edb_noumea.egg-info/requires.txt +0 -0
- {edb_noumea-0.2.7 → edb_noumea-0.2.8}/edb_noumea.egg-info/top_level.txt +0 -0
- {edb_noumea-0.2.7 → edb_noumea-0.2.8}/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.8
|
|
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
|
|
@@ -90,30 +90,42 @@ def get_detailed_results():
|
|
|
90
90
|
|
|
91
91
|
print(f"✅ {len(tables)} tableau(x) trouvé(s). Affichage du premier.")
|
|
92
92
|
df = tables[0]
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
93
|
+
print("\n--- Aperçu du tableau extrait (toutes colonnes) ---")
|
|
94
|
+
with pd.option_context('display.max_columns', None):
|
|
95
|
+
print(df)
|
|
96
|
+
print("\nColonnes:", list(df.columns))
|
|
97
|
+
print("Shape:", df.shape)
|
|
98
|
+
|
|
99
|
+
# Sélectionne et renomme les colonnes demandées
|
|
100
|
+
columns_map = {
|
|
101
|
+
'Unnamed: 0': 'Nom du site de baignade',
|
|
102
|
+
'Unnamed: 1': 'Point de prélèvement',
|
|
103
|
+
'Unnamed: 2': 'Date du prélèvement',
|
|
104
|
+
'Unnamed: 3': 'Heure du prélèvement',
|
|
105
|
+
'Escherichia': 'Escherichia coli (NPP/100ml)',
|
|
106
|
+
'Entérocoques': 'Entérocoques intestinaux (NPP/100ml)'
|
|
102
107
|
}
|
|
103
|
-
cleaned_df = df[
|
|
104
|
-
|
|
105
|
-
cleaned_df.
|
|
106
|
-
|
|
107
|
-
cleaned_df
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
108
|
+
cleaned_df = df[list(columns_map.keys())].rename(columns=columns_map)
|
|
109
|
+
# Supprime la première ligne (ligne d'en-tête du PDF)
|
|
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
|
+
})
|
|
120
|
+
|
|
121
|
+
# Ajoute deux colonnes issues du split de 'point_de_prelevement'
|
|
122
|
+
split_points = cleaned_df["point_de_prelevement"].str.split(",", n=1, expand=True)
|
|
123
|
+
cleaned_df["id_point_prelevement"] = split_points[0].str.strip()
|
|
124
|
+
cleaned_df["desc_point_prelevement"] = split_points[1].str.strip() if split_points.shape[1] > 1 else ""
|
|
125
|
+
|
|
126
|
+
# S'assurer que la colonne 'heure' est bien présente et de type string
|
|
127
|
+
if "heure" in cleaned_df.columns:
|
|
128
|
+
cleaned_df["heure"] = cleaned_df["heure"].astype(str)
|
|
117
129
|
|
|
118
130
|
return cleaned_df
|
|
119
131
|
|
|
@@ -126,4 +138,4 @@ if __name__ == "__main__":
|
|
|
126
138
|
print("\n📋 Voici les détails des derniers relevés (toutes colonnes) :")
|
|
127
139
|
print(detailed_df)
|
|
128
140
|
print("\nColonnes du DataFrame :")
|
|
129
|
-
print(list(detailed_df.columns))
|
|
141
|
+
#print(list(detailed_df.columns))
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: edb-noumea
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.8
|
|
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
|