go-gota / gota

Gota: DataFrames and data wrangling in Go (Golang)
Other
2.97k stars 276 forks source link

Fix column key for lookup #205

Closed tiopramayudi closed 1 year ago

tiopramayudi commented 1 year ago

Previously we rely on String() method of Element interface to convert float to string, but this introduce issue when doing join where the join key type is different between dataframes, e.g left table key is 4 type int, but right table key is 4 type float, it will create different lookup key. For left table the lookup key will be "4" but right table the lookup key will be "4.0000000" hence the join not working properly. This PR aim to fix conversion of whole number float (e.g 4) to string without additional digits