Converting raw file content from Flask file upload into dataframe using pandas
pandas.read_csv()
can take any file-like object (with a read()
method) as input, so just use it: http://pandas.pydata.org/pandas-docs/stable/generated/pandas.read_csv.html#pandas.read_csv
@app.route('/upload', methods=['POST'])def upload(): df = pandas.read_csv(request.files.get('uploaded_file'))