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)
279 views
9 pages
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)
279 views
9 pages
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
Download
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
GRADE XII CS PRACTICAL FILE 2024 - 25 Final
PDF
No ratings yet
GRADE XII CS PRACTICAL FILE 2024 - 25 Final
48 pages
Project On Netflix Data Analysis
PDF
100% (1)
Project On Netflix Data Analysis
22 pages
Payroll System Ip
PDF
No ratings yet
Payroll System Ip
38 pages
Ip Record
PDF
No ratings yet
Ip Record
46 pages
Series Worksheet
PDF
No ratings yet
Series Worksheet
9 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
Ip Holiday Homework
PDF
No ratings yet
Ip Holiday Homework
40 pages
Ip Practical
PDF
No ratings yet
Ip Practical
31 pages
XII IP Practical File - 2023-24upto June
PDF
No ratings yet
XII IP Practical File - 2023-24upto June
6 pages
Pandas Questions Ip File
PDF
No ratings yet
Pandas Questions Ip File
13 pages
Informatics Practices Project File PDF
PDF
0% (1)
Informatics Practices Project File PDF
45 pages
Ip Practical File
PDF
No ratings yet
Ip Practical File
31 pages
IP CSV Project For Class 12
PDF
No ratings yet
IP CSV Project For Class 12
22 pages
Ip Project Class 12 Final
PDF
No ratings yet
Ip Project Class 12 Final
33 pages
Minimum Level Pandas Skill Based Questions
PDF
No ratings yet
Minimum Level Pandas Skill Based Questions
8 pages
IP Project Aman
PDF
100% (1)
IP Project Aman
30 pages
Daniel Sam Joseph: Informatics Practices Project XII
PDF
No ratings yet
Daniel Sam Joseph: Informatics Practices Project XII
20 pages
Shashank Bodduna: Informatics Practices Project XII
PDF
No ratings yet
Shashank Bodduna: Informatics Practices Project XII
20 pages
Ip Project Class Xii
PDF
No ratings yet
Ip Project Class Xii
31 pages
Xiiip Practical 2023-24 - Final
PDF
0% (1)
Xiiip Practical 2023-24 - Final
38 pages
Dataframe Practical
PDF
No ratings yet
Dataframe Practical
14 pages
Series Programs
PDF
No ratings yet
Series Programs
4 pages
StudentMgmStystme ProjectFinal
PDF
100% (1)
StudentMgmStystme ProjectFinal
23 pages
Final Practical File 2022-23
PDF
No ratings yet
Final Practical File 2022-23
87 pages
IP Practical 2023-24 (1 To 34)
PDF
100% (1)
IP Practical 2023-24 (1 To 34)
32 pages
Informatics Practices CBSE Project File Class 12
PDF
0% (1)
Informatics Practices CBSE Project File Class 12
40 pages
Final Class 12 Commerce Practical File
PDF
No ratings yet
Final Class 12 Commerce Practical File
19 pages
Ip Project File: Class-Xii ' Roll No.
PDF
No ratings yet
Ip Project File: Class-Xii ' Roll No.
23 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
CBSE Class 12 Informatic Practices MySQL
PDF
No ratings yet
CBSE Class 12 Informatic Practices MySQL
26 pages
IP Project Himanshu
PDF
No ratings yet
IP Project Himanshu
48 pages
Literacy Rate Analysis Coding and Output
PDF
No ratings yet
Literacy Rate Analysis Coding and Output
22 pages
Grade 12 - IP Practicals (1 To 9)
PDF
No ratings yet
Grade 12 - IP Practicals (1 To 9)
12 pages
HF Sample Paper-X Half Yearly Class - Xi Informatics Practices
PDF
No ratings yet
HF Sample Paper-X Half Yearly Class - Xi Informatics Practices
3 pages
ComputerScience SQP Set2 MS
PDF
No ratings yet
ComputerScience SQP Set2 MS
12 pages
IP Project File Harsh
PDF
No ratings yet
IP Project File Harsh
37 pages
XII IP Practical File 1 Complete
PDF
No ratings yet
XII IP Practical File 1 Complete
38 pages
Project Documents On Cricket Analysis
PDF
No ratings yet
Project Documents On Cricket Analysis
19 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
Ip Class 12 Project Python and SQL
PDF
No ratings yet
Ip Class 12 Project Python and SQL
21 pages
Aissce Xii Ip 065 Practicals QP 3
PDF
100% (2)
Aissce Xii Ip 065 Practicals QP 3
2 pages
Practical - With Solution - XII - IP
PDF
No ratings yet
Practical - With Solution - XII - IP
13 pages
12IPRevisionPapers2025 (3)
PDF
No ratings yet
12IPRevisionPapers2025 (3)
93 pages
IP Project Final
PDF
100% (1)
IP Project Final
26 pages
Nalanda Mordern Public School-Project File
PDF
0% (1)
Nalanda Mordern Public School-Project File
22 pages
1673447310671practical File IP Class 12 2022 23
PDF
No ratings yet
1673447310671practical File IP Class 12 2022 23
67 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
CSV FILE BOOK SHOP - Khushi S Tiwari
PDF
No ratings yet
CSV FILE BOOK SHOP - Khushi S Tiwari
24 pages
QP-2 CS
PDF
No ratings yet
QP-2 CS
7 pages
Hotel Management System
PDF
No ratings yet
Hotel Management System
29 pages
Worksheet 12 - Only Qs - (Aggregate Functions) Group BY
PDF
100% (1)
Worksheet 12 - Only Qs - (Aggregate Functions) Group BY
5 pages
Employee Data Analysis IP Sample Project
PDF
No ratings yet
Employee Data Analysis IP Sample Project
11 pages
Ip Project
PDF
No ratings yet
Ip Project
45 pages
Informatics Practices Project - 221228 - 132356
PDF
No ratings yet
Informatics Practices Project - 221228 - 132356
30 pages
Class 12 Ip Practical Programs 2024-25
PDF
100% (1)
Class 12 Ip Practical Programs 2024-25
43 pages
Informatics Practices Sample Paper 1 CBSE Class 12
PDF
No ratings yet
Informatics Practices Sample Paper 1 CBSE Class 12
12 pages
Functions
PDF
No ratings yet
Functions
52 pages
Program 1 Read a text file and display the number of vowels
PDF
No ratings yet
Program 1 Read a text file and display the number of vowels
8 pages
grade 12 worksheets_chapter1
PDF
No ratings yet
grade 12 worksheets_chapter1
20 pages