Click here to Skip to main content
15,884,176 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have CSV file contain 6000 lines ,I want to read every 200 lines together and then store these (200 lines) in a txt file until the csv file ends. How can do that please?

What I have tried:

import pandas as pd

dataset = pd.read_csv('e.csv') 
X = dataset.iloc[:,[0,0]].values
Posted
Updated 1-Apr-20 2:51am
v2

1 solution

Add a counter so you stop after each 200.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900