Private
Public Access
1
0

alerts, analysis, api tested

This commit is contained in:
2024-04-21 10:56:37 +02:00
parent 85bd89d3d2
commit 409f4aff63
8 changed files with 124 additions and 117 deletions

View File

@@ -16,7 +16,7 @@ from rowers.utils import (
from rowers.celery import result as celery_result
from rowers.interactiveplots import *
from scipy.interpolate import griddata
from rowers.dataprep import getsmallrowdata_db, read_data
from rowers.dataprep import getsmallrowdata_pd, read_data
from rowers.dataprep import timedeltaconv
from scipy.special import lambertw
from io import BytesIO
@@ -35,6 +35,7 @@ import threading
import redis
import colorsys
import re
import gzip
import zipfile
import bleach
import arrow
@@ -1345,9 +1346,9 @@ def trydf(df, aantal, column): # pragma: no cover
s = df[column]
if len(s) != aantal:
return np.zeros(aantal)
if not np.issubdtype(s, np.number):
if not s.dtype in pl.NUMERIC_DTYPES:
return np.zeros(aantal)
except KeyError:
except (KeyError, ColumnNotFoundError):
s = np.zeros(aantal)
return s