From autoreload IPython documentation:
autoreload reloads modules automatically before entering the execution of code typed at the IPython prompt.
%autoreload 2 Reload all modules (except those excluded by %aimport) every time before executing the Python code typed.
Working example:
%load_ext autoreload
%autoreload 2