My organisation converts any Jupyter Notebooks (.ipynb files) it makes into python scripts (.py files) for easier management in our repos. I need to convert them back so I can run the notebooks but can't work out how.
I believe they've been encoded using the nbconvert
package but I couldn't find a way to convert the files back in the package docs.
I've included the head of one of the .py files bellow in case it makes the encoding format more obvious.
# ---
# jupyter:
# jupytext:
# formats: ipynb,py:light
# text_representation:
# extension: .py
# format_name: light
# format_version: '1.4'
# jupytext_version: 1.2.0
# kernelspec:
# display_name: Python 3
# language: python
# name: python3
# ---
# # Title/filename here
# ### Initialise
import pandas as pd
import numpy as np
# etc
# ### Title here
# +
do_stuff()