DataFrame.to_json(path_or_buf=None, orient=None, date_format=None, double_precision=10, force_ascii=True, date_unit='ms', default_handler=None, lines=False, compression='infer', index=True, indent=None, storage_options=None)#

Write Elasticsearch data to a json file.

By setting the lines parameter to True, and orient to 'records', the entire DataFrame can be written in a streaming manner. Doing so avoids the need to have the entire DataFrame in memory. This format is known as JSON lines and can use the file extension .jsonl.

See Also#