CSV column
Name
0 *****
1 *****
2 -
3 -
Trying to check if the strings '*****' and '-' in a specific column in a CSV file however, the checking was not done on the 2nd condition i.e. '-'. Here's the problem:
df = pd.read_csv("datafile.csv")
isCrypted = next(('Crypted' for Name in df["Name"] if((Name == '*****') or (Name == '-')) and all(Name == df["Name"][0] for Name in df["Name"] )), 'notCrypted')
Output -
notCrypted
Desired output -
Crypted