How to read data from the csv file

I got the data from the csv file as
data = pandas.read_csv()

now how to read data from the data variable, it’s has 500 rows and a single column

hey @ChiteshBansal ,

which variable are you talking about ?? can you please share your screenshots too …

Thank You

we read the data from the csv file ,now it’s a class component ,now if I want to access the data I fetched from the file ,then how to do that

data = pandas.read_csv() , this is the only code snipped what else u need,

nothing you need to do.
lets say you did it like
df = pd.read_csv()
to view it just do ,
df.head()
and similarly you can try other functions or methods too.

That is what I am asking how to access the data, like first element of the first row and so on

hey @ChiteshBansal ,
like for example you have below dataframe
index,key_1,key_2
0,1,2
1,2,3

so to access the values ,
do it like
df.iloc[0][‘key_1’]

iloc is used to target over a particular index value, and then column name.

Note: Explaining these things here, would be a bit difficult in these chats. I recommend you to go through the course first , learn pandas and then use them , else you can also search google for all of these simple things. Use the power of internet.

Thank You :slight_smile:.