Skip to content
This repository has been archived by the owner on Sep 1, 2022. It is now read-only.

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

Open
haobibo opened this issue Nov 15, 2016 · 1 comment
Open

Comments

@haobibo
Copy link
Contributor

haobibo commented Nov 15, 2016

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
Copy link
Contributor

poplav commented Nov 15, 2016

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants