Fetch Dataset

Markov allows you to fetch registered datasets using the following APIs. Know more about datasets in MarkovML in Datasets & Data Families

If you don't have any dataset registered with markov, follow Register Datasetsto register datasets with MarkovML.

You can use the datasets to do the following:

  • Get the feature column

  • Get the target column

  • Use the dataset segments (train/test/validate) as dataframes

  • Get the number of columns in the dataset / segment

  • Get the number of rows in the dataset / segment

  • Download the dataset as csv

Fetch registered dataset using dataset ID

import markov

dataset = markov.dataset.get_by_id(dataset_id="paste_dataset_id_here")

# get the feature columns
features = dataset.features

# get the target column
target = dataset.target

# get the segments
segments = dataset.segments

# get the train segment's dataframe
dataset_train_dataframe = dataset.train.as_df()

# get the number of rows of the train segment
train_num_rows = dataset.train.num_rows

# get the number of columns of the test segment
test_num_cols = dataset.test.num_cols

# download the test segment as csv
dataset.test.download_as_csv(filepath="test.csv")

Fetch registered dataset using dataset name

You can read more about the datasets API in our API reference herearrow-up-right

Last updated