To merge two Pandas DataFrame with common column, use the merge() function and set the ON parameter as the column name.At first, let us import the pandas library with an alias −import pandas as pdLet us create the 1st DataFrame −dataFrame1 = pd.DataFrame( { "Car": ['BMW', 'Lexus', 'Audi', 'Mustang', 'Bentley', 'Jaguar'], "Units": [100, 150, 110, 80, 110, 90] } )Next, create the 2nd DataFrame −dataFrame2 = pd.DataFrame( { "Car": ['BMW', 'Lexus', 'Audi', 'Mustang', 'Mercedes', 'Jaguar'], "Reg_Price": [7000, 1500, 5000, 8000, 9000, 6000] } )Now, merge ... Read More
APIApplication Programming Interface is a computing interface that communicates and helps exchange information between two separate systems. A system that executes an API involves functions that another system can also perform. It defines requests to be made, how to make the requests, formats that can be used, etc. between two different systems.API TestingIt is a software testing that evaluates APIs. Its purpose is to determine the functionality, dependability, performance, and security of the interfaces. Rather than standard user inputs such as keyboards and outputs, we use software to send calls, obtain output, and record the response of the system. These ... Read More
To merge two Pandas DataFrame, use the merge() function. Just set both the DataFrames as a parameter of the merge() function.At first, let us import the required library with alias “pd” −import pandas as pdCreate the 1st DataFrame −# Create DataFrame1 dataFrame1 = pd.DataFrame( { "Car": ['BMW', 'Lexus', 'Audi', 'Mustang', 'Bentley', 'Jaguar'], "Units": [100, 150, 110, 80, 110, 90] } )Next, create the 2nd DataFrame −# Create DataFrame2 dataFrame2 = pd.DataFrame( { "Car": ['BMW', 'Lexus', 'Audi', 'Mustang', 'Mercedes', 'Jaguar'], "Reg_Price": [7000, 1500, 5000, 8000, 9000, 6000] } ... Read More
The chance of failure-free software execution for a set period of time in a given environment is defined as reliability.People nowadays naively believe in any program in this mechanized environment. People believe that whatever outcome the software system produces is always correct, therefore they follow it. That is a common mistake that we all make.Users believe that the data displayed is correct and that the software will always work properly. This is where the requirement for reliability testing arises.Reliability TestingReliability testing is a software testing procedure that determines if a piece of software can operate without fail for a set ... Read More
Quality Management PlanIt is a well-defined set of documents to ensure and manage the quality throughout software development life cycle (SDLC) efficiently. The main objective of creating a quality management plan is to make sure that the project output is of adequate quality and suitable for the software. It helps guide the Project Manager and other to execute quality management and quality assurance activities for a project. This plan is usually developed by a contractor and reviewed by the customer.The quality management plan describes how the quality has to be managed. It determines quality policies and procedures for the project ... Read More
The iloc method is an integer-location based indexing for selection by position. We are using iloc to append a list to a DataFrame.Let us first create a DataFrame. The data is in the form of lists of team rankings for our example −# data in the form of list of team rankings Team = [['India', 1, 100], ['Australia', 2, 85], ['England', 3, 75], ['New Zealand', 4 , 65], ['South Africa', 5, 50], ['Bangladesh', 6, 40]] # Creating a DataFrame and adding columns dataFrame = pd.DataFrame(Team, columns=['Country', 'Rank', 'Points'])Following is the row to be appended −myList = ["Sri Lanka", 7, ... Read More
Mutation TestingMutation testing, another form of software testing, is a testing in which statement(s) of the source code is/are changed or mutated to determine whether the test cases can detect errors in the source code or not. It is conducted to ensure the quality of test cases in terms of its robustness that it must fail the mutated source code.Mutation testing is not only done to determine the quality of existing software tests, but also to design new software tests. In mutation testing, a program is modified in small ways. It emphasizes helping testers develop effective tests and detect bottlenecks ... Read More
Application testing is a critical activity for any apps. Various approaches for testing apps have been developed over the last decade to ensure that we are providing high-quality applications that meet all of the customer's needs.Model-based testing (MBT) is a hot issue in the world of test automation that involves creating test cases from models of the applications being testedVarious approaches based on model-based testing are now available. We'll show you two approaches for model-based testing that use genetic algorithms. The use of genetic algorithms for model-based testing is a hot issue, and there are several papers and comparisons of ... Read More
To add anew column with constant value, use the square bracket i.e. the index operator and set that value.At first, import the required library −import pandas as pdCreating a DataFrame with 4 columns −dataFrame = pd.DataFrame({"Car": ['Bentley', 'Lexus', 'BBMW', 'Mustang', 'Mercedes', 'Jaguar'], "Cubic_Capacity": [2000, 1800, 1500, 2500, 2200, 3000], "Reg_Price": [7000, 1500, 5000, 8000, 9000, 6000], "Units_Sold": [ 100, 110, 150, 80, 200, 90] })Adding a new column with a constant value. The new column names is set in the square bracket −dataFrame['Mileage'] = 15 ExampleFollowing is the complete code −import pandas as pd # creating dataframe dataFrame = ... Read More
To check, use the isinf() method. To find the count of infinite values, use sum(). At first, let us import the required libraries with their respective aliases −import pandas as pd import numpy as npCreate a dictionary of list. We have set the infinity values using the Numpy np.inf −d = { "Reg_Price": [7000.5057, np.inf, 5000, np.inf, 9000.75768, 6000] } Creating dataframe from the above dictionary of listdataFrame = pd.DataFrame(d)Checking for infinite values using isinf() and displaying the countcount = np.isinf(dataFrame).values.sum() ExampleFollowing is the code −import pandas as pd import numpy as np # dictionary of list d = ... Read More
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP