The project question asked me to determine the number of NaT values in a specific column of a dataframe. My initial idea was to create a counter that would iterate through the column and +=1 wherever a NaT value existed. The pandas documentation mentions that the .isnull() function can take in a scalar or array and return a boolean value or array of boolean values.

I was hoping to use the boolean value to fulfil my conditional statement but it gives me the error 'NaTType object has no attribute .isnull()?

I understand that the other solution is quicker but why doesn’t this work? Thanks in advance

```
# this is the solution given in the project solutions
print(len(visits_carts[visits_carts.cart_time.isnull()]))
#before I went to the solutions I tried this
count = 0
for i in range(len(visits_carts)):
if visits_carts.loc[i, "cart_time"].isnull():
count+=1
print(count)
```