Count Uppercase, Lowercase, Special Characters and Numeric Values in Python using Regex

Gireesha Devara
Updated on 29-Aug-2023 14:05:18

865 Views

Regular expressions, commonly known as re or Regex is a powerful tool for manipulating and searching for patterns in text. In Python, regular expressions are implemented using the re-module. A regular expression is a sequence of characters that define a search pattern. The pattern is used to match and manipulate text strings, which can be very useful for tasks such as data cleaning, parsing, and validation. To count the number of uppercase letters, lowercase letters, special characters, and numeric values in a string using regular expressions (regex), we can use specific patterns to match and count the desired characters.  Following ... Read More

Union of Python Tuples

Pranay Arora
Updated on 29-Aug-2023 13:41:48

894 Views

A tuple, in python, is a sequential data structure that consists of a number of values. It is an immutable data structure. Hence, it is tricky to get a union of two tuples. Through this article we will try to dive into a few of the best possible approaches and understand their implementation in Python. Tuples, in python, are immutable, but they can contain mutable objects. Similarly, we can take help of mutable data structures to get our desired union. The union of Python tuples finds applications in removing duplicates, merging data sources, set operations, data deduplication, merging multiple results, ... Read More

Python Type Conversion in Nested and Mixed List

Pranay Arora
Updated on 29-Aug-2023 13:14:18

552 Views

Python is widely used and accepted today because of its versatility and readability. Its powerful features allow developers to perform complex tasks with ease. One such essential feature is type conversion or type casting. Especially with Python lists, which are heterogeneous in nature which often demands converting each nested list element or lists to be converted to a particular data type for use. In mixed lists, it becomes more complex. In this article, we will try to understand and implement type conversion in Nested and Mixed Lists. Through the codes we will decode the python features to implement the ... Read More

Convert List to Single-Valued Lists in Tuple in Python

Pranay Arora
Updated on 29-Aug-2023 13:12:48

289 Views

This article is our approach to try and understand the various methods to convert a list to single valued lists in Tuple. We will look into the possible Python programming to achieve the same. We will discuss the implementation details, time and space complexities, and efficiency of each method based on the size of the input list. Developers, data scientists, and general readers with a basic technical background will find this article beneficial for judging the best approach for their specific use cases. In python, converting a list to a tuple of single valued lists is not a complex task. ... Read More

Print Superscript and Subscript in Python

Pranay Arora
Updated on 29-Aug-2023 13:10:37

12K+ Views

Python is a multipurpose programming language which is well known to us for its simplicity and power. Whether you are starting as a fresher or an experienced developer, Python helps us with a wide range of tools to control and display text in various formats. Many times we need superscripts and subscripts as part of our writing especially to denote Scientific Notations or values. In this article, we will try to visualize and understand different ways to print superscripts and subscripts in Python. This will allow you to beautify and justify text output and make it visually appealing and equally ... Read More

Print Multiple Arguments in Python

Pranay Arora
Updated on 29-Aug-2023 13:08:49

2K+ Views

Python is one of the most widely used programming languages due to its powerful dynamic functionalities and ease of writing codes. It is great for beginners as well to start their programming journey. One very popular start code or beginner code is to understand and implement printing ‘Hello world’ in our console. In python, we use a print() statement to achieve the same. print("Hello World!!!") In this article, we will try to understand the print() module and learn how to print multiple arguments in Python. When we try to display anything in the console or window, there are often ... Read More

Position Legends Inside a Plot in Plotly Python

Pranay Arora
Updated on 29-Aug-2023 13:05:26

3K+ Views

Data visualization is a powerful tool that allows us to understand information examples, patterns, and bits of knowledge all the more really. Plotly-Python, a flexible and intuitive plotting library, gives information researchers, specialists, and experts with the capacity to make outwardly engaging and intelligent plots. Among the critical components of any plot is the legend, which assumes a significant part in assisting watchers with grasping the information and distinguish various components present in the representation. As a matter of course, Plotly positions legends outside the plot region, normally on the right-hand side. While this arrangement is reasonable for ... Read More

Plot Timeseries Based Charts Using Pandas

Pranay Arora
Updated on 29-Aug-2023 13:03:19

133 Views

Often in our daily life, we come across various interactive graphical data. In our daily work life or business, we come across several data sets or charts that help us in decision making, future predictions and much more. One such set of data that we come across in our daily encounters is Time Series data. A series of data or data points collected in regular intervals of time, such a time bound data set is called Time Series data. These data sets are collected at fixed intervals of time. A simple example can be our weather data, or may be ... Read More

Plot Ricker Curve Using SciPy in Python

Pranay Arora
Updated on 29-Aug-2023 13:01:02

318 Views

Python is one of the most popular and versatile programming languages. It is a dynamically-typed, high level language. It offers support for multiple libraries and tools for various scientific and mathematical research. It is hence widely used in data analysis and research. SciPy is a widely used python library, which provides a collection of functions and abilities for scientific computing. In this article, we will learn and understand how to plot a Ricker curve using SciPy in Python. The Ricker curve, which is also popular as the Mexican Hat wavelet, is commonly used in signal processing, seismic exploration, etc. By ... Read More

Delete True Values in a Python List

Pranay Arora
Updated on 29-Aug-2023 12:59:15

387 Views

In Python, lists are perhaps of the most regularly used datum structures that permit us to store different elements. Now and then, we might experience circumstances where we really want to remove explicit elements from a list. In this article, we will discuss five distinct methods to remove the True values from a Python list. We will examine the algorithm, give code examples, show the result, and close with a correlation of the methods. Introduction Consider a situation where we have a list containing a combination of boolean type and different information types, and we need to remove all events ... Read More

Advertisements