0
0
Data Analysis Pythondata~10 mins

Why data cleaning consumes most analysis time in Data Analysis Python - Test Your Understanding

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to load data from a CSV file.

Data Analysis Python
import pandas as pd
data = pd.read_csv([1])
Drag options to blanks, or click blank then click option'
A'data.csv'
Bcsv.read
Cread.csv
Ddata.csv
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting quotes around the file name
Using wrong function names
2fill in blank
medium

Complete the code to check for missing values in the data.

Data Analysis Python
missing = data.[1]().sum()
Drag options to blanks, or click blank then click option'
Adropna
Bisnull
Cnotnull
Disna
Attempts:
3 left
💡 Hint
Common Mistakes
Using dropna() which removes missing values instead of detecting them
Using notnull() which detects non-missing values
3fill in blank
hard

Fix the error in the code to remove duplicate rows.

Data Analysis Python
clean_data = data.[1](keep='first')
Drag options to blanks, or click blank then click option'
Adrop_duplicate
Bdrop_duplicates
Cremove_duplicates
Ddropna
Attempts:
3 left
💡 Hint
Common Mistakes
Using dropna which removes missing values, not duplicates
Misspelling the function name
4fill in blank
hard

Fill both blanks to create a dictionary of word lengths for words longer than 3 letters.

Data Analysis Python
lengths = {word: [1] for word in words if len(word) [2] 3}
Drag options to blanks, or click blank then click option'
Alen(word)
B>
C<
Dword
Attempts:
3 left
💡 Hint
Common Mistakes
Using the word itself as the value instead of its length
Using < instead of > in the condition
5fill in blank
hard

Fill all three blanks to create a dictionary of uppercase words and their counts if count is positive.

Data Analysis Python
result = [1]: [2] for k, v in data.items() if v [3] 0}
Drag options to blanks, or click blank then click option'
Ak.upper()
Bv
C>
Dk.lower()
Attempts:
3 left
💡 Hint
Common Mistakes
Using k.lower() instead of k.upper()
Using < instead of > in the condition
Swapping keys and values