python - How to retrieve value of n-th element in pandas Series object? -


i have series object (1 column of dataframe) , extract value of first element. there way without converting list , without knowing key? or way access converting list first using tolist()[n]?

i think can use iloc:

print df   col 0   1   b 2   c 3   d 4   e  print df.iloc[0] col    name: 0, dtype: object 

Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -