python function call giving bot error

Badge +1

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



2 replies

Userlevel 1
Badge +3

Hi @bhargavi.B ,


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



Badge +1

Hi @DK 964 ,

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….