Dataset on Redivis are the entity where data is stored. Datasets are made up of tables, non-tabular files, and various metadata. Datasets can be owned by a user or organization, and are version controlled.
Constructors
Examples
dataset = redivis.organization("Demo").dataset("US Fires")# Will throw an error if the dataset doesn't exists# Can first call dataset.exists() to check for existencedataset.get()print(dataset.properties)
dataset = redivis.user("my_username").dataset("My dataset")dataset = dataset.create_next_version()# We can upload new data to existing tables once we have a "next" versionwithopen("data.csv", "rb")as file: dataset.table("My table").upload("data.csv").upload_file(file)dataset.release()
dataset = redivis.organization("Demo").dataset("CMS 2014 Medicare Data")# The home_health_agencies table is assumed to be within the dataset,# since it isn't otherwise qualifiedquery = dataset.query(""" SELECT * FROM home_health_agencies WHERE state = 'CA'""")print(query.to_dataframe())