Creating a DataFrame from a Query