diff --git a/forest/bonsai/simulate_gps_data.py b/forest/bonsai/simulate_gps_data.py index 2e3b77a3..52d2860d 100644 --- a/forest/bonsai/simulate_gps_data.py +++ b/forest/bonsai/simulate_gps_data.py @@ -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