Skip to content

Commit

Permalink
Aligning OSPAR handler with HELCOM one
Browse files Browse the repository at this point in the history
  • Loading branch information
franckalbinet committed Sep 23, 2024
1 parent 1690006 commit 44e482a
Show file tree
Hide file tree
Showing 5 changed files with 8,458 additions and 502 deletions.
2 changes: 1 addition & 1 deletion marisco/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ def generate_lookup_table(self,
def _create_lookup_table(self):
df = self.provider_lut_df
for _, row in tqdm(df.iterrows(), total=len(df), desc="Processing"):
# print(row[self.provider_col_to_match])
self._process_row(row)

def _process_row(self, row):
value_to_match = row[self.provider_col_to_match]
if isinstance(value_to_match, str): # Only process if value is a string
# If value is in fixes, use the fixed value
name_to_match = self.fixes.get(value_to_match, value_to_match)

result = match_maris_lut(self.maris_lut, name_to_match, self.maris_col_id, self.maris_col_name).iloc[0]
Expand Down
2 changes: 1 addition & 1 deletion nbs/api/utils.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -257,12 +257,12 @@
" def _create_lookup_table(self):\n",
" df = self.provider_lut_df\n",
" for _, row in tqdm(df.iterrows(), total=len(df), desc=\"Processing\"): \n",
" # print(row[self.provider_col_to_match])\n",
" self._process_row(row)\n",
"\n",
" def _process_row(self, row):\n",
" value_to_match = row[self.provider_col_to_match]\n",
" if isinstance(value_to_match, str): # Only process if value is a string\n",
" # If value is in fixes, use the fixed value\n",
" name_to_match = self.fixes.get(value_to_match, value_to_match)\n",
" \n",
" result = match_maris_lut(self.maris_lut, name_to_match, self.maris_col_id, self.maris_col_name).iloc[0]\n",
Expand Down
Loading

0 comments on commit 44e482a

Please sign in to comment.