read one column pandas

Solutions on MaxInterview for read one column pandas by the best coders in the world

showing results for - "read one column pandas"
Fabio
21 Nov 2017
1import pandas as pd
2
3df = pd.read_csv('some_data.csv', usecols = ['col1','col2'], low_memory = True)
4
Valeria
24 Apr 2016
1import pandas as pd
2fields = ['star_name', 'ra']
3
4df = pd.read_csv('data.csv', skipinitialspace=True, usecols=fields)
5# See the keys
6print df.keys()
7# See content in 'star_name'
8print df.star_name
9