I have a csv file in pandas Data Frame and while trying to check for existence of Customer Key, it gives me False even when the Customer key provided by user is valid and exists in the Data frame.
CustomerKey = input("enter the Customer Key: ") if CustomerKey in df['Customer Key']: print('True') else: print('False')the csv file has [660 rows x 7 columns]
buran write May-17-2021, 04:37 AM:
Please, use proper tags when post code, traceback, output, etc. This time I have added tags for you.
See BBcode help for more info.
Please, use proper tags when post code, traceback, output, etc. This time I have added tags for you.
See BBcode help for more info.