Skip to content
Snippets Groups Projects
Commit de459e13 authored by rubegar's avatar rubegar
Browse files

Delete peticiones.py

parent 859eb4fa
No related branches found
No related tags found
No related merge requests found
import csv
from collections import Counter
def count_thread_names(csv_file):
thread_names = []
with open(csv_file, 'r') as file:
reader = csv.DictReader(file)
for row in reader:
thread_names.append(row['threadName'])
count = Counter(thread_names)
with open('peticiones2.csv', 'w', newline='') as file:
writer = csv.writer(file)
writer.writerow(['threadName', 'numeroPeticiones'])
for thread_name, count in sorted(count.items(), key=lambda x: x[0]):
writer.writerow([thread_name, count])
count_thread_names('medidas2.csv')
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment