Q:

Pandas, position of iloc in df

The following code produces the same result.  Can I use both interchangeably?  Will I run into problems later?
Thank you
Method1: df.iloc[0]['A']

Method2: df['A'].iloc[0] 

A:

The result in both case is the same as suggested. But it might be useful, to make the process as clear as possible. In your case you at first generate a Series object and you then pick one element of it. 

df.iloc[0]['A']   #1st. generate Series: row with index 0., 2nd. pick element 'A'
df['A'].iloc[0]   #1st. generate Series: col with name 'A'., 2nd. pick element 0

Even though you have asked for iloc, if you want just to select the value, I would go for df.loc[0, 'A']. This is somehow consistent with matrix notation. Pick row=0 and col='A' from matrix df. 

