Basics-Copy1 (2).ipynb (272.2 KB)
Screen Link:
https://app.dataquest.io/m/469/guided-project%3A-popular-data-science-questions/10/just-a-fad
My Code:
yearly = tps.groupby('Year').agg({"Deep Learning": ['sum', 'size']})
yearly.columns = ["Deep Learning Questions", "Total Questions"]
yearly["Deep Learning Rate"] = yearly["Deep Learning Questions"]\
/yearly["Total Questions"]
yearly.reset_index(inplace=True)
print(yearly)
What I expected to happen:
Table of annual deep learning questions, total questions, and deep learning rate.
What actually happened:
No error. Total questions is 1 for all years.
Please see attached file for complete code.
Click here to view the jupyter notebook file in a new tab