I am running a python script from Ubuntu TLS on Windows 10. I need to save a file to a windows folder. If it do eg from a pandas dataframe
df.to_csv("C:\\Users\\XXXX\\Downloads\\my_file.csv")
It just creates a filename C Users XXXX Downloads myfile.csv
in the same folder as my script... (on the ubuntu file system)
try the following
df.to_csv("/mnt/c/Users/XXXX/Downloads/my_file.csv")
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.