Python Data Analytics & Visualization Mohd Razif Bin Shamsuddin
Introduction to Python Getting Started Python can be easy to pick up whether you're a first time programmer or you're experienced with other languages. The following link pages are a useful first step to get on your way writing programs with Python! Beginner's Guide, Programmers Beginner's Guide, Non-Programmers Beginner's Guide, Download & Installation Code sample and snippets for Beginners
Why learn python? Friendly & Easy to Learn The community hosts conferences and meetups, collaborates on code, and much more. Python's documentation will help you along the way, and the mailing lists will keep you in touch. Applications The Python Package Index (PyPI) hosts thousands of third-party modules for Python. Both Python's standard library and the community-contributed modules allow for endless possibilities. Open-source Python is developed under an OSI-approved open source license, making it freely usable and distributable, even for commercial use. Python's license is administered by the Python Software Foundation.
There are two versions of python Short version: Python 2.x is legacy, Python 3.x is the present and future of the language PYTHON 3.6.1 Note that Python 3.5+ cannot be used on Windows XP or earlier. Python 2.7.13 There are some key issues that may require you to use Python 2 rather than Python 3. Firstly, if you're deploying to an environment you don't control, that may impose a specific version, rather than allowing you a free selection from the available versions. Secondly, if you want to use a specific third party package or utility that doesn't yet have a released version that is compatible with Python 3, and porting that package is a non-trivial task, you may choose to use Python 2 in order to retain access to that package. Python 3.0 was released in 2008. The final 2.x version 2.7 release came out in mid-2010, with a statement of extended support for this end-of-life release. The 2.x branch will see no new major releases after that. 3.x is under active development and has already seen over five years of stable releases, including version 3.3 in 2012, 3.4 in 2014, 3.5 in 2015, and 3.6 in 2016. This means that all recent standard library improvements, for example, are only available by default in Python 3.x. * Info from 10/7/2017
https://www.python.org /downloads/ Installer for python https://www.python.org /downloads/
Mohd Razif Bin Shamsuddin Learning the Syntax Mohd Razif Bin Shamsuddin
Basic Syntax (Cont.) # This program prints Hello, world!print('Hello, world!')
Basic Syntax (Cont.)
Basic Syntax (Cont.)
Python Input, Output and Import Python provides numerous built-in functions that are readily available to us at the Python prompt. Some of the functions like input() and print() are widely used for standard input and output operations respectively. Let us see the output section first.
Python Input, Output and Import Python Output Using print() function We use the print() function to output data to the standard output device (screen).
Python Input, Output and Import The actual syntax of the print() function is print(*objects, sep=' ', end='\n', file=sys.stdout, flush=False)
Python Input, Output and Import Up till now, our programs were static. The value of variables were defined or hard coded into the source code. To allow flexibility we might want to take the input from the user. In Python, we have the input() function to allow this. The syntax for input() is input([prompt])
Python Input, Output and Import where prompt is the string we wish to display on the screen. It is optional. >>> num = input('Enter a number: ') Enter a number: 10 >>> num '10‘
Python Input, Output and Import Python Import When our program grows bigger, it is a good idea to break it into different modules. A module is a file containing Python definitions and statements. Python modules have a filename and end with the extension .py. Definitions inside a module can be imported to another module or the interactive interpreter in Python. We use the import keyword to do this. For example, we can import the math module by typing in import math. import math print(math.pi)
Source Code Example (Cont.)
https://www.programiz.com/ python-programming Tutorial https://www.programiz.com/ python-programming
Hands on using Datacamp Mohd Razif Shamsuddin
Register your Accounts online. Go to: https://www.datacamp.com/
Data Visualization Mohd Razif Shamsuddin
10 Useful Python Data Visualization Libraries for Any Discipline Matplotlib Matplotlib was the first Python data visualization library, many other libraries are built on top of it or designed to work in tandem with it during analysis. Some libraries like pandas and Seaborn are “wrappers” over matplotlib. They allow you to access a number of matplotlib’s methods with less code.
10 Useful Python Data Visualization Libraries for Any Discipline Seaborn
10 Useful Python Data Visualization Libraries for Any Discipline Seaborn Seaborn harnesses the power of matplotlib to create beautiful charts in a few lines of code. The key difference is Seaborn’s default styles and color palettes, which are designed to be more aesthetically pleasing and modern. Since Seaborn is built on top of matplotlib, you’ll need to know matplotlib to tweak Seaborn’s defaults. Created by: Michael Waskom Where to learn more: http://web.stanford.edu/~mwaskom/software/seaborn/index.html
10 Useful Python Data Visualization Libraries for Any Discipline ggplot Created by: ŷhat Where to learn more: http://ggplot.yhathq.com/
10 Useful Python Data Visualization Libraries for Any Discipline Bokeh Created by: Continuum Analytics Where to learn more: http://bokeh.pydata.org/en/latest/
10 Useful Python Data Visualization Libraries for Any Discipline pygal Created by: Florian Mounier Where to learn more: http://www.pygal.org/en/latest/index.html
10 Useful Python Data Visualization Libraries for Any Discipline Plotly Created by: Plotly, Available in Mode Where to learn more: https://plot.ly/python/
10 Useful Python Data Visualization Libraries for Any Discipline Geoplotlib Created by: Andrea Cuttone Where to learn more: https://github.com/andrea-cuttone/geoplotlib
10 Useful Python Data Visualization Libraries for Any Discipline gleam Created by: David Robinson Where to learn more: https://github.com/dgrtwo/gleam
10 Useful Python Data Visualization Libraries for Any Discipline missingno Created by: Aleksey Bilogur Where to learn more: https://github.com/ResidentMario/missingno
10 Useful Python Data Visualization Libraries for Any Discipline leather Created by: Christopher Groskopf Where to learn more: http://leather.readthedocs.io/en/latest/index.html
Thank you Mohd Razif Shamsuddin