I've got a web server (tornado), and want to serialize a large dataframe to json but chunk by chunk, not creating the whole json string then sending it.
Is that possible ?
I've got a web server (tornado), and want to serialize a large dataframe to json but chunk by chunk, not creating the whole json string then sending it.
Is that possible ?
The http server (tornado) implements so this works :
import tornado.ioloop
import tornado.web
impot pandas as pd
df=pf.DataFrame({"test":[1,2,3,4]})
class MainHandler(tornado.web.RequestHandler):
def get(self):
df.to_json(self)