Closed s-leroux closed 1 month ago
Two possible solutions:
Two possible solutions:
1. The exact representation is based on the column's type, 2. We remember what was the native type at the column's creation time,
The first option does make a lot of sense. Unfortunately, the preliminary experiments increased the coupling between ColType
and Column
. The problem is that the Column
object caches the various representations, and we'd like to keep the internal details private here. For that reason, we also don't want to expose a "conversion" interface from Column
.
To reduce the coupling, we might also return a typecode from the ColType
instances.
Finally, we can remember if the column that was created using one of the Column.from_xxxx_mv()
factory methods.
Actually, the implementation uses the "richest" representation first by default (Python objects > float > ternary), so it is not a conversion issue. The problem was with Column.c_remap
, which didn't copy all the cached data types.
In some circumstances, floating-point number columns are displayed as ternary columns:
Displays:
It is probably caused when the same column has cached several representations. We do not have a mechanism to select the "most appropriate" representation.