how to export data to unix system location using python
<p>I am trying to write the file to my company's project folder which is unix system and the location is /department/projects/data/. So I used the following code</p>

<p>df.to_csv("/department/projects/data/Test.txt", sep='\t', header = 0)</p>

<p>The error message shows it cannot find the locations. how to specify the file location in Unix using python?</p>

<pre><code>df.to_csv("C:\Users\abc\Desktop\Test.txt", sep='\t', header = 0)
</code></pre>

<p>Either you really mean that the backslashes are doubled as in</p>

<pre><code>df.to_csv("C:\\Users\\abc....
</code></pre>

<p>or your strings are just wrong. I believe that Python will support Unix style paths on both Windows and Unix - use that style.</p>

<p>Replace your \ characters with / and dump the "C:".</p>

python unix