Skip to content

Commit

Permalink
fix: allow upload string list (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
cabreraalex authored Dec 8, 2023
1 parent 36c69fc commit 9eae224
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "zeno-client"
version = "0.1.13"
version = "0.1.14"
description = "Python client for creating new Zeno projects and uploading data."
authors = ["Zeno Team <[email protected]>"]
license = "MIT"
Expand Down
14 changes: 7 additions & 7 deletions zeno_client/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,17 @@ def df_to_pa(df: pd.DataFrame, id_column: str) -> pa.Table:

if pa.types.is_struct(col_type):
new_column = array_to_utf8_json_array(data)
elif pa.types.is_list(col_type):
if pa.types.is_integer(col_type.value_type) or pa.types.is_floating(
col_type.value_type
):
new_column = data
else:
new_column = array_to_utf8_json_array(data)
elif (
pa.types.is_integer(col_type)
or pa.types.is_floating(col_type)
or pa.types.is_boolean(col_type)
or (
pa.types.is_list(col_type)
and (
pa.types.is_integer(col_type.value_type)
or pa.types.is_floating(col_type.value_type)
)
)
):
new_column = data
else:
Expand Down

0 comments on commit 9eae224

Please sign in to comment.