Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
221 views
Ip Series Assignment (Python)
Uploaded by
Lee Jeong hyeon
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save Ip Series Assignment (python) For Later
Download
Save
Save Ip Series Assignment (python) For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
221 views
Ip Series Assignment (Python)
Uploaded by
Lee Jeong hyeon
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save Ip Series Assignment (python) For Later
Carousel Previous
Carousel Next
Save
Save Ip Series Assignment (python) For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 9
Search
Fullscreen
Assignment: SERIES Informatica Practices of all subjects by 10. Questions. Solutions Qu- | Given the following Series A 1100 B_ | 200 Cc [300 D__ [400 E1500 ouTPUT Write the command to create above Series and ||3 309 then double the value in series and store in e300 another series named Series? pb 400 z 500 idtype: int6e » 200 B 400 e600 D800, = 1000 deype: inte a. A series object is size mutable. b. A Dataframe object is value mutable Q3-_| Consider a given Series , Series!: 200 700 201 700 202 «700 QUTPUT 203 700 200700 204 700 201 700 Write a program in Python Pandas tocreatethe | 303 00, series and display it. 204 700 type: intse ‘QA _| Consider the following Series object, s iP 95 Physics 89 Chemistry 92 Math 95 i, Write the Python syntax which will display only IP. ANSWER: ii. Write the Python syntax to increase marks _| i) series_object.index[index number] ii) series_object=series_object+10 OUTPUT: =| 1P 9s Physics 09, Chemistry 92 Math 95 dtype: inte4 Fy 1p 105 Physics 98 Chemistry 102 Math 105 dtype: intedConsider a given series : SQTR QTRI__ [50000 Lgrr2 | 65890 QTR3__| 56780 QTR4 | 89000 grrs__[ 77900 OUTPUT: Write a program in Python Pandas to create and | O82 9000 apy ees oe Gina 99000 qs 77900 type: int6e Q& | What will be the output produced by the Tatemete following programming statements | & 2? oO Fal import pandas as pd eu eee S\=pd Series(data=[31,41,51]) deype: boot print(S1>40) ->Statement! ‘Statement prin(SI{S1>40}) _ ~->Statement2 ane type: intéd Q.7-_| Given two series S1 and S2 si 92 A 39 A 10 B 4) B 10 c 4 D 10 D 44 F 10 Find the output for following python pandas statements? OUTPUT: a. Sif: 2]*100 b. S1*S2 ce. Sfss-l}*i0 Q8-_| Given the following Series SI and S2: st sz A 0 A § B 2 B 4 c w Cc 6 dD 4 OD 8& series $1 and S2 Write the command to find the multiplication of | §° B80 e180 D320 type: inté4 Q9- | Consider a given Series , Subject: ENGLISH. 75 HIND 78 MATHS, 82. ‘SCIENCE, 86, series ‘Write a program in Python Pandas to create thisOUTPUT: ENGLISH 75 INDI 18 MATHS a2 SCIENCE 86 dtype: int6@ @.10- | Consider the following Series object, “company” and its profit in Crores TCS 350 Reliance 200 Lar 800 print(com Wipro 150 ompany.nam: i. Write the command which will display the name of the company having profit>250. fi. Write the command to name the series as OUTPUT: Profit. Tes 350 L&T 800 dtype: inté4 res 350 Reliance 200 Let 800 Wipro 150 Name: Profit, dtype: inté4 Q.ll- | Consider two objects a and b. 2 is a list whereas b is a Series. Both have values 10,20,25,50. ‘What will be the output of the following two statements considering that the above objects have been created already a. print(a*2) ° b. print(b*2) ouTPUuT: Justify your answer. Option a) will produce [10, 20, 25, 50, 10, 20, 25, 50) Option b) will produce $ 8 2 50 3 100 deype: inet Justification: In Option a) In Option b) @.2- | Given a Pandas series called Sample, the ‘Conrestanier ‘command which will display the last 3 rows print (Sampléytail(3)) is. a. print (Sample.tail (3)) b. print (Sample.Tail(3)) c. print (Sample. tails (3) d. print (Sample. Tails (3))13- | What will be the output of the following | code? oe import pandas as pd s = pd.Series(6,index=range| | print(s) 920.5) Qi | Ifseries s1 a having following data, 31 53 % 5 1 6 | . 4 3 21 n 8 5 3 B 7 7 5 | 4 9 4 | vy 6 a8 wy 7 i 7 dtype: intes is 4 What would be the result of the command | 37 $ | ¥ 1 print(s4[3:6)? dtype: int64 OUTPUT: | 7 5 9 4 n 8 type: inted OIE | What willbe the output of the following | OUTPUT: code? o 10 import pandas as pd 2 ise s = pd Series(np.range(10,50,10)) 3 40 print(s) deypet ante print (s.ndim) 1) print(s.shape) ‘ print(len(s)) Q.6- | Consider the following Series ‘s- 0 40 i 88 1 5.0 Xe 2 70 i 3 3 NaN deg! donee 4 10 or sfo 5 10.0 p88 dtype: floaté4 2 () Write a Python code to add 1 to all the ss elements. pr sion (i) Write a code to replace all NaN with 0. a Se ire Pater) deype! Aloneee G7 | Predict the output of the following code. OUTPUT: import pandas as pd we import numpy as np fas 0 data = one’’a' 'two'"'b,three’“'c} dtype: object s=pd.Series(data) a print(s) print(s.size)ig python sequence [2,4,6,8] and default indies OUTPUT: o 2 1 4 2 6 38 dtype: inted Qi9- | Write the output ofthe following code fragment. | OUTPUT: import pandas as pd ° i s2=pd Series({'i","am", "a","student”)) a - print(s2) 3 seudent dtype: object Q.20- | Write the output of the following code fragment. OUTPUT: import pandas as pd 2 200 s1=pd Series(200,index=range(2,13,2)) $ ite print(s1) fo 00 i2 doe atype: ints Qi- | Write the output ofthe following code fragment. import pandas as pd slapd Series(range(2,11,2), index=[x for x in abcde") print(s!) Qa2- | Write the output of the following code fragment. import pandas as pd s3epd Series(index= range(10,15), data=x*2) st=pd.Series(x**2,x) print(s3) print(s4) Q.23- | Sequences section and con ‘bution store the section name ('A'B',C''D',E) and contribution (8900,8700,7800,6500,nil) for charity. Your school has decided to donate more contribution by each section, so donation has been doubled. Write code to create series object that stores the contribution amount as the values and section name as indexes with data type as float32.Donation by n 6300.0 B 8700.0 7800.0 D E B 1740.0 c 15600.0 > 130000 (Q24- | Write the output of the following code fragment. import pandas as pd serl=pd.Series(range(5.25,50,10.25), index=[','b'/a'/a',b')) | print(serl) | print(ser!['a']) print(serl[’b')) | b 46.25 Q.25- | Considera series object s10 that stores the number of students in each section of class 12 as shown below. First two sections have been given task for selling tickets @ Rs.100/- per ticket as a part of social experiment. Write code to create the series and display how much section A and B have collected. A 39 OUTPUT: . . B31 Amount collected by Section A and B (in Rs.) A 3900.0, Cc 32 B 3200.0 Dos Gtype: £10832 E 35 Q.26- | Consider the series sas given below 0 2.50 1 1745 2 20.25 3 87.25 4 33.76 What will be the output after executing the following: Q27- | Consider the following code- import pandas ‘s1=pandas.Series((2,3,4,5,6),index=| print(s1) What will be the output after executing the code, . 2.00 b 345.60 je -14.65, id -14.65 le 6.00 dtype: floatedCon: the Series object s12 that stores th contribution of each section, as sh 7 ric own below: B 8000 Cc 5400 D 3400 Write code to modify the amount of section ‘A’ the changed object. as 8800 and for section 'C' and 'D' as 7700. Print wracoer 6 5 € g BZes "veu0ca F 388-3883 s3ss88ss 5 streams( ‘Science’, ‘Commerce’ and 'Humanities') are stored in two series objects el and c12. write code to find total number of students in class 11 and 12,, stream wise. Q.29. | A Series object trainingdata consists of 2000 ows of data. Write a program to print (i) First 100 rows of data (ii) Last 5 rows of data ‘Q.30- | Consider the following Series s3- 0 a 1s 2 b 30 3 © 45 ‘ d 60 deype: e 75 2 ‘Now create the above series and find the output A of the following commands- ‘ i) print(s3+3) ii) print(s3*2) aeeat iii) print(s3>3.0) _ iv) print(s3[s3>3.0)) : é Seype: book ors a so ors deype: “froatse Q.3I- | Consider the Series object s12 that stores the contribution of each section, as shown below: OUTPUT: A 6700 A 6700 B 8000 B 8000 Cc 5400 type: int64 D 3400 Write code to create the series and display those sections that made the contribution more than Rs, 5600/- @32- | Number of students in class 11 and 12 in threeQ34- Consider the series s1 and s2 and s3- si s2 $3 010 05 a 3 120 110 b 6 230 215 ¢ 9 340 320 d I 450 425 e 1 5 30 6 35 Now find the output of the following- i) print(S1+S2) ii) print(S1*S3) iii) print(S1-S2) ‘Consider the Series object S12 that stores the jown below contribution of each section, as sh D 6700 A 8000 B $400 Cc 3400 i) Write code to create the series and display all its values sorted in descending order ii) Write code to display all its indices sorted in ascending order. ints Why is following code producing error while working on Series object 13? dtype of students 67 rv 95 Total no. Science Commerce Humani tic: deype: inted ourpuT: ° «13.0 red o (5e 2 Soe J: 333 2 oo 2 iso 3 maw 3 20.0 |
You might also like
Informatics Practices Practical File Class 12th - Pandas, Matplotlib & SQL Questions With Solutions
PDF
100% (1)
Informatics Practices Practical File Class 12th - Pandas, Matplotlib & SQL Questions With Solutions
27 pages
IP Projects For Class Xii
PDF
0% (1)
IP Projects For Class Xii
20 pages
Ip Record
PDF
No ratings yet
Ip Record
46 pages
Series Worksheet1 3
PDF
No ratings yet
Series Worksheet1 3
10 pages
Worksheet Class Xii Ip 2023-24
PDF
No ratings yet
Worksheet Class Xii Ip 2023-24
143 pages
Series Worksheet
PDF
No ratings yet
Series Worksheet
9 pages
Super 40 - Pandas Series Worksheet 1 - Answers
PDF
No ratings yet
Super 40 - Pandas Series Worksheet 1 - Answers
10 pages
Apractical File Informatics Practices Class 12 For 2022-23 No WM
PDF
No ratings yet
Apractical File Informatics Practices Class 12 For 2022-23 No WM
27 pages
Dataframe Practical
PDF
No ratings yet
Dataframe Practical
14 pages
Ip Practical
PDF
No ratings yet
Ip Practical
31 pages
Series Programs
PDF
No ratings yet
Series Programs
4 pages
Ip Project Class Xii
PDF
No ratings yet
Ip Project Class Xii
31 pages
Ip Holiday Homework
PDF
No ratings yet
Ip Holiday Homework
40 pages
Ip Practical File
PDF
No ratings yet
Ip Practical File
31 pages
Informatics Practices Project File PDF
PDF
0% (1)
Informatics Practices Project File PDF
45 pages
XII IP Practical File - 2023-24upto June
PDF
No ratings yet
XII IP Practical File - 2023-24upto June
6 pages
Ip Project Class 12 Final
PDF
No ratings yet
Ip Project Class 12 Final
33 pages
Worksheet 12 - Only Qs - (Aggregate Functions) Group BY
PDF
100% (1)
Worksheet 12 - Only Qs - (Aggregate Functions) Group BY
5 pages
Pandas Questions Ip File
PDF
No ratings yet
Pandas Questions Ip File
13 pages
Daniel Sam Joseph: Informatics Practices Project XII
PDF
No ratings yet
Daniel Sam Joseph: Informatics Practices Project XII
20 pages
Xiiip Practical 2023-24 - Final
PDF
0% (1)
Xiiip Practical 2023-24 - Final
38 pages
Practical - With Solution - XII - IP
PDF
No ratings yet
Practical - With Solution - XII - IP
13 pages
IP Project Aman
PDF
100% (1)
IP Project Aman
30 pages
CSV FILE BOOK SHOP - Khushi S Tiwari
PDF
No ratings yet
CSV FILE BOOK SHOP - Khushi S Tiwari
24 pages
Aissce Xii Ip 065 Practicals QP 3
PDF
100% (2)
Aissce Xii Ip 065 Practicals QP 3
2 pages
IP CSV Project For Class 12
PDF
No ratings yet
IP CSV Project For Class 12
22 pages
XII Informatics Practices
PDF
No ratings yet
XII Informatics Practices
147 pages
Series in Pandas
PDF
No ratings yet
Series in Pandas
16 pages
Worksheet Dataframes Solved-23
PDF
No ratings yet
Worksheet Dataframes Solved-23
6 pages
Ip Practical File
PDF
No ratings yet
Ip Practical File
20 pages
Ip Class Xii Sample Question Paper 1
PDF
100% (3)
Ip Class Xii Sample Question Paper 1
11 pages
XII - Informatics Practices (LAB MANUAL)
PDF
100% (1)
XII - Informatics Practices (LAB MANUAL)
42 pages
Practical File Informatics Practices Class 12 For 2022-23
PDF
No ratings yet
Practical File Informatics Practices Class 12 For 2022-23
26 pages
Ip Practice Questions Class 12
PDF
No ratings yet
Ip Practice Questions Class 12
5 pages
Nalanda Mordern Public School-Project File
PDF
0% (1)
Nalanda Mordern Public School-Project File
22 pages
StudentMgmStystme ProjectFinal
PDF
100% (1)
StudentMgmStystme ProjectFinal
23 pages
Minimum Level Pandas Skill Based Questions
PDF
No ratings yet
Minimum Level Pandas Skill Based Questions
8 pages
Data Visualization and Data Handling Using Pandas CLASS 12 - Aashi Nagiya
PDF
No ratings yet
Data Visualization and Data Handling Using Pandas CLASS 12 - Aashi Nagiya
19 pages
IP Project File Harsh
PDF
No ratings yet
IP Project File Harsh
37 pages
ComputerScience SQP Set2 MS
PDF
No ratings yet
ComputerScience SQP Set2 MS
12 pages
Project Documents On Cricket Analysis
PDF
No ratings yet
Project Documents On Cricket Analysis
19 pages
Chapter 1 Python Pandas - I Type C Long Answer
PDF
No ratings yet
Chapter 1 Python Pandas - I Type C Long Answer
5 pages
CSV - Practice Paper
PDF
No ratings yet
CSV - Practice Paper
7 pages
Data Handling Using Pandas-1: Long Answer Questions
PDF
100% (1)
Data Handling Using Pandas-1: Long Answer Questions
1 page
Ip Project File: Class-Xii ' Roll No.
PDF
No ratings yet
Ip Project File: Class-Xii ' Roll No.
23 pages
Set a 2024-25_ms_pre Board Xii Ip
PDF
No ratings yet
Set a 2024-25_ms_pre Board Xii Ip
12 pages
Pandas Practicals - Term-1
PDF
100% (1)
Pandas Practicals - Term-1
18 pages
Class Xii - Informatics Practices (065) Max Marks: 70 Time: 3 Hrs General Instructions
PDF
0% (1)
Class Xii - Informatics Practices (065) Max Marks: 70 Time: 3 Hrs General Instructions
11 pages
Mock Practicals
PDF
No ratings yet
Mock Practicals
9 pages
A Project Report ON Stock Market Analysis For Aissce 2021-22 Examination
PDF
No ratings yet
A Project Report ON Stock Market Analysis For Aissce 2021-22 Examination
15 pages
VSA - Very Short Answer Question (For 1 Mark) : Chapter - Data Visualization
PDF
No ratings yet
VSA - Very Short Answer Question (For 1 Mark) : Chapter - Data Visualization
6 pages
Shashank Bodduna: Informatics Practices Project XII
PDF
No ratings yet
Shashank Bodduna: Informatics Practices Project XII
20 pages
12 IP CBSE Practical File (PART-1)
PDF
No ratings yet
12 IP CBSE Practical File (PART-1)
27 pages
Kunj Project 2
PDF
No ratings yet
Kunj Project 2
31 pages
IP Grade 11 Practical
PDF
No ratings yet
IP Grade 11 Practical
16 pages
IP Project Complete Color Coded Justification-Aligned Outputs Changed
PDF
No ratings yet
IP Project Complete Color Coded Justification-Aligned Outputs Changed
55 pages
XII IP Practical File 1 Complete
PDF
No ratings yet
XII IP Practical File 1 Complete
38 pages
Assignment-1 (Python Pandas-Series Object and Data Frame: 1. Answer The Following
PDF
100% (1)
Assignment-1 (Python Pandas-Series Object and Data Frame: 1. Answer The Following
8 pages
grade 12 worksheets_chapter1
PDF
No ratings yet
grade 12 worksheets_chapter1
20 pages
Super 40 - Pandas Series Worksheet Qs
PDF
No ratings yet
Super 40 - Pandas Series Worksheet Qs
11 pages