|
@@ -425,7 +425,7 @@ class ZipCSVProcessor:
|
|
|
|
|
|
# Fill potential NaNs introduced by reindexing or missing data
|
|
# Fill potential NaNs introduced by reindexing or missing data
|
|
# Choose appropriate fill strategy (e.g., 0, forward fill, or leave as NaN)
|
|
# Choose appropriate fill strategy (e.g., 0, forward fill, or leave as NaN)
|
|
- df_merged.fillna(0.0, inplace=True) # Example: fill with 0.0
|
|
|
|
|
|
+ # df_merged.fillna(0.0, inplace=True) # Example: fill with 0.0
|
|
|
|
|
|
# Save the final merged DataFrame
|
|
# Save the final merged DataFrame
|
|
df_merged.to_csv(output_path, index=False, encoding="utf-8")
|
|
df_merged.to_csv(output_path, index=False, encoding="utf-8")
|
|
@@ -567,7 +567,7 @@ class ZipCSVProcessor:
|
|
# df_vehicle.dropna(subset=[col for col in required_pos if col in df_vehicle.columns], inplace=True)
|
|
# df_vehicle.dropna(subset=[col for col in required_pos if col in df_vehicle.columns], inplace=True)
|
|
|
|
|
|
try:
|
|
try:
|
|
- df_vehicle["simTime"] = np.round(np.arange(df_raw["simTime"].tolist()[0], df_raw["simTime"].tolist()[0] + 0.01*(len(df_vehicle) - 1), 0.01), 2)
|
|
|
|
|
|
+ df_vehicle["simTime"] = np.round(np.arange(df_raw["simTime"].tolist()[0], df_raw["simTime"].tolist()[0] + 0.01*(len(df_vehicle)), 0.01), 2)
|
|
df_vehicle["simFrame"] = np.arange(1, len(df_vehicle) + 1)
|
|
df_vehicle["simFrame"] = np.arange(1, len(df_vehicle) + 1)
|
|
df_vehicle["playerId"] = int(player_id)
|
|
df_vehicle["playerId"] = int(player_id)
|
|
df_vehicle['playerId'] = pd.to_numeric(df_vehicle['playerId']).astype(int)
|
|
df_vehicle['playerId'] = pd.to_numeric(df_vehicle['playerId']).astype(int)
|