Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python read column data from text file

import csv

with open('path/to/file.txt') as inf:
    reader = csv.reader(inf, delimiter=" ")
    second_col = list(zip(*reader))[1]
Comment

PREVIOUS NEXT
Code Example
Python :: python transform two columns to a list combine 
Python :: django phone number field 
Python :: how to make a kivy label multiline text 
Python :: python get lan ip 
Python :: np load csv 
Python :: import serial python 
Python :: install python selenium webdriver 
Python :: binary search tree iterator python 
Python :: tkinter events 
Python :: python string contains substring 
Python :: pandas query on datetime 
Python :: python requests cookies 
Python :: pandas summarize all columns 
Python :: python filter 
Python :: except as exception: 
Python :: python telegram bot send image 
Python :: normalize data python 
Python :: binomial coefficient 
Python :: tkinter window background color 
Python :: python candlestick chart 
Python :: two loop type python 
Python :: extract filename from path in python 
Python :: send email with flask 
Python :: python append element to array 
Python :: set image size mapltotlib pyplot 
Python :: python cmath constants 
Python :: python read folder 
Python :: blank=True 
Python :: star pattern in python 
Python :: Python loop to run for certain amount of seconds 
ADD CONTENT
Topic
Content
Source link
Name
8+2 =