Comments (4)
Hi Marco, there has been a change in format for the header files (an extra line-break in the second row seems to be the problem). I would suggest we add a line to your code and then include it in the next release.
def get_min_max_timestamp_header_values(file_path):
with io.open(file_path, mode='r', newline=None) as fid:
lines = fid.readlines()
if not lines[1].isspace():
first = lines[1]
else:
first = lines[2]
last = lines[-1]
min_date = datetime.strptime(first[:16], '%Y/%m/%d %H:%M')
max_date = datetime.strptime(last[:16], '%Y/%m/%d %H:%M')
return min_date, max_date
Thanks again and please share more suggestions & improvements, when you find the time!
Cheers, Daniel
from ismn.
Hi Marco, you are right, get_min_max_timestamp_header_values is not working properly. However, if I apply your changes the tests no longer pass. We'll have to look into this, and get back to you. thanks!
from ismn.
@daberer we can close this issue, right?
from ismn.
@wpreimes seems to be fixed in #27, so I'll just close this 👍🏻
from ismn.
Related Issues (20)
- how to read the cosmos, fr_aqui and sosmania data? HOT 4
- add read() function HOT 1
- Initializing ISMN_reader errors "INFO:root:no header:" on static_variables.csv files
- Filter depths by depth_from only HOT 3
- Collection not created HOT 5
- setuptools_scm conflicts with other environments HOT 1
- ismn_data.collection.get_nearest_station HOT 5
- multiple variables in Sensor.eval
- ids and ISMN_Interface.metadata.index does not match HOT 1
- Update citations.txt HOT 1
- 'ISMN_Interface' object has no attribute 'collection' HOT 2
- how to use "ISMN_interface" to load data from several download zip files? HOT 2
- no 'display' is found in 'docs/examples/interface.ipynb' HOT 2
- "orig_flag" in "ts" via "ismn_data.read" HOT 2
- No 'variable' in station '3.09' and min_depth/max_depth don't work HOT 14
- ISMN v1.2.0: error when reading dataset HOT 3
- station plot improvement
- handle invalid folder names HOT 1
- Store metadata as parquet
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ismn.