Using Python’s datetime module, it is simple to calculate the number of days between two dates. This article describes how to use Python to calculate the number of days between two dates. Following is the example of how to calculate…
In this article, we will see how to change datetime format in Python Pandas. Python Pandas has the ability to convert a string representation of a date or time into a DateTime object. Let us assume we have a dataset…
Pandas Dataframe provides a convenient way to store and manipulate tabular data. The index is an important part of a Pandas DataFrame, as it provides a way to uniquely identify each row. In this article, we will discuss how to…
Validations are very important for any application because they make sure that the data entered by the user is valid. In this article, we will see how to validate the date string format using Python. There are many way to…
In this article, we’ll look at how to write a Python program that lists subdirectories and files in the given path. It’s very important to perform this task efficiently when dealing with a large number of files and folders. There…
In this article, we will see how to generate a random date between two dates in Python. There might be N no of scenarios where you may need to generate a random date between two dates in python. For example,…
In this article, we will see why we get the “TypeError: ‘NoneType’ object is not iterable” and how to resolve it. Type Error : ‘NoneType’ usually occurs when we try to iterate over an object that is of type None….
In this article, we will see how to call a class function from an init function in Python. In python, when an object of a given class is created, the init function is invoked automatically. It’s common practice to utilize…
Secure Copy (SCP) is a way to safely transfer files from a local host to a remote host or from a remote host to another remote host. As a software engineer, you must have used SCP at least once in…
In this article, we will see how to print the keys and values of a dictionary. There are several methods in python to achieve this task. Using the keys() and values() methods There might be case where you need only…