将大的2d-dict转换为scipy稀疏矩阵

时间:2017-04-21 17:56:28

标签: python numpy scipy

我有一个二维字典如下:

myDict = {
    "AIK":{"dfa":1,"bff":2,"mam":1},
    "BQQ":{"dic":5,"mam":8,"nzz":3},
    "ZZD":{"gox":6,"xee":2,"dic":9}
}

myDict.keys()的长度为5000,内部键的总和为10000 如何尽快将其转换为 scipy稀疏矩阵(5000,10000)

0 个答案:

没有答案