Answers for "python validate nan value"

1

python check if nan

import math
x = float('nan')
math.isnan(x)
True
Posted by: Guest on August-30-2021
0

check if a value is nan pandas

import numpy as np
import pandas as pd

val = np.nan

print(pd.isnull(val))
# True
Posted by: Guest on June-03-2021

Browse Popular Code Answers by Language