【发布时间】:2020-05-04 16:47:59
【问题描述】:
通常,将字典保存到 hdf 或 netCDF 很简单。例如here。 但是如何处理嵌套字典。例如以下字典:
test = {'temp': {'unit': 'K', 'data': [273.,298.,315.]}, 'press': {'unit': 'hPa', 'data': [800.,900.,1000.]}}
请注意,嵌套可以持续到多个级别。所以我需要 netCDF 或 hdf 组内的子组
【问题讨论】:
-
到目前为止你尝试了什么?
标签: python python-3.x dictionary netcdf hdf