Skip to content

Commit

Permalink
Relax from_pandas 'append' requirement for 'row_start_index'
Browse files Browse the repository at this point in the history
If the array is sparse then we don't need to require 'row_start_idx'.
  • Loading branch information
ihnorton committed Jun 11, 2021
1 parent d4c332d commit eb64ff6
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions tiledb/dataframe_.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,13 +290,7 @@ def _sparse_from_dtypes(dtypes, sparse=None):
return sparse if sparse is not None else False


def create_dims(
df,
index_dims,
tile=None,
full_domain=False,
filters=None,
):
def create_dims(df, index_dims, tile=None, full_domain=False, filters=None):
per_dim_tile = isinstance(tile, dict)
if tile is not None:
tile_values = tile.values() if per_dim_tile else (tile,)
Expand Down Expand Up @@ -441,7 +435,8 @@ def from_pandas(uri, dataframe, **kwargs):
write = False
elif mode == "append":
create_array = False
if not sparse and row_start_idx is None:
schema = tiledb.ArraySchema.load(uri)
if not schema.sparse and row_start_idx is None:
raise TileDBError(
"Cannot append to dense array without 'row_start_idx'"
)
Expand Down

0 comments on commit eb64ff6

Please sign in to comment.