Can you please tell me if it is possible to get the name of an element in PubChemPy? I found in the documentation that can find the PubChem CID by name:
result = pcp.get_compounds('Glucose', 'name')
print(result)
[Compound(5793)]
But I need the other way around, by CID to find the name of the element. Maybe someone knows how to do this?
You can get the Compound with CID as follows:
then you can get all the information you need from this object. for example:
Check the docs for more info on the object attrs