Is there a way to find nunique and nmissing values for an integer column?

I understand computing metrics like nmissing and nunique in describe() is avoided to save the performance issue. But is there any other way that these metrics can be computed?

length(unique(A.mycol))
length(filter(ismissing,A.mycol))

?

3 Likes

@dlakelan i get the error stating

MethodError: objects of type DataFrame are not callable

Stacktrace:
 [1] top-level scope at In[283]:1

when i try to pass a dataframe’s column here. How do i resolve this?
Thanks in Advance

@dlakelan
Resolved, earlier i was trying to pass

df[:colName]

Now I changed it to

df.colName and it works .

Thanks

1 Like