File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
mapswipe_workers/mapswipe_workers/utils Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -143,9 +143,10 @@ 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 )
146+ if "is_pano" in sequence_df .columns :
147+ # below line prevents FutureWarning
148+ # (https://stackoverflow.com/questions/73800841/add-series-as-a-new-row-into-dataframe-triggers-futurewarning)
149+ sequence_df ["is_pano" ] = sequence_df ["is_pano" ].astype (bool )
149150 sampled_sequence_df = pd .concat ([sampled_sequence_df , sequence_df ], axis = 0 )
150151
151152 # reverse order such that sequence are in direction of travel
You can’t perform that action at this time.
0 commit comments