How do I create a new file in my current directory?

15 views
Skip to first unread message

Austin Peña

unread,
Jun 11, 2020, 12:04:47 AM6/11/20
to spyder
Every time I create a new file, it creates it in the /tmp directory. And then when I go to save it, I can only save it via a "very long" relative path. What's the recommended workflow?

Bibeesh Y S

unread,
Jun 12, 2020, 5:57:04 PM6/12/20
to spyd...@googlegroups.com
Hi,

You can set the path in path manager.

Regards
Bibeesh

On Thu, 11 Jun, 2020, 9:34 AM Austin Peña, <austinco...@gmail.com> wrote:
Every time I create a new file, it creates it in the /tmp directory. And then when I go to save it, I can only save it via a "very long" relative path. What's the recommended workflow?

--
You received this message because you are subscribed to the Google Groups "spyder" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spyderlib+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/spyderlib/2b4c0887-c49b-42a5-a4b6-dbfb70e305f1o%40googlegroups.com.

Mauricio Azálgara Bedoya

unread,
Jun 12, 2020, 5:57:05 PM6/12/20
to spyd...@googlegroups.com
It is possible to set directories using adding the root to the file such as follows:

import pandas as pd

## df is a DataFrame

df.to_csv('001.csv',sep=',',index=False,header=False) ## the file is saved in the predetermined directory.
df.to_csv('C:\MyWorksInPython\001.csv',sep=',',index=False,header=False)    ## the file is saved in  'C:\MyWorksInPython\ 

You may use a new directory if you would use many files.

By the way, take care with the direction of the symbol '\'.

Regards  

On Wed, Jun 10, 2020 at 11:04 PM Austin Peña <austinco...@gmail.com> wrote:
Every time I create a new file, it creates it in the /tmp directory. And then when I go to save it, I can only save it via a "very long" relative path. What's the recommended workflow?

--
You received this message because you are subscribed to the Google Groups "spyder" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spyderlib+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/spyderlib/2b4c0887-c49b-42a5-a4b6-dbfb70e305f1o%40googlegroups.com.


--

Atentamente,

Mauricio Azálgara Bedoya

Dirección: 120 Calle Lima | Int. A-1, Yanahuara

                   04017 Arequipa

                   PERU

Móvil: ++51 998 050 690

Teléfono: ++51 54 317 803

Cuenta Skype: mazalgarab

Reply all
Reply to author
Forward
0 new messages