title: pandas to_csv doesn't output the file
body: <p>I'm using jupyter notebook pandas <code>to_csv</code> doesn't output the dataframe to a file.</p>
  <p>I tried to use <code>to_csv</code> to output a dataframe to a csv file by setting the working directory or specify the directory, and it didn't create any file. The code ran and didn't produce any error message, but when I opened the folder, there was no such file.</p>
  <p>I tried a different IO, and it did show the result had been output.</p>
  <pre><code>from io import StringIO
  
  output = StringIO()
  
  a.to_csv(output)
  
  print(output.getvalue())
  </code></pre>
  <p>I got the following output:</p>
  <pre><code>,a
  
  0,1
  
  1,2
  
  2,3
  </code></pre>
  <p>but again <code>to_csv('filepath/filename.csv')</code> doesn't output any file.</p>
  <p>PS: I can read any file in any directory using read_csv().</p>
  <h1>Update</h1>
  <p>If I save the file <code>df.to_csv('testfile.csv')</code> then do <code>pd.read_csv('testfile.csv')</code></p>
  <p>I can read the file but cannot see it in the directory.</p>
  <p>Also, doing <code>[x for x in os.listdir() if x == 'testfile.csv']</code> will list the file.</p>