This commit is contained in:
wuaho 2021-11-18 14:10:38 +08:00
parent 9889b35ce8
commit 79a453134f

View File

@ -8,6 +8,7 @@ import json
from fastapi import Depends
import pandas as pd
import numpy as np
from sqlalchemy import func, or_, and_, not_
@ -41,6 +42,7 @@ class CombinationEvent:
result = round(result, 2)
elif self.format == 'integer':
result = result.astype(int)
result.replace(np.inf, 0, inplace=True)
return result.to_list(), round(result.sum(), 2), round(result.mean(), 2)