Skip to content

Commit 6a7acbf

Browse files
author
Martin
committed
Restructure of requirements.txt + minor edits
1 parent e2f1d56 commit 6a7acbf

File tree

2 files changed

+45
-32
lines changed

2 files changed

+45
-32
lines changed

dashboard-writer/utils.py

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,18 +74,24 @@ def list_log_files(fs, devices, start_times, verbose=True):
7474
return log_files
7575

7676

77-
def restructure_data(df_phys, res):
77+
def restructure_data(df_phys, res, full_col_names=True):
7878
import pandas as pd
7979

8080
df_phys_join = pd.DataFrame({"TimeStamp": []})
8181
if not df_phys.empty:
82-
for signal, data in df_phys.groupby("Signal"):
83-
df_phys_join = pd.merge_ordered(
84-
df_phys_join,
85-
data["Physical Value"].rename(signal).resample(res).pad().dropna(),
86-
on="TimeStamp",
87-
fill_method="none",
88-
).set_index("TimeStamp")
82+
for message, df_phys_message in df_phys.groupby("CAN ID"):
83+
for signal, data in df_phys_message.groupby("Signal"):
84+
if full_col_names == True:
85+
col_name = str(hex(int(message))).upper()[2:] + "." + str(signal)
86+
else:
87+
col_name = signal
88+
89+
df_phys_join = pd.merge_ordered(
90+
df_phys_join,
91+
data["Physical Value"].rename(col_name).resample(res).pad().dropna(),
92+
on="TimeStamp",
93+
fill_method="none",
94+
).set_index("TimeStamp")
8995

9096
return df_phys_join
9197

requirements.txt

Lines changed: 31 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,35 @@
1-
attrs==19.3.0
2-
bitstruct==8.11.0
3-
botocore==1.20.88
4-
can-decoder>=0.0.5
5-
canedge-browser>=0.0.5
6-
canmatrix==0.9.2
7-
certifi==2020.6.20
8-
click==7.1.2
9-
docutils==0.15.2
10-
fsspec==0.8.4
1+
aiobotocore==1.3.0
2+
aiohttp==3.7.4.post0
3+
aioitertools==0.7.1
4+
async-timeout==3.0.1
5+
attrs==21.2.0
6+
bitstruct==8.11.1
7+
botocore==1.20.49
8+
can-decoder>=0.1.0
9+
canedge-browser>=0.0.6
10+
canmatrix==0.9.1
11+
certifi==2021.5.30
12+
chardet==4.0.0
13+
click==8.0.1
14+
colorama==0.4.4
15+
fsspec==2021.5.0
1116
future==0.18.2
12-
influxdb-client==1.10.0
17+
idna==3.2
18+
importlib-metadata==4.5.0
19+
influxdb-client==1.18.0
1320
jmespath==0.10.0
14-
mdf-iter>=0.0.3
15-
numpy==1.19.4
16-
pandas==1.1.5
21+
mdf-iter>=0.0.4
22+
multidict==5.1.0
23+
numpy==1.20.3
24+
pandas==1.2.4
1725
pathlib2==2.3.5
1826
python-dateutil==2.8.1
19-
pytz==2020.1
20-
Rx==3.1.1
21-
s3fs==0.4.2
22-
six==1.15.0
23-
urllib3==1.25.10
24-
lxml==4.6.1
25-
xlsxwriter==1.3.7
26-
xlwt==1.3.0
27-
xlrd==1.2.0
28-
pyyaml
27+
pytz==2021.1
28+
Rx==3.2.0
29+
s3fs==2021.5.0
30+
six==1.16.0
31+
typing-extensions==3.10.0.0
32+
urllib3==1.26.5
33+
wrapt==1.12.1
34+
yarl==1.6.3
35+
zipp==3.4.1

0 commit comments

Comments
 (0)