Tag: Not
Filter Pandas dataframe using ‘in’ & ‘not in’ like SQL
In this article, we will discuss multiple ways to filter a pandas DataFrame using the “in” and “not in” like functions in SQL. These functions are very handy to filter any DataFrame based on some custom conditions or predecided values. Table of Contents Preparation of solution Using pandas.DataFrame.isin() function Using numpy.isin() function Using query() method …
Filter Pandas dataframe using ‘in’ & ‘not in’ like SQLRead More
Delete a folder that is not empty in Python
Python provides a great communication channel with OS, hence it can delete, move, create files in the system. In this Python tutorial, we will learn about some methods using which we remove/delete a folder that is not empty. Table Of Contents Method 1 : Using shutil module Method 2 : Using OS module Summary Here …
The “If not” syntax in Python explained
In this Python tutorial, we will discuss the if not Syntax in Python programming language. But before that let’s learn about the if and not operators one by one, then we will discuss what is if not Syntax in Python, and why is it used or what are its best use cases? Table if Contents …
Add element to List if not already exists using Python
This tutorial will discuss about unique ways to add element to list if not already present in List. Table Of Contents Introduction to not in Operator in Python Using ‘not in’ Operator to append element if not already present in Python List Example 1 Example 2 Summary Introduction to not in Operator in Python In …
Add element to List if not already exists using PythonRead More
Select Rows where Two Columns are not equal in Pandas
This tutorial will discuss about different ways to select DataFrame rows where two columns are not equal in pandas. Table Of Contents Preparing DataSet Method 1: Using DataFrame.query() Method 2: Using DataFrame.loc[] Attribute Summary Preparing DataSet Let’s create a DataFrame with some hardcoded data. Advertisements import pandas as pd data = {‘Col_A’: [33, 12, 33, …
Select Rows where Two Columns are not equal in PandasRead More
Check if Any item of List is Not in Another List in Python
This tutorial will discuss about a unique way to check if any element of a list is not in another list in Python. Suppose we have two lists, list1 = [11, 22, 33, 44, 55] list2 = [67, 78, 49, 34, 19, 27] We want to check if any element from first list list1 is …
Check if Any item of List is Not in Another List in PythonRead More
Remove items in Array that are not in Another Array in Python
This tutorial will discuss about unique ways to remove elements from array that are not in another array – Python. Suppose we have two NumPy Arrays, mainArray = np.array([14, 23, 30, 41, 53]) otherArray = np.array([23, 41]) Now we want to remove only those elements from the mainArray which are not present in the otherArray. …
Remove items in Array that are not in Another Array in PythonRead More
Glo Night Plan Not Working? How To Fix It Now!
Is your Glo Night Plan not working right now? Get the top reasons why you’re disconnected. Also, learn how to fix your data connection fast. If you use the Glo night plan and it’s not working, this post can help you. Many people wonder why their Glo night plan doesn’t work, just like I did …
Airtel Night Plan Not Working? How to Fix it Now
Is your Airtel Night Plan Not Working? No problem, I created this post to show you why this is happening and the best solution for you. If you’re having trouble using your Airtel night plan, then this post can help you. Many people ask why their Airtel night plan isn’t working. I decided to write …
Is MTN Data Not Working? How To Fix It Now!
Is your MTN data not working? I will show you the common reasons why this happens. Also, learn how to fix it fast. If you’re having trouble using your MTN data plan, don’t worry, you’re not alone. Many people face this issue and ask questions like “why is my MTN data not working?” The good …