Query.to_dataframe

Query.to_dataframe(max_results=None, *geography_variable="", progress=True) → pandas.DataFrame | geopandas.GeoDataFrame

Returns a representation of the table as a pandas or geopandas dataframe.

Parameters:

max_results : int, default None The maximum number of rows to return. If not specified, all rows in the query results will be read.

geography_variable : str, default "" Only relevant if one of your variables is of type "geography". The variable to use as the geopandas geometry. If an empty string, the first geography variable in the dataframe will be used. If set to None, a normal pandas.DataFrame will be returned instead, with all geography variables stored as their WKT string representation.

progress : bool, default True Whether to show a progress bar.

Returns:

pandas.DataFrame | geopandas.GeoDataFrame

Notes:

The returned dataframe will use numpy dtypes for its backend. Learn more about pandas dtypes and type conversions >

Last updated

Was this helpful?