How can I create MODData with my DataFrame? #63
|
How can I create MODData with my DataFrame from my CSV file? |
Answered by
ppdebreuck
Oct 17, 2021
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. |
1 reply
Answer selected by
mhlee216
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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_featurizedkeyword. 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 …