-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathread_metadata.py
More file actions
45 lines (31 loc) · 768 Bytes
/
Copy pathread_metadata.py
File metadata and controls
45 lines (31 loc) · 768 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Read metadata files (RNH)
from pandas import read_csv, read_excel
def nl32(file_in):
metadata_in = read_csv(
file_in,
index_col=0,
header=None,
squeeze=True
)
metadata_in["Frequency Weighting"] = metadata_in["Frequency-weight"].replace(' ', '')
return metadata_in
def nl52(file_in):
metadata_in = read_csv(
file_in,
skiprows=4,
index_col=0,
header=None,
squeeze=True
)
return metadata_in
def duo(file_in):
metadata_in = read_excel(
file_in,
nrows=8,
usecols=[0, 1],
index_col=0,
header=None,
squeeze=True
)
metadata_in["Frequency Weighting"] = metadata_in["Weighting"]
return metadata_in