DataFrame.toJSON
Convert DataFrame to JSON format
Deprecated in v1.1.0: Use the dfd.toJSON function directly instead
DataFrame.toJSON(options)
Parameters | Type | Description | Default |
options | object, optional | Configuration object:
| {
|
The toJSON function can be used to write out a DataFrame or Series to JSON format/file. The output is configurable and will depend on the environment. In the following examples, we show you how to write/download a JSON file from Node and Browser environments.
Convert DataFrame/Series to JSON and return value
Convert DataFrame/Series to JSON and write to local file path
Writing a DataFrame/Series as JSON, to a local file path is only supported in the Nodejs environment
Convert DataFrame/Series to JSON and download file in browser
You can automatically convert and download a DataFrame/Series as a JSON file in a browser environment, by specifying a fileName
and setting download
to true.
Last updated