Is there anyway I can make the below work? e.g. by changing dtype or suggesting a dtype?
COLUMNS = ["name", "ages"]; data = [["Raj", [31, 32]], ["Jay", [21, 22]]]
df = pd.DataFrame(data=data, columns=COLUMNS)
uri = "tile-data.tiledb"
tiledb.from_pandas(uri, df)
The error I get is:
Traceback (most recent call last):
File "trial.py", line 24, in <module>
tiledb.from_pandas(uri, df)
File "/opt/conda/lib/python3.8/site-packages/tiledb/dataframe_.py", line 452, in from_pandas
column_infos = _get_column_infos(
File "/opt/conda/lib/python3.8/site-packages/tiledb/dataframe_.py", line 176, in _get_column_infos
column_infos[name] = ColumnInfo.from_values(column, varlen_types)
File "/opt/conda/lib/python3.8/site-packages/tiledb/dataframe_.py", line 100, in from_values
raise NotImplementedError(
NotImplementedError: mixed inferred dtype not supported
I want to be able to use that within the context of a ML application where I load by βrowβ or batch. Something like
# Ingest
with tiledb.open(uri) as tiledb_array:
print(tiledb_array[0]["name"]) # should give me 'Raj'
print(tiledb_array[0]["ages"]) # should give me [31, 32]