OSError:[WinError 193]%1不是运行python代码的有效Win32应用程序

2024-09-29 22:25:41 发布

您现在位置:Python中文网/ 问答频道 /正文

我试图使用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")

你知道为什么会这样吗?谢谢大家!


Tags: csvdfaddresscountlinkdiffelementword

热门问题