title: How to read csv with pandas in tmp directory in aws lambda
body: <p>I am writing a lambda to read some data from a csv into a dataframe, manipulate said data then convert it back to a csv and make an api call with the new csv all on a python lambda.  </p>
  
  <p>I am running into an issue using pandas.read_csv command.  It ends my lambdas trigger execution with no errors.  </p>
  
  <pre class="lang-py prettyprint-override"><code>os.chdir('/tmp')
  for root, dirs, files in os.walk('/tmp', topdown=True):
      for name in files:
          if '.csv' in name:
              testdic[name] = root
              print(os.path.isfile('/tmp/' + name))
              print(os.path.isfile(name))
              df = pd.read_csv(name)
              df = pd.read_csv('/tmp/' + name)
  </code></pre>
  
  <p>Both os.path.isfile return true and i have tried both versions of read_csv, both do not work and end the lambda prematurely without error. </p>
  
  <p>I have confirmed the csv is downloaded into the lambda tmp directory, I can read and print off rows of the csv in tmp. However when i run  = pd.read_csv('/tmp/file.csv') or changing my directory to /tmp and doing  = pd.read_csv('file.csv') it ends the lambda with no error and does not pass that point in the code.  I am using pandas 0.23.4 as that is what I need to use and the code works locally.  Any suggestions would be helpful</p>
  
  <p>Expected results should be the csv being read into a dataframe so I can manipulate it.</p>
  
  <p><em>FIXED:  Could not just use '/tmp/' + filename.  Had to use os.path.join(root, filename), also had to increase the timeout of my lambda due to file size.</em> </p>