Skip to content

kolena.workflow.io#

dataframe_from_csv(*args, **kwargs) #

Helper function to load pandas DataFrame exported to CSV with dataframe_to_csv.

Parameters:

Name Type Description Default
args Any

positional arguments to pandas.DataFrame.read_csv.

()
kwargs Any

keyword arguments to pandas.DataFrame.read_csv.

{}

Returns:

Type Description
DataFrame

DataFrame.

dataframe_from_json(*args, **kwargs) #

Helper function to load pandas DataFrame containing annotation or asset from JSON file or string.

Parameters:

Name Type Description Default
args Any

positional arguments to pandas.DataFrame.read_json.

()
kwargs Any

keyword arguments to pandas.DataFrame.read_json.

{}

Returns:

Type Description
DataFrame

DataFrame.

dataframe_to_csv(df, *args, **kwargs) #

Helper function to export pandas DataFrame containing annotation or asset to CSV format.

Parameters:

Name Type Description Default
args Any

positional arguments to pandas.DataFrame.to_csv.

()
kwargs Any

keyword arguments to pandas.DataFrame.to_csv.

{}

Returns:

Type Description
Union[str, None]

None or str.