-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.py
32 lines (26 loc) · 808 Bytes
/
main.py
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
from ExtractO2 import ExtractO2
from ProcessO2 import ProcessO2
def header(string):
num = (80 - len(string)) // 2
eqs = '=' * num
print(f"{eqs} {string} {eqs}")
model = ProcessO2('../O2Measures/*.csv', null_data=True)
print(header('Files with duplicated data'))
[print(i) for i in model.get_duplicated_files()]
data = model.get_all_data()
print(header('With Null Data'))
print(data.head())
print(data.describe())
print(data.dtypes)
model = ProcessO2('../O2Measures/*.csv')
data = model.get_all_data()
print(header('Without Null Data'))
print(data.head())
print(data.describe())
print(data.dtypes)
summary = ExtractO2(data)
days, nights = summary.compute_days_nights()
print(header('Nights'))
print(summary.data_info_frame(nights))
print(header('Days'))
print(summary.data_info_frame(days))