I have a huge file, where the columns are randomly sequenced and I was able to use pandas to read a specific timestamp column.
with open(<file name>, 'r') as in_file:
b = pandas.read_csv(in_file,usecols=["<Timestamp Column Name>"],parse_dates=[0])
c = b.to_csv(header=None,index=False)
print c
Sample values are:
2016-11-26 16:12:00
2016-11-30 09:19:00
2016-11-28 17:30:00
2016-11-30 14:50:00
2016-11-26 21:39:00
2016-01-12 11:14:00
2016-11-27 09:39:00
2016-11-28 06:50:00
2016-11-26 14:08:00
2016-11-30 12:42:00
2016-11-26 11:01:00
2016-11-25 08:23:00
Now I'm trying to loop through this column to achieve a count. If I use a simple for loop, it reads every digit like a string, which is of no use. Appreciate some help.
or :
or read from csv file:
out:
just split by line break use splitlines, this will return a list