Data Type
The kind of value a variable holds: int, float, str, bool, list, dict, etc.
- Four scalars in ML: int, float, str, bool.
- bool is a subclass of int (True == 1).
- Containers: list, dict, tuple, set.
When to use: Converting features before training; avoiding silent dtype promotions.
Example: type(3) is int; type(3.0) is float; type("3") is str; type(True) is bool. int(True) + 1 == 2.