Explicitly specify grouping column in dataframe iteration

This commit is contained in:
2026-07-22 19:47:11 +02:00
parent 22d4af292c
commit 24ce8dad60
+1 -1
View File
@@ -70,7 +70,7 @@ for bus, df in DATA.items():
df = df.sort_values(['Formatted_ID', 'Timestamp'], kind='stable')
grouped = {}
for can_id, group in df.groupby('Formatted_ID'):
for can_id, group in df.groupby(by='Formatted_ID'):
byte_cols = [f"b{i}" for i in range(8) if f"b{i}" in group.columns]
if not group.empty and len(byte_cols) > 0:
arr = group[byte_cols].to_numpy(dtype=np.float32, copy=False)