Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
energy
bmon
Commits
46e43ab5
Commit
46e43ab5
authored
Aug 20, 2021
by
alaskamapscience
Browse files
Fix timeseries rounding bug
parent
b5dff7a7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
bmsapp/reports/timeseries.py
bmsapp/reports/timeseries.py
+3
-3
No files found.
bmsapp/reports/timeseries.py
View file @
46e43ab5
...
...
@@ -67,10 +67,10 @@ class TimeSeries(basechart.BaseChart):
df
=
bmsapp
.
data_util
.
decimate_timeseries
(
df
,
bin_count
=
1000
,
col
=
'val'
)
# create lists for plotly
if
np
.
absolute
(
df
.
val
.
values
).
max
()
<
10000
:
values
=
df
.
val
.
round
(
4
).
where
(
df
.
val
.
notnull
(),
None
).
values
.
tolist
()
if
df
.
val
.
abs
(
).
max
()
<
10000
:
values
=
[
round
(
x
,
4
)
if
not
np
.
isnan
(
x
)
else
None
for
x
in
df
.
val
]
else
:
values
=
df
.
val
.
round
(
0
).
where
(
df
.
val
.
notnull
(),
None
).
values
.
tolist
()
values
=
[
round
(
x
)
if
not
np
.
isnan
(
x
)
else
None
for
x
in
df
.
val
]
times
=
df
.
index
.
strftime
(
'%Y-%m-%d %H:%M:%S'
).
tolist
()
else
:
times
=
[]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment