12 IP Notes On Series
12 IP Notes On Series
12 IP Notes On Series
Class: XII
Some Facts :
Why PANDAS?
1. To read and write in many different data formats.
2. It can calculate in all the possible ways data is organized.
3. It can easily select subsets of data from bulky data.
4. It allows you to apply operation to independent groups within the data.
5. It supports reshaping of data into different forms.
6. Using its advance time-series functionality one can predict the future values.
Type of Homogeneous – All elements Heterogeneous – DataFrame objects can have different
Data must be of same data type. data types.
Mutability Size- Immutable: Size of a series Size – Mutable : We can drop or add the elements in an
object, once created, cannot existing dataframe object.
change.
import pandas as pd
<Series Object>=pandas.Series()
To create a non-empty Series object, you need to specify arguments for data and indexes as per following
syntax :
3. Write code to create a series object that stores total number of medals 450 to be won every year in
Olympics held in the decade 2020-2030.
4. Write python code to distribute Rs. 500 crore for education in the budget equally for four quarters
Q1,Q2,Q3 and Q4 of the year.
5. Create a Python Series which includes monthly expenditure for the 6 Months. Specify the datatype as
float64.
6. A Python list namely player stores the names of cricket players i.e. Player[‘Rohit’, ‘Virat’, ‘Rahul’,
‘MSD’, ‘Raina’]. Another list Run_scr stores the runs scored by the players in overall one day cricket.
Create a series in Python that stores Player as the index values and Run_scr as the data.