dtoolkit.geoaccessor.index.H3.to_parent#

H3.to_parent(resolution: int = None) Index[source]#

Get the parent of cell.

Parameters:
resolutionint, optional

The resolution for the children. If None, then use the current resolution of cell -1 .

Returns:
Index

New H3 parent cell.

Examples

>>> import dtoolkit.geoaccessor
>>> import pandas as pd
>>> index = pd.Index([612845052823076863, 614269156845420543])
>>> index
Index([612845052823076863, 614269156845420543], dtype='int64')
>>> index.h3.to_parent()
Index([608341453197803519, 609765557230632959], dtype='int64')