after putting the iloc, there is a [:,1:2] set and the 2 in this a jump so we are jumping two values and coming to the next one (which always leads to the age column) and if we remove this jump then we can get the value of a row, so for a specific column, mention the index of the column before and the one of after.
How can you search the first row (header) of a csv file, looking for the column that has the string, "Score".. and if found, retrieve all the rows from that column into a list? import pandas as pd df = pd.read_csv('my.csv') scoreList = df["Score"].tolist() #list(df["Score"].values)
You should rename this to "Read specific rows from csv in python pandas". You didn't explain how to read specific columns.
god damn right LOL
after putting the iloc, there is a [:,1:2] set and the 2 in this a jump so we are jumping two values and coming to the next one (which always leads to the age column) and if we remove this jump then we can get the value of a row, so for a specific column, mention the index of the column before and the one of after.
Great tutorial!!! Thanks
How can you search the first row (header) of a csv file, looking for the column that has the string, "Score".. and if found, retrieve all the rows from that column into a list?
import pandas as pd
df = pd.read_csv('my.csv')
scoreList = df["Score"].tolist() #list(df["Score"].values)
👍👍
Sir, can u tell me what is the path of book1.csv file..
thanks a lot!!
If there are many rows n columns how to print it all
Any method for rows tell me
It was for specific row not column. How to read particular column?
👍