I am trying to run a specific line of script based on a cell value in an excel data frame. I basically want to conduct the calculation if a specific cell is not empty. For this, I used the code below:
check=df.iat[1,13] #I am reading the value of the cell
if check is not (None, "[nan]"):
print("cell is not empty")
when I print the value of check (the cell value), I get 'nan'. However, the if statement is not working as nothing is printed.
I am not sure why is this happening and I will appreciate any hints. Thanks!