How To Create Dataframe In Python Using Global Variables In Functions