Skip to content
C

Problem 4: Remove Irrelevant Columns

Easypython

Problem Description

Write a Python program that takes a DataFrame with an irrelevant "internaltrackingid" column and removes it, printing the DataFrame's columns before and after.

Input

A DataFrame containing at least one irrelevant column alongside relevant ones.

Output

The list of column names before and after removal.

Constraints

  • The column to remove will be explicitly specified.

Example Input

text
columns = ["name", "age", "marks", "internal_tracking_id"]

Example Output

text
Before: ['name', 'age', 'marks', 'internal_tracking_id'] After: ['name', 'age', 'marks']

Concepts Covered

df.drop(columns=[...]).

Input (stdin)

Output

Run your code to see output here...