Python3 preparation

This commit is contained in:
Shahram Najm 2018-11-23 18:04:03 +00:00
parent 6ce3491902
commit 777a3585fc
1 changed files with 2 additions and 2 deletions

View File

@ -29,8 +29,8 @@ def example(csvfile, input_filename, output_filename):
# The first line in the CSV has the column names
print('Reading input CSV file: ', csvfile)
parse_date = lambda x: datetime.strptime(x, '%Y%m%d')
parse_time = lambda x: datetime.strptime(x, '%H:%M:%S')
parse_date = lambda x: datetime.strptime(x.decode('ascii'), '%Y%m%d')
parse_time = lambda x: datetime.strptime(x.decode('ascii'), '%H:%M:%S')
data = np.genfromtxt(csvfile, delimiter=',', dtype=None, names=True,
converters={0: parse_date, 1: parse_time})