简体   繁体   English

导入聚合时 DLL 加载失败:无法找到指定的模块 pyhton pandas excel 文件合并

[英]DLL load failed while importing aggregations: The specified module could not be found pyhton pandas excel files merging

I am trying to merge multiple excel files in folder to one using pandas, iam getting above error我正在尝试使用 Pandas 将文件夹中的多个 excel 文件合并为一个文件,但出现上述错误

import os
import pandas as pd
import numpy as np

path = os.getcwd("C:/Users/SHARAN/Desktop/EXCELFILES/")
files = os.listdir(path)
files
print (files)
files = [f for f in files if f[-4:] == 'xlsx']
files
df=pd.DaataFrame()
for f in files:
    data = pd.read_excel(f, 'Sheet1')
    df = df.append(data)

writer=pd.ExcelWriter ("CosolidateFile.xlsx")
df.to_excel(writer,"Sheet1")
writer.save()

Error Messeage :错误消息:

> Traceback (most recent call last):   File
> "C:\Users\SHARAN\Desktop\ExcelMerge2.py", line 2, in <module>
>     import pandas as pd   File "C:\Python\lib\site-packages\pandas\__init__.py", line 55, in <module>
>     from pandas.core.api import (   File "C:\Python\lib\site-packages\pandas\core\api.py", line 29, in <module>
>     from pandas.core.groupby import Grouper, NamedAgg   File "C:\Python\lib\site-packages\pandas\core\groupby\__init__.py", line 1,
> in <module>
>     from pandas.core.groupby.generic import DataFrameGroupBy, NamedAgg, SeriesGroupBy   File
> "C:\Python\lib\site-packages\pandas\core\groupby\generic.py", line 60,
> in <module>
>     from pandas.core.frame import DataFrame   File "C:\Python\lib\site-packages\pandas\core\frame.py", line 124, in
> <module>
>     from pandas.core.series import Series   File "C:\Python\lib\site-packages\pandas\core\series.py", line 4572, in
> <module>
>     Series._add_series_or_dataframe_operations()   File "C:\Python\lib\site-packages\pandas\core\generic.py", line 10349, in
> _add_series_or_dataframe_operations
>     from pandas.core.window import EWM, Expanding, Rolling, Window   File "C:\Python\lib\site-packages\pandas\core\window\__init__.py",
> line 1, in <module>
>     from pandas.core.window.ewm import EWM  # noqa:F401   File "C:\Python\lib\site-packages\pandas\core\window\ewm.py", line 5, in
> <module>
>     **import pandas._libs.window.aggregations as window_aggregations ImportError: DLL load failed while importing aggregations: The
> specified module could not be found.**

I had the same error.我有同样的错误。 I just uninstall Python3.8 and install Anaconda Python(3.7).我只是卸载 Python3.8 并安装 Anaconda Python(3.7)。 I don't exactly what the problem is.我不完全是什么问题。 But I guess 3.8 may have a dependency problem.但我猜 3.8 可能有依赖性问题。 If you use Python3.8.如果你使用 Python3.8。 You can try this way.你可以试试这个方法。

Try to use an older version尝试使用旧版本

pip uninstall pandas
pip install pandas==0.25.3

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 导入错误:导入聚合时 DLL 加载失败:找不到指定的模块 - ImportError: DLL load failed while importing aggregations: The specified module could not be found 导入 pyrfc 时 DLL 加载失败:找不到指定的模块 - DLL load failed while importing pyrfc: The specified module could not be found DLL加载失败:导入scipy时找不到指定的模块 - DLL load failed: The specified module could not be found while importing scipy 导入 Cartopy 时 ImportError: DLL load failed while importing trace: The specified module could not be found - When importing Cartopy ImportError: DLL load failed while importing trace: The specified module could not be found 导入 Dash 时出错:“ImportError: DLL load failed while importing _brotli: The specified module could not be found.” - Error when importing Dash: "ImportError: DLL load failed while importing _brotli: The specified module could not be found." 加载 psycopg2 模块时出错:导入 _psycopg 时 DLL 加载失败:找不到指定的模块 - Error loading psycopg2 module: DLL load failed while importing _psycopg: The specified module could not be found cx_Freeze ImportError: DLL load failed while importing _ctypes: 找不到指定的模块 - cx_Freeze ImportError: DLL load failed failed while importing _ctypes: The specified module could not be found DLL load failed while importing winpty: the specified procedure could not be found - DLL load failed while importing winpty: The specified procedure could not be found (ibm_db) ImportError: DLL load failed while importing ibm_db: The specified module could not be found - (ibm_db) ImportError: DLL load failed while importing ibm_db: The specified module could not be found 导入错误:导入 _openmp_helpers 时 DLL 加载失败:找不到指定的模块 - ImportError: DLL load failed while importing _openmp_helpers: The specified module could not be found
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM