title: Adding a path to pandas to_csv function
body: <p>I have a small chunk of code using Pandas that reads an incoming CSV, performs some simple computations, adds a column, and then turns the dataframe into a CSV using to_csv. </p>
  
  <p>I was running it all in a Jupyter notebook and it worked great, the output csv file would be there right in the directory when I ran it. I have now changed my code to be run from the command line, and when I run it, I don't see the output CSV files anywhere. The way that I did this was saving the file as a .py, saving it into a folder right on my desktop, and putting the incoming csv in the same folder. </p>
  
  <p>From similar questions on stackoverflow I am gathering that right before I use to_csv at the end of my code I might need to add the path into that line as a variable, such as this.</p>
  
  <pre><code>path = 'C:\Users\ab\Desktop\conversion'
  
  final2.to_csv(path, 'Combined Book.csv', index=False)
  </code></pre>
  
  <p>However after adding this, I am still not seeing this output CSV file in the directory anywhere after running my pretty simple .py code from the command line. </p>
  
  <p>Does anyone have any guidance? Let me know what other information I could add for clarity. I don't think sample code of the pandas computations is necessary, it is as simple as adding a column with data based on one of my incoming columns. </p>