Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

using csv module how to read perticular lines in csv

with open("test.csv", "rb") as infile:
    r = csv.reader(infile)
    for i in range(8): # count from 0 to 7
        next(r)     # and discard the rows
    row = next(r)  
Comment

PREVIOUS NEXT
Code Example
Python :: Python program to read a random line from a file 
Python :: how to get the end of a item in a python array 
Python :: Examples of os.makedirs() method 
Python :: how to print values without space in python 
Python :: pandas change string column to datetime 
Python :: importing python modules from a folder 
Python :: os module 
Python :: Example pandas.read_hfd5() 
Python :: label_map dict = label_map_util.get_label_map_dict(label_map) 
Python :: reactstrap example 
Python :: capitalise texts 
Python :: run python test in terminal 
Python :: NumPy flipud Syntax 
Python :: difference between 2 dataframes 
Python :: Sum of all substrings of a number 
Python :: Access field values of form django 
Python :: python trim zero off end of list 
Python :: var colors python 
Python :: open file in os python 
Python :: torch cos 
Python :: use get method request html page python 
Python :: # Python string capitalization 
Python :: collections.defaultdict(set) 
Python :: views.py 
Python :: exception handling in tkinter 
Python :: apply 2d mask to 3d array python 
Python :: numpy index of first true value 
Python :: <pandas.core.groupby.generic.dataframegroupby object 
Python :: print torch model python 
Python :: how to handle response from tkinter messagebox.askquestion() function in Python 
ADD CONTENT
Topic
Content
Source link
Name
8+1 =