Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def cnt_uniq_type_in_column(file_obj, column):
- data_base = csv.reader(file_obj)
- req_types = set()
- cnt = 0
- for row in data_base:
- if not (row[column] in req_types):
- cnt += 1
- req_types.add(row[column])
- return cnt - 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement