From 7e735543b979ea358c99f9ae9ad21f82c58cb402 Mon Sep 17 00:00:00 2001 From: Szymon Bartanowicz Date: Tue, 14 May 2024 22:29:02 +0200 Subject: [PATCH] fix --- model.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/model.py b/model.py index 08e7a09..1cd25a8 100644 --- a/model.py +++ b/model.py @@ -51,10 +51,14 @@ import tensorflow as tf data = pd.read_csv('./data/train.csv') -features_idx = [1, 4, 7] # Sex, Age, BodyweightKg -target_idx = 25 # TotalKg +print(data.columns) # Debugging: Print DataFrame columns -data = data.iloc[:, [1, 4, 7, 25]].dropna() +# Assuming the relevant columns are at these indexes +features_idx = [1, 4, 7] # Sex, Age, BodyweightKg +target_idx = 24 # TotalKg + +# Dropping rows with NaN values from relevant columns +data = data.iloc[:, [1, 4, 7, 24]].dropna() features = data.iloc[:, features_idx] target = data.iloc[:, target_idx]