0

For example I remember that I need train_test_split function from sklearn module, but I don't remember I need to use from sklearn.model_selection import train_test_split for import, I've tried to use help() in interactive mode with no results for train_test_split string:

import sklearn
help() # then type 'train_test_split' in interactive mode

do I need load each submodule and search pattern there ?

Qbik
  • 5,885
  • 14
  • 62
  • 93

1 Answers1

1

Maybe you can Google train_test_split until unless you are asking generally How to search a function in a module: Maybe this Question

In that case you can use

dir(sklearn)
help(sklearn)

from inspect import getmembers, isfunction, isclass
    
getmembers(sklearn, isfunction)
Deshwal
  • 3,436
  • 4
  • 35
  • 94