psweep.psweep.df_extract_dicts

psweep.psweep.df_extract_dicts#

psweep.psweep.df_extract_dicts(df, py_types=False)[source]#

Convert df’s rows to dicts.

Parameters:
  • df (DataFrame)

  • py_types (bool) – If True, let Pandas (Series.to_dict()) decide types. It tries to return Python native types (e.g. it converts pd.NA to None.) Else, try to preserve types as they are in df.

Return type:

Sequence[dict]