“Cómo leer el archivo HDF5 en Python” Código de respuesta

Cómo cargar HDF5 en Python

# Reading and writing netCDF files with xarray requires scipy or the netCDF4-Python library
# to be installed (the latter is required to read/write netCDF V4 files and use the
# compression options described below).


# 1) We can load netCDF files to create a new Dataset using open_dataset():

ds_disk = xr.open_dataset("saved_on_disk.nc")

# print data information
ds_disk
    
    
# 2) We can save a Dataset to disk using the Dataset.to_netcdf() method:
ds.to_netcdf("saved_on_disk.nc")


# Datasets have a Dataset.close() method to close the associated netCDF file.
# However, it’s often cleaner to use a with statement:

# this automatically closes the dataset after use
with xr.open_dataset("saved_on_disk.nc") as ds:
     print(ds.keys())
    
    
  
Mckynde

Cómo leer el archivo HDF5 en Python

store = HDFStore('dataset.h5')
#import hdfStore from pandas
Ugly Unicorn

Respuestas similares a “Cómo leer el archivo HDF5 en Python”

Preguntas similares a “Cómo leer el archivo HDF5 en Python”

Más respuestas relacionadas con “Cómo leer el archivo HDF5 en Python” en Python

Explore las respuestas de código populares por idioma

Explorar otros lenguajes de código