Notebook Import and Integration
If you have previous experience and analyses with Jupyter or similar Python notebooks, you can import your previous work into Einblick and take advantage of Einblick's unique capabilities to further your insight into your data. You can also start from scratch, creating and arranging cells as you see fit.
Import
Importing Notebooks
Einblick supports the import of .ipynb
files into a canvas. To import a .ipynb
file, click the Import notebook
button in the top-left corner of the main menu (pictured below), and select an .ipynb
file to upload. Alternatively, drag an .ipynb
file onto the main menu.
When an .ipynb
file is imported, corresponding Python cell
and Annotation
operators will be created for each cell in the notebook, containing the full code and text of each cell. The original console outputs of each code cell will also be shown, but is not recomputed until the cells are explicitly run. The created operators will maintain the order in the original notebook, and will be arranged vertically.
Importing Data
To learn how to import data in Einblick, visit the 'Datasets and Data Connectors` page. Some pre-existing notebooks will use pandas.read_csv(<file>)
or with open(<file>)
statements to import data from a filesystem, but in most cases, the cells will need to instead take in a pandas
dataframe from the cell's dataframe input.
Importing Packages
Packages can be imported by using the IPython magic command !pip install <package-name>
.
Working with Cells
Creating Cells
Whether you imported a notebook file or not, you can add new cells to the canvas by adding Python cell
(for code) and Annotation
(for text, Markdown and HTML) operators to the canvas, just like any other operator. You can also add any other available operators as you see fit. Consult the Python cell
and Annotation
pages for additional information on these operators.
Shared Python Runtime
All Python cell
operators in a canvas share a Python runtime, as with other notebook environments. Therefore, any variable defined in one Python cell
will be available in any other in the same canvas. Notably, any data in the runtime will not immediately be available to other operators in the form of dataframes (see the next section on how to accomplish this.)
The Python runtime can be started or stopped from the runtime menu at the top-left of the canvas.
Exporting Data From the Runtime
While data in the runtime is not immediately available for use in other non-Python cell
operators, any pandas
dataframe in the runtime can be exported to the canvas through the einblick.write_df
function. The Python cell
page contains further information on this function and the rest of the Einblick Python runtime API.
Running Multiple Cells
Right-clicking on any Python cell
will show the Run all cells
option, which will run all cells in the canvas, starting from the uppermost cell. Cells that are waiting to run will show a queued...
message until they are run.