コード例 #1
0
def _ensure_format(obj):
    if isinstance(obj, FileFormat):
        return obj
    elif obj == "parquet":
        return ParquetFileFormat()
    elif obj == "ipc":
        return IpcFileFormat()
    else:
        raise ValueError("format '{}' is not supported".format(obj))
コード例 #2
0
ファイル: dataset.py プロジェクト: astrojams1/cleanstreets
def _ensure_format(obj):
    if isinstance(obj, FileFormat):
        return obj
    elif obj == "parquet":
        return ParquetFileFormat()
    elif obj in {"ipc", "arrow", "feather"}:
        return IpcFileFormat()
    elif obj == "csv":
        return CsvFileFormat()
    else:
        raise ValueError("format '{}' is not supported".format(obj))
コード例 #3
0
def _ensure_format(obj):
    if isinstance(obj, FileFormat):
        return obj
    elif obj == "parquet":
        return ParquetFileFormat()
    elif obj in {"ipc", "arrow", "feather"}:
        return IpcFileFormat()
    elif obj == "csv":
        return CsvFileFormat()
    elif obj == "rados-parquet":
        return RadosParquetFileFormat("/etc/ceph/ceph.conf", "cephfs_data")
    else:
        raise ValueError("format '{}' is not supported".format(obj))