Open haobibo opened 8 years ago
The goal of this effort was to standardize the column types to their respective JS types/not bleed language specific information from the backend.
The deserialization on the JS side is at https://github.com/jupyter-incubator/declarativewidgets/blob/master/elements/urth-core-dataframe/urth-core-dataframe.html#L294.
Did you have a specific use case in mind?
cc @peller
For Category datatype in pandas.DataFrame or factor (Levels) datatype in R, current serializers convert their columnTypes to 'Unkown'. Is it better to create a new datatype for columnTypes, say
category
,enum
, orfactor
?Related code can be found here: For Python: https://github.com/jupyter-incubator/declarativewidgets/blob/master/kernel-python/declarativewidgets/util/serializers.py#L46
For R: https://github.com/jupyter-incubator/declarativewidgets/blob/master/kernel-r/declarativewidgets/R/serializers.r#L28
For Scala: https://github.com/jupyter-incubator/declarativewidgets/blob/master/kernel-scala/src/main/scala/declarativewidgets/util/SerializationSupport.scala#L73