0
0
Data Analysis Pythondata~10 mins

Google Colab as alternative in Data Analysis Python - Interactive Code Practice

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

Complete the code to import pandas in Google Colab.

Data Analysis Python
import [1] as pd
Drag options to blanks, or click blank then click option'
Amatplotlib
Bpandas
Cnumpy
Dseaborn
Attempts:
3 left
💡 Hint
Common Mistakes
Importing numpy instead of pandas.
Using wrong alias like 'pn' instead of 'pd'.
2fill in blank
medium

Complete the code to read a CSV file in Google Colab.

Data Analysis Python
df = pd.read_csv('[1]')
Drag options to blanks, or click blank then click option'
A/mnt/data/data.csv
Bdata.csv
Chttps://drive.google.com/file/d/FILE_ID/view?usp=sharing
D/content/sample_data/data.csv
Attempts:
3 left
💡 Hint
Common Mistakes
Using only filename without path.
Using Google Drive share URL directly.
3fill in blank
hard

Fix the error in the code to mount Google Drive in Colab.

Data Analysis Python
from google.colab import [1]
[1].mount('/content/drive')
Drag options to blanks, or click blank then click option'
Astorage
Bfiles
Cdrive
Dauth
Attempts:
3 left
💡 Hint
Common Mistakes
Importing wrong module like files or auth.
Forgetting to mount after import.
4fill in blank
hard

Fill both blanks to list files in the mounted Google Drive folder.

Data Analysis Python
import os
files = os.[1]('[2]')
print(files)
Drag options to blanks, or click blank then click option'
Alistdir
Bwalk
C/content/drive/MyDrive
D/content/sample_data
Attempts:
3 left
💡 Hint
Common Mistakes
Using os.walk which returns a generator, not a list.
Using wrong path like sample_data instead of MyDrive.
5fill in blank
hard

Fill all three blanks to save a DataFrame to Google Drive in CSV format.

Data Analysis Python
df.[1]('[2]/[3].csv', index=False)
Drag options to blanks, or click blank then click option'
Ato_csv
B/content/drive/MyDrive
Cmy_data
Dread_csv
Attempts:
3 left
💡 Hint
Common Mistakes
Using read_csv instead of to_csv.
Saving to wrong folder path.