Reputation: 55
I am new to Kaggle and using notebooks. I can see that I can fork notebooks on Kaggle, however, whenever I try to get the code by clicking on the Code tab, it provides the necessary python commands for analysis (which I want) along with a lot of code to produce the formatted text that shows up in the Notebook(which I don't want).
I was wondering if there was an easy way to just extract the python code needed for analysis, without all of the code meant to format the Notebook output. Could anyone help me with this? I suspect it must be simple, but I searched around for a while and couldn't seem to find what I was looking for. Thanks for your time.
Upvotes: 4
Views: 1339
Reputation: 3967
Follow these steps:
!jupyter nbconvert --to script config_template.ipynb
For clear information on point 4, have a look on this webpage https://stackoverflow.com/a/19779226/10734525
Upvotes: 3