Python
#17

Isolate Numerical and Categorical Columns with select_dtypes in Pandas

Easy
Interview Question #17

Given a mixed DataFrame of numerical, object, and datetime columns, select all numerical columns (int, float) for statistical scaling.

Input Table: df
1 rows preview
idagesalarysignup_datecountry
12565000.52026-01-01India
Expected Output Structure1 rows
idagesalary
12565000.5
Interview Context

Asked frequently in data analyst and business analyst technical rounds. Focus on clean filtering, optimal indexing usage, and unambiguous column selection.

Python 3.10 (Pandas)
Environment Ready

Starting the real Python + pandas runtime (one-time download)…

Chat with us