This commit is contained in:
Liam Brydon
2025-11-05 13:30:03 +13:00
parent 5dc4c822c4
commit 9f0e396437

View File

@ -81,14 +81,6 @@ class Dataset(ABC):
def generate_dataset(reactions, *args, **kwargs):
pass
def at(self, position: int) -> Dataset:
"""See __getitem__"""
return self[position]
def limit(self, limit: int) -> Dataset:
"""See __getitem__"""
return self[:limit]
def __iter__(self):
"""Use polars iter_rows for iterating over the dataset"""
return self.df.iter_rows()
@ -180,7 +172,7 @@ class RuleBasedDataset(Dataset):
def structure_id(self, index: int):
"""Get the UUID of a compound"""
return self.df.item(index, "structure_id")
return self.item(index, "structure_id")
def X(self, exclude_id_col=True, na_replacement=0):
"""Get all the feature and trig columns"""