本文整理汇总了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