本文整理匯總了Python中castra.Castra.to_dask方法的典型用法代碼示例。如果您正苦於以下問題:Python Castra.to_dask方法的具體用法?Python Castra.to_dask怎麽用?Python Castra.to_dask使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類castra.Castra
的用法示例。
在下文中一共展示了Castra.to_dask方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: from_castra
# 需要導入模塊: from castra import Castra [as 別名]
# 或者: from castra.Castra import to_dask [as 別名]
def from_castra(x, columns=None):
"""Load a dask DataFrame from a Castra.
Parameters
----------
x : filename or Castra
columns: list or string, optional
The columns to load. Default is all columns.
"""
from castra import Castra
if not isinstance(x, Castra):
x = Castra(x, readonly=True)
return x.to_dask(columns)
示例2: from_castra
# 需要導入模塊: from castra import Castra [as 別名]
# 或者: from castra.Castra import to_dask [as 別名]
def from_castra(x, columns=None):
"""
Load a dask DataFrame from a Castra.
The Castra project has been deprecated. We recommend using Parquet
instead.
Parameters
----------
x : filename or Castra
columns: list or string, optional
The columns to load. Default is all columns.
"""
from castra import Castra
if not isinstance(x, Castra):
x = Castra(x, readonly=True)
return x.to_dask(columns)
示例3: load
# 需要導入模塊: from castra import Castra [as 別名]
# 或者: from castra.Castra import to_dask [as 別名]
def load(file_name):
c = Castra(path = './subreddit_dumps/'+file_name+'.castra/')
df = c.to_dask()
return df