Hi,
When I look at the Array schema produced by calling the from_pandas
Data Import method on my dataframe, I see that nullable=false
for all of my attributes. I am trying to create a Sparse Array, and would like to (for some of my attributes) allow nullable=true
because some measurements will not be known to me when I write to the array.
I don’t currently see an argument to pass to this function which will allow me to do this. I see the fillna
option, but it doesn’t look like what I need.
Can someone help me with this?
Here is how I currently save the dataframe as a tiledb Sparse Array:
tiledb.from_pandas("/path/2/Array",
df,
sparse=True,
index_dims=["dim1","dim2","dim3","dim4","dim5"],
column_types={"dim1":"dateTime64[ns]","dim2":np.float64, "dim2":"ascii", "dim3":"ascii", "dim5":"ascii"},
mode="ingest",
cell_order="row-major"
)
Thanks!
[Edit]
Following this guide from the tiledb website did not set
nullable=True
for my attribute. When I read in the array, the schema returns:
attrs=[
Attr(name='attr1', dtype='<U0', var=True, nullable=False, filters=FilterList([ZstdFilter(level=-1), ])),
Attr(name='attr2', dtype='float64', var=False, nullable=False, filters=FilterList([ZstdFilter(level=-1), ])),
],
But I want,
attrs=[
Attr(name='attr1', dtype='<U0', var=True, nullable=True, filters=FilterList([ZstdFilter(level=-1), ])),
Attr(name='attr2', dtype='float64', var=False, nullable=False, filters=FilterList([ZstdFilter(level=-1), ])),
],