-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdq_direction.py
More file actions
27 lines (20 loc) · 756 Bytes
/
Copy pathdq_direction.py
File metadata and controls
27 lines (20 loc) · 756 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# -*- coding: utf-8 -*-
#------------------------------------------------------------------------------
# Platform : dq_direction
# Project Name : SYNOP DATA DECODER
# Author : Nikhil Dhandre
#------------------------------------------------------------------------------
import csv
def dq_direction(x):
with open('db/dq_direction.csv') as csvfile:
dq_data=csv.reader(csvfile, delimiter=',')
code_all=[]
dq_all=[]
for row in dq_data:
code=row[0]
dq=row[1]
code_all.append(code)
dq_all.append(dq)
index=code_all.index(x)
return dq_all[index]
#------------------------------------------------------------------------------