Skip to content

Commit e47bee2

Browse files
authored
Replace nan with None in table diff sample (#987)
1 parent 6e514be commit e47bee2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

web/server/api/endpoints/table_diff.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import typing as t
44

5+
import numpy as np
56
from fastapi import APIRouter, Depends
67
from sqlglot import exp
78

@@ -47,7 +48,7 @@ def get_table_diff(
4748
source=_row_diff.source,
4849
target=_row_diff.target,
4950
stats=_row_diff.stats,
50-
sample=_row_diff.sample.to_dict(),
51+
sample=_row_diff.sample.replace({np.nan: None}).to_dict(),
5152
source_count=_row_diff.source_count,
5253
target_count=_row_diff.target_count,
5354
count_pct_change=_row_diff.count_pct_change,

0 commit comments

Comments
 (0)