title: How to read parquet files from AWS S3 using spark dataframe in python (pyspark)
body: <p>I'm trying to read some parquet files stored in a s3 bucket. I am using the following code:</p>
  <pre><code>s3 = boto3.resource('s3')
  
  # get a handle on the bucket that holds your file
  bucket = s3.Bucket('bucket_name')
  
  # get a handle on the object you want (i.e. your file)
  obj = bucket.Object(key = 'file/key/083b661babc54dd89139449d15fa22dd.snappy.parquet')
  
  # get the object
  response = obj.get()
  
  # read the contents of the file and split it into a list of lines
  lines = response[u'Body'].read().split('\n')
  </code></pre>
  <p>When trying to execute the last line of code <code>lines = response[u'Body'].read().split('\n')</code> I'm getting the following error:</p>
  <pre><code>TypeError: a bytes-like object is required, not 'str'
  </code></pre>
  <p>I'm not really sure how to solve this issue.</p>