Tag: Specific
Remove String after a Specific Character in Python
This article will discuss different ways to remove all characters from a string after a specific character in Python. Table Of Contents Remove everything after a character in a string using split() Remove everything after a character in a string using partition() Remove everything after a character in a string using Regex Remove everything after …
Remove String before a Specific Character in Python
This article will discuss different ways to remove all characters before a specific character from a string in Python. Table Of Contents Remove everything before a character in a string using split() Remove everything before a character in a string using partition() Remove everything before a character in a string using Regex Remove everything before …
Remove String before a Specific Character in PythonRead More
Remove specific characters from a string in Python
In this article, you will learn to remove specific characters from a string. Table Of Contents Remove specific characters from a string using replace() Remove specific characters from a string using translate() Remove all characters except alphabets using isalpha. Remove all characters except numbers using isdecimal. Remove all characters except alphabets and numbers from a …
How to get a string after a specific substring?
In this Python tutorial, we will learn how to get a string after a specific substring. Table Of Contents Get a string after a specific substring using split() Get a string after a specific substring using slicing Get a string after a specific substring using partition() Summary Get a string after a specific substring using …
Extract specific columns to new DataFrame as copy in Pandas
Multiple times while processing data, it is important to extract specific columns and store them in a new DataFrame. In this article, we will cover multiple ways to achieve that. Table of Contents Preparing Dataset Select subset of columns using copy() function Select subset of columns using filter() function Select subset of columns using drop() …
Extract specific columns to new DataFrame as copy in PandasRead More
Find Files containing specific Text in Linux
In this article, we will discuss different ways to find files that contain a specific text. When we want to find the files containing specific text in our Linux system instead of searching for every directory, we can achieve this with the grep command. This article will guide you on how to find the files …
Install a specific python package version using pip
In this article, we will learn how to install a specific package version with pip Table Of Contents What is pip? How to use pip command? How to check the pip version? How to upgrade or downgrade the pip version? Upgrading the pip to the latest version? Downgrading the pip to the specific version? How …
Install a specific python package version using pipRead More
Check if String Contains Specific Characters in Python
In this article, we will learn how to check a string for specific characters in Python. Table Of Contents Method 1: Using in operator Method 2: Using contains() method Method 2: Using find() method Summary Method 1: Using in operator We can use the in operator to check if a particular character exists in a …
Check if String Contains Specific Characters in PythonRead More
Read a specific column from CSV file in Python
In this article, we will learn how to read a specific column from CSV file in python Table Of Contents What is csv file? Reading specific columns by name from CSV file using read_csv() and usecols attribute. Reading specific columns by index from CSV file using read_csv() and usecols attribute. Reading specific columns by index …
Print a specific row of a pandas DataFrame
In this article, we will discuss different ways to print a specific row of a pandas DataFrame. Table of Contents Preparing DataSet Print specific row of DataFrame based on index position Print specific row of DataFrame based on index name Summary Preparing DataSet To quickly get started, let’s create a sample dataframe to experiment. We’ll …