We help IT Professionals succeed at work.

ModuleNotFoundError: No module named 'sklearn.cross_validation'

hi am geting this error
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-95-d05cc6ee7707> in <module>
----> 1 from sklearn.cross_validation import train_test_split

ModuleNotFoundError: No module named 'sklearn.cross_validation'
Comment
Watch Question

Excel & VBA Expert
CERTIFIED EXPERT
Most Valuable Expert 2018
Awarded 2015
Commented:
sklearn.cross_validation has been changed to sklearn.model_selection.
So try this...
from sklearn.model_selection import train_test_split