caikit.interfaces.ts.data_model.backends.spark_util
Internal utilities for supporting spark backend implementations
Functions
|
pyspark.pandas.Series objects do not support |
|
Roughly mocks the behavior of pandas groupBy but on a spark dataframe. |
Module Contents
- caikit.interfaces.ts.data_model.backends.spark_util.iteritems_workaround(series: Any, force_list: bool = False) Iterable[source]
pyspark.pandas.Series objects do not support iteration. For native pandas.Series objects this function will be a no-op.
For pyspark.pandas.Series or other iterable objects we try to_numpy() (unless force_list is true) and if that fails we resort to a to_list()