Один из способов состоит в том, чтобы повернуть данные, чтобы каждое местоположение представляло собой отдельный столбец, а затем построить сводные данные.
import pandas as pd
import matplotlib.pyplot as plt
# just same dummy data
df=pd.DataFrame([['2016','1',123],
['2017','1',134],
['2018','1',154],
['2016','2',234],
['2017','2',240],
['2018','2',259],
['2016','3',304],
['2017','3',324],
['2018','3',384],
['2016','4',414],
['2017','4',424],
['2018','4',444]
], columns=['Year','Location','Sales'])
# Create a pivot table from the raw data
pivoted=df.pivot_table( values='Sales', index='Year',
columns=['Location'], aggfunc="sum")
# Not sure why, but plot doesn't like the index structure of a pivot table
# so I'm flattening it here:
pivoted.reset_index(inplace=True)
# Create the plot
ax=pivoted.plot(xticks=pivoted.index)
plt.gca().set_xticklabels( pivoted.Year )
ax.set_ylabel('Sales');
ax.set_xlabel('Year');
![sample output](https://i.stack.imgur.com/AoNEd.png)