I would like to make three different plots (by location) with data similar to the df I created down below. On the x axis I need the date and the number on the y axis. Preferably, they would be barcharts with a bar for each date. Is it possible to do it in a few simple lines using e.g. the groupby function for the location? Thank you!
data = {"location": ["USA", "USA", "USA", "UK", "UK", "UK", "World", "World", "World"], "date": ["21-06-2021", "22-06-2021", "23-06-2021", "21-06-2021", "22-06-2021", "23-06-2021", "21-06-2021", "22-06-2021", "23-06-2021"], "number": [456, 543, 675, 543, 765, 345, 654, 345, 654]}
import pandas as pd
df = pd.DataFrame (data, columns = ['location','date','number'])
df["date"] = pd.to_datetime(df["date"])
df