Corrected construct_pandas_df to work with 0-row data, also added test for that case