本文整理匯總了Python中pandas.io.pickle._unpickle_array方法的典型用法代碼示例。如果您正苦於以下問題:Python pickle._unpickle_array方法的具體用法?Python pickle._unpickle_array怎麽用?Python pickle._unpickle_array使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類pandas.io.pickle
的用法示例。
在下文中一共展示了pickle._unpickle_array方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: _unpickle_sparse_frame_compat
# 需要導入模塊: from pandas.io import pickle [as 別名]
# 或者: from pandas.io.pickle import _unpickle_array [as 別名]
def _unpickle_sparse_frame_compat(self, state):
""" original pickle format """
series, cols, idx, fv, kind = state
if not isinstance(cols, Index): # pragma: no cover
from pandas.io.pickle import _unpickle_array
columns = _unpickle_array(cols)
else:
columns = cols
if not isinstance(idx, Index): # pragma: no cover
from pandas.io.pickle import _unpickle_array
index = _unpickle_array(idx)
else:
index = idx
series_dict = DataFrame()
for col, (sp_index, sp_values) in compat.iteritems(series):
series_dict[col] = SparseSeries(sp_values, sparse_index=sp_index,
fill_value=fv)
self._data = to_manager(series_dict, columns, index)
self._default_fill_value = fv
self._default_kind = kind