How can I create MODData with my DataFrame? #63
-
How can I create MODData with my DataFrame from my CSV file? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @mhlee216, You should first extract the structures (list of pymatgen structures or compositions) and targets (2D array) from the CSV file.
If you already have features you can pass them to the Finally, you can append other features to the featurized MODData by using join or concat: Let me know if this works. |
Beta Was this translation helpful? Give feedback.
Hi @mhlee216,
You should first extract the structures (list of pymatgen structures or compositions) and targets (2D array) from the CSV file.
Example: you read the csv as a dataframe df with columns "structures" and "e_form".
If you already have features you can pass them to the
df_featurized
keyword. Otherwise use data.featurize().Finally, you can append other features to the featurized MODData by using join or concat:
data.df_featurized = data.df_featurized.join(df_with_my_features)
. (Features are simply stored as a dataframe at …