title: NotImplementedError: Text mode not supported, use mode='wb' and manage bytes in s3fs
body: <p>I know that there are a similar question but it is more general and not specific of this package. I am saving a pandas dataframe within a Sagemaker Jupyter notebook into a csv in S3 as follow:</p>
  
  <pre><code>df.to_csv('s3://bucket/key/file.csv', index=False)
  </code></pre>
  
  <p>However I am getting the following error:</p>
  
  <pre><code>NotImplementedError: Text mode not supported, use mode='wb' and manage bytes
  </code></pre>
  
  <p>The code more or less is that I read a csv from S3, make some preprocessing on it and then saves it to S3. I can read csv from S3 successfully with:</p>
  
  <pre><code>df.read_csv('s3://bucket/key/file.csv')
  </code></pre>
  
  <p>The object that I am trying to save to S3 is indeed a <em>pandas.core.frame.DataFrame</em></p>
  
  <p>In the notebook I can see using <code>!pip show package</code> that I have pandas 0.24.2 and s3fs 0.1.5. </p>
  
  <p>What could be the problem? </p>