code: def df2list(df):
          
          for column in df:
              df[column] = df[column].astype(object).where(df[column].notnull(), None)
          return df.to_dict(orient='records')
docs: Converts pandas.DataFrame values into list
          :param df: pandas.DataFrame
          :return: list