title: Upload CSV file using Python Flask and process it
body: <p>I have the following code to upload an CSV file using Python FLASK.</p>
  
  <pre><code>from flask_restful import Resource
  import pandas as pd
  
  ROOT_PATH = os.path.dirname(os.path.abspath(__file__))
  
  class UploadCSV(Resource):
  
      def post(self):
          files = request.files['file']
          files.save(os.path.join(ROOT_PATH,files.filename))
          data = pd.read_csv(os.path.join(ROOT_PATH,files.filename))
          print(data)
  
  api.add_resource(UploadCSV, '/v1/upload')
  
  if __name__ == '__main__':
      app.run(host='localhost', debug=True, port=5000)
  </code></pre>
  
  <p>This code works fine and I can able to upload CSV file successfully and read it using pandas dataframe. But I'm saving the csv in local filesystem and reading it. </p>
  
  <p>I have tried reading like below -</p>
  
  <pre><code>files = request.files['file']
  files.read()
  </code></pre>
  
  <p>The results obtained were in the format of bytes but I need it in the format of dictionary. So I used pandas dataframe to read it and I later convert it into a custom dictionary of my format.</p>
  
  <p>Is it possible to read the CSV file on the fly without writing it in local filesystem? Or any equivalent way we can achieve using Python Flask Restful?</p>