Skip to content

Commit

Permalink
Fix wrong order of risma columns, update notebook (#70)
Browse files Browse the repository at this point in the history
* Fix wrong order of rismn columns, update notebook

* Delete file

* Update changelog
  • Loading branch information
wpreimes authored Jun 16, 2023
1 parent bcb9c37 commit 66d7980
Show file tree
Hide file tree
Showing 3 changed files with 263 additions and 119 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ Changelog
Unreleased changes in master branch
===================================

-

Version 1.3.4
=============

- Fixed bug with parsing sensor files for RISMA network in "header & files" format

Version 1.3.3
Expand Down
365 changes: 252 additions & 113 deletions docs/examples/interface.ipynb

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions src/ismn/filehandlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -601,9 +601,9 @@ def __read_format_header_values(self) -> pd.DataFrame:
names=names,
usecols=[0, 1, 2, 3, 4],
skiprows=1,
sep=" ",
#sep=" ",
low_memory=False,
delim_whitespace=False,
delim_whitespace=True,
)

def __read_csv(self, names=None, usecols=None, skiprows=0, **kwargs):
Expand Down Expand Up @@ -632,9 +632,7 @@ def readf(
skiprows=skiprows,
parse_dates=[[0, 1]],
engine="c",
delim_whitespace=None,
sep=None,
low_memory=None,
**kwargs
):
try:
return pd.read_csv(
Expand All @@ -644,8 +642,9 @@ def readf(
names=names,
parse_dates=parse_dates,
engine=engine,
**kwargs
)
except pd.errors.ParserError as text_exception:
except pd.errors.ParserError:
return pd.read_csv(
filepath_or_buffer=f,
skiprows=skiprows,
Expand All @@ -654,6 +653,7 @@ def readf(
delim_whitespace=True,
parse_dates=parse_dates,
engine="c",
**kwargs
)

if self.root.zip:
Expand Down

0 comments on commit 66d7980

Please sign in to comment.