https://github.com/kpj/ipy_pdcache
Automatically cache results of intensive computations in IPython.
https://github.com/kpj/ipy_pdcache
ipython-magic jupyter-notebook python
Last synced: 24 days ago
JSON representation
Automatically cache results of intensive computations in IPython.
- Host: GitHub
- URL: https://github.com/kpj/ipy_pdcache
- Owner: kpj
- License: mit
- Created: 2019-09-12T09:41:34.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-04-01T15:36:13.000Z (about 2 years ago)
- Last Synced: 2025-04-28T14:21:31.592Z (24 days ago)
- Topics: ipython-magic, jupyter-notebook, python
- Language: Python
- Size: 19.5 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# %%pdcache cell magic
[](https://pypi.org/project/ipy-pdcache/)
[](https://github.com/kpj/ipy_pdcache/actions)Automatically cache results of intensive computations in IPython.
Inspired by [ipycache](https://github.com/rossant/ipycache).
## Installation
```bash
$ pip install ipy-pdcache
```## Usage
In IPython:
```python
In [1]: %load_ext ipy_pdcacheIn [2]: import pandas as pd
In [3]: %%pdcache df data.csv
...: df = pd.DataFrame({'A': [1,2,3], 'B': [4,5,6]})
...:In [4]: !cat data.csv
,A,B
0,1,4
1,2,5
2,3,6
```This will cache the dataframe and automatically load it when re-executing the cell.