Skip to content

Commit

Permalink
[python] Update add_new_dataframe doc re domain= (#3636)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnkerl authored Jan 28, 2025
1 parent af5b676 commit 80d601f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apis/python/src/tiledbsoma/_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
...
Expand Down

0 comments on commit 80d601f

Please sign in to comment.