for i in range(19):
for j in range(5):
if df.iloc[i,j] == 'NaN':
print('Missing Value at (row,col): ({}, {}) '.format(i,j))
Asked
Active
Viewed 229 times
1 Answers
1
You can try this, hope it helps:)
# importing pandas as pd
import pandas as pd
# importing numpy
import numpy as np
# dictionary of lists
dict = {'First Score':[100, 90, np.nan, 95],
'Second Score': [30, 45, 56, np.nan],
'Third Score':[np.nan, 40, 80, 98]}
# creating a dataframe using dictionary
df = pd.DataFrame(dict)
# using notnull() function
df.notnull()

shivam sharma
- 19
- 3