當前位置: 首頁>>代碼示例>>Python>>正文


Python Castra.to_dask方法代碼示例

本文整理匯總了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)
開發者ID:danielballan,項目名稱:dask,代碼行數:15,代碼來源:io.py

示例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)
開發者ID:gameduell,項目名稱:dask,代碼行數:19,代碼來源:io.py

示例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
開發者ID:JherezTaylor,項目名稱:Datamining-Reddit,代碼行數:6,代碼來源:load_subreddit_castra.py


注:本文中的castra.Castra.to_dask方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。