I have a dataframe of cars from 5 different brands with all models and their technical data. Simplified it looks like that:
Brand | Model | Power in HP |
---|---|---|
VW | Golf 7 | 150 |
Audi | A4 | 190 |
Audi | A5 | 190 |
VW | Passat | 240 |
VW | Polo | 80 |
Ford | A4 | 190 |
KIA | A4 | 190 |
Audi | Q3 | 150 |
Audi | S6 | 400 |
VW | Golf 6 | 140 |
VW | Golf 5 | 116 |
...... |
How can I create a multi line plot that shows the distribution of HP for each brand? (each brand is a line in the plot)
I tried the function groupby or simply giving the dataframe columns into the lineplot constructor but that didn't work..
but you should note that because the data is spars for ford
and kia
(only one point for each), that nothing will show...