Download presentation
Presentation is loading. Please wait.
1
Python Data Analytics & Visualization
Mohd Razif Bin Shamsuddin
2
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
3
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.
4
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 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 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 This means that all recent standard library improvements, for example, are only available by default in Python 3.x. * Info from 10/7/2017
5
https://www.python.org /downloads/
Installer for python /downloads/
6
Mohd Razif Bin Shamsuddin
Learning the Syntax Mohd Razif Bin Shamsuddin
7
Basic Syntax (Cont.) # This program prints Hello, world!print('Hello, world!')
8
Basic Syntax (Cont.)
9
Basic Syntax (Cont.)
10
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.
11
Python Input, Output and Import
Python Output Using print() function We use the print() function to output data to the standard output device (screen).
12
Python Input, Output and Import
The actual syntax of the print() function is print(*objects, sep=' ', end='\n', file=sys.stdout, flush=False)
13
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])
14
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‘
15
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)
16
Source Code Example (Cont.)
17
https://www.programiz.com/ python-programming
Tutorial python-programming
18
Hands on using Datacamp
Mohd Razif Shamsuddin
19
Register your Accounts online.
Go to:
20
Data Visualization Mohd Razif Shamsuddin
21
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.
22
10 Useful Python Data Visualization Libraries for Any Discipline
Seaborn
23
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:
24
10 Useful Python Data Visualization Libraries for Any Discipline
ggplot Created by: ŷhat Where to learn more:
25
10 Useful Python Data Visualization Libraries for Any Discipline
Bokeh Created by: Continuum Analytics Where to learn more:
26
10 Useful Python Data Visualization Libraries for Any Discipline
pygal Created by: Florian Mounier Where to learn more:
27
10 Useful Python Data Visualization Libraries for Any Discipline
Plotly Created by: Plotly, Available in Mode Where to learn more:
28
10 Useful Python Data Visualization Libraries for Any Discipline
Geoplotlib Created by: Andrea Cuttone Where to learn more:
29
10 Useful Python Data Visualization Libraries for Any Discipline
gleam Created by: David Robinson Where to learn more:
30
10 Useful Python Data Visualization Libraries for Any Discipline
missingno Created by: Aleksey Bilogur Where to learn more:
31
10 Useful Python Data Visualization Libraries for Any Discipline
leather Created by: Christopher Groskopf Where to learn more:
32
Thank you Mohd Razif Shamsuddin
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.