get unique elements count of one column based on the unique value of another column code example
Example 1: pandas count the number of unique values in a column
df['hID'].nunique()
5
Example 2: values of unique from dataframe with count
data = df.groupby('ColumnName')['IDColumnName'].nunique()
print(data)