0% found this document useful (0 votes)
16 views

Intro To Python

presents an introduction to python for data analysts

Uploaded by

pt
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

Intro To Python

presents an introduction to python for data analysts

Uploaded by

pt
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Quick intro

What is Python?
• General Purpose High Level Language
• Beginner Friendly
• Emphasis on readability
• Do a lot with a few lines of code
• Less verbose than C++ or Java
• Indentation replaces brackets
• Automatic memory management
• Dynamic types
• Interpreted / Interactive
• Completely Object Oriented
• In Python everything is an object
Why Python?
• No memory management
• Memory management is automated.
• So are pointers.
• High Level native data types
• Bool, Int, Float, String (only one of each!)
• Lists, dictionaries, file objects
• DataFrames (pandas), arrays (numpy)
• Easy Integration
• C, C++, Java, R
• JSON, XML, HTML, RDBMS
• Simpler code gets written faster.
When to use Python?
• Prototyping
• Great for building the first draft of a program
• before moving to C/C++, Java

• DevOPS
• Talk to multiple OS’s, network protocols & databases
• from the same process
• for embedded configuration, extension scripts
• Data Analysis
• Easy processing of multiple data formats
• Markup languages (HTML, XML), Excel, Databases, Text
• Many analysis and visualization tools
How to install?
• Anaconda – Continuum Analytics
• Makes windows installation easy
• 1 step process

• Command line installer for libraries

• Included IDE’s
• Spyder – Matlab like environment
• iPython Notebook – build interactive documents
Libraries - Ecosystem
• Numpy – Scientific Computing
• Pandas – Data Analysis Library
• MatPlotLib – Graphics and plotting
• Vincent – Data visualization
• Cython – C/C++ integration
• pyspark - Apache SPARK API – for big data processing.
• Scikit-learn – Machine Learning and AI.
• Processing – parallel - multicore or clusters
• libXML – XML parsing and manipulation
IDE’s
• Spyder
• A powerfull interactive environment
• Editing, testing, debugging & Introspection tools.
• Numerical computing environment
• Includes Ipython, Numpy, Scipy and Matplotlib
• -> based on MATLab

• Visual Studio
• Integrated with VS features
• Free and open source -> Hosted on GitHub
• Install from VS custom install.
• You need to install the python backend (anaconda) first
libXML
• etree
• A data structure for accessing and manipulating XML’s
• Allows queries using XPATH.
• XPATH is a query language for XML & HTML documents.
• Defined by W3C
xml_compare.py
• Get the xml tree, applications branch
• Using xpath to navigate the XML.
• Go over the leafs in each branch
• Compare the settings of new and old
• Store records with results & details of each test
• Calculate statistics

• Repeat for each partner


• & add exception handling for all situations.
Educational Resources
• Video Crash Course: Python for the C# developer
• Article Introducing Python for C# devs.
• Introduction to CS using Python – MIT free class - Currently in session!
• Python Specialization – Michigan U - Starts Oct 27
• Python Fundamentals – PluralSight
• Python Dev Toolkit – Pluralsight
References
• Python - Wikipedia page
• Python.org
• List of useful python modules
• XML processing with lxml

You might also like