Read specific columns from csv in python pandas

preview_player
Показать описание
#python #read #csv #columns #pandas

Рекомендации по теме
Комментарии
Автор

You should rename this to "Read specific rows from csv in python pandas". You didn't explain how to read specific columns.

Kolya_Smirnov
Автор

If there are many rows n columns how to print it all

Juliet
Автор

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)

bennguyen
Автор

Sir, can u tell me what is the path of book1.csv file..

GauravSingh-uuze
Автор

It was for specific row not column. How to read particular column?

anuragadarsh