0

I just started working with python pandas and am trying to achieve the following:

I have a dataframe d that contains the rows Country and Botnet. For each value of Country, I want to calculate how many distinct Botnet values exist.

I know that I can receive the distinct country values as follows:

d['Country'].unique()

I do not know however how I can now transform this to receive the length of all the unique botnet values sorted per country. Is this even possible in Pandas?

hY8vVpf3tyR57Xib
  • 3,574
  • 8
  • 41
  • 86

0 Answers0