'encode() Geohash of dataframe generates 'Invalid argument', but how?

import Geohash as gh

gh.encode(35., -100., 7) works great!

df.apply(lambda x: x.latitude*x.longitude, axis=1) also works great.

But

df.apply(lambda x: gh.encode(x.latitude, x.longitude, precision=7), axis=1)

should work, but instead it generates a 'Invalid argument' error. But for the life of me I don't see why!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source