Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raise ParserWarning not ParserError for Pandas > 1.3.5 #30

Merged
merged 2 commits into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ automatically with any of the installation instructions provided.

- SciPy >= 0.6.0

- pandas >= 0.17.0
- pandas >= 1.3.0

Development
-----------
Expand Down
3 changes: 1 addition & 2 deletions thermochem/janaf.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,14 @@ def __init__(self, rawdata_text):
self.description = self.rawdata_text.splitlines()[0]

# Read the text file into a DataFrame.
# TODO: adjust usecols length to be within bounds, Pandas deprecation
data = pd.read_csv(
StringIO(self.rawdata_text),
skiprows=2,
header=None,
delimiter=r'[\t\s]+',
engine='python',
names=['T', 'Cp', 'S', '[G-H(Tr)]/T', 'H-H(Tr)', 'Delta_fH', 'Delta_fG', 'log(Kf)'],
usecols=range(8) # Ignore extra columns -- those are caused by comments in the text file
on_bad_lines='warn'
)
self.rawdata = data

Expand Down
Loading