I have a csv file datasheet.csv
-
City A B C D E F G H I J
1 -----------VALUES------------
2 -----------VALUES------------
3 -----------VALUES------------
4 -----------VALUES------------
5 -----------VALUES------------
6 -----------VALUES------------
Right now I store this with this code.
import pandas as pd
df = pd.read_csv('datasheet.csv')
I am able to call columns with.
df['City'],df['G']
But im not so sure on how to procede with rows. Right now I have the code.
(df.loc[df['City']=='1'])
This prints the rows but im not able to use index to get any spesific value. For example when I do
print((df.loc[df['City']=='1'])[0])
It returns a error "key error: 0". Im not sure how to procede from here