Write a small python codeto create a dataframewith headings(a and b) from the list given below : [[1,2],[3,4],[5,6],[7,8]] -Technology

1 Answer

Answer :

import pandas as pddf = pd.DataFrame([[1, 2], [3, 4]], columns = ['a','b'])df2 = pd.DataFrame([[5, 6], [7, 8]], columns = ['a','b'])df = df.append(df2)

Related questions

Description : Write a python code to create a data frame with appropriate headings from the list given below : -Technology

Last Answer : import pandas as pd# initialize list of listsdata = [['S101', 'Amy', 70], ['S102', 'Bandhi', 69], ['S104','Cathy', 75], ['S105', 'Gundaho', 82]]# Create the pandas DataFramdf = pd.DataFrame(data, columns = ['ID', 'Name', 'Marks'])# printdataframe. print(df )

Description : Consider a given Series , M1: Write a program in Python Pandas to create the series. -Technology

Last Answer : import pandas as pdm1=pd.Series([45,65,24,89],index=['term1','term2','t erm3','term4'])

Description : In a Web page, you can place (a) 2 levels of headings (b) 6 levels of headings -Technology

Last Answer : (b) Web page provides six levels of headings.

Description : Write a program in Python Pandas to create the following DataFrame batsman from a Dictionary: B_NO Name Score1 Score2 -Technology

Last Answer : Alternative Answer

Description : Which heading element gives the most prominent headings? -Technology

Last Answer : heading element gives the most prominent headings.

Description : What is the method of using headings in HTML? -Technology

Last Answer : provides six levels of headings. is the largest heading level while is the smallest heading level. These headings help us in obtaining a uniform look and feel for the document.

Description : A total of how many headings are there in html: -Technology

Last Answer : 6 headings are there in html.

Description : Write the HTML code to create the exact table which is given below: ADMNO SNAME NAME DOB -Technology

Last Answer : The HTML code is ADMNO SNAMENAMEDOB1110MANJITRANJIT4-MAR-1998

Description : Write a small python code to drop a row from data frame labeled as 0. -Technology

Last Answer : # Drop rows with label 0df = df.drop(0)print(df )

Description : Consider the following python code and write the output for statement S1 import pandas as pd -Technology

Last Answer : 0.50 8.00.75 11.0

Description : Write the code in python to read the contents of “number.csv” file consisting of data from a mysql table and print the data of the table -Technology

Last Answer : f = open('numbers.csv', 'r') with f:reader = csv.reader(f)for row in reader:for e in row:print(e)

Description : Write the HTML code to generate the following web page with the given below specifications: -Technology

Last Answer : Income Tax Slabs 2017-18INCOME TAX SLABS 2017-18S.No.Income RangeTax%10-250000NIL2250001-50000010%3500001-100000020%4>100000030%Next Page

Description : With reference to the above given tables, write commands in SQL for (i) and (ii) and output for (iii) below: -Technology

Last Answer : (i) select TName, Passenger from Train T, Reservation R where T.TrainId=R.TrainId;(ii) select T.* from Train T, Reservation R where T.TrainId!=R.TrainId;(iii)TrainIdTNameSourceDestination3424Lucknow MailLucknowNew Delhi5400Century ExpressNew DelhiKanpur

Description : Write a code to plot the speed of a passenger train as shown in the figure given below: -Technology

Last Answer : import matplotlib.pyplot as pltimport numpy as npx = np.arange(1, 5)plt.plot(x, x*1.5, label='Normal')plt.plot(x, x*3.0, label='Fast')plt.plot(x, x/3.0, label='Slow')plt.legend()plt.show()

Description : Write the code given below using ‘for’ loop instead of ‘while’ loop : -Technology

Last Answer : The given code using ‘for’ loop instead of ‘while’ loop :int ifor (i = 1 ; i < = 5 ; i + +){if (1 * i = = 4)jTextFieldl. setText ( “ “ + i) ;}

Description : Match List- I and List -II and select the correct answer using code given below lists List-I  a) Facts as effect of fact in issue 1) Section9 b) Facts forming part of same transaction 2) Section 8 c) Fact which constitute preparation for any ... d) A) 1 2 3 4 B) 4 3 2 1 C) 3 4 2 1 D) 2 3 1 4

Last Answer : c) Fact which constitute preparation for any fact in issue

Description : Consider the table STUDENT given below: RollNo Name Class DOB Gender City Marks 1 Anand XI 6/6/97 M Agra 430 -Technology

Last Answer : (1)b. Both (iii) and (iv)(2) b.RollnoNameClassDOBGenderCityMarks6734MaakhiyNehaGeetPreetiXIXXIXII12/12/948/12/956/5/978/8/95FFFFDubaiMoscowAgraMumbai256324470492

Description : How many modes are available in Python ? -Technology

Last Answer : interactive mode and script mode.

Description : Using Python Matplotlib ...... can be used to count how many values fall into each interval a. line plot b. bar graph -Technology

Last Answer : (c)histogram

Description : What does a create when used in an unordered list? -Technology

Last Answer : creates bulleted points for each list item.

Description : Which one of the following list type that will create a bulleted list? (a) Unordered (b) Ordered -Technology

Last Answer : (a) Unordered list provides various types of bullets like the square, disc, and circle.

Description : To create a square bulleted list, use (a) (b) -Technology

Last Answer : (c) Square bulleted list is the part of unordered list.

Description : To create a numbered list with A, B, … use (a) -Technology

Last Answer : (a) The given list uses the uppercase letter for each item so, the correct syntax is

Description : If you want to make a list of items in the form of terms and their descriptions, then you can create a …………. list. -Technology

Last Answer : (c) A definition list is a list of items, with a description of each item.

Description : List the important points to create an XML document. -Technology

Last Answer : The points while creating an XML document are as follows:1. XML documents must have starting and closing tags.2. XML tags are case sensitive.3. XML elements must be properly nested.4. XML documents must have one root element.5. The values of XML attributes must be enclosed in double quotes.

Description : Discuss the importance of the Haldia Planning Region under the following headings : (i) Location of the main centre. -Geography

Last Answer : (i) Haldia is located at the confluence of rivers Hooghly and Haldia about 105 kms downstream from Kolkata. (ii) Haldia port has been developed to release congestion at the Kolkata ... , Assam, Arunachal Pradesh, Nagaland, Manipur, Mizoram, Meghalaya, Tripura and Northern parts of Chhattisgarh.

Description : How many headings are there in each column of a database ?

Last Answer : Each column in a database has a heading.

Description : What displays thecontents of the active cell in Excel ? (A) Name box (B) Row Headings (C) Formula bar (D) Task pane (E) None of these

Last Answer : Name box

Description : ______bar displays the heading for each drop down menu. Commands are grouped under each of these menu headings according to function: a) Title Bar b) Formatting Toolbar c) Menu bar d) None of These

Last Answer : c) Menu bar

Description : What displays the contents of the active cell in Excel: a) Name box b) Row Headings c) Formula bar d) Taskpane e) None of The Above

Last Answer : c) Formula bar

Description : Suppose you have columns of data that span more than one printed page. How can you automatically print the column headings on each page? 1) Click Page Setup on the File menu, click the Sheet tab, ... Page Setup on the File menu, click the Sheet tab, and make a selection under the Print heading

Last Answer : 1) Click Page Setup on the File menu, click the Sheet tab, and enter the row that contains these column

Description : What displays the content of the active cell in Excel? 1) Name box 2) Row Headings 3) Formula bar 4) Taskpane

Last Answer : 3) Formula bar

Description : Which of the following is an important fact about working capital in Capsim? a. The life blood of any organization b. All of the money tied up in things you one day wish to sell c. Can be ... The change of working capital can be seen on the cash flow statement e. All of the above are important

Last Answer : e. All of the above are important

Description : Below is the list of various types of application softwares: A. Database B. Desktop publishing C. Drawing -Technology

Last Answer : 1. Drawing2. Word processing3. Desktop publishing4. Spreadsheet5. Database

Description : Create XML markup to represent a message sent on 7 June, 2014 to Amit and Saurabh by Mohit. -Technology

Last Answer : Mohit Amit Saurabh Submitted Successfully

Description : Write the HTML code to create a paragraph whose text color is blue. -Technology

Last Answer : or

Description : Write the HTML code to create a link for school .jpg located at C:\. -Technology

Last Answer : Image

Description : Write an HTML code to create the following table: 100 Amit 10 A -Technology

Last Answer : The HTML code is Roll NumberNameClass 100 Amit 10 A 101 Ankit 10 B 102 Arnab 10C Footer 1 Footer 2 Footer 3

Description : Write the complete … tags to create a table with the following contents. -Technology

Last Answer :

Description : Write the steps to create a new document. -Technology

Last Answer : Steps to create a new blank document are as follows:(a) Step 1: Click the Microsoft Office button.(b) Step 2: Select New, the New Document dialog box will appear as shown below:(c) Step 3: ... (It will be highlighted bydefault).(d) Step 4: Click Create button, a new blank document will appear.

Description : Write SQL query to create a table “BOOKS” with the following structure: Table: BOOKS -Technology

Last Answer : Create table Books(BOOK_ID Integer (2) Primary Key,BOOK_NAME Varchar (20),CATEGORY Varchar (20),ISSUE_DATE Date);

Description : Write SQL query to create a table “Registration” with the following structure: -Technology

Last Answer : Create table Registration(Reg_Id Integer(2) Primary Key,Name varchar(20),Course varchar(10),Join_Dt date);

Description : Write a Numpy program to create a 3x3 identity matrix, i.e. diagonal elements are 1, the rest are 0. Replace all 0 to random number from 10 to 20 -Technology

Last Answer : import numpy as nparray1=np.identity(3)print(array1)x=np.where(array1==0)for i in x:array1[x]=np.random.randint(low=10,high=20)print(array1)

Description : Write a Numpy program to create a 3x3 identity matrix, i.e. non diagonal elements are 1, the rest are 0. Replace all 0 to random number from 1 to 10 -Technology

Last Answer : import numpy as npZ = np.arange(9).reshape(3,3)print (Z)x=np.where((Z%2)==0)for i in x:Z[x]=np.random.randint(low=10,high=20)print(Z)

Description : Write a numPy program to create a numPy array with all values as True printed 10 times. -Technology

Last Answer : This answer was deleted by our moderators...

Description : Write SQL query to create a table Inventory with the following structure : -Technology

Last Answer : CREATE TABLE Inventory(Material Id Integer Primary Key,Material Varchar (50) NOT NULL,Category Char,DatePurchase Date) :

Description : Write SQL query to create a table Player with the following structure : -Technology

Last Answer : CREATE TABLE Player(};

Description : Write the HTML code to generate the following table on a Web page with the contents and alignment exactly as shown below: -Technology

Last Answer : The HTML code is

Description : Write command for the operations (i) to (iii) based on the spreadsheet below: -Technology

Last Answer : 1. At cell F2, type =D2*E2 and then copy this formula using mouse Fill handle onto range F3: F5.2. At cell G2, type =IF(C2=”Consumable”, F2*0.07, F2*0.11) and then copy this formula using mouse Fill handle onto range G3: G5.3. At cell G6, type =SUM(G2: G5).

Description : In a Bank’s database, there are two tables ‘Customer’ and ‘Transaction’ as shown below. Write a query to display customer’s name who has -Technology

Last Answer : (i) Select cust_name from customer c,transaction t where c.Acc_No=t.Acc_No and Transaction_Type= 'Debit';(ii)Select cust_name, t.* from customer c, transaction t where c.Acc_No=t.Acc_No;(iii) ... total amount of all type of transactions, it will only display the total of credit transactions only.