Skip to content

Commit

Permalink
Merge pull request #371 from dataforgoodfr/349-fix_1_position_mmsi
Browse files Browse the repository at this point in the history
cas unique positon/mmsi dans batch
  • Loading branch information
ejamet73 authored Dec 16, 2024
2 parents efd7727 + 208e195 commit 27236ef
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion backend/bloom/tasks/create_update_excursions_segments.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,10 @@ def run():
df_end.sort_values("timestamp_end", inplace=True)
df_end.reset_index(drop=True, inplace=True)
# get every end entry but the last one ; each one of them will be the start point of a segment
df_start = df_end.iloc[0:-1, :].copy()
if len(df_end)>1:
df_start = df_end.iloc[0:-1, :].copy()
else:
df_start=df_end.copy()
for col in df_start.columns:
df_start.rename(columns={col: col.replace("end", "start")}, inplace=True)
vessel_last_segment = pd.DataFrame()
Expand Down

0 comments on commit 27236ef

Please sign in to comment.