malt.data.dataset.from_pandas
- malt.data.dataset.from_pandas(dataframe, smiles_column: str, y_column: str)[source]
Read dataset from pandas DataFrame.
- Parameters
dataframe (pandas.DataFrame) – The dataframe to read from.
smiles_column (str) – The name of the column containing SMILES string.
y_column (str) – The name of the column containing measurement.
Examples
>>> import pandas as pd >>> dataframe = pd.DataFrame.from_dict( ... {"SMILES": ["C", "CC"], "Y": [1, 2]}, ... ) >>> dataset = from_pandas(dataframe, "SMILES", "Y")