Replies: 1 comment
-
Does the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In PySpark, there exists a preprocessing method called
StringIndexer
, which could be imported by code follows:here is an example of using
StringIndexer
in PySpark. (the module import and session creation are omitted)the result is shown as follows:
as shown above,
StringIndexer
considers bothfrequency
andstring
to create label.LabelEncoder
and some other preprocessing method in sklearn to meet the need. But none works. I just want to know, "are there any ways for implementStringIndexer
in sklearn", ... methods in sklearn itself, orsklearn
-compatible third party modules (instead of pyspark, for I do not want to use pyspark just for aStringIndexer
)yours sincerely,
@WMF1997
Beta Was this translation helpful? Give feedback.
All reactions