SampleDataset#
- class SampleDataset(dataset: Dataset, df: DataFrame)#
Bases:
DatasetA specialized Dataset class for representing a sample of records.
This class is typically instantiated via the sample method of the base Dataset. It maintains a reference to the original dataset’s metadata while holding only a sample of the data.
- Parameters:
dataset (Dataset) – The parent Dataset instance from which this sample was derived.
df (DataFrame) – The sampled data records.
- Variables:
all_sample_datasets (list) – A class-level list containing all instantiated SampleDataset objects.
Methods
- reload_df()#
Unlike the base Dataset class, a SampleDataset cannot easily “reload” from disk because it is a result of an in-memory sampling operation. Thus, consider re-running the logic from Dataset.sample instead.
- Returns:
ITableDF – The currently held sampled data.
Attributes
Access the sampled data.
- all_sample_datasets = []#
- df#
Access the sampled data.
- Returns:
ITableDF – The sampled data.