skbio.util.get_data_path¶
- skbio.util.get_data_path(fn, subfolder='data')[source]¶
Return path to filename
fn
in the data folder.State: Experimental as of 0.4.0.
During testing it is often necessary to load data files. This function returns the full path to files in the
data
subfolder by default.- Parameters:
fn (str) – File name.
subfolder (str, defaults to
data
) – Name of the subfolder that contains the data.
- Returns:
Inferred absolute path to the test data for the module where
get_data_path(fn)
is called.- Return type:
Notes
The requested path may not point to an existing file, as its existence is not checked.