kolena.io
kolena.io
provides helper functions for converting pandas.DataFrame
s containing
to and from common serializable formats while adhering to the JSON specifications, and preserving
non-primitive data objects.
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 |
()
|
kwargs
|
Any
|
keyword arguments to |
{}
|
Returns:
Type | Description |
---|---|
Union[str, None]
|
None or str. |
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 |
()
|
kwargs
|
Any
|
keyword arguments to |
{}
|
Returns:
Type | Description |
---|---|
DataFrame
|
DataFrame. |
dataframe_to_parquet(df, *args, **kwargs)
#
Helper function to export pandas DataFrame containing annotation or asset to Parquet format.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
args
|
Any
|
positional arguments to |
()
|
kwargs
|
Any
|
keyword arguments to |
{}
|
Returns:
Type | Description |
---|---|
Union[bytes, None]
|
None or str. |
dataframe_from_parquet(*args, **kwargs)
#
Helper function to load pandas DataFrame exported to Parquet with dataframe_to_parquet
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
args
|
Any
|
positional arguments to |
()
|
kwargs
|
Any
|
keyword arguments to |
{}
|
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 |
()
|
kwargs
|
Any
|
keyword arguments to |
{}
|
Returns:
Type | Description |
---|---|
DataFrame
|
DataFrame. |