How to Solve NameError: name 'filterwarnings' is not defined -- warnings
Solution: Import the 'filterwarnings' module
To Solve the error, add the following line to the top of your code.
from warnings import filterwarnings
For more information:
Python filterwarnings warnings