Prasad Naik has Published 74 Articles

Draw a line on an image using OpenCV

Prasad Naik

Prasad Naik

Updated on 17-Mar-2021 07:29:18

836 Views

In this program, we will draw a simple line on an image using the OpenCV function line().Original ImageAlgorithmStep 1: Import cv2. Step 2: Read the image using imread(). Step 3: Get the dimensions of the image using the image.shape method. Step 4: Define starting point of the line. Step 5: ... Read More

How to create a simple screen using Tkinter?

Prasad Naik

Prasad Naik

Updated on 16-Mar-2021 11:10:50

344 Views

 We will create a simple screen using the Tkinter library.AlgorithmStep 1: Import tkinter. Step 2: Create an object of the tkinter class. Step 3: Display the screen.Example Codeimport tkinter as tk window = tk.Tk()Output

Python program to display various datetime formats

Prasad Naik

Prasad Naik

Updated on 16-Mar-2021 11:09:09

206 Views

The datetime module supplies classes for manipulating dates and time. We will display different formats like day of the week, week number, day of the year, etc.AlgorithmStep 1: Import datetime. Step 2: Print day of the week. Step 3: Print week number. Step 4: Print day of the year.Example CodeLive ... Read More

Adding textures to graphs using Matplotlib

Prasad Naik

Prasad Naik

Updated on 16-Mar-2021 11:07:40

408 Views

In this program, we will plot a bar graph using the matplotlib library. The most important Step in solving matplotlib related problems using the matplotlib library is importing the matplotlib library. The syntax is:import matplotlib.pyplot as pltPyplot is a collection of command style functions that make Matplotlib work like MATLAB. ... Read More

Displaying horizontal bar graphs using Matplotlib

Prasad Naik

Prasad Naik

Updated on 16-Mar-2021 11:06:31

719 Views

In this program, we will plot a bar graph using the matplotlib library. The most important Step in solving matplotlib related problems using the matplotlib library is importing the matplotlib library. The syntax is:import matplotlib.pyplot as pltPyplot is a collection of command style functions that make Matplotlib work like MATLAB. ... Read More

Displaying bar graphs using Matplotlib

Prasad Naik

Prasad Naik

Updated on 16-Mar-2021 11:05:57

190 Views

In this program, we will plot a bar graph using the matplotlib library. The most important Step in solving matplotlib related problems using the matplotlib library is importing the matplotlib library. The syntax is −import matplotlib.pyplot as pltPyplot is a collection of command style functions that make Matplotlib work like ... Read More

Finding the length of words in a given Pandas series

Prasad Naik

Prasad Naik

Updated on 16-Mar-2021 11:02:49

729 Views

In this task, we will find the length of strings in a Pandas series. We will use the str.len() function in the Pandas library for this purpose.AlgorithmStep 1: Define a Pandas series of string. Step 2: Find the length of each string using the str.len() function. Step 3: Print the ... Read More

Pandas program to convert a string of date into time

Prasad Naik

Prasad Naik

Updated on 16-Mar-2021 11:02:13

125 Views

In this program, we will convert a date string like "24 August 2020" to 2020-08-24 00:00:00. We will use the to_datetime() function in pandas library to solve this task.AlgorithmStep 1: Define a Pandas series containing date string. Step 2: Convert these date strings into date time format using the to_datetime ... Read More

How to use regular expressions (Regex) to filter valid emails in a Pandas series?

Prasad Naik

Prasad Naik

Updated on 16-Mar-2021 11:00:23

647 Views

A regular expression is a sequence of characters that define a search pattern. In this program, we will use these regular expressions to filter valid and invalid emails.We will define a Pandas series with different emails and check which email is valid. We will also use a python library called ... Read More

How to get the nth percentile of a Pandas series?

Prasad Naik

Prasad Naik

Updated on 16-Mar-2021 10:55:31

939 Views

A percentile is a term used in statistics to express how a score compares to other scores in the same set. In this program, we have to find nth percentile of a Pandas series.AlgorithmStep 1: Define a Pandas series. Step 2: Input percentile value. Step 3: Calculate the percentile. Step ... Read More

Advertisements