have (got) (someone) pegged as (something)
To distinctly regard someone as being a certain type of person. I had you pegged as a coward, but I'm impressed with how you stood up to that criminal. Everyone's got me pegged as a loser, but I'll show them!
have someone pegged
If you have someone pegged, you understand completely what they are like or who they are. Those who have her pegged as fragile singer-songwriter should hear her touring band blasting out their latest song. I want you to know that the drinkers in the cocktail lounge have you pegged for a detective.