On my dataset, i have a column as below:
hist = ['A','FAT',nan,'TAH']
Then i should use a loop to obtain the cells which contains an 'A'. Here is my code:
    import numpy as np
    import pandas as pd
    import math
    from numpy import nan
    for rowId in np.arange(dt.shape[0]):
        for hist in np.arange(10):
            if math.isnan(dt.iloc[rowId,hist])!=True:
                if 'A' in dt.iloc[rowId,hist]:
                    print("A found in: "+str(dt.iloc[rowId,hist]))
In the line if 'A' in dt.iloc[rowId,hist]
 when the value of dt.iloc[rowId,hist] is NAN then it complains with, TypeError: argument of type 'float' is not iterable
so i decided to add if math.isnan(dt.iloc[rowId,hist])!=True:
But, also this one leads to the below error:
TypeError: must be real number, not str
How may i find the values which contains 'A'?
 
    