owid / data-api

API for accessing data from our data catalog.
MIT License
16 stars 4 forks source link

`Int64` is converted into `float64` when returned to user #5

Open Marigold opened 2 years ago

Marigold commented 2 years ago

Int64 type is stored in DuckDB as NULLABLE BIGINT. Calling fetch_df on it converts it to float64 (because it assumes there could be NaNs) which could be confusing for users (for instance weekly covid cases are such a case).

We could either keep it in arrow format, never call fetch_df and let users read it as feather file or convert float64 back to Int64 before returning it to user.