I'm starting to use Jupyter lab which is nice. One thing that I have a question about is how to get the param arguments for a function that I created?
If I do my_function() and then press the tab key, I get a long list of a variety of things that are present in my environment. Such as other functions, classes, or instances (variables I defined), modules, and PARAM, which is what I care about.
It is nice that each of these are color coded, but is there an easy way to get to each of my params for my function without having to scroll through a million things?
For example in R, I can do
myfunction(<tab key>)
to get a list of all params for that function.
Documentation: Jupyter Notebook can show that documentation of the function you are calling. Press Shift+Tab to view the documentation.
Function blocks begin with the keyword def followed by the function name and parentheses ( ( ) ). Any input parameters or arguments should be placed within these parentheses. You can also define parameters inside these parentheses.
In Python, we can easily define a function with mandatory and optional parameters. That is, when we initialise a parameter with a default value, it becomes optional. Otherwise, the parameter will be mandatory. In the above example, man1 and man2 are mandatory because they are not initialised in the function definition.
press shift
+tab
with the cursor inside the function parenthesis to see the parameter arguments as well as the function docstring (if it has one).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With