I am also new on Python and I just completed this project.
Firstly, it is axis=1, not index=1.
Secondly, you don’t need to quote the True and False, I don’t know why but I assume it’s because they are reserved or unique variables in Python.
Thirdly, it seems like Lambda returns integer so all the percentage will be 0. However, you can add 100* into the Lambda calculation. The result looks the same as mine.
At begging I was also thinking about using Lambda on this task, but I just simply used basic column adding function, here is my code:
clicks_pivot['percent_clicked'] = clicks_pivot[True]/(clicks_pivot[True]+clicks_pivot[False])