Pandas - Delete a Series Using the del keyword

By Hemanta Sundaray on 2021-08-15

Let’s read the budget.xlsx file into a DataFrame:

import pandas as pd

data = pd.read_excel("budget.xlsx", sheet_name="sheet2")

data

Output:

Budget

We can delete the LTL Flag column using the del keyword as shown below:

del data["LTL Flag"]

data

Output: Delete

Join the Newsletter