Factorization - Wikipedia
https://en.wikipedia.org/wiki/FactorizationBy the fundamental theorem of arithmetic, every integer greater than 1 has a unique (up to the order of the factors) factorization into prime numbers, which are those integers which cannot be further factorized into the product of integers greater than one. For computing the factorization of an integer n, one needs an algorithm for finding a divisorq of n or deciding that n is prime. When such a divisor is found, the repeated application of this algorithm …
pandas.factorize — pandas 1.3.5 documentation
pandas.pydata.org › api › pandaspandas.factorize. ¶. Encode the object as an enumerated type or categorical variable. This method is useful for obtaining a numeric representation of an array when all that matters is identifying distinct values. factorize is available as both a top-level function pandas.factorize () , and as a method Series.factorize () and Index.factorize ().