You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Will make sure all the folders for "./data/f1/f2/n1/n1" are created first before writing.
We can save on the explicit pathlib import and make the save a single line if here contains an option akin to create_dirs=True.
It would turn the above code into.
Not sure this is a good idea and in here()'s scope. Should be the user's responsibility to create the context for here() to work. It's already a one-liner to pl.Path(here("./data/f1/f2/n1/n1", warn=False)).mkdir(parents=True, exist_ok=True). Have the user go through the mkdir ceremony.
While
here
was mainly used to read data. It's also useful to write data to locations.However, it's a little clunky to create folders before using here.
For example:
Will make sure all the folders for
"./data/f1/f2/n1/n1"
are created first before writing.We can save on the explicit pathlib import and make the save a single line if
here
contains an option akin tocreate_dirs=True
.It would turn the above code into.
The
create_dirs
parameter would also setwarn=False
automatically (since you're most likely going to use this idiom to write to a new file).The text was updated successfully, but these errors were encountered: