From 80d601f8b689297fae9ef6b0bbbacbda15d1e109 Mon Sep 17 00:00:00 2001 From: John Kerl Date: Tue, 28 Jan 2025 12:49:03 -0500 Subject: [PATCH] [python] Update `add_new_dataframe` doc re `domain=` (#3636) --- apis/python/src/tiledbsoma/_collection.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apis/python/src/tiledbsoma/_collection.py b/apis/python/src/tiledbsoma/_collection.py index 1435aa5ddd..6c449fac5a 100644 --- a/apis/python/src/tiledbsoma/_collection.py +++ b/apis/python/src/tiledbsoma/_collection.py @@ -240,12 +240,13 @@ def add_new_dataframe( :meth:`DataFrame.create` unchanged. Examples: + >>> import tiledbsoma >>> import pandas as pd >>> import pyarrow as pa >>> df = pd.DataFrame(data={"soma_joinid": [0, 1], "col1": [1, 2], "col2": [3, 4]}) ... with tiledbsoma.Collection.create("/tmp/collection") as soma_collection: ... soma_df = soma_collection.add_new_dataframe( - ... "a_dataframe", schema=pa.Schema.from_pandas(df) + ... "a_dataframe", schema=pa.Schema.from_pandas(df), domain=[[0,9]], ... ) ... soma_df.write(pa.Table.from_pandas(df, preserve_index=False)) ...