Skip to main content

Learning Python and a Few More Things

  • Chapter
  • First Online:
Computing with Data

Abstract

Python is one of the most popular programming languages. It’s broadly used in programming web applications, writing scripts for automation, accessing data, processing text, data analysis, etc. Many software packages that are useful for data analysis (like NumPy, SciPy, and Pandas) and machine learning (scikit-learn, TensorFlow, Keras, and PyTorch) can be integrated within a Python application in a few lines of code. In this chapter, we explore the programming language in a similar approach to the one we took for C++ and Java. In addition, we explore tools and packages that help accelerate the development of data-driven application using Python.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Hardcover Book
USD 109.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    Most of the important data analysis extensions have been ported from Python 2.x to 3.x, but not all.

  2. 2.

    https://docs.python.org/3/reference/executionmodel.html#naming-and-binding.

  3. 3.

    https://www.python.org/dev/peps/pep-0498/.

  4. 4.

    https://docs.python.org/3/library/string.html#custom-string-formatting.

  5. 5.

    A conversion may happen to convert a parameter into the expected type. Parameters of a derived class (satisfying the is-a relationship) are also accepted.

  6. 6.

    The duck typing example is inspired by the example found in the Wikipedia page for Duck Typing.

  7. 7.

    https://en.wikipedia.org/wiki/N-gram.

  8. 8.

    In this chapter, we discuss control flow in a sequential-execution (single-threaded) environment; for details on parallel computing, see Chap. 10.

  9. 9.

    http://legacy.python.org/dev/peps/pep-3104.

  10. 10.

    https://docs.python.org/3/reference/datamodel.html.

  11. 11.

    See https://en.wikipedia.org/wiki/GNU_Readline for more information on the Readline library.

  12. 12.

    Python 2 (version 2.7.9 or greater) and Python 3 (version 3.4 or greater) ship with the pip tool pre-installed. To manually install the pip tool, follow the instructions at https://pip.pypa.io/en/stable/installing/.

  13. 13.

    See Chap. 8 for details about matplotlib.

  14. 14.

    http://scikit-learn.org/stable/modules/generated/sklearn.cluster.KMeans.html.

  15. 15.

    http://scikit-learn.org/stable/modules/sgd.html#classification.

  16. 16.

    http://scikit-learn.org/stable/modules/sgd.html#regression.

  17. 17.

    See https://wiki.python.org/moin/Python2orPython3 for more details about the version change.

References

  • C. M. Bishop. Pattern Recognition and Machine Learning. Springer, 2006.

    Google Scholar 

  • K. P. Murphy. Machine Learning: A Probabilistic Perspective. MIT Press, 2012.

    Google Scholar 

  • Anil K. Jain and Richard C. Dubes. Algorithms for Clustering Data. Prentice-Hall, Inc., Upper Saddle River, NJ, USA, 1988. ISBN 0-13-022278-X.

    MATH  Google Scholar 

  • Leonard Kaufman and Peter J. Rousseeuw. Finding groups in data : an introduction to cluster analysis. Wiley series in probability and mathematical statistics. Wiley, New York, 1990. ISBN 0-471-87876-6. A Wiley-Interscience publication.

    Google Scholar 

  • M. Lutz. Programming Python. O’Reilly Media Inc., fourth edition, 2011.

    Google Scholar 

  • M. Lutz. Learning Python. O’Reilly Media Inc., fifth edition, 2013.

    Google Scholar 

  • W. McKinney. Python for data analysis. O’Reilly Media Inc., 2013.

    Google Scholar 

  • S. Bird, E. Klein, and E. Loper, editors. Natural Language Processing with Python. O’Reilly Media Inc., 2009.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2018 Springer Nature Switzerland AG

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Lebanon, G., El-Geish, M. (2018). Learning Python and a Few More Things. In: Computing with Data. Springer, Cham. https://doi.org/10.1007/978-3-319-98149-9_6

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-98149-9_6

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-98148-2

  • Online ISBN: 978-3-319-98149-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics