title: AWS Lambda - Python - reading csv file in S3-uploaded packaged zip function
body: <p>I have a lambda function in Python 3.6 which I compressed into a zip file to upload to S3 (total function folder size is 180MB ,that's why). Inside the zip I have 1 csv file ('example.csv') which I want to read in the lambda handler function.</p>
  
  <p>How to read this file?
  I tried:</p>
  
  <pre><code>filename = 'example.csv'
  filepath = os.environ['LAMBDA_TASK_ROOT'] + '/' + filename
  df = pd.read_csv(filepath, dtype=str)
  
  # Failed with OSError: Initializing from file failed
  </code></pre>
  
  <p>Example of the content of my lambda function folder:</p>
  
  <pre><code>root:
   -- lambda_function.py
   -- example.csv
   -- bunch of library folders
  </code></pre>
  
  <p>Content of my csv file:</p>
  
  <pre><code>  id | value | something | else
  -----------------------------------
    0  |  lol  |    ok     |  bye
    1  |  omg  |    foo    |  bar
    2  |  thx  |    baz    |  qux
  </code></pre>
  
  <p>What is the path to my csv file?</p>