title: Jupyter Notebook : I am unable to arg-parse a value to variable and generate another notebook from command prompt based on that value
body: <p>I have a Notebook which I call it as Template . I need to pass a variable called ID = 'EF12345'(string value) as an argument based on which my notebook will run and create a new notebook</p>
  
  <p>These are few posts which I referred , I am missing something where I am not to figure out 
  <a href="https://stackoverflow.com/questions/50763033/argparse-in-jupyter-notebook-throws-a-typeerror">Argparse in Jupyter Notebook throws a TypeError</a></p>
  
  <p>I cannot do pip install (blocked -- no internet) </p>
  
  <p><a href="https://stackoverflow.com/questions/37534440/passing-command-line-arguments-to-argv-in-jupyter-ipython-notebook">Passing command line arguments to argv in jupyter/ipython notebook</a></p>
  
  <p>Original Code 
  cold_mill_id = 'E126644'</p>
  
  <pre><code>  strip_stats = hive_ctx.sql(query).toPandas()
    strip_stats[strip_stats.cold_mill_id == cold_mill_id]
  
    sns.set(font_scale=1.2, font='DejaVu Sans')
    fig, ax = plt.subplots(1, 1, figsize=(15, 6))
    xp = df.position
    yp = df.fm_entry_temperature
    p = ax.plot(xp, yp, linestyle='-', label='fm_entry_temperature')
    yp = df.fm_exit_temperature
    p = ax.plot(xp, yp, linestyle='-', label='fm_exit_temperature')
    p = ax.set_title('finishing mill temperature profiles for cold_mill_id=' + 
    cold_mill_id)
    p = ax.set_xlabel('position')
    p = ax.set_ylabel('temperature    (F)')
    p = ax.set_ylim(1650, 2100)
    p = plt.legend()
  </code></pre>
  
  <p>I added argparse to get value for my cold mill id </p>
  
  <pre><code>   parser.add_argument('--id')
     args = parser.parse_args([])
     args, cold_mill_id = parser.parse_known_args()
  </code></pre>
  
  <p>ID which I am passing is not working , I am not able to pass ID - which is string and then my code sucks 
  This is how I need </p>
  
  <p><code>nbconvert --to notebook --execute Template.ipynb 'E12664'</code></p>
  
  <p>ID which I am passing from Parser is not working , neither can I debug from Command line what is happening fails at certain point in execution when TYPE of ID mismatches with what is expected </p>
  
  <p>Added this piece of code after argparse to check what is getting inside but won't print it in command line </p>
  
  <pre><code>import sys
  print(sys.argv)
  
  </code></pre>
  
  <p>I am doing something horribly wrong I am clueless 
  What I need is I need to somehow pass this ID to cold_mill_id in jupyter notebook and save those results for new ID as one more notebook</p>