Exemplo n.º 1
0
Arquivo: io.py Projeto: ghuls/polars
def read_json(source: Union[str, BytesIO]) -> DataFrame:
    """
    Read into a DataFrame from JSON format.

    Parameters
    ----------
    source
        Path to a file or a file like object.
    """
    return DataFrame._read_json(source)
Exemplo n.º 2
0
def read_json(source: Union[str, IOBase], json_lines: bool = False) -> DataFrame:
    """
    Read into a DataFrame from JSON format.

    Parameters
    ----------
    source
        Path to a file or a file-like object.
    json_lines
        Toggle between "JSON" and "NDJSON" format
    """
    return DataFrame._read_json(source, json_lines)