Gireesha Devara has Published 207 Articles

Constructors in Python

Gireesha Devara

Gireesha Devara

Updated on 30-May-2023 15:03:29

In python every class has a constructor, it is a special method specified inside a class. The constructor/initializer will automatically invoke while creating a new object for the class. When an object is initialized, the constructor assigns values to the data members within the class. It is not necessary ... Read More

Conversion between binary, hexadecimal and decimal numbers using Coden module

Gireesha Devara

Gireesha Devara

Updated on 30-May-2023 14:57:06

The coden is a python library developed by Tanmay Earappa, which is used for secret codes (decoding and encoding secret codes). This module provides functionalities to do the code conversions. Following are few functions and their functionalities provided by this module – coden.secret(): It is used for decode or ... Read More

Convert an image into jpg format using Pillow in Python

Gireesha Devara

Gireesha Devara

Updated on 30-May-2023 14:53:05

In python pillow is one of the image processing libraries that is built on top of PIL (Python Image Library). It provides image processing functionalities to the python interpreter to work with image objects. And this library supports above 30 different image file formats. Install Pillow with pip By ... Read More

Conversion Functions in Pandas DataFrame

Gireesha Devara

Gireesha Devara

Updated on 30-May-2023 14:48:53

Pandas is one of the most potent libraries in python that provide high-performance data manipulation and analysis tools, it allows us to work with tabular data like spreadsheets, CSV, and SQL data using DataFrame. A DataFrame is a 2-dimensional labeled data structure it represents the data in rows and ... Read More

Convert a nested for loop to a map equivalent in Python

Gireesha Devara

Gireesha Devara

Updated on 30-May-2023 14:28:52

In general, for loop is used to execute/iterate a block of code a fixed number of times. And nested for loop is nothing but, iterating a block of code for x number of times, then we need to run another block of code within that code for y number of ... Read More

Convert "unknown format" strings to datetime objects in Python

Gireesha Devara

Gireesha Devara

Updated on 30-May-2023 13:25:44

Dates can be in many formats like: “2009/05/13 19:19:30”, “May 13 2009 07:19PM", and “2009-05-13 19:19”. Python provides many modules to work with data related to date times. To read an unknown format of date strings into a python datetime object, we can use the python dateutil, datetime modules. The ... Read More

Convert a NumPy array to a Pandas series

Gireesha Devara

Gireesha Devara

Updated on 30-May-2023 13:16:19

A Numpy array is an N-dimensional array also called a ndarray, it is a main object of the NumPy library. In the same way, the pandas series is a one-dimensional data structure of the pandas library. Both pandas and NumPy are validly used open-source libraries in python. Below we can ... Read More

Convert a NumPy array to Pandas dataframe with headers

Gireesha Devara

Gireesha Devara

Updated on 30-May-2023 13:14:13

Both pandas and NumPy are validly used open-source libraries in python. Numpy stands for Numerical Python. This is the core library for scientific computing. A Numpy array is a powerful N-dimensional array object which is in the form of rows and columns. NumPy array array([[1, 2], [3, 4]]) ... Read More

Python Program to reverse the elements of the array using inbuilt function

Gireesha Devara

Gireesha Devara

Updated on 29-May-2023 15:34:39

An array is a data structure that is used to store homogeneous elements in order. And the stored elements are identified by an index value or a key. Python doesn’t have a specific data structure to represent arrays. However, we can use the List data structure or Numpy module to ... Read More

Python Program to find the index of the first occurrence of the specified item in the array

Gireesha Devara

Gireesha Devara

Updated on 29-May-2023 15:31:14

An array is a data structure that is used to store elements of the same data type in order. And the stored elements are identified by an index value. Python doesn’t have a specific data structure to represent arrays. However, we can use the List data structure or Numpy module ... Read More

Advertisements