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
1,4
2,5
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:

Project details


Download files

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

Source Distribution

ipy_pdcache-0.0.2.tar.gz (2.9 kB view hashes)

Uploaded Source

Built Distribution

ipy_pdcache-0.0.2-py3-none-any.whl (3.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page