Skip to main content

Automatically cache results of intensive computations in IPython.

Project description

%%pdcache cell magic

pypi version license

Automatically cache results of intensive computations in IPython.

Inspired by ipycache.

Installation

$ pip install ipy-pdcache

Usage

In IPython:

In [1]: %load_ext ipy_pdcache

In [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.

%load_ext ipy_pdcache import pandas as pd

%%pdcache df data.csv print('hu') df = pd.DataFrame({'A': [1,2,3], 'B': [4,5,6]}) print('ha') 1

Dev:

Testing:

Misc:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for ipy-pdcache, version 0.0.5
Filename, size File type Python version Upload date Hashes
Filename, size ipy_pdcache-0.0.5-py3-none-any.whl (3.6 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size ipy_pdcache-0.0.5.tar.gz (3.3 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page