1. Help:
? : Overview and Introduction to Ipython
Help: Querying for assistance with the specified name
Obj? : Lists the details of the Obj object
Obj?? : List more detailed information
2. Special variables:
_ Indicates the previous output
__ indicates the second-to-last output
___ indicates the third-to-last output
_DH: Catalog History---return list
_oh: Output History---"Back to Dictionary"
3. Shell command:
! Command Execution Shell command (the current system's shell command) if the current system is wind, then many of the commands can not be executed, need to pass the additional configuration, the current system support shell command, if it is Linux, basic can be executed.
! Ls-l
! Touch A.txt
Files =!ls-l | grep py
4, Magic Method:
Ipython built-in special method with% percent sign
%magic format
% starts with the line magic
The cell Magic,notebook is the cell that starts with the percent
%alias defines an alias for a system command
Alias LL Ls-l
ll
%timeit statement
-N How many times a loop loop executes the statement
-R Loop executes how many loops to get the best results
%%timeit Setup_code
Code .... This is for the entire cell.
%CD Change current working directory, CD can be considered as%CD link, path history in _dh view
%pwd, PWD Displays the current working directory
%ls, LS Returns a list of files
Note:%PW This kind of thing magic method, is Ipython internal realization, and the exercise system is irrelevant, and! PWD relies on command execution provided by the shell of the current operating system, and default Windows does not support PWD
%%js,%%javascript run JS script in cell
%%js
Aleart (' a ' + 1)
Basic use of Ipython