dtoolkit.geoaccessor.dataframe.H3.to_int#
- H3.to_int() DataFrame [source]#
Converts hexadecimal string H3 cell index to 64-bit integer.
- Returns:
- DataFrame
With new H3 cell as the its index.
See also
Examples
>>> import dtoolkit.geoaccessor >>> import pandas as pd >>> s = pd.Series(['a', 'b'], index=['88143541bdfffff', '886528b2a3fffff']) >>> s 88143541bdfffff a 886528b2a3fffff b dtype: object >>> s.h3.to_int() 612845052823076863 a 614269156845420543 b dtype: object >>> df = pd.DataFrame( ... {'label': ['a', 'b']}, ... index=['88143541bdfffff', '886528b2a3fffff'], ... ) >>> df label 88143541bdfffff a 886528b2a3fffff b >>> df.h3.to_int() label 612845052823076863 a 614269156845420543 b