Unit test for functions that out put data frames

I am very much new to the unit testing. i am writing a code which has functions

  1. import a data frame
  2. pre process the data frame
  3. export the final data

task is to write unit testing for all the functions individually with 2 different datasets in loop with time taken to run every unit test

each function is giving a dataset.

here is the function for data import

def data_import(): df = spark.sql(data) df2 = df.topandas() return df,df1