Method: Polars::IO#read_json
- Defined in:
- lib/polars/io/json.rb
#read_json(source, schema: nil, schema_overrides: nil, infer_schema_length: N_INFER_DEFAULT) ⇒ DataFrame
Read into a DataFrame from a JSON file.
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/polars/io/json.rb', line 25 def read_json( source, schema: nil, schema_overrides: nil, infer_schema_length: N_INFER_DEFAULT ) if Utils.pathlike?(source) source = Utils.normalize_filepath(source) end rbdf = RbDataFrame.read_json( source, infer_schema_length, schema, schema_overrides ) Utils.wrap_df(rbdf) end |