You are on page 1of 59

Data Science

with Python
วรเศรษฐ สุวรรณิก
18 ต.ค. 2561
1
Purpose

2
Purpose

3
Data Science
● what data scientist do

4
Data Scientist
● curiosity ขีส� งสัย

● data analysis

● storytelling

5
Data Analysis

credit : https://upxacademy.com/data-scientist/ 6
Python Library
● data analysis : pandas seaborn

● chart : matplotlib
track gps folium

● machine learning : sklearn

● deep learning : TensorFlow, Keras, PyTorch

● web scraping : BeautifulSoup

● interactive map : folium (Leaflet)

7
ศึกษาข้อมูลดาต้า

Most people start working with data from exactly the


ต้องทําการสอดแน้ มเต้าก่อน

wrong end. They begin with a data set, then apply


their favorite tools and techniques to it.
– Max Shron

8
Jupyter Notebook or JupyterLab
● https://labs.cognitiveclass.ai
● login using facebook, gmail, or other

9
Jupyter Notebook or JupyterLab
● https://colab.research.google.com

10
Jupyter Notebook or JupyterLab
● Python Script
– autocomplete : tab
● Markdown - MD

● Interactive

● API Key

11
Pandas

12
pandas
● import pandas as pd
● Series

● DataFrame

13
Read from File
● read_csv
● read_excel

● read_json

Tips data from


https://www.datacamp.com/courses/pandas-foundations 14
basic stats

15
basic stats

16
basic stats

17
Select Column

18
Select Column

19
Select Column

20
Select Column

21
Select Row

22
Filter

23
Filter

24
Sort

25
Add Column

26
Add Column

27
Delete Column

28
Add Column

29
Group

30
Group

31
Matplotlib

32
matplotlib
● line
● bar

● histogram

● same plot

● subgraph

33
plot

34
subplots

35
Bar
barh

36
Bar

37
Bar

38
Histogram

39
Histogram

40
Histogram

41
Same Area

42
Subplot

43
sklearn
(scikit-learn)

44
AI & ML & Deep Learning

credit : towardsdatascience.com https://bit.ly/2HcfmuU 45


Machine Learning (ส่วนหนึ่ง)

credit : moogsoft.com https://bit.ly/2CPQg7e 46


Train/Test Data

47
Train/Test

48
Nonlinear

49
Multiple Regresssion & One-hot Encoding

50
Your Turn – Predict MPG
● download ‘Automobile miles per gallon’ data
from datacamp’s pandas foundation course
● perform linear regression

● what factors have negative effect on mpg?

51
Visualization

52
success in data visualization
does not start with data visualization.
– cole nussbaumer knaflic

53
Context

Storytelling with Data: A Data Visualization Guide for Business Professionals Paperback –
November 2, 2015 by Cole Nussbaumer Knaflic 54
Context

Storytelling with Data: A Data Visualization Guide for Business Professionals Paperback –
November 2, 2015 by Cole Nussbaumer Knaflic 55
Quantity => Quality
● ซ้อม presention > 7 ครั้ง
● ซ้อม presention > 3 ครั้ง

– หาคนฟัง ถ่ายวิดีโอตัวเอง
– ยืนพูด
● เตรียมคำถาม > 20 คำถาม

– กรณีตอบไม่ได้ bit.ly/2DCEcrm

56
Conclusion

57
Other Tools
● Google Sheet – explore
● Excel – pivot table

● Tableau

● RapidMiner

● cloud : Google, Azure

58
Learn More
● pandas > time series
● datacamp

● kaggle

● พูดด้วยภาพ พรีเซนต์อย่างไรให้ถูกใจคนฟัง by BetterPitch

● Storytelling with Data by Cole Nussbaumer Knaflic

59

You might also like