Creating a series from Scalar value
To create a series from scalar value, an index must be provided. The scalar value will be repeated as per the length of index.
Creating a series from a Dictionary
Mathematical Operations in Series
Head and Tail Functions in Series
head (): It is used to access the first 5 rows of a series.
Note :To access first 3 rows we can call series_name.head(3)
tail(): It is used to access the last 5 rows of a series.
Note :To access last 4 rows we can call series_name.tail (4)
Selection in Series
Series provides index label loc and ilocand [] to access rows and columns.
1. loc index label :-
Syntax:-series_name.loc[StartRange: StopRange]
Example-
2. Selection Using iloc index label :-
Syntax:-series_name.iloc[StartRange : StopRange]
Example-
3. Selection Using [] :
Syntax:-series_name[StartRange> : StopRange] or series_name[ index]
Example-
0 Comments
Please do note create link post in comment section