merge query result into pandas.DataFrame format