In [1]:
# ==  Basic import == #
# plot within the notebook
%matplotlib inline
# No annoyingwarnings
import warnings
warnings.filterwarnings('ignore')

Lecture 3 Python


In [10]:
# The directory containing the file lib_pythontip3.py 
# must be the current one or in your python pathP
import lib_pythontip3 as mylib
# for python 3 use
# from imp import reload
reload(mylib)


Out[10]:
<module 'lib_pythontip3' from 'lib_pythontip3.py'>

In [ ]:


In [11]:
myobj = mylib.MyFirstClass("data/us_marriages_divorces.csv")

In [12]:
myobj.CLASSNAME


Out[12]:
'the class name'

In [13]:
myobj.print_me_divorce_stat()


mean:  414576.624113
std:  411625.987343
nmad: 291200.0

In [15]:
myobj2 = mylib.MySecondClass()


hello

In [16]:
myobj2.print_it("bye ")


bye 

In [ ]: