In Jupyter notebooks or similar environments, you can stop the execution of a notebook at a specific cell by raising an exception. However, you need to handle the exception properly to ensure the execution stops. The issue you're encountering could be due to unhandled exceptions.
Here's how you can stop the execution at a specific cell using an exception:
```python
if not data_input_cols.issubset(data.columns):
raise Exception("Missing column or column's name missmatch. Please check input data has a valid schema: " + str(data_input_cols))
```
To make sure the execution stops when the exception is raised, you can add a try-except block in the cells where you want to capture the exception. For example:
```python
try:
# Your code here
except Exception as e:
# Handle the exception if needed
print(f"An exception occurred: {str(e)}")
```
This way, when the exception is raised, the code execution in that cell will stop, and you can choose to handle the exception as required. The subsequent cells will not be executed.
If you're using a different environment or have specific requirements, please provide more details for a more tailored solution.
All about tech and apps