And I want to show in the plot only the temperature that has its location_id = 1.
I tried this code:
import matplotlib.pyplot as plt
x = df['local_time'].where(df['location_id'] == 1)
y = df['temperature']
plt.plot(x, y)
plt.xlabel('Local time')
plt.ylabel('Temperature')
plt.title('Weather in London')
plt.show()
And I get this error: TypeError: 'value' must be an instance of str or bytes, not a float
Could you please help me ?