Datasets
Import, export, generate
count = st.dataset.upload_csv(ds.id, "./entries.csv", split="train")
path = st.dataset.download_csv(ds.id, "./out.csv")
new_entries = st.dataset.generate(
ds.id,
count=50,
prompt="Generate refund scenarios with amount > $500",
)Upload CSV
count = st.dataset.upload_csv(dataset_id, "./entries.csv", split="train")CSV header must match existing dataset columns. Create columns first with st.dataset.create(..., columns=[...]) — see manage. Returns the number of rows inserted.
Download CSV
path = st.dataset.download_csv(dataset_id, "./out.csv", split=None)Pass split="test" to export only one split. Returns the resolved Path.
Synthetic generation
generate synthesizes new entries that match the dataset's schema and style.
entries = st.dataset.generate(
dataset_id,
count=50,
prompt="Generate refund scenarios where the customer is upset and the amount is over $500",
seed_entry_ids=["ent_abc", "ent_def"],
)| Parameter | Default | Description |
|---|---|---|
count | 10 | New entries to generate. |
prompt | None | Natural-language steering. |
seed_entry_ids | None | Existing entries to ground the generator on. Keeps the synthetic batch on-distribution. |
Generated rows are appended and returned as a list of DatasetEntry.