Hafeezul Kareem has Published 328 Articles

Apply function to every row in a Pandas DataFrame in Python

Hafeezul Kareem

Hafeezul Kareem

Updated on 01-Nov-2019 09:50:20

1K+ Views

In this tutorial, we are going to learn about the most common methods of a list i.e.., append() and extend(). Let's see them one by one.apply()It is used to apply a function to every row of a DataFrame. For example, if we want to multiply all the numbers from each ... Read More

Apply uppercase to a column in Pandas dataframe in Python

Hafeezul Kareem

Hafeezul Kareem

Updated on 01-Nov-2019 09:47:01

1K+ Views

In this tutorial, we are going to see how to make a column of names to uppercase in DataFrame. Let's see different ways to achieve our goal.ExampleWe can assign a column to the DataFrame by making it uppercase using the upper() method.Let's see the code.# importing the pandas package import ... Read More

Arithmetic Operations on Images using OpenCV in Python

Hafeezul Kareem

Hafeezul Kareem

Updated on 01-Nov-2019 09:45:00

943 Views

In this tutorial, we are going to learn about the arithmetic operations on Images using OpenCV. We can apply operations like addition, subtraction, Bitwise Operations, etc.., Let's see how we can perform operations on images.We need the OpenCV module to perform operations on images. Install the OpenCV module using the ... Read More

as_integer_ratio() in Python for reduced fraction of a given rational

Hafeezul Kareem

Hafeezul Kareem

Updated on 01-Nov-2019 09:42:09

391 Views

In this tutorial, we are going to write a program that returns two numbers whose ratio is equal to the given float value. We have a method called as_integer_ratio() that helps to achieve our goal.Let's see some examples.Input: 1.5 Output: 3 / 2 Input: 5.3 Output: 5967269506265907 / 1125899906842624Let's examine ... Read More

Arithmetic operations using OpenCV in Python

Hafeezul Kareem

Hafeezul Kareem

Updated on 01-Nov-2019 09:40:12

312 Views

In this tutorial, we are going to perform arithmetic operations on images using OpenCV in Python. We need to install the OpenCV module.Run the following command to install the OpenCV module.pip install opencv-python==4.1.1.26If you run the above command, you will get the following successful message.Collecting opencv-python==4.1.1.26 Downloading https://files.pythonhosted.org/packages/1f/51/e0b9cef23098bc31c77b0e0 6221dd8d05119b9782d4c2b1d1482e22b5f5e/opencv_python-4.1.1.26-cp37-cp37m-win_amd64.w hl ... Read More

Audio processing using Pydub and Google Speech Recognition API in Python

Hafeezul Kareem

Hafeezul Kareem

Updated on 01-Nov-2019 08:19:42

867 Views

In this tutorial, we are going to work with the audio files. We will breakdown the audio into chunks to recognize the content in it. We will store the content of the audio files in text files as well. Install the following modules using the below commands.pip install pydubIf you ... Read More

Barnsley Fern in Python

Hafeezul Kareem

Hafeezul Kareem

Updated on 01-Nov-2019 08:11:37

425 Views

In this tutorial, we are going to learn about the Barnsley Fern, which is created by Michael Barnsley. The features of Barnsley Fern is similar to the fern shape. It is created by iterating over the four mathematical equations known as Iterated Function System(IFS). The transformation has the following formula.f(x, ... Read More

Basic Python Programming Challenges

Hafeezul Kareem

Hafeezul Kareem

Updated on 01-Nov-2019 08:06:14

518 Views

In this tutorial, we are going to write a solution for a challenge.ChallengeWe have to generate a random set of basic arithmetic operations. The user will give the number of questions, and we have to generate questions. After every question, the user will answer it. At the end of the ... Read More

Data analysis and Visualization with Python program

Hafeezul Kareem

Hafeezul Kareem

Updated on 01-Nov-2019 07:58:30

352 Views

In this tutorial, we are going to learn about data analysis and visualization using modules like pandas and matplotlib in Python. Python is an excellent fit for the data analysis things. Install the modules pandas and matplotlib using the following commands.pip install pandaspip install matplotlibYou will get a success message ... Read More

Automated software testing with Python

Hafeezul Kareem

Hafeezul Kareem

Updated on 01-Nov-2019 07:51:47

682 Views

In this tutorial, we are going to learn about automating testing in Python. After writing code, we have to test them by giving different types of input and check whether the code is working correctly or not.We can do it manually or automatically. Doing manual testing is very hard. So, ... Read More

Advertisements