2024-05-18 23:26:43 发布
网友
目前,我可以查看HDF5存储中的每个表以及该表中的数据。你知道吗
with pd.HDFStore(left_file, 'r') as hdf: tables = hdf.keys() for table in tables: print(hdf.select('{0}'.format(table))
但是我怎样才能得到每个表中列的列表呢?你知道吗
多亏了这些视频,我对熊猫的了解才有了一点提高。https://www.youtube.com/user/DrNoureddinSadawi/videos
这是我的解决办法。它列出了表及其列标题。你知道吗
with pd.HDFStore(hdfs_file, 'r') as hdf: tables = hdf.keys() for table in tables: print(table) table_data = hdf.get(table) column_list = table_data.columns.values for column in column_list: print(" - {0}".format(column))
多亏了这些视频,我对熊猫的了解才有了一点提高。https://www.youtube.com/user/DrNoureddinSadawi/videos
这是我的解决办法。它列出了表及其列标题。你知道吗
相关问题 更多 >
编程相关推荐