Skip to content

Commit

Permalink
Merge pull request #3 from kishorek/develop
Browse files Browse the repository at this point in the history
fixed an issue while handling the indices in headers
  • Loading branch information
kishorek authored Jul 2, 2020
2 parents 7247bb1 + 70b17a3 commit e9dc523
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions comparesv.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def exist_in_list(option, option_list):
def prepare_headers(data1, headers1, headers2, column_match):
mapped_headers_index = OrderedDict()
mapped_indices2 = []
for index, header in enumerate(headers1):
for idx, header in enumerate(headers1):
index = -1
if column_match == 'exact':
exists, index = exist_in_list(header, headers2)
Expand All @@ -152,7 +152,7 @@ def prepare_headers(data1, headers1, headers2, column_match):
column_data['index'] = index
if index != -1:
column_data['matched_header'] = headers2[index]
column_data['type'] = predict_column_type([val[index] for val in data1])
column_data['type'] = predict_column_type([val[idx] for val in data1])
mapped_headers_index[header] = column_data

return mapped_headers_index
Expand Down
2 changes: 1 addition & 1 deletion version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = 0.12
__version__ = 0.13

0 comments on commit e9dc523

Please sign in to comment.