VOOZH about

URL: https://www.geeksforgeeks.org/python/access-the-elements-of-a-series-in-pandas/

⇱ Access the elements of a Series in Pandas - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Access the elements of a Series in Pandas

Last Updated : 6 Dec, 2018
Pandas Series is a one-dimensional labeled array capable of holding data of any type (integer, string, float, python objects, etc.). Labels need not be unique but must be a hashable type. Let's discuss different ways to access the elements of given Pandas Series. First create a Pandas Series. Output: 👁 Image
  Example #1: Get the first element of series Output: 👁 Image
  Example #2: Access multiple elements by providing position of item Output: 👁 Image
  Example #3: Access first 5 elements in Series Output: 👁 Image
  Example #4: Get last 10 elements in Series Output: 👁 Image
  Example #5: Access multiple elements by providing label of index
Output: 👁 Image
Comment