Skip to content

Commit

Permalink
warning on pd.concat with empty df
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgeEfstathiadis committed Oct 26, 2024
1 parent 9989247 commit d71bb11
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion forest/bonsai/simulate_gps_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -1394,7 +1394,10 @@ def sim_gps_data(
obs = remove_data(all_traj, cycle, percentage, no_of_days)
obs_pd = prepare_data(obs, int(timestamp_s / 1000), tz_str)
obs_pd['user'] = user + 1
gps_data = pd.concat([gps_data, obs_pd])
if gps_data.empty:
gps_data = obs_pd
else:
gps_data = pd.concat([gps_data, obs_pd])

user += 1
ind += 1
Expand Down

0 comments on commit d71bb11

Please sign in to comment.