Difference between pandas .iloc and .iat?

前端 未结 2 1147
眼角桃花
眼角桃花 2021-02-14 06:07

I\'ve recently noticed that a function where I iterate over a DataFrame rows using .iloc is very slow. I found out that there\'s a faster method called

2条回答
  •  感动是毒
    2021-02-14 06:38

    iat and at gives only a single value output, while iloc and loc can give multiple row output.
    Example:
    iloc[1:2,5:8] is valid but iat[1:2,5:8] will throw error

提交回复
热议问题