Hi Everyone,
I am trying to Import .py file and Execute function using A360 it is throwing BOT error but same python code is perfectly working fine in pycharm editor, Any suggestions will be highly appreciated
![](https://uploads-us-west-2.insided.com/automationanywhere-en/attachment/db69eeb0-3ddb-46c0-9e3d-31eb02818fe9.png)
![](https://uploads-us-west-2.insided.com/automationanywhere-en/attachment/18284db0-fb1c-40bc-84f0-b3d9489e5d2d.png)
![](https://uploads-us-west-2.insided.com/automationanywhere-en/attachment/b5241087-a993-4eec-acf5-aa3f2dddb6e0.png)
Hi Everyone,
I am trying to Import .py file and Execute function using A360 it is throwing BOT error but same python code is perfectly working fine in pycharm editor, Any suggestions will be highly appreciated
Hi
Try with below code.
********************************
import pandas as pd
def CompareExcel():
df1 = pd.read_csv('Input_Dump - Copy1.csv', encoding='cp1252')
df2 = pd.read_csv('Input_Dump - Copy2.csv', encoding='cp1252')
# Perform comparison
result = df1[~df1.apply(tuple).isin(df2.apply(tuple))]
# Export result to 'Output.csv'
result.to_csv('Output.csv', index=False)
return result
# Call the function
output_data = CompareExcel()
print(output_data) # Optional: Print the result for verification
************************************
Hi
Thanks for your Investigation,
As suggested, I tried below Python Snippet but still same BOT error when i am trying to execute same code snippet in PyCharm it is perfectly working fine snapshots as below, Thanks in advance….
Hello. It’s because you don’t have pandas saved in the correct directory. When you create a py script in pycharm it downloads all dependencies locally to that project. In order to have AA run your pyscript all dependencies have to be saved globally. I think you can open cmd and run a line like “pip install pandas” on your user level and you should be good to go. Should be stored in this location I think c:\program files\python38\lib\site-packages. Hopefully this helps!
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.