Teradata Package for Python Function Reference | 20.00 - __init__ - Teradata Package for Python - Look here for syntax, methods and examples for the functions included in the Teradata Package for Python.
Teradata® Package for Python Function Reference - 20.00
- Deployment
- VantageCloud
- VantageCore
- Edition
- Enterprise
- IntelliFlex
- VMware
- Product
- Teradata Package for Python
- Release Number
- 20.00.00.03
- Published
- December 2024
- ft:locale
- en-US
- ft:lastEdition
- 2024-12-19
- dita:id
- TeradataPython_FxRef_Enterprise_2000
- lifecycle
- latest
- Product Category
- Teradata Vantage
- teradataml.geospatial.geodataframe.GeoDataFrame.__init__ = __init__(self, table_name=None, index=True, index_label=None, query=None, materialize=False)
- Constructor for teradataml GeoDataFrame.
Note:
Use GeoDataFrame only when table or query result contains a Geometry data, i.e.,
column of teradatasqlalchemy types: Geometry(ST_Geometry in SQL), MBB, MBR.
Otherwise, an exception is raised.
PARAMETERS:
table_name:
Optional Argument.
The table name or view name in Teradata Vantage referenced by this GeoDataFrame.
Types: str
index:
Optional Argument.
True if using index column for sorting, otherwise False.
Default Value: True
Types: bool
index_label:
Optional Argument.
Column/s used for sorting.
Types: str OR list of Strings (str)
query:
Optional Argument.
SQL query for this GeoDataFrame. Used by class method from_query.
Types: str
materialize:
Optional Argument.
Whether to materialize GeoDataFrame or not when created.
Used by class method from_query.
You should use materialization, when the query passed to from_query(),
is expected to produce non-deterministic results, when it is executed multiple
times. Using this option will help user to have deterministic results in the
resulting teradataml GeoDataFrame.
Default Value: False (No materialization)
Types: bool
RAISES:
TeradataMlException - TDMLDF_CREATE_FAIL
EXAMPLES:
>>> from teradataml import GeoDataFrame
>>> load_example_data("geodataframe","sample_streets")
>>> gdf = GeoDataFrame("sample_streets")
>>> gdf
street_name street_shape
skey
1 Coast Blvd LINESTRING (12 12,18 17)
1 Main Street LINESTRING (2 2,3 2,4 1)
>>>