Created
July 31, 2021 13:37
-
-
Save Drvanon/0720fb6acc240ab15c680486b9d6e79e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/export/home/ccprakt3/miniconda3/lib/python3.9/site-packages/pandas/core/frame.py:3607: SettingWithCopyWarning: | |
A value is trying to be set on a copy of a slice from a DataFrame. | |
Try using .loc[row_indexer,col_indexer] = value instead | |
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy | |
self._set_item(key, value) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rows = [{'a': 1, 'b': 2}, {'a':3, 'b':4}] | |
df = pd.DataFrame(rows) | |
df = df.set_index(['mutant', 'method', 'state id', 'transition id']) | |
df.sort_index(level=['mutant','method', 'state id', 'transition id'], inplace=True) | |
orb_map = np.loadtxt('../F/BLYP-B3LYP-orbital-overlap.txt', skiprows=1) | |
df1 = df.loc[("NH2", "BLYP"), :] | |
df2 = df.loc[("NH2", "B3LYP"), :] | |
df1.loc[:, "mapped occupied"] = df1.loc[:,"occupied"].map(lambda o: int(orb_map[orb_map == o][1])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment