1

I am trying to work with the data available from: https://www.ncdc.noaa.gov/cdo-web/datasets and https://www1.ncdc.noaa.gov/pub/data/ghcn/daily/hcn/

enter image description here

It comes in a .dly file. Is there a way to open this with Python or Excel?

My ultimate goal is to have them in a file format that I can open with Python and Pandas.

0

These are fixed-width format files - each column is a specific number of characters wide. You can read it with pandas.read_fwf().

There is a readme.txt available at https://www1.ncdc.noaa.gov/pub/data/ghcn/daily/ for the GHCN data you linked, which includes a title, width and data type for each column. You can supply these to read_fwf() if the automatic width detection doesn't work. I think you have to add the column titles manually though.

edit: I have added an example snippet you can use at https://gitlab.com/snippets/1838910

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.