Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

return dataframe as csv flask

return Response(
       df.to_csv(),
       mimetype="text/csv",
       headers={"Content-disposition":
       "attachment; filename=filename.csv"})
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #return #dataframe #csv #flask
ADD COMMENT
Topic
Name
8+5 =