cufflinks.utils module

cufflinks.utils.check_kwargs(global_kwargs, values, local_kwargs=None, clean_origin=False)[source]
cufflinks.utils.deep_update(d, d_update)[source]

Updates the values (deep form) of a given dictionary

d : dict
dictionary that contains the values to update
d_update : dict
dictionary to be updated
cufflinks.utils.dict_path(from_d, to_d={}, l=[])[source]

Returns a dictionary with the path in which each of the keys is found

Parameters:
from_d : dict
Dictionary that contains all the keys, values
to_d : dict
Dictionary to which the results will be appended
Example:

dict_path({‘level1’:{‘level2’:{‘level3’:’value’}}}) Returns

{‘level1’: [],
‘level2’: [‘level1’], ‘level3’: [‘level1’, ‘level2’]

}

cufflinks.utils.dict_replace_keyword(d, keyword, kwargs, forceupdate=True)[source]
cufflinks.utils.dict_update(d, k, val, d_ref=None)[source]
cufflinks.utils.inverseDict(d)[source]

Returns a dictionay indexed by values {value_k:key_k} Parameters: ———–

d : dictionary
cufflinks.utils.is_dict(val)[source]
cufflinks.utils.is_list(val)[source]
cufflinks.utils.is_string(val)[source]
cufflinks.utils.kwargs_from_keyword(from_kwargs, to_kwargs, keyword, clean_origin=True)[source]

Looks for keys of the format keyword_value. And return a dictionary with {keyword:value} format

from_kwargs : dict
Original dictionary
to_kwargs : dict
Dictionary where the items will be appended
keyword : string
Keyword to look for in the orginal dictionary
clean_origin : bool
If True then the k,v pairs from the original dictionary are deleted
cufflinks.utils.load_pickle(filename)[source]

Loads a serialized object Parameters: ———–

filename : string
cufflinks.utils.make_dict_from_list(val)[source]
cufflinks.utils.make_list(val)[source]
cufflinks.utils.make_string(val)[source]
cufflinks.utils.merge_dict(d1, d2)[source]

d1 <– d2

cufflinks.utils.pp(el, preString='')[source]

Formats (prettyprint) a concatenated dictionary

cufflinks.utils.read_google(self, url, **kwargs)[source]

Reads a google sheet

cufflinks.utils.save_pickle(obj, filename)[source]

Serializes a given object Parameters: ———–

obj : object filename : string