我试图使用python 3.8.6运行python代码,但出现以下错误:
OSError: [WinError 193] %1 is not a valid Win32 application
我无法解决此错误
我的代码如下:
import os
print(os.getcwd())
import pandas as pd
import numpy as np
dfTextonly = pd.DataFrame(pd.read_csv('internal_all_txt.csv', low_memory=False, header=1))
dfTextonly = dfTextonly[['Address','Status Code', 'Word Count' ,'Outlinks', 'Unique Outlinks', 'Inlinks', 'Unique Inlinks',"Canonical Link Element 1"]].copy()
dfJS = pd.DataFrame(pd.read_csv('internal_all_js.csv', low_memory=False, header=1))
dfJS = dfJS[['Address','Status Code', 'Word Count', 'Outlinks', 'Unique Outlinks', 'Inlinks', 'Unique Inlinks',"Canonical Link Element 1"]].copy()
df = pd.merge(dfTextonly, dfJS, left_on='Address', right_on='Address', how='outer')
df['Diff Wordcount'] = df['Word Count_y'] - df['Word Count_x']
df['Diff Outlinks'] = df['Outlinks_y'] - df['Outlinks_x']
df['Diff Unique Outlinks'] = df['Unique Outlinks_y'] - df['Unique Outlinks_x']
df['Diff Inlinks'] = df['Unique Inlinks_y'] - df['Unique Inlinks_x']
df["Canonicals are equal"] = np.where((df["Canonical Link Element 1_y"] == df["Canonical Link Element 1_x"]), "yes", "no")
df.to_excel("rendering-test.xlsx")
你知道为什么会这样吗?谢谢大家!
我不能添加这样的评论
尝试卸载numpy。有时它有多个版本
参考资料:-Python error: OSError: [WinError 193] %1 is not a valid Win32 application
相关问题 更多 >
编程相关推荐