I am fairly new to Python, especially pandas. I have a DataFrame called KeyRow which is from a bigger df:
KeyRow=df.loc[df['Order'] == UniqueOrderName[i]]
Then I make a nested loop
for i in range (0,len(PersonNum)):
print(KeyRow.loc[KeyRow['Aisle'] == '6', 'FixedPill'])
So it appears to only work when a constant is placed, whereas if I use PersonNum[0] instead of '6',even though both values are equivalent, it appears not to work. When I use PersonNum[i] this is the output I am getting:
Series([], Name: FixedPill, dtype: object)
Whereas if I use 'x' I get a desired result:
15 5
Name: FixedPill, dtype: object