I am trying to run a python code using Python 3.8.6, but I get the following error:
OSError: [WinError 193] %1 is not a valid Win32 application
I am unable to resolve this error.
My code is the following:
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")
Any ideas on why this is the case? Thank you!