kaskada.formatters_helpers
Module Contents
Functions
|
Safely recursively gets an item from a dict, otherwise returns the default value |
|
|
|
|
|
Returns a html table row, where the key is bolded, and the value is output as code. |
|
Returns a html table row, where the key is bolded, and the value is output as is. |
|
|
|
|
|
|
|
Converts a fenl field to a string representation. |
|
Converts a fenl dataType to a string representation. |
|
Gets a dataframe from a schema object if it exists |
|
Converts a google.protobuf.timestamp_pb2 into a python datetime object. |
|
|
|
Converts a protobuf response into a simple python dictionary. |
Attributes
- get_item(obj, keys, default='')[source]
Safely recursively gets an item from a dict, otherwise returns the default value
- Parameters:
- Returns:
Either the found value or the default.
- Return type:
string
- html_obj_table_row(key, value)[source]
Returns a html table row, where the key is bolded, and the value is output as code.
- html_table_row(key, value)[source]
Returns a html table row, where the key is bolded, and the value is output as is.
- convert_fenl_schema_field(field)[source]
Converts a fenl field to a string representation.
- Parameters:
field (schema_pb2.Schema_Field) – the input field
- Returns:
The string representation of the fenl Field
- Return type:
- convert_fenl_datatype(data_type)[source]
Converts a fenl dataType to a string representation.
- Parameters:
data_type (schema_pb2.DataType) – the input dataType
- Returns:
The string representation of the fenl DataType
- Return type:
- get_schema_dataframe(obj)[source]
Gets a dataframe from a schema object if it exists
- Parameters:
obj (kaskada.fenl.v1alpha.schema_pb2.Schema | Any) – Either a schema object or an object that has a schema or analysis object at the root level
- Returns:
Either a dataframe describing the schemea or None if no schema exists in the passed object.
- Return type:
pandas.dataframe | None