Skip to content

Commit

Permalink
FutureWarning on pd.concat with empty df (#262)
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgeEfstathiadis authored Oct 28, 2024
1 parent b755818 commit 8ef5ada
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 8ef5ada

Please sign in to comment.