'How can I return a string from one DataFrame, using a string from another?
Solution 1:[1]
Would you like to return the atom row from the second dataframe using the coordinates from the row of the first dataframe? If so, you can use something like this:
df2.loc[df2['x'] == x_value_from_df1]
This will return the row from the second dataframe where the x column is equal to the value that you can supply from the first dataframe (x_value_from_df1). You can supply either the x, y or z values and this will work as well, as there seems to be no repeats in the link that you provided.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Dharman |
