Hi

I am trying to update the value of a column in df[“sqr”]

def excelsqrtfile(k):

f1=pd.DataFrame(k[‘values’])

if ‘com.infa.ldm.profiling.lastProfileTime’ in f1.attributeId.values:

t=‘Y’

else:

print(“NO”)

t=‘N’

return t

for x in get_list:

df[“sqr”]=excelsqrtfile(x)

for the first row, it returns - N and for the second row it returns the value - Y

But in the df[“sqr”] the values are showing as ‘Y’ for two rows. even though I could print the values as No and Yes in python.

Can you advise me where I am doing wrong?

My expectation is - for the first row of df[“sqr”] = N and for the second row df[“sqr”]= Y.

Many thanks in advance.