| Class XII |
Informatics Practices |
Informatics Practices |
3 |
with axis=0 gives the same result >>> df['Maths'].aggregate(['max','min'],axis=0) max 24 min 12 Name: Maths, dtype: int64 #Total marks of Maths and... |
|
| Class XII |
Informatics Practices |
Informatics Practices |
3 |
1 Raman 2 21 20 17 22 24 2 Raman 3 14 19 15 24 23 3 Zuhaire 1 20 17 22 24 19 4 Zuhaire 2 23 15 21 25 15 5 Zuhaire 3 22 18 19 23 13 Now, to obtain s... |
|
| Class XII |
Informatics Practices |
Informatics Practices |
3 |
Hindi values(by=['Science','Hindi'])) Name UT Maths Science S.St Hindi Eng 5 Zuhaire 3 22 18 19 23 13 11 Mishti 3 17 18 20 25 20 2 Raman 3 14 19 15... |
|
| Class XII |
Informatics Practices |
Informatics Practices |
3 |
15 C 45 A 10 C 10 B 15 Sum C 15 C 20 C 20 Figure 3.1: A DataFrame with two columns The following statements show how to apply GROUP BY() function o... |
|
| Class XII |
Informatics Practices |
Informatics Practices |
3 |
19 23 13 The above statements show how we create groups by splitting a DataFrame using GROUP BY(). Next step is to apply functions over the groups ... |
|
| Class XII |
Informatics Practices |
Informatics Practices |
3 |
15 24 23 3 Zuhaire 1 20 17 22 24 19 4 Zuhaire 2 23 15 21 25 15 5 Zuhaire 3 22 18 19 23 13 6 Ashravy 1 23 19 20 15 22 7 Ashravy 2 24 22 24 17 21 8 A... |
|
| Class XII |
Informatics Practices |
Informatics Practices |
3 |
below: >>> dfUT1.drop(columns=[‘index’],inplace=True) >>> print(dfUT1) Name UT Maths Science S.St Hindi Eng 0 Raman 1 22 21 18 20 21 1 Zuhaire 1 20... |
|
| Class XII |
Physics |
Physics Part-II |
3 |
currents are now found to be at higher values. This shows that more electrons are being emitted per second, proportional to the intensity of incide... |
|
| Class XII |
Informatics Practices |
Informatics Practices |
3 |
2017 and 2018. Example 3.1 >>> import pandas as pd >>> data={'Store':['S1','S4','S3','S1','S2','S3 ','S1','S2','S3'], 'Year':[2016,2016,2016,2017 ,... |
|
| Class XII |
Informatics Practices |
Informatics Practices |
3 |
as index, year will be the headers for columns and sales value will be displayed as values of the pivot table. >>> print(pivot1) Year 2016 2017 2... |
|
| Class XII |
Informatics Practices |
Informatics Practices |
3 |
Total_sales(Rs) Total_profit(Rs) Year 2016 2017 2018 2016 2017 2018 Store S1 12000.0 20000.0 30000.0 1100.0 32000.0 3000.0 S2 NaN 10000.0 11000.0 N... |
|
| Class XII |
Informatics Practices |
Informatics Practices |
3 |
has been used as the default aggregate function. Price of the blue pen in the original data is 50 and 20. Mean has been used as aggregate and the p... |
|
| Class XII |
Mathematics |
Mathematics Part-II |
7 |
probability of the hypothesis E. i Bayes'theoremisalsocalledtheformulafortheprobabilityof"causes".Sincethe E'i are a partition of the sample space ... |
|
| Class XII |
Informatics Practices |
Informatics Practices |
3 |
to have some missing attributes. There may be several reasons for that. In some cases, data was not collected properly resulting in missing data e.... |
|
| Class XII |
Informatics Practices |
Informatics Practices |
3 |
15 22 25 22 22 Mishti 2 18 21 25 24 23 Mishti 3 17 18 20 25 20 Mishti 4 14 20 19 20 To calculate the final result, teachers are asked to submitthep... |
|
| Class XII |
Informatics Practices |
Informatics Practices |
3 |
False False False 7 False False False False False False False 8 False False False False False False False 9 False False False False False False Fal... |
|
| Class XII |
Informatics Practices |
Informatics Practices |
3 |
can use df.isnull().sum().sum(). >>> print(df.isnull().sum().sum()) Program 3-12 Write a program to find the percentage of marks scored by Raman in... |
|
| Class XII |
Informatics Practices |
Informatics Practices |
3 |
with appropriate value. Dropping will remove the entire row (object) having the missing value(s). This strategy reduces the size of the dataset use... |
|
| Class XII |
Informatics Practices |
Informatics Practices |
3 |
Marks Scored by Raman in Maths 76.0 % Note that the number of rows in dfRaman is 3 after using dropna. Hence percentage is computed from marks obta... |
|
| Class XII |
Informatics Practices |
Informatics Practices |
3 |
dfRaman.loc[:,'Eng'] >>> print("Marks Scored by Raman in English \n\n",dfEng) Marks Scored by Raman in English 0 21.0 1 24.0 2 23.0 3 NaN Name: Eng... |
|
| Class XII |
Informatics Practices |
Informatics Practices |
3 |
in the python environment using the following command: pip install pymysql sqlalchemy is a library used to interact with the MySQL database by prov... |
|
| Class XII |
Informatics Practices |
Informatics Practices |
3 |
| LXIE | 2017 | Petrol | | S002 | Car4 | 614000.00 | VXI | 2018 | Petrol | +-------+--------+-----------+-----------+-----------------+----------+ ... |
|
| Class XII |
Informatics Practices |
Informatics Practices |
3 |
It is used to write the specified DataFrame to the table the connection identifier (sql_conn) returned from the create_engine (). • The parameter i... |
|
| Class XII |
Informatics Practices |
Informatics Practices |
3 |
strategies for handling missing data. Either the row (or column) having missing value is removed completely from analysis or missing value is repla... |
|
| Class XII |
Informatics Practices |
Informatics Practices |
3 |
10000 650 TV LG 15000 800 AC SONY 14000 750 a) To create the data frame for the above table. b) To add the new rows in the data frame. c) To displa... |
|