Sunday, September 8, 2024
Homepandas Determine whether there is a NaN value in data.Frame

[Python-Pandas] Determine whether there is a NaN value in data.Frame

Determine whether there is a NaN value in data.Frame

During the expression matrix preprocessing process, missing values ​​need to be processed. Therefore, it is first necessary to determine whether there are missing values ​​in the expression matrix.

maxtrix_s = pd.read_csv(path_input, sep='\t')
# Check if there are missing values ​​in expression matrix
check_for_nan = maxtrix_s.isnull().values.any()
print(check_for_nan) 

If False is output, it means there are no missing values. On the contrary, there is.

RELATED ARTICLES

Most Popular

Recent Comments