Curriculum
Course: Data Science Bootcamp- Bridging the Skil...
Login
Text lesson

2. Python Advanced Concepts

Objective:

By the end of this lesson, learners will master string manipulation, list comprehensions, advanced loops, and file handling in Python, with applications in data science workflows.


1. String Manipulation

Topics Covered:

  • Splitting strings.

  • Replacing substrings.

  • f-strings for formatting.

Activity:

  • Modify a filename string to remove the trailing -1 using .replace().


2. File Handling in Google Colab

Key Concepts:

  • Mounting Google Drive.

  • Searching for files.


3. List Comprehensions

Skills Practiced:

  • Convert currencies.

  • Filter data.

Activity:

  • Filter a list of property records for entries in “Tlalpan”.


4. Advanced Loops

Key Concepts:

  • while loops with break/continue.

  • for loops with dictionaries.

Activity:

  • Print only odd numbers from 0 to 100 using a for loop.


5. Nested Loops & Range

Examples:

  • Nested loops.

  • range() function.

Activity:

  • Create an 8×8 grid of # symbols using nested loops.


6. Practical Exercises

Data Science Applications:

  1. Summing numbers.

  2. Filtering countries.

  3. Reversing a list.

Challenge:

  • Analyze countries_data.py to find:

    • Total languages.

    • Top 10 most spoken languages.

    • Top 10 most populated countries.


7. Summary & Resources

Key Takeaways:

  • Strings: Split, replace, format.

  • Files: Search/read in Colab.

  • Loops: whilefor, nested loops.

  • Comprehensions: Transform/filter lists efficiently.

Access the whole lesson here: Access the lesson content here: Python Advanced Concepts.

Review Your Cart
0
Add Coupon Code
Subtotal