/datasets/create
Create a dataset from a Pandas DataFrame.
public
private
organization
monetized
Path to the file in Ouro's database
File name with extension
/datasets/{id}
Retrieves dataset details as a Pydantic model instance.
/datasets/{id}/data
Retrieves the data within the dataset identified by the provided ID.
/datasets/{id}/schema
Retrieves the underlying schema for the dataset with the specified ID. Retrieves the schema of a specific dataset. Specifies the columns of the dataset and their datatype, as well as any foreign key and index information.
/datasets/{id}/stats
Retrieves information about the dataset.
/datasets/{id}/permissions
Retrieves the current access permissions for the dataset with the specified ID.
/datasets/{id}
Updates the dataset with new values for the specified dataset ID. Data is updated by overwriting the existing data.
public
private
organization
monetized
pay-to-unlock
pay-per-use
Pricing strategy. Visibility must monetized to set monetization
/datasets/{id}
Deletes the dataset identified by the provided ID.
from ouro import Ouro
import pandas as pd
ouro = Ouro(api_key="your_api_key")
data = pd.DataFrame(
[
{"name": "Bob", "age": 30},
{"name": "Alice", "age": 27},
{"name": "Matt", "age": 26},
]
)
res = ouro.datasets.create(
data=data,
name="your_dataset_name",
description="your_dataset_description",
visibility="private",
)
id = "3d82308b-0747-45e4-8045-c8f7d2f6c0a6" # penguins dataset
# Retrieve a dataset
dataset = ouro.datasets.retrieve(id)
# Option 1: Load dataset's data as json using the table name
data = ouro.datasets.load("penguins")
# Option 2: Read dataset's data as a Pandas DataFrame
df = ouro.datasets.query(id)
schema = ouro.datasets.schema(id)
stats = ouro.datasets.stats(id)
permissions = ouro.datasets.permissions(id)
id = "3d82308b-0747-45e4-8045-c8f7d2f6c0a6
data_update = pd.DataFrame([
{"name": "Bob", "age": 30},
{"name": "Alice", "age": 27},
{"name": "Matt", "age": 26},
])
update = {
"visibility": "private",
"data": data_update,
}
data = ouro.datasets.update("018f86da-b1be-7099-9556-fe88fb6882c3", **update)
data = ouro.datasets.delete(id)