Difference of two columns in Pandas dataframeDifference of two columns in pandas dataframe in Python is carried out by using following methods : Method #1 : Using â -â operator. Python3 import pandas as pd # Create a DataFrame df1 = { 'Name':['George','Andrea','micheal', 'maggie','Ravi','Xien','Jalpa'], 'score1':[62,47,55,74,32,77,86], 'score2
2 min read
How to drop one or multiple columns in Pandas DataFrameLet's learn how to drop one or more columns in Pandas DataFrame for data manipulation. Drop Columns Using df.drop() MethodLet's consider an example of the dataset (data) with three columns 'A', 'B', and 'C'. Now, to drop a single column, use the drop() method with the columnâs name.Pythonimport pand
4 min read