ml-eda / routers /_utils.py
wram1708's picture
Upload routers/_utils.py with huggingface_hub
aa2ab18 verified
Raw
History Blame Contribute Delete
232 Bytes
import numpy as np
import pandas as pd
def _to_native(v):
if pd.isna(v):
return None
if isinstance(v, np.integer):
return int(v)
if isinstance(v, np.floating):
return float(v)
return str(v)