I am new to data science and I am trying to build a pia chart using the matlplot package. Which shows the percentage of traffic on the web sites of a particular model. For example 10% iPhone 50%ipad and 40% Mac etc.
useragent count
iPhone 11298
Mac 3206
iPad 627
SM-N960F 433
SM-N950F 430
... ...
K330 1
K220 1
SM-J737P 1
SM-J737T1 1
0PFJ50 1
[1991 rows x 2 columns]
If You see the dataset it consists of 1991 rows, but I don't want all of them to be displayed. I want only the first 5 user agents to be displayed.
The desired output should be something like this:
useragent count
iPhone 11298
Mac 3206
iPad 627
SM-N960F 433
Others 9000
Can anyone help me achieve my output?