jupyter / declarativewidgets

[RETIRED] Jupyter Declarative Widget Extension
http://jupyter.org/declarativewidgets/docs.html
Other
120 stars 38 forks source link

Category/Factor dataype in DataFrame in serializers becomes 'Unknown' #527

Open haobibo opened 8 years ago

haobibo commented 8 years ago

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 , or factor?

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

poplav commented 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