When building datascience APIs with kotlin, do you refer to missing values as NA nor null? Data-scientists are likely to prefer NA, and most kotlin programmer will prefer null. I'm asking because I want to add https://www.rdocumentation.org/packages/tidyr/versions/0.8.3/topics/drop_na to krangl (which is a data-frame implementation for kotlin) but the correct kotlin name seems to be
filterNotNull
.
i
Igor Alshannikov
01/22/2021, 2:48 PM
Apart from nulls there are NaN and +-Infinity values that usually fell to the 'na' category. I would keep
drop_na
.
h
holgerbrandl
01/22/2021, 2:49 PM
That's a very good point. I completely missed infinity.
Though, there is no infinite value for integers Afaik
Are method be aliases in kotlin to provide both methods while sharing the api doc?
i
Igor Alshannikov
01/22/2021, 5:39 PM
No, not integers, only floating points (infinity and NaNs). No idea about doc sharing 🙂