Learn practical skills, build real-world projects, and advance your career
Updated 3 years ago
Pandas
Used for:
Data Manipulation
Data Wrangling/Cleaning
Data Analysis
Data Structures of Pandas:
Series: 1D ndarray with an axis label.
Dataframes: 2D, hetegeneous data, all operations on a dataframe can be performed along the axes, rows and columns.
import pandas as pd
pd.__version__
'1.1.3'
Constructing Series Objects:
Syntax:
pd.Series(data, index=index)
index is an optional argument and can be list/tuple
data can be list/tuple
s = pd.Series([10,20,30,40,50])
print(s)
print(s.shape) # shape is an attribute
0 10
1 20
2 30
3 40
4 50
dtype: int64
(5,)