Book Image

Python for Finance

By : Yuxing Yan
Book Image

Python for Finance

By: Yuxing Yan

Overview of this book

Table of Contents (20 chapters)
Python for Finance
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Finding a function from an imported module


We could assign all related functions from NumPy to a variable such as x. Then, we loop through it to print each individual function as shown in the following lines of code:

>>>import numpy as np
>>>x=np.array(dir(np))
>>>for k in x:
        if (k.find("uni")!=-1):
              print k
unicode
unicode0
unicode_
union1d
unique