📜  从 python pandas 中的 csv 读取特定列 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:28.951000             🧑  作者: Mango

代码示例2
import pandas as pd
fields = ['star_name', 'ra']

df = pd.read_csv('data.csv', skipinitialspace=True, usecols=fields)
# See the keys
print df.keys()
# See content in 'star_name'
print df.star_name