pd_flatten

ssapy.io.pd_flatten(data, factor=1)[source][source]

Flatten and process a list of data values.

This function takes a list of data values, attempts to split each value based on commas (excluding the first and last characters), and flattens the resulting list. If splitting fails (e.g., due to a TypeError), the original value is added to the result. Finally, all values are converted to floats and divided by the specified factor.

Parameters:
  • data (list) – A list of data values to be processed. Each value can be a string or a type that supports slicing and splitting.

  • factor (float, optional) – A divisor applied to each processed value. Defaults to 1.

Returns:

A list of processed float values, flattened and divided by factor.

Return type:

list