VOOZH about

URL: https://www.geeksforgeeks.org/python/python-pandas-factorize/

⇱ Python | Pandas.factorize() - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Python | Pandas.factorize()

Last Updated : 27 Sep, 2018
pandas.factorize() method helps to get the numeric representation of an array by identifying distinct values. This method is available as both pandas.factorize() and Series.factorize().
Parameters: values : 1D sequence. sort : [bool, Default is False] Sort uniques and shuffle labels. na_sentinel : [ int, default -1] Missing Values to mark 'not found'. Return: Numeric representation of array
Code: Explaining the working of factorize() method 👁 Image
👁 Image
👁 Image
Comment