-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support R factor data type #18
Comments
I just used R built-in |
Your tests work because dataframes are passed through |
I just checked that!! it doesn't import the variable and just assigns the variable name to |
You need to first read https://vatlab.github.io/sos-docs/doc/user_guide/language_module.html and then dive into the source code of sos-r. I think support for factor on both ends are missing. |
usually, R's vector should translate to python's bulit-in list. However, as much as I'm aware python lists are not able to handle categorical data (correct me if I'm wrong and I search for a way to transfer data to list). My current idea is to translate R's factor vector to a categorical pandas series and if someone writes a categorical pandas series, I translate it into a factor R vector. What do you think? |
I agree, R's category type matches perfectly to Panda's category series http://pandas-docs.github.io/pandas-docs-travis/user_guide/categorical.html , and vise versa. |
issue: Support R factor data type vatlab#18 - Pandas Categorical series will be coerced into an R factor vector depending on its features as if it is named or unnamed, ordered or unordered. - R factor vector will be coerced into a Pandas categorical series depending on its features as if it is named or unnamed, ordered or unordered
I tried to test all the possible factors or pandas categories in my jupyterlab but I think there should be some predetermined tests for it!! |
http://pandas-docs.github.io/pandas-docs-travis/user_guide/categorical.html
Pandas now has categorical data type.
The text was updated successfully, but these errors were encountered: