jamescooper
Well-known Member
- Joined
- Sep 8, 2014
- Messages
- 887
Not sure why this doesn't work?
import pandas as pd
from datetime import datetime
import matplotlib.pyplot as plt
today_format = datetime.strptime(datetime.today().strftime('%d/%m/%Y'), "%d/%m/%Y")
filtered_df = values=df['Current price'], aggfunc='min') & (df['Date Captured'] == today_format)]
filtered_df.plot(x="Mon Year", y=["Current price"], kind="bar")
plt.title("Minimum Price")
plt.xlabel("Month Year")
plt.ylabel("Price (£)")
plt.locator_params(axis='x', nbins=12)
plt.show()
import pandas as pd
from datetime import datetime
import matplotlib.pyplot as plt
today_format = datetime.strptime(datetime.today().strftime('%d/%m/%Y'), "%d/%m/%Y")
filtered_df = values=df['Current price'], aggfunc='min') & (df['Date Captured'] == today_format)]
filtered_df.plot(x="Mon Year", y=["Current price"], kind="bar")
plt.title("Minimum Price")
plt.xlabel("Month Year")
plt.ylabel("Price (£)")
plt.locator_params(axis='x', nbins=12)
plt.show()