Docs/API reference

DatasetResult · Python

Read and export a single extracted field map.

Download .md
Developers3 min read12 sections
Source reference · Match your SDK version. Availability and known issues
In this guide

Purpose and lifecycle

Returned by Dataset.build. Constructing it manually requires the correct native result handle.

Export methods create or replace files. A small-result export is not a resumable dataset shard or checkpoint. Python df() needs pandas installed separately.

Definition and availability

Source snapshot: 1.0.0-alpha.3. Package export. Declared in source; this is not a runtime test result.

Signatures and source locations are generated from the SDK wrappers. Clean snapshots link to the recorded commit. Modified snapshots link to main, which may differ; file hashes identify the local inputs.

class DatasetResult
python1 lines · copy-ready

Members

MemberKindReturn / value typeSource status
__init__methodNot annotated; see behavior notesPresent in source
to_jsonmethodNot annotated; see behavior notesPresent in source
to_csvmethodNot annotated; see behavior notesPresent in source
to_parquetmethodNot annotated; see behavior notesPresent in source
to_dictmethoddictPresent in source
dfmethodNot annotated; see behavior notesPresent in source
__getitem__methodstrPresent in source
__repr__methodstrPresent in source

__init__()

Wrap a native DatasetResult handle returned by the engine. A plain Python dictionary is not a compatible handle.

Returns / value: Not annotated; see behavior notes.

def __init__(self, core_result: _CoreDatasetResult)
python1 lines · copy-ready
ParameterTypeRequired / defaultMeaning
core_result_CoreDatasetResultRequiredNative result handle produced by the engine.

to_json()

Serialize the field map to one JSON object file.

Returns / value: Not annotated; see behavior notes.

def to_json(self, path: str)
python1 lines · copy-ready
ParameterTypeRequired / defaultMeaning
pathstrRequiredFilesystem path relative to the process working directory unless absolute.

to_csv()

Write one header row and one data row.

Returns / value: Not annotated; see behavior notes.

def to_csv(self, path: str)
python1 lines · copy-ready
ParameterTypeRequired / defaultMeaning
pathstrRequiredFilesystem path relative to the process working directory unless absolute.

to_parquet()

Write the fields as a one-row Parquet dataset.

Returns / value: Not annotated; see behavior notes.

def to_parquet(self, path: str)
python1 lines · copy-ready
ParameterTypeRequired / defaultMeaning
pathstrRequiredFilesystem path relative to the process working directory unless absolute.

to_dict()

Return a copy of the extracted string-valued fields.

Returns / value: dict.

def to_dict(self) -> dict
python1 lines · copy-ready

df()

Return a one-row pandas DataFrame; requires pandas.

Returns / value: Not annotated; see behavior notes.

def df(self)
python1 lines · copy-ready

__getitem__()

Look up a field by key; the native result can return None for an absent key.

Returns / value: str.

def __getitem__(self, key: str) -> str
python1 lines · copy-ready
ParameterTypeRequired / defaultMeaning
keystrRequiredField-map key or extraction field name.

__repr__()

Return a short debugging representation of the wrapper. This is not a data export or a stable serialization format.

Returns / value: str.

def __repr__(self) -> str
python1 lines · copy-ready

Errors and operational limits

Filesystem and serialization failures propagate. Node export methods reject with ExportError. Python can also expose OSError directly.

Source availability, package publication and runtime validation are separate facts. These pages describe the source snapshot, not a claim that all platforms or every API path have passed production acceptance.