get_dataframe_internal function

Write to temp and apply function