code: def df_first_row_to_dict(df):
          
          if df is not None:
              return [dict(r) for i, r in df.head(1).iterrows()][0]
docs: First DataFrame row to list of dict
  
          Args:
              df (pandas.DataFrame): A DataFrame with at least one row
  
          Returns:
              A list of dict that looks like:
  
                  [{'C1': 'x'}, {'C2': 'y'}, {'C3': 'z'}]
  
              from a DataFrame that looks like:
  
                      C1  C2  C3
                  1   x   y   z
  
              Else if `df` is `None`, returns `None`