https://app.dataquest.io/m/147/improving-plot-aesthetics/4/visualizing-the-gender-gap
fig=plt.figure()
plt.plot(women_degrees['Year'], women_degrees['Biology'], c='blue', label='Women')
plt.plot(women_degrees['Year'], 100-women_degrees['Biology'], c='green', label='Men')
plt.legend(loc='upper right')
plt.title('Percentage of Biology Degrees Awarded By Gender')
plt.show()
What I expected to happen: Show plot with title
What actually happened:
TypeErrorTraceback (most recent call last)
<ipython-input-1-e508ef7bc51a> in <module>()
3 plt.plot(women_degrees['Year'], 100-women_degrees['Biology'], c='green', label='Men')
4 plt.legend(loc='upper right')
----> 5 plt.title('Percentage of Biology Degrees Awarded By Gender')
6 plt.show()
TypeError: 'str' object is not callable
Other details: Tried it without line 1, got the same error. Copied-and-pasted the given answer from the ‘Get Help’ dropdown, got the same error.