Skip to content

andrewkittredge/vector_cache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vector_cache

Caching for functions that return pandas DataFrames.

@vector_cache
def foo(empty_df):
    print 'populating df'
    results = lengthy_calculation(df.index, df.columns)
    empty_df.update(results)
    return empty_df

required_data = pandas.DataFrame(index=[1, 2, 3, 4], columns=['a, 'b', 'c'])
foo(required_data) # foo is called
foo(required_data) #foo is not called

About

cache pandas.DataFrames

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages