breaking things up
sharing some code btw pure python and with pandas
need more sleep
moving onto pandas