SlideShare uma empresa Scribd logo
1 de 26
Baixar para ler offline
PYTHON FOR DATA SCIENCE
DUSTIN MICHELS
DEVX, CARLETON
16 OCTOBER 2017
I. INTRODUCTION
WHAT IS DATA SCIENCE?
“DATA SCIENCE COMPRISES THREE DISTINCT AND OVERLAPPING AREAS: THE SKILLS OF A STATISTICIAN WHO
KNOWS HOW TO MODEL AND SUMMARIZE DATASETS (WHICH ARE GROWING EVER LARGER); THE SKILLS OF A
COMPUTER SCIENTIST WHO CAN DESIGN AND USE ALGORITHMS TO EFFICIENTLY STORE, PROCESS, AND
VISUALIZE THIS DATA; AND THE DOMAIN EXPERTISE—WHAT WE MIGHT THINK OF AS “CLASSICAL” TRAINING IN A
SUBJECT—NECESSARY BOTH TO FORMULATE THE RIGHT QUESTIONS AND TO PUT THEIR ANSWERS IN CONTEXT.”



(JAKE VANDERPLAS, PYTHON FOR DATA SCIENCE HANDBOOK, XI)
I. INTRODUCING DATA SCIENCE
DRAWING ON WORK OF JAKE VANDERPLAS
▸ “Why Astronomers Love Python”,
PyCon 2017, https://youtu.be/
lWl6d7mkru4.
▸ “Python for Data Science
Handbook” (2017), O’Reily.
I. INTRODUCING DATA SCIENCE
KEY IDEA: PUTTING THE “SCIENCE” IN COMPUTER SCIENCE
▸ Programming is integral part of scientific work, but not
always done scientifically…
I. INTRODUCING DATA SCIENCE
KEY IDEA: PUTTING THE “SCIENCE” IN COMPUTER SCIENCE
▸ Programming is integral part of scientific work, but not
always done scientifically…
▸ Python and its packages are becoming popular choice
▸ Quality
▸ Transparency
▸ Reproducibly
▸ Collaboration
I. INTRODUCING DATA SCIENCE
TOOLS
▸ Interactivity / collaboration
▸ IPython
▸ Jupyter
▸ Data wrangling / analysis
▸ Numpy
▸ Pandas
▸ Visualization
▸ Matplotlib
▸ Seaborn
“WHY ASTRONOMERS LOVE PYTHON” (PYCON, 2017)
I. INTRODUCING DATA SCIENCE
1. Go to: https://tinyurl.com/devx-data
2. Git clone or download folder
TODO #1
TODO #2
Option A:
Conda/ Miniconda
Option B:
$ pip3 install --upgrade pip`
$ pip3 install numpy
matplotlib ipython jupyter
II. INTERACTIVITY /
COLLABORATION
IPYTHON / JUPYTER
II. IPYTHON / JUPYTER
IPYTHON: IMPROVED “REPL”
python REPL ipython REPL
II. IPYTHON / JUPYTER
IPYTHON: KEY FEATURES
▸ Input/output numbering!
▸ Syntax highlighting!
▸ Multi-line entry / recall!
▸ Tab completion!
▸ Easily pull up documentation with “?” !
II. IPYTHON / JUPYTER
IPYTHON: METHOD DISCOVERY
II. IPYTHON / JUPYTER
IPYTHON: KEYBOARD SHORTCUTS
THANKS JAKE!
II. IPYTHON / JUPYTER
IPYTHON: REFERENCING PAST IN/OUT
II. IPYTHON / JUPYTER
IPYTHON: MAGIC STUFF!
▸ Magic Stuff!
▸ %paste
▸ %timeit
▸ %magic
▸ See: https://jakevdp.github.io/
PythonDataScienceHandbook/01.03-magic-commands.html
II. IPYTHON / JUPYTER
JUPYTER
II. IPYTHON / JUPYTER
JUPYTER
See: https://jupyter-notebook.readthedocs.io/en/stable/examples/Notebook/Notebook%20Basics.html
III. DATA WRANGLING /
ANALYSIS
NUMPY / PANDAS
III. DATA WRANGLING / ANALYSIS
NUMPY
THANKS JAKE!
III. DATA WRANGLING / ANALYSIS
NUMPY
THANKS JAKE!
III. DATA WRANGLING / ANALYSIS
NUMPY: DATA TYPES
THANKS JAKE!
III. DATA WRANGLING / ANALYSIS
NUMPY: UFUNCS
THANKS JAKE!
III. DATA WRANGLING / ANALYSIS
NUMPY: AGGREGATION FUNCTIONS
THANKS JAKE!
IV. VISUALIZATION
MATLOTLIB / SEABORN

Mais conteúdo relacionado

Semelhante a DevX: Python for Data Science

How Your Data Can Predict The Future
How Your Data Can Predict The FutureHow Your Data Can Predict The Future
How Your Data Can Predict The FutureBecky Wang
 
Putting the Magic in Data Science
Putting the Magic in Data SciencePutting the Magic in Data Science
Putting the Magic in Data ScienceSean Taylor
 
Python as the Zen of Data Science
Python as the Zen of Data SciencePython as the Zen of Data Science
Python as the Zen of Data ScienceTravis Oliphant
 
Data science training institute in hyderabad
Data science training institute in hyderabadData science training institute in hyderabad
Data science training institute in hyderabadKelly Technologies
 
Data Science - An emerging Stream of Science with its Spreading Reach & Impact
Data Science - An emerging Stream of Science with its Spreading Reach & ImpactData Science - An emerging Stream of Science with its Spreading Reach & Impact
Data Science - An emerging Stream of Science with its Spreading Reach & ImpactDr. Sunil Kr. Pandey
 
Text mining and machine learning
Text mining and machine learningText mining and machine learning
Text mining and machine learningJisc RDM
 
Introduction to Big Data and Data Science
Introduction to Big Data and Data ScienceIntroduction to Big Data and Data Science
Introduction to Big Data and Data ScienceFeyzi R. Bagirov
 
Digital Science: Towards the executable paper
Digital Science: Towards the executable paperDigital Science: Towards the executable paper
Digital Science: Towards the executable paperJose Enrique Ruiz
 
Materials Data in Action
Materials Data in ActionMaterials Data in Action
Materials Data in Actionaimsnist
 
Datanauts: Open Innovation & Earth Observation (Proposal)
Datanauts: Open Innovation & Earth Observation (Proposal)Datanauts: Open Innovation & Earth Observation (Proposal)
Datanauts: Open Innovation & Earth Observation (Proposal)Wolfgang Weicht
 
Converged IT and Data Commons
Converged IT and Data CommonsConverged IT and Data Commons
Converged IT and Data CommonsSimon Twigger
 
Big data and data science
Big data and data scienceBig data and data science
Big data and data scienceSong Xue
 
DISUMMIT Keynote presentation from Kirk Borne - From Sensors to Sense-Making
DISUMMIT Keynote presentation from Kirk Borne - From Sensors to Sense-Making DISUMMIT Keynote presentation from Kirk Borne - From Sensors to Sense-Making
DISUMMIT Keynote presentation from Kirk Borne - From Sensors to Sense-Making DigitYser
 
The Hitchhiker's Guide to Machine Learning with Python & Apache Spark
The Hitchhiker's Guide to Machine Learning with Python & Apache SparkThe Hitchhiker's Guide to Machine Learning with Python & Apache Spark
The Hitchhiker's Guide to Machine Learning with Python & Apache SparkKrishna Sankar
 
Demystifying Data Science & Analytics - 757ColorCoded 2019
Demystifying Data Science & Analytics - 757ColorCoded 2019Demystifying Data Science & Analytics - 757ColorCoded 2019
Demystifying Data Science & Analytics - 757ColorCoded 2019Guillermo A. Fisher
 
Python in the Atmospheric sciences
Python in the Atmospheric sciencesPython in the Atmospheric sciences
Python in the Atmospheric sciencesScott Collis
 
Cloud Programming Models: eScience, Big Data, etc.
Cloud Programming Models: eScience, Big Data, etc.Cloud Programming Models: eScience, Big Data, etc.
Cloud Programming Models: eScience, Big Data, etc.Alexandru Iosup
 

Semelhante a DevX: Python for Data Science (20)

How Your Data Can Predict The Future
How Your Data Can Predict The FutureHow Your Data Can Predict The Future
How Your Data Can Predict The Future
 
Putting the Magic in Data Science
Putting the Magic in Data SciencePutting the Magic in Data Science
Putting the Magic in Data Science
 
Python as the Zen of Data Science
Python as the Zen of Data SciencePython as the Zen of Data Science
Python as the Zen of Data Science
 
Data science training institute in hyderabad
Data science training institute in hyderabadData science training institute in hyderabad
Data science training institute in hyderabad
 
Data Science - An emerging Stream of Science with its Spreading Reach & Impact
Data Science - An emerging Stream of Science with its Spreading Reach & ImpactData Science - An emerging Stream of Science with its Spreading Reach & Impact
Data Science - An emerging Stream of Science with its Spreading Reach & Impact
 
Text mining and machine learning
Text mining and machine learningText mining and machine learning
Text mining and machine learning
 
Introduction to Big Data and Data Science
Introduction to Big Data and Data ScienceIntroduction to Big Data and Data Science
Introduction to Big Data and Data Science
 
Distributed Tracing
Distributed TracingDistributed Tracing
Distributed Tracing
 
Digital Science: Towards the executable paper
Digital Science: Towards the executable paperDigital Science: Towards the executable paper
Digital Science: Towards the executable paper
 
Materials Data in Action
Materials Data in ActionMaterials Data in Action
Materials Data in Action
 
Cs501 dm intro
Cs501 dm introCs501 dm intro
Cs501 dm intro
 
E scidocdays review
E scidocdays reviewE scidocdays review
E scidocdays review
 
Datanauts: Open Innovation & Earth Observation (Proposal)
Datanauts: Open Innovation & Earth Observation (Proposal)Datanauts: Open Innovation & Earth Observation (Proposal)
Datanauts: Open Innovation & Earth Observation (Proposal)
 
Converged IT and Data Commons
Converged IT and Data CommonsConverged IT and Data Commons
Converged IT and Data Commons
 
Big data and data science
Big data and data scienceBig data and data science
Big data and data science
 
DISUMMIT Keynote presentation from Kirk Borne - From Sensors to Sense-Making
DISUMMIT Keynote presentation from Kirk Borne - From Sensors to Sense-Making DISUMMIT Keynote presentation from Kirk Borne - From Sensors to Sense-Making
DISUMMIT Keynote presentation from Kirk Borne - From Sensors to Sense-Making
 
The Hitchhiker's Guide to Machine Learning with Python & Apache Spark
The Hitchhiker's Guide to Machine Learning with Python & Apache SparkThe Hitchhiker's Guide to Machine Learning with Python & Apache Spark
The Hitchhiker's Guide to Machine Learning with Python & Apache Spark
 
Demystifying Data Science & Analytics - 757ColorCoded 2019
Demystifying Data Science & Analytics - 757ColorCoded 2019Demystifying Data Science & Analytics - 757ColorCoded 2019
Demystifying Data Science & Analytics - 757ColorCoded 2019
 
Python in the Atmospheric sciences
Python in the Atmospheric sciencesPython in the Atmospheric sciences
Python in the Atmospheric sciences
 
Cloud Programming Models: eScience, Big Data, etc.
Cloud Programming Models: eScience, Big Data, etc.Cloud Programming Models: eScience, Big Data, etc.
Cloud Programming Models: eScience, Big Data, etc.
 

Último

Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...masabamasaba
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfkalichargn70th171
 
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburgmasabamasaba
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...Nitya salvi
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park masabamasaba
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...masabamasaba
 
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...masabamasaba
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesVictorSzoltysek
 

Último (20)

Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 

DevX: Python for Data Science

  • 1. PYTHON FOR DATA SCIENCE DUSTIN MICHELS DEVX, CARLETON 16 OCTOBER 2017
  • 2. I. INTRODUCTION WHAT IS DATA SCIENCE?
  • 3. “DATA SCIENCE COMPRISES THREE DISTINCT AND OVERLAPPING AREAS: THE SKILLS OF A STATISTICIAN WHO KNOWS HOW TO MODEL AND SUMMARIZE DATASETS (WHICH ARE GROWING EVER LARGER); THE SKILLS OF A COMPUTER SCIENTIST WHO CAN DESIGN AND USE ALGORITHMS TO EFFICIENTLY STORE, PROCESS, AND VISUALIZE THIS DATA; AND THE DOMAIN EXPERTISE—WHAT WE MIGHT THINK OF AS “CLASSICAL” TRAINING IN A SUBJECT—NECESSARY BOTH TO FORMULATE THE RIGHT QUESTIONS AND TO PUT THEIR ANSWERS IN CONTEXT.”
 
 (JAKE VANDERPLAS, PYTHON FOR DATA SCIENCE HANDBOOK, XI)
  • 4. I. INTRODUCING DATA SCIENCE DRAWING ON WORK OF JAKE VANDERPLAS ▸ “Why Astronomers Love Python”, PyCon 2017, https://youtu.be/ lWl6d7mkru4. ▸ “Python for Data Science Handbook” (2017), O’Reily.
  • 5. I. INTRODUCING DATA SCIENCE KEY IDEA: PUTTING THE “SCIENCE” IN COMPUTER SCIENCE ▸ Programming is integral part of scientific work, but not always done scientifically…
  • 6. I. INTRODUCING DATA SCIENCE KEY IDEA: PUTTING THE “SCIENCE” IN COMPUTER SCIENCE ▸ Programming is integral part of scientific work, but not always done scientifically… ▸ Python and its packages are becoming popular choice ▸ Quality ▸ Transparency ▸ Reproducibly ▸ Collaboration
  • 7. I. INTRODUCING DATA SCIENCE TOOLS ▸ Interactivity / collaboration ▸ IPython ▸ Jupyter ▸ Data wrangling / analysis ▸ Numpy ▸ Pandas ▸ Visualization ▸ Matplotlib ▸ Seaborn
  • 8. “WHY ASTRONOMERS LOVE PYTHON” (PYCON, 2017) I. INTRODUCING DATA SCIENCE
  • 9. 1. Go to: https://tinyurl.com/devx-data 2. Git clone or download folder TODO #1
  • 10. TODO #2 Option A: Conda/ Miniconda Option B: $ pip3 install --upgrade pip` $ pip3 install numpy matplotlib ipython jupyter
  • 12. II. IPYTHON / JUPYTER IPYTHON: IMPROVED “REPL” python REPL ipython REPL
  • 13. II. IPYTHON / JUPYTER IPYTHON: KEY FEATURES ▸ Input/output numbering! ▸ Syntax highlighting! ▸ Multi-line entry / recall! ▸ Tab completion! ▸ Easily pull up documentation with “?” !
  • 14. II. IPYTHON / JUPYTER IPYTHON: METHOD DISCOVERY
  • 15. II. IPYTHON / JUPYTER IPYTHON: KEYBOARD SHORTCUTS THANKS JAKE!
  • 16. II. IPYTHON / JUPYTER IPYTHON: REFERENCING PAST IN/OUT
  • 17. II. IPYTHON / JUPYTER IPYTHON: MAGIC STUFF! ▸ Magic Stuff! ▸ %paste ▸ %timeit ▸ %magic ▸ See: https://jakevdp.github.io/ PythonDataScienceHandbook/01.03-magic-commands.html
  • 18. II. IPYTHON / JUPYTER JUPYTER
  • 19. II. IPYTHON / JUPYTER JUPYTER See: https://jupyter-notebook.readthedocs.io/en/stable/examples/Notebook/Notebook%20Basics.html
  • 20. III. DATA WRANGLING / ANALYSIS NUMPY / PANDAS
  • 21. III. DATA WRANGLING / ANALYSIS NUMPY THANKS JAKE!
  • 22. III. DATA WRANGLING / ANALYSIS NUMPY THANKS JAKE!
  • 23. III. DATA WRANGLING / ANALYSIS NUMPY: DATA TYPES THANKS JAKE!
  • 24. III. DATA WRANGLING / ANALYSIS NUMPY: UFUNCS THANKS JAKE!
  • 25. III. DATA WRANGLING / ANALYSIS NUMPY: AGGREGATION FUNCTIONS THANKS JAKE!