我被一个流程困住了,我有pandas dataframe,它有一个列作为我想要的索引。在
但是这个索引有Str+num类型。在
Index_H
['N0000', 'N0002', 'N0003', 'N0007', 'N0011', 'N0017', 'N0018', 'N0020', 'N0021', 'N0023', 'N0026', 'N0027', 'N0028', 'N0030', 'N0033', 'N0034', 'N0045', 'N0050', 'N0052', 'N0055', 'N0056', 'N0057', 'N0059']
这些索引值中的每一个都有一个关联的值行,对于每个N,跨度为344列(1*344)**** 我想将其转换为连续索引,并在缺少索引的行中添加0/Nan。在
使用
reindex
相关问题 更多 >
编程相关推荐