daft.read_json
daft.read_json#
- daft.read_json(path: str, fs: Optional[fsspec.spec.AbstractFileSystem] = None) daft.dataframe.dataframe.DataFrame [source]#
Creates a DataFrame from line-delimited JSON file(s)
Example
>>> df = daft.read_json("/path/to/file.json") >>> df = daft.read_json("/path/to/directory") >>> df = daft.read_json("/path/to/files-*.json") >>> df = daft.read_json("s3://path/to/files-*.json")
- Parameters
path (str) – Path to JSON files (allows for wildcards)
fs (fsspec.AbstractFileSystem) – fsspec FileSystem to use for reading data. By default, Daft will automatically construct a FileSystem instance internally.
- Returns
parsed DataFrame
- Return type