Kiran P has Published 125 Answers

How to plot pie-chart with a single pie highlighted with Python Matplotlib?

Kiran P

Kiran P

Updated on 10-Nov-2020 06:16:11

Introduction..What is your most favorite chart type ? If you ask this question to management or a business analyst, the immediate answer is Pie charts!. It is a very common way of presenting percentages.How to do it..1. Install matplotlib by following command.pip install matplotlib2. Import matplotlibimport matplotlib.pyplot as plt3. Prepare ... Read More

How to plot 4D scatter-plot with custom colours and cutom area size in Python Matplotlib?

Kiran P

Kiran P

Updated on 10-Nov-2020 06:12:56

Introduction..Scatter-plot are very useful when representing the data with two dimensions to verify whether there's any relationship between two variables. A scatter plot is chart where the data is represented as dots with X and Y values.How to do it..1. Install matplotlib by following command.pip install matplotlib2. Import matplotlibimport matplotlib.pyplot ... Read More

How to extract required data from structured strings in Python?

Kiran P

Kiran P

Updated on 10-Nov-2020 06:08:49

Introduction...I will show you couple of methods to extract require data/fields from structured strings. These approaches will help, where the format of the input structure is in a known format.How to do it..1. Let us create one dummy format to understand the approach.Report: <> - Time: <> - Player: <> ... Read More

How to read Microsoft Word with Python?

Kiran P

Kiran P

Updated on 10-Nov-2020 06:05:20

Introduction...No offense, I do not like Microsoft word neither spreadsheets. Being a Data Engineering specialist, I often receive test results from testers in Microsoft word. Sigh! they put so much information into word document right from capturing screen shots, links, big, very big, very very big paragraphs. Microsoft word had ... Read More

How to create Microsoft Word paragraphs and insert Images in Python?

Kiran P

Kiran P

Updated on 10-Nov-2020 06:00:18

Introduction...Being a Data Engineering specialist, I often receive test results from testers in Microsoft word. Sigh! they put so much information into word document right from capturing screen shots and very big paragraphs.Other day, I was asked by testing team to help them with a program to insert the tool ... Read More

How to save HTML Tables data to CSV in Python

Kiran P

Kiran P

Updated on 10-Nov-2020 05:53:33

Problem:One of the most challenging taks for a data sceintist is to collect the data. While the fact is, there is plenty of data available in the web it is just extracting the data through automation.Introduction..I wanted to extract the basic operations data which is embedded in HTML tables from ... Read More

How to Add Legends to charts in Python?

Kiran P

Kiran P

Updated on 10-Nov-2020 05:46:55

Introduction...The main purpose of charts is to make understand data easily. "A picture is worth a thousand words" means complex ideas that cannot be expressed in words can be conveyed by a single image/chart.When drawing graphs with lot of information, a legend may be pleasing to display relevant information to ... Read More

How to Visualize API results with Python

Kiran P

Kiran P

Updated on 10-Nov-2020 05:45:39

Introduction..One of the biggest advantage of writing an API is to extract current/live data, even when the data is rapidly changing, an API will always get up to date data. API programs will use very specific URLs to request certain information e.g. Topp 100 most played songs of 2020 in ... Read More

How to implement Multithreaded queue With Python

Kiran P

Kiran P

Updated on 10-Nov-2020 05:39:02

Introduction..In this example, we will create a task queue that holds all the tasks to be executed and a thread pool that interacts with the queue to process its elements individually.We will begin with the question, what is a Queue?. A queue is a data structure that is a collection ... Read More

How to scan for a string in multiple document formats (CSV, Text, MS Word) with Python?

Kiran P

Kiran P

Updated on 10-Nov-2020 05:36:10

Problem..Assume you have a directory full of files with different formats, to search for a particular keyword.Getting ready..Install below packages.1. beautifulsoup42. python-docxHow to do it...1. Write a function to search for a string in CSV format. I will be using csv.reader module to go through the file and search for ... Read More

Advertisements