From d71bb112648c1775db5b05ac722c49d1ca4929d1 Mon Sep 17 00:00:00 2001 From: GeorgiosEfstathiadis Date: Sat, 26 Oct 2024 17:14:06 -0400 Subject: [PATCH] warning on pd.concat with empty df --- forest/bonsai/simulate_gps_data.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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