Python Excel Merge Unmerge Cells

Merge/Unmerge Cells In this example I am going to show you how to merge and unmerge cells in excel sheet using Python script. You can merge two or more columns in a single row or multiple rows in excel file. For merging cells you need to specify the range of rows and columns in the excel sheet. So, you need…

Insert Images In Excel File Using Python

Images in Excel In this example I am going to show you how to insert images in excel file using Python script. You may have a requirement that needs to insert one or more images into an excel file. Either to represent something using the images in the excel file or you may need both text and images into the…

How To Create Borders In Excel File Using Python

Borders in Excel File In this example I am going to show you how to create borders in excel file. I will create two sheets in the same excel file. In one sheet I will show how to create borders around rows and columns without writing any text. In the other sheet I will show you how to create borders…

Python Add Images To PDF Documents

PDF In this example I am going to show you how to add images to PDF documents or files. you may need to add or include images into pdf files along with text information. There are a number of advantages while using pdf as a document for various purposes, such as: PDF format reports allows professionals to edit, share, collaborate…

Solving Josephus Problem Using Python

Introduction In this example, I am going to show you how to solve Josephus problem using Python. The Josephus’ Problem can be stated as follows: There was a group of 41 Jewish soldiers surrounded by Roman army, and they didn’t want to get caught. So, they sat down in a circle and came up with an algorithm. Everybody had a…

Van Eck Sequence Using Python

Introduction In this example I am going to generate Van Eck sequence using Python programming language. Van Eck sequence is not used strictly for research purpose and it is actually application based professional activity. Van Eck sequence can be illustrated as follows: You start with a number 0 at the first position. Not necessarily you have to start with a…

Pretty Print JSON In Python

Table of Contents Introduction Why do you need to prettify the JSON data? Prerequisites Pretty Print JSON Source Code Introduction In this example I am going to show you how to pretty print JSON in Python programming language. The ugly JSON or one liner JSON data or string could be very difficult to read manually and that’s why you may…

How To Reduce Image Size Using Python

Table of Contents Introduction Why Need To Reduce Size Other Tools Prerequisites Project Directory Reduce Image Size Testing Image Quality After Reducing Image Size Original Images Scaled Images Optimized Images Source Code Introduction In this tutorial I will show you how to reduce image size using Python program. I am using Pillow package for reducing the size of the image….

How To Extract Text From Images In Python

Introduction In this example I will show you how to extract text from images in Python program. The text extraction from image could be used for various purpose, for example, data mining for machine learning projects, reading the content from images can be used for further processing in your applications. To extract text from image I am going to use…

Python Flask Cache in Web Applications

Introduction In this example, I am going to discuss about how to work with Python flask caching. Flask is a Python based light-weight web frameworks. Flask framework provides an extension called Flask-Caching that adds caching supports for various backends to any flask applications. You can also develop your own caching system by extending the flask_caching.backends.base.BaseCache class. Caching is used to…