16 lines
398 B
Python
16 lines
398 B
Python
import csv
|
|
|
|
input_file = 'input.csv'
|
|
output_file = 'output.csv'
|
|
|
|
with open(input_file, 'r') as infile, open(output_file, 'w', newline='') as outfile:
|
|
reader = csv.reader(infile)
|
|
writer = csv.writer(outfile)
|
|
|
|
header = next(reader) # Skip header
|
|
|
|
for i, row in enumerate(reader):
|
|
if i >= 1000: # Stop after 10000 rows
|
|
break
|
|
writer.writerow([row[0]])
|