Creating Dataframe Using Pandas Apply Method