You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was wondering and some search did not give me a solution, would it be possible/feasible to save all kind of data inside the ipython notebook file?
For teaching purposes as well as to keep things together, I would love to e.g. embedding images, data-files and other relevant information inside the same jupyter-notebook file. The file would be basically a container for those other data.
On load, underneath the file in the file-viewer, those files would be listed and could be accessed by an own namespace.
E.g. showing an embedded image would be something like this in markdown
[My embedded image](data:myimage.png)
This will look not in the same folder but 'inside' the jupyter notebook file itself for the file.
In the same way, one could store and access CSV files or other data.
...save(´data:data.csv')
or ...load(´data:data.csv')
respectively. Whereas, save could be blocked by settings to avoid that data once embedded can be modified.
Within a code cell this data could be both be called and saved inside the namespace.
Yes, this could result in very large notebook files (files, esp. data could be packed internally, reducing the total filesize) but I see many use cases, where this is a far smaller problem compared to missing additional files. E.g. in a teaching session ask students to download all given files and open up the jupyter notebook file, there will always be a few who claim that images are not shown.... well because they did not download the necessary auxiliary files.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I was wondering and some search did not give me a solution, would it be possible/feasible to save all kind of data inside the ipython notebook file?
For teaching purposes as well as to keep things together, I would love to e.g. embedding images, data-files and other relevant information inside the same jupyter-notebook file. The file would be basically a container for those other data.
On load, underneath the file in the file-viewer, those files would be listed and could be accessed by an own namespace.
E.g. showing an embedded image would be something like this in markdown
[My embedded image](data:myimage.png)
This will look not in the same folder but 'inside' the jupyter notebook file itself for the file.
In the same way, one could store and access CSV files or other data.
...save(´data:data.csv')
or
...load(´data:data.csv')
respectively. Whereas, save could be blocked by settings to avoid that data once embedded can be modified.
Within a code cell this data could be both be called and saved inside the namespace.
Yes, this could result in very large notebook files (files, esp. data could be packed internally, reducing the total filesize) but I see many use cases, where this is a far smaller problem compared to missing additional files. E.g. in a teaching session ask students to download all given files and open up the jupyter notebook file, there will always be a few who claim that images are not shown.... well because they did not download the necessary auxiliary files.
Beta Was this translation helpful? Give feedback.
All reactions