Closed djbower closed 7 months ago
Based on the above, Pandas 1.3.5 is the last version that is supported by thermochem. Perhaps this note could be added to the README dependencies for clarity before a fix is eventually issued? (0.17.0<= pandas <= 1.3.5)
>>> from thermochem import janaf
>>> db = janaf.Janafdb()
>>> db.getphasedata(formula='H2O', phase='l')
/Users/dan/Programs/atmodeller/.venv/lib/python3.10/site-packages/pandas/util/_decorators.py:311: FutureWarning: Defining usecols with out of bounds indices is deprecated and will raise a ParserError in a future version.
return func(*args, **kwargs)
<thermochem.janaf.JanafPhase object at 0x7fabc9a33280>
>>>
Yes. I think it would be good to fix this, however, since most folks will be using newer Pandas and with a code modification it should be fine to use a newer Pandas. Would you want to submit a pull request for this too?
Yes, I'm happy to contribute a pull request once I have something working and tested. I've rolled back to an earlier version of Pandas for my current projects due to time constraints, but I will endeavour to provide a fix soon. Thanks.
Fix provided in pull request #30.
A note is already in the code about this (janaf.py, line 80), and indeed the latest versions of Pandas are not compatible with thermochem. In some cases the data can still be parsed (like H2O in the gas phase), but H2O in the liquid phase raises a parser error. A simple example is below. (Also see https://github.com/pandas-dev/pandas/issues/48127)