secretflow.data.io#
secretflow.data.io.oss#
Functions:
|
Return a s3 filesystem instance. |
|
Open a oss object. |
secretflow.data.io.util#
Functions:
|
Open a oss/http/https file. |
|
|
|
A wrapper of pandas read_csv and supports oss file. |
|
A wrapper of pandas to_csv and supports oss file. |
- secretflow.data.io.util.open(filepath: Union[str, Path], mode='rb')[source]#
Open a oss/http/https file.
- Parameters:
filepath – The file path, which can be an oss, or pathlib.Path object.
mode – optional. open mode.
- Returns:
the file object.
- secretflow.data.io.util.read_csv_wrapper(filepath: str, auto_gen_header_prefix: str = '', **kwargs) DataFrame[source]#
A wrapper of pandas read_csv and supports oss file.
- Parameters:
filepath – the file path.
auto_gen_header_prefix – If set, the format of generated headers would be {gen_header_prefix}_{col_idx}.
kwargs – all other arguments are same with
pandas.DataFrame.read_csv().
- Returns:
a pandas DataFrame.