DOC: to_json for stream object #61280
Labels
Closing Candidate
May be closeable, needs more eyeballs
Docs
IO JSON
read_json, to_json, json_normalize
Pandas version checks
main
hereLocation of the documentation
https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.to_json.html
Documentation problem
Currently the docs for
to_json
method only mentions about file-like object, yet we can pass buffer which are more like stream object. This was raised on the stubs repo (pandas-dev/pandas-stubs#1179).Should the docs reflect the ability of not just file-like but also stream-like? It seems to be supported at run time for sure.
Thanks!
Suggested fix for documentation
Add mention of stream-like object for the
path_or_buf
argument.The text was updated successfully, but these errors were encountered: