python csv read specific column code example
Example 1: read specific columns from csv in python pandas
import pandas as pd
df = pd.read_csv('some_data.csv', usecols = ['col1','col2'], low_memory = False)
Example 2: read specific columns from csv in python pandas
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