Contents

  1. Python Setup and Installation
  2. Introduction to Python Libraries and its Overview
  3. PyCharm IDE Installation
  4. Series and its creation in different ways
  5. Indexing in Series or Accessing Series Elements
  6. Slicing in Series or Subset Accessing in Series
  7. Series Attributes and functionalites
  8. Concept of np.NaN and more about indexing
  9. Head and Tail Functions in Series
  10. Mathematical Functions in Series Objects
  11. DataFrame in Python Pandas and its creation in different ways
  12. DataFrame from CSV and Text File
  13. DataFrame Attributes and other functionalites
  14. Iloc Methods for subset accessing in DataFrame
  15. Loc Methods for subset accessing in DataFrame
  16. Adding Columns to DataFrame
  17. Adding Rows to DataFrame
  18. Deleting Columns from DataFrame
  19. Deleting Rows from DataFrame
  20. Renaming Row and Column Labels in DataFrame

Indexing in Series

While creating series, you might have observed that in output, we are getting numbers starting from zero (0) which represents the count of the rows in the series that is called as POSITIONAL INDEX(default). This index can be changed using index keyword or by renaming index and are called as USER-DEFINED INDEX.
Indexing is defined as the technique of accessing the elements or data of the series using Index. It helps in accessing the value or data at every index.

SYNTAX: print(ser_name[index])

#importing required libraries
import pandas as pd

#creating a list of names
list1 = ['Aman', 'Raghav', 'Shubham', 'Rohit', 'Yash']
ser = pd.Series(list1)

#accessing element of the series
print(ser[3])

OUTPUT:

Rohit #Rohit is present at index 3

Download Notes