Skip to content

Instantly share code, notes, and snippets.

@ohemelaar
ohemelaar / simple_histogram.py
Created July 10, 2019 13:09
Simple histogram data generator
#!/usr/bin/env python3
# Change this with whatever function you want for grouping
def grouping(line):
return int(line) // (24 * 3600 * 1000)
histo = {}
with open('some_file.csv', 'r') as file:
for line in file.readlines():
key = grouping(line)