Create a pandas DataFrame and return the requested first and last rows as record-oriented dictionaries.