• Convert list to matrix in Python
    21 August

    Convert list to matrix in Python

    Python provides some in-built data types to stock multiple items in a single variable. A List is one among these built-in data types. However, performing mathematical functions on lists is impossible due to which we need to convert the given lists to matrices or arrays in order to allow the successful performance of certain mathematical […]

  • Save image to file in Python
    21 August

    Save Image to File in Python

    1. Introduction In the realm of Python programming, saving images to files is a task that finds its importance in numerous applications like web scraping, data visualization, and multimedia processing. This article presents a comprehensive guide on various Python methods for saving images, with a focus on practical scenarios involving both local and web sources. […]

  • Convert image to grayscale in Python
    21 August

    Convert image to grayscale in python

    A grayscale image is an image that simply contains only the shades of gray and no other color. The main advantage of using a grayscale image over a colored image is that it brings down the computational requirements, increases the speed of processing, and makes a significant impact on the complexity of the algorithm. This […]

  • Epoch to datetime in Python
    21 August

    Convert epoch to datetime in python

    Epoch time refers to the time elapsed since time was started measuring on January 1, 1970. Usually, it is measured in seconds. It is also known as UNIX time. In this article, we will convert this epoch time to datetime object in Python. First, let us understand what this datetime is. Python offers a module […]

  • Rotate image Python
    20 August

    Rotate image in Python

    Python supports the use of images and sometimes a given image needs to be rotated to a certain angle. The image in Python is rotated about the center and with a certain angle that is specified. Image Rotation is a geometric transformation, and this process can be carried out by Inverse or Forward Transformation. This […]

  • Create matrix in Python
    18 August

    Create matrix in Python

    In the world of programming, matrices are represented as 2-D arrays used for data representation in rows and columns. These are used in various mathematical and statistical operations and they retain their shape. A matrix with an equal number of rows and columns is called a square matrix. To create matrix in Python, we can […]

  • Select rows by multiple conditions using loc in Pandas
    29 July

    Pandas Loc Multiple Conditions

    💡 Outline Here is the code to select rows by pandas Loc multiple conditions. [crayon-679071e60f6df215209423/] Here, we are select rows of DataFrame where age is greater than 18 and name is equal to Jay. [crayon-679071e60f6e3715694900/] The loc() function in a pandas module is used to access values from a DataFrame based on some labels. It […]

  • Split dataframe in Pandas
    28 July

    Split dataframe in Pandas

    In real-life scenarios, we deal with massive datasets with many rows and columns. At times, we may want to split a large DataFrame into smaller DataFrames. We will discuss different methods to split dataframe in Python. Using the iloc() function to split DataFrame in Python Slicing is a method of extracting a smaller number of […]

  • Read text file in Pandas
    28 July

    Read text file in Pandas

    A dataset has the data neatly arranged in rows and columns. The pandas module in Python allows us to load DataFrames from external files and work on them. The dataset can be in different types of files. In this tutorial, we will read text file in pandas module in Python. Using the read_csv() function to […]