def df_to_dictlist_force_types(df):
    """
        return the content of the dataframe as a list
        of dictionaries. The pandas.DataFrame.to_dict
        causes all the values to be casted to float64
        type, and we don't want this.

        See:
        https://stackoverflow.com/questions/31374928/dtype-changes-when-using-dataframe-to-dict

        This function is quite a bit faster than df.astype(object).to_dict('record')

        Parameters:
        -----------

            df: `pandas.DataFrame`
                dataframe to be parsed

        Returns:
        --------

            list of dictionaries.
    """
    # this is not perfect, but is the best I can do now
    return [dict(row._asdict()) for row in df.itertuples(index = False)]