'Command lines in Jupyter Notebook conversion for production
I've been using Jupyter Notebooks for my data analysis and loved it. Now I'm in the process of cleaning up the scripts and documenting everything. The analysis is a "once-through" with static input and static output so no continuous running scripts. I've been using nbconvert to create .py scripts based on my notebooks. There is only one challenge: What to do with jupyter magic commands? (e.g. !mkdir -p /foo/bar)
I used command line commands such as aws cli and some ETL using standard linux commands. I know I can use solutions such as python's subprocess, split python and bash or use native python libraries such as boto. Is there a better solution that does not require rewriting code?
The goal is to run the converted notebook (to .py script) from a command line or in other scripts.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
