Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python equivalent to R 's factor data type [duplicate]

I'm new in using Python as scientific language.

I'm missing using an data type that informs me the data it self and the factors the data are in. (Specially for categorical data array. )

I'm wondering if there's a lib or an array type in scipy package for this usage ?

like image 868
Alvaro Joao Avatar asked Sep 11 '25 22:09

Alvaro Joao


1 Answers

Try pandas

http://pandas.pydata.org/

and take a look at:

http://pandas.pydata.org/pandas-docs/stable/categorical.html

It's an amazing library that does pretty what what you're asking for.

like image 195
Wboy Avatar answered Sep 13 '25 11:09

Wboy