Search this site
Embedded Files
AIMD GPDS Courses
  • Home
  • Courses
  • Contact
AIMD GPDS Courses
  • Home
  • Courses
  • Contact
  • More
    • Home
    • Courses
    • Contact

日本語  ❯

Lesson 4    ❮    Lesson List    ❮    Top Page

4.1 Functions    

4.2 Lambda Functions    

❯  4.3  Handling Exceptions   

4.4 Intro to RegEx    

4.5 RegEx for Data Cleaning

⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺
EXPECTED COMPLETION TIME
❲▹❳  Video   5m 22s
☷  Interactive readings   5m
✑  Practice 4.3 (G Colab)   10m

Handling Basic Exception

When an error occurs, or exception as we call it, Python will normally stop and generate an error message.

These exceptions can be handled using the try and except statement.

In data analysis applications, many functions only work on certain kinds of input. As an example, Python's int function can convert a string to integer, but fails with ValueError on improper input.

Handling Exception on Multiple List

When a data that we have is not clean, try and except can be really useful, especially when multiple lists exist. We can assign the value if an error occurred.

©2023. All rights reserved.  Samy Baladram,
Graduate Program in Data Science - GSIS - Tohoku University
Google Sites
Report abuse
Page details
Page updated
Google Sites
Report abuse