Xii-Ip PPT 2020-21
Xii-Ip PPT 2020-21
following three
data structures − Data
Frames
2 General 2D labeled, size-
mutable tabular structure
1. Series with potentially
heterogeneously typed
columns.
2. DataFrame
3. Panel
Panel 3 General 3D labeled, size-
mutable array.
SERIES
• Series is a one-dimensional array like structure
with homogeneous data. For example, the
following series is a collection of integers 10,
23, 56, …
• Creation of Series from :
1. ndarray,
2. dictionary,
3. scalar value
Creating Series from Scalar
1. #import the pandas library and aliasing as pd
2. import pandas as pd
3. import numpy as np
4. s1 = pd.Series(5)
5. s2 = pd.Series(5, index=[0, 1, 2, 3])
6. print (s1)
7. print(s2)