Skip to content

Commit

Permalink
fix: fix iloc issues (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
cabreraalex authored Oct 5, 2023
1 parent 0b5ce8d commit 9eab05e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions zeno_client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,11 @@ def upload_dataset(
raise ValueError("ERROR: label_column not found in dataframe")

# Cast id_column to string to avoid issues with numeric IDs in database
df[id_column] = df[id_column].astype(str)
df.loc[:, id_column] = df[id_column].astype(str)

# Cast all object columns to string
object_columns = df.select_dtypes(include=["object"]).columns
df[object_columns] = df[object_columns].astype(str)
df.loc[:, object_columns] = df[object_columns].astype(str)

pa_table = pa.Table.from_pandas(df, preserve_index=False)

Expand Down Expand Up @@ -179,11 +179,11 @@ def upload_system(
raise ValueError("ERROR: output_column not found in dataframe")

# Cast id_column to string to avoid issues with numeric IDs in database
df[id_column] = df[id_column].astype(str)
df.loc[:, id_column] = df[id_column].astype(str)

# Cast all object columns to string
object_columns = df.select_dtypes(include=["object"]).columns
df[object_columns] = df[object_columns].astype(str)
df.loc[:, object_columns] = df[object_columns].astype(str)

pa_table = pa.Table.from_pandas(df, preserve_index=False)

Expand Down

0 comments on commit 9eab05e

Please sign in to comment.