Finding missing values

In this section we will find the missing values and also find some unique values by using isnull and value_counts method.

Find Missing Values

data.isnull().sum()

Output:

N              0
P              0
K              0
temperature    0
humidity       0
ph             0
rainfall       0
label          0
dtype: int64

 

Find Unique Values

data['label'].value_counts()

Output:

rice           100
orange         100
blackgram      100
grapes         100
mango          100
coffee         100
muskmelon      100
jute           100
papaya         100
maize          100
mungbean       100
cotton         100
banana         100
chickpea       100
pigeonpeas     100
watermelon     100
lentil         100
kidneybeans    100
mothbeans      100
apple          100
pomegranate    100
coconut        100
Name: label, dtype: int64
Discussion

2

0