edmt.contrib.utils

Module Contents

edmt.contrib.utils.clean_vars(addl_kwargs={}, **kwargs)
edmt.contrib.utils.normalize_column(df, col)
edmt.contrib.utils.clean_time_cols(df, columns=[])
edmt.contrib.utils.format_iso_time(date_string: str) str
edmt.contrib.utils.norm_exp(df: pandas.DataFrame, cols: str | list) pandas.DataFrame

Normalizes specified columns containing list of dicts, expands them into separate rows if needed, and appends new columns to the original dataframe with prefixing.

Parameters: - df: Original pandas DataFrame - cols: str or list of str, names of columns to normalize

Returns: - Modified DataFrame with normalized and expanded data

edmt.contrib.utils.append_cols(df: pandas.DataFrame, cols: str | list)

Move specified column(s) to the end of the DataFrame.

Parameters:

df (pd.DataFrame): Input DataFrame. cols (str or list): Column name(s) to move to the end.

Returns:

pd.DataFrame: DataFrame with columns reordered.

edmt.contrib.utils.dict_expand(data, cols)