Machine Learning, Deep Learning, AI, Pandas, Data Analysis.
df.loc[:3] Notice the slight difference in that iloc is exclusive of the second number, while loc is inclusive. Below is an example of how you can use loc to achieve the same task as we did previously with iloc. df.loc[df['Wscore'].argmax(), 'Lscore'] Out: 140 df.at[df['Wscore'].argmax(), 'Lscore']