-
Notifications
You must be signed in to change notification settings - Fork 46
Closed
Description
I can do this:
from upath import UPath
import pandas as pd
pd.read_csv(str(UPath('gs://bucket/filename.csv')))
but not this:
up = UPath('gs://')
pd.read_csv(str(up.joinpath('bucket', 'colombia/filename.csv')))
This is because
str(UPath('gs://bucket/filenamecsv'))
gives 'gs://bucket/colombia/filename.csv' which maintains the leading //
while
str(UPath('gs://').joinpath('bucket', 'filename.csv'))
gives 'gs:/bucket/filename.csv' which is invalid.
This is important because I need to be able to programmatically construct the path separate from the bucket. The idea behind this tool is to keep me from using f strings, but it appears that is my only option here.
Metadata
Metadata
Assignees
Labels
No labels