Skip to content

Commit 809f0f8

Browse files
committed
fix: handle FutureWarning when concating dfs
1 parent 64553ef commit 809f0f8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

mapswipe_workers/mapswipe_workers/utils/spatial_sampling.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,9 @@ def spatial_sampling(df, interval_length):
143143

144144
if interval_length:
145145
sequence_df = filter_points(sequence_df, interval_length)
146+
# below line prevents FutureWarning
147+
# (https://stackoverflow.com/questions/73800841/add-series-as-a-new-row-into-dataframe-triggers-futurewarning)
148+
sequence_df["is_pano"] = sequence_df["is_pano"].astype(bool)
146149
sampled_sequence_df = pd.concat([sampled_sequence_df, sequence_df], axis=0)
147150

148151
# reverse order such that sequence are in direction of travel

0 commit comments

Comments
 (0)