danfo.read_json(source,) [source]
Parameters | Type | Description |
source: | string, path or URL | Any valid string path is acceptable. The string could be a URL. Valid URL schemes include http, https, ftp, s3, gs, or a local path. Both relative and absolute paths are supported |
Returns:
Promise. Resolves to DataFrame
The read_json method can read JSON file from local disk, or over the internet. For instance, in the example below, user_names.json is a JSON file in this same directory as our script. To read it into danfo DataFrame, you can specify the relative path:
const dfd = require("danfojs-node")dfd.read_json("user_names.json").then(df => {df.head().print()}).catch(err=>{console.log(err);})