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')[源代码]#
Open a oss/http/https file.
- 参数:
filepath – The file path, which can be an oss, or pathlib.Path object.
mode – optional. open mode.
- 返回:
the file object.
- secretflow.data.io.util.read_csv_wrapper(filepath: str, auto_gen_header_prefix: str = '', **kwargs) DataFrame [源代码]#
A wrapper of pandas read_csv and supports oss file.
- 参数:
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()
.
- 返回:
a pandas DataFrame.