How to check the source code of a module in a Jupyter laptop?

For example, I want to check the source code of a python library directly in a notebook, is there any way to do this?

thanks

+5
source share
2 answers

Enter the full name of the function, then enter ?? .

+8
source

You can use the validation module (which is built-in) - for example, you can see the tree module below from scikit-learn.

 import inspect from sklearn import tree inspect.getsourcelines(tree.tree) 
+3
source

Source: https://habr.com/ru/post/1260737/


All Articles