Dataset load from sqlite / split error

Hello - trying to load a dataset from a sqlite table. dataset loads as follows no problem:
ds = Dataset.from_sql(SQL_STATEMENT, conn)

ds object looks like this after import

Dataset({
features: [‘col1’, ‘label’],
num_rows: 1000
})

but then when i try and split into train, test, val splits I get a "list object has not attribute ‘train_test_split’

train_testvalid = ds[col1’].train_test_split(test_size=0.2)

test_valid = train_testvalid[col1].train_test_split(test_size=0.5)

Can someone pls help me out here?

ds["col1"] returns a Python list, hence the error. To avoid it, use train_testvalid = ds.select_columns("col1").train_test_split(test_size=0.2) instead.