Back to marketplace

Transforming Data

No description yet. This curated deck is ready for daily study.

Total cards: 10•Content version: v4•Public deck•Updated: 8/1/2026

Card preview (10)

#1
Front (Question)

Function used to find missing data?

Back (Answer)

df.isna()

#2
Front (Question)

Function used to compile all the missing data

Back (Answer)

df.isna().sum()

#3
Front (Question)

Function used to drop all rows that are missing data?

Back (Answer)

df.dropna(inplace=True) Using inplace=True makes the change stick

#4
Front (Question)

Function used just to drop only rows in one column?

Back (Answer)

df. dropna(subset=[‘Embarked’], inplace=True) df. isna().sum()

#5
Front (Question)

Function used to drop column directly

Back (Answer)

df. drop(columns= ‘Cabinet, inplace=True) df. isna().sum()

#6
Front (Question)

Function used to drop all columns that are missing any data?

Back (Answer)

df.dropna(axis=1, inplace=True

#7
Front (Question)

What argument can be used to decide how much incomplete data to drop in columns?

Back (Answer)

thresh= can be used to drop data with less than 45% of its data df.dropna(axis=1, thresh=.45, inplace=True)

#8
Front (Question)

How to fill missing data with new category? What code is used?

Back (Answer)

df[‘Gender’].fillna(‘Missing, inplace=True) Replaces Gender column with Missing

#9
Front (Question)

How to fill missing data with an average?

Back (Answer)

median_age = df[‘Age’].median() df[‘Age’].fillna(median_age, inplace=True) df.isna().sum()

#10
Front (Question)

How to fill categorical data with the most common value in the column?

Back (Answer)

most_common_pet = df[‘Pet Type’].mode() df[‘Pet Type].fillna(most_common_pet, inplace=True