Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python read csv into array

import csv 

items = []

with open('file.csv') as csvfile:    
	csvReader = csv.reader(csvfile)    
	for row in csvReader:        
		items.append(row[0])        
print(items)
Comment

PREVIOUS NEXT
Code Example
Python :: how to convert datetime to jdatetime 
Python :: pandas remove char from column 
Python :: pyttsx3 save to file 
Python :: python flask sample application 
Python :: ValueError: cannot mask with array containing NA / NaN values 
Python :: pytube urllib.error.HTTPError: HTTP Error 410: Gone 
Python :: pytorch check gpu 
Python :: django flush database 
Python :: python number of cpus 
Python :: clear multiprocessing queue python 
Python :: df sort values 
Python :: python open encoding utf-8 
Python :: classification report scikit 
Python :: how to remove numbers from string in python pandas 
Python :: pygame get mouse position 
Python :: pandas dataframe set datetime index 
Python :: distance formula in python 
Python :: array of 1 to 100 python 
Python :: import xgboost 
Python :: counter in django template 
Python :: import status in django rest framework 
Python :: dataframe from two series 
Python :: run django app locally 
Python :: SettingWithCopyWarning 
Python :: pandas group by month 
Python :: django create app command 
Python :: size of variable python 
Python :: pytest ignore warnings 
Python :: roc curve python 
Python :: jupyter notebook pass python variable to shell 
ADD CONTENT
Topic
Content
Source link
Name
9+1 =