maxframe.liteframe.read_json#
- maxframe.liteframe.read_json(path, *, lines=True, dtype=None, usecols=None, chunk_bytes='64M', compression='infer', head_bytes='100k', default_index_type=None, storage_options=None, merge_small_files=True, session=None, **kwargs)[source]#
Read a JSON file into a LiteFrame with Arrow dtypes.
By default reads line-delimited JSON (JSONL/NDJSON) which is the natural fit for chunked distributed I/O.
- Parameters:
path (str) – File path or glob pattern. Supports local and cloud storage paths.
lines (bool, default True) – Read the file as line-delimited JSON (one JSON object per line).
dtype (dict, optional) – Column name to dtype mapping for explicit type specification.
usecols (list, optional) – Return a subset of columns.
chunk_bytes (str, default '64M') – Target chunk size for splitting files.
compression (str, default 'infer') – Compression type. Inferred from file extension if ‘infer’.
head_bytes (str, default '100k') – Bytes to read for schema inference.
default_index_type (str, optional) – Type of default index to generate.
storage_options (dict, optional) – Extra options for storage connection.
merge_small_files (bool, default True) – Merge small files into larger chunks.
session (session, optional) – Execution session for remote dtype inference.
- Return type:
See also
LiteFrame.to_jsonWrite a LiteFrame to a JSON file.
read_csvRead a CSV file into a LiteFrame.