当我使用pandas时,代码运行得很好(但是非常慢), 当使用modin和concat dataframe时,会显示一个错误
contador = 0
df = pd.DataFrame()
data = pd.DataFrame()
for file in range(len(files)):
usefile = files[file]
print("Valor Numero :" + str(contador) + " de un total de " + str((len(files))) + " archivos")
print("Existe " + str(usefile) + " añadiendolo al DataFrame" )
contador = contador +1
ruta = mainpath + "/" + str(usefile)
df = pd.read_csv(ruta)
datos[usefile] = df
data = pd.concat(datos.values(), keys=datos.keys() , sort='True')
基于}参数可订阅的假设,Modin(版本0.4)无意中还不支持这种行为。在
keys
和{在Modin中修复代码的最后一行之前,可以更改代码中的最后一行作为解决方法:
我在Modin repo上创建了一个问题来跟踪问题:https://github.com/modin-project/modin/issues/557
相关问题 更多 >
编程相关推荐