Write the code to create a DataFrame ‘df’ and answer the questions followed.
Write the code to create a DataFrame ‘df’ and answer the questions followed. SOLUTION Write the code to create a DataFrame ‘df’ and answer the questions followed. import pandas as pd import numpy as np # Original DataFrame data = { “Col1”: [100.0, 95.8, np.nan, 85.0], “Col2”: [100.0, 100.0, 100.0, 85.0], “Col3”: [60.0, 57.48, 53.58, […]
Table : Infant. Write a MYSQL Query
Table : Infant. Write a MYSQL Query SOLUTION Table : Infant. Write a MYSQL Query Table: Infant ItemCode Item DatePurchase UnitPrice Discount 101 Frock 2016-01-23 700 10 102 Cot 2015-09-23 5000 25 103 Soft Toy 2016-06-17 800 10 104 Baby Socks 2014-10-16 100 7 105 Baby Suit 2015-09-20 500 5 (i) List names & unit […]
Write a Python program to display the given Result using a BAR CHART
Write a Python program to display the given Result using a BAR CHART SOLUTION Bar chart program import matplotlib.pyplot as plt # Line Plot RESULT[[‘Maths’, ‘Science’, ‘SST’]].plot(kind=’line’, marker=’o’) plt.title(“Result Analysis”) plt.xlabel(“Name”) plt.ylabel(“Score”) plt.grid(True) plt.show() (i) Title set as “Result Analysis”✔ (ii) Labels “Name” (x-axis) and “Score” (y-axis)✔ (iii) Legend displayed automatically (Maths, Science, SST)
Write the code to create a DataFrame ‘df’ and answer the questions followed.
Write the code to create a DataFrame ‘df’ and answer the questions followed. SOLUTION Write the code to create a DataFrame ‘df’ and answer the questions followed. Pandas operations import pandas as pd # Create DataFrame data = { ‘Maths’: [100, 95, 85], ‘Science’: [100.0, 50.0, 90.0], ‘SST’: [60.0, 57.48, 53.58] } df = pd.DataFrame(data, […]
Create a table DRUGDB with the fields given in below table and assuming data type of your own.
SQL SQL Queries (a) Create table DRUGDB (schema based on the displayed sample): (b) SQL commands for the specific requests (i) To increase the price of “Paracetamol” by 35 (ii) To display the DrugID, RxID and PharmacyName of all records in descending order of their price (iii) Display all the details of the drugs where […]
Write a Python program to display a BAR CHART of the number of students in a school.
Write a Python program to display a BAR CHART of the number of students in a school. SOLUTION Create a Bar Chart……. import matplotlib.pyplot as plt groups = [‘I’, ‘II’, ‘III’, ‘IV’] strength = [38, 30, 45, 49] # provide different colors for each bar (one color per bar) colors = [‘tab:blue’, ‘tab:orange’, ‘tab:green’, ‘tab:red’] […]
Write the code to create the series ‘serObj’ and answer the questions that follow.
Write the code to create the series ‘serObj’ and answer the questions that follow. SOLUTION Create a Series …….. import pandas as pd # create the series serObj = pd.Series([31, 28, 31, 30], index=[‘Jan’, ‘Feb’, ‘Mar’, ‘Apr’]) print(“Initial series:”) print(serObj) # i) add one row: ‘May’ -> 31 serObj[‘May’] = 31 # ii) update Feb […]
Class 12th IP Practical-1
Class 12th IP Practical-1 PRACTICAL Q1. a) Write the code to create the series ‘serObj’ and answer the questions that follow. Jan 31Feb 28Mar 31Apr 30 i) Write the command to add one row: ‘May’ – 31ii) Write the command to update Feb to 29iii) Write the command to change index to 1,2,3,4,5 in place […]
Python Pandas – I
Python Pandas – I INDEX NOTES Introduction to Python Pandas Python has become one of the most widely used programming languages, especially in the field of data handling and analysis. One of the most important libraries that supports these tasks is Pandas. The word “Pandas” is derived from “Panel Data”, which refers to multidimensional structured […]
50m Dash or 50m Standing Start
Class 12th PE LOG BOOK 50m Dash or 50m Standing Start Purpose: The purpose of this test is to determine or measure speed and acceleration. Infrastructure/Equipment Required: Measuring tape or marked square, 2 stopwatches, flat and clean surface of 50 meters. Procedure: An area of 50m is marked on a track. Two parallel lines are […]
