I've got a Dataframe with around 16000 entries and 12 columns. I've (hopefully) already removed duplicates and Nan values. I want to visualise the number of occurrences in the column 'brand' in a Pie chart with Pandas. But every Brand which occurs less than 20 times should be grouped together and be named 'Freie Tankstellen'.
I've gotten to:
df_stations['brand'].value_counts().to_frame()< 20
But i don't know how to proceed, thank you in advance!
elias_lay_u_schisslbauer_simon2021-06-12_11-57 - Jupyter Notebook
,uuid,name,brand,street,house_number,post_code,city,latitude,longitude,first_active,openingtimes_json,state,istFrei
0,0e18d0d3-ed38-4e7f-a18e-507a78ad901d,OIL! Tankstelle München,OIL!,EVERSBUSCHSTRASSE,33,80999,MÜNCHEN,48.1807,11.4609,1970-01-01 01:00:00+01,"{""openingTimes"":[{""applicable_days"":192,""periods"":[{""startp"":""07:00"",""endp"":""20:00""}]},{""applicable_days"":63,""periods"":[{""startp"":""06:00"",""endp"":""22:00""}]}]}",Bayern,True
1,44e2bdb7-13e3-4156-8576-8326cdd20459,bft Tankstelle,BFT TANKSTELLE,SCHELLENGASSE ,53,36304,ALSFELD,50.7520089,9.2790394,1970-01-01 01:00:00+01,"{""openingTimes"":[{""applicable_days"":63,""periods"":[{""startp"":""06:00"",""endp"":""22:00""}]},{""applicable_days"":64,""periods"":[{""startp"":""07:00"",""endp"":""21:00""}]}]}",Hessen,True
2,ad812258-94e7-473d-aa80-d392f7532218,bft Bonn-Bad Godesberg,BFT,GODESBERGER ALLEE,55,53175,BONN,50.6951,7.14276,1970-01-01 01:00:00+01,"{""openingTimes"":[{""applicable_days"":31,""periods"":[{""startp"":""06:00"",""endp"":""22:00""}]},{""applicable_days"":32,""periods"":[{""startp"":""07:00"",""endp"":""22:00""}]},{""applicable_days"":64,""periods"":[{""startp"":""08:00"",""endp"":""22:00""}]}]}",Nordrhein-Westfalen,True

