Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

read one column pandas

import pandas as pd

df = pd.read_csv('some_data.csv', usecols = ['col1','col2'], low_memory = True)
Comment

read one column 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
Comment

PREVIOUS NEXT
Code Example
Python :: assign multiple columns pandas 
Python :: pytest create server 
Python :: exception handling in tkinter 
Python :: sqlite python select with parameters 
Python :: Python NumPy insert Function Syntax 
Python :: re.search variable 
Python :: python flatten a list of lists 
Python :: import one file into another python 
Python :: tkinter transparent background 
Python :: normalizer in sklearn 
Python :: python variables 
Python :: mongodb and python 
Python :: iterate last day of months python 
Python :: python list append 
Python :: load list from file python 
Python :: Python - How To Concatenate List of String 
Python :: define event on socketio python 
Python :: pandas switch column levels 
Python :: urllib_errors 
Python :: adding new key in python 
Python :: puython is not equal to 
Python :: how to register a model in django 
Python :: amazon redshift 
Python :: delete content of table django 
Python :: Use len with list 
Python :: lcd of 18 and 21 
Python :: set default palette seaborn 
Python :: model checkpoint 
Python :: armstrong number in python 
Python :: how to convert str to int python 
ADD CONTENT
Topic
Content
Source link
Name
4+1 =