Skip to content

Instantly share code, notes, and snippets.

@vilterp
Created July 16, 2014 15:36
Show Gist options
  • Save vilterp/95babfb6f256654f78fd to your computer and use it in GitHub Desktop.
Save vilterp/95babfb6f256654f78fd to your computer and use it in GitHub Desktop.
from netCDF4 import Dataset
ds = Dataset('Wheat.NetCDF')
ds
hwam = ds.variables['HWAM']
hwam.dimensions
hwam.shape
data = hwam[:]
reshaped = data.reshape(150, 8)
reshaped
import pandas as pd
df = pd.DataFrame(data=reshaped)
df[0]
df[0].plot()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment