Created
August 21, 2015 15:51
-
-
Save seumasmorrison/9d5424d3040b013b41af to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import pandas as pd | |
os.chdir('D://J_Morrison//Data//Datawell//Siadar_HebMarine1') | |
wave_height_dfs = [] | |
for year in os.listdir('.'): | |
os.chdir(year) | |
for month in os.listdir('.'): | |
os.chdir(month) | |
wave_height_dfs.append(pd.read_hdf('buoy_data.h5','wave_height')) | |
os.chdir('..') | |
os.chdir('..') | |
wave_heights = pd.concat(wave_height_dfs) | |
sorted_wave_heights = wave_heights.sort_index() | |
sorted_wave_heights.to_csv('siadar_wave_heights.csv') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment