Skip to content

Commit

Permalink
Update interpolate query (#799)
Browse files Browse the repository at this point in the history
Signed-off-by: GBBBAS <[email protected]>
  • Loading branch information
GBBBAS authored Aug 9, 2024
1 parent cbe4648 commit 5a04ecc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/api/v1/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ def convert_value(x):
return float(x)
return x

data_parsed = data.replace({np.nan: None}).map(convert_value)
data_parsed = data.map(convert_value).replace({np.nan: None})
schema = build_table_schema(data_parsed, index=False, primary_key=False)
data_dict = data_parsed.to_dict(orient="records")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1026,7 +1026,7 @@ def _query_builder(parameters_dict: dict, query_type: str) -> str:
parameters_dict
)
sample_parameters["is_resample"] = False
sample_parameters["to_json"] = to_json
parameters_dict["to_json"] = to_json
return _interpolation_query(parameters_dict, sample_query, sample_parameters)

if query_type == "time_weighted_average":
Expand Down

0 comments on commit 5a04ecc

Please sign in to comment.