better query -> dataframe handling. closes #10 . thanks @lbeltrame