Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Hands-On Data Preprocessing in Python

You're reading from   Hands-On Data Preprocessing in Python Learn how to effectively prepare data for successful data analytics

Arrow left icon
Product type Paperback
Published in Jan 2022
Publisher Packt
ISBN-13 9781801072137
Length 602 pages
Edition 1st Edition
Languages
Concepts
Arrow right icon
Author (1):
Arrow left icon
Roy Jafari Roy Jafari
Author Profile Icon Roy Jafari
Roy Jafari
Arrow right icon
View More author details
Toc

Table of Contents (24) Chapters Close

Preface 1. Part 1:Technical Needs
2. Chapter 1: Review of the Core Modules of NumPy and Pandas FREE CHAPTER 3. Chapter 2: Review of Another Core Module – Matplotlib 4. Chapter 3: Data – What Is It Really? 5. Chapter 4: Databases 6. Part 2: Analytic Goals
7. Chapter 5: Data Visualization 8. Chapter 6: Prediction 9. Chapter 7: Classification 10. Chapter 8: Clustering Analysis 11. Part 3: The Preprocessing
12. Chapter 9: Data Cleaning Level I – Cleaning Up the Table 13. Chapter 10: Data Cleaning Level II – Unpacking, Restructuring, and Reformulating the Table 14. Chapter 11: Data Cleaning Level III – Missing Values, Outliers, and Errors 15. Chapter 12: Data Fusion and Data Integration 16. Chapter 13: Data Reduction 17. Chapter 14: Data Transformation and Massaging 18. Part 4: Case Studies
19. Chapter 15: Case Study 1 – Mental Health in Tech 20. Chapter 16: Case Study 2 – Predicting COVID-19 Hospitalizations 21. Chapter 17: Case Study 3: United States Counties Clustering Analysis 22. Chapter 18: Summary, Practice Case Studies, and Conclusions 23. Other Books You May Enjoy

Overview of the Jupyter Notebook

The Jupyter Notebook is becoming increasingly popular as a successful User Interface (UI) for Python programing. As a UI, the Jupyter Notebook provides an interactive environment where you can run your Python code, see immediate outputs, and take notes.

Fernando Pérezthe and Brian Granger, the architects of the Jupyter Notebook, outlines the following reasons in terms of what they were looking for in an innovative programming UI:

  • Space for individual exploratory work
  • Space for collaboration
  • Space for learning and education

If you have used the Jupyter Notebook already, you can attest that it delivers all these promises, and if you have not yet used it, I have good news for you: we will be using Jupyter Notebook for the entirety of this book. Some of the code that I will be sharing will be in the form of screenshots from the Jupyter Notebook UI.

The UI design of the Jupyter Notebook is very simple. You can think of it as one column of material. These materials could be under code chunks or Markdown chunks. The solution development and the actual coding happens under the code chunks, whereas notes for yourself or other developers are presented under Markdown chunks. The following screenshot shows both an example of a Markdown chunk and a code chunk. You can see that the code chunk has been executed and the requested print has taken place and the output is shown immediately after the code chunk:

Figure 1.1 – Code for printing Hello World in a Jupyter notebook

Figure 1.1 – Code for printing Hello World in a Jupyter notebook

To create a new chunk, you can click on the + sign on the top ribbon of the UI. The newly added chunk will be a code chunk by default. You can switch the code chunk to a Markdown chunk by using the drop-down list on the top ribbon. Moreover, you can move the chunks up or down by using the correct arrows on the ribbon. You can see these three buttons in the following screenshot:

Figure 1.2 – Jupyter Notebook control ribbon

Figure 1.2 – Jupyter Notebook control ribbon

You can see the following in the preceding screenshot:

  • The ribbon shown in the screenshot also allows you to Cut, Copy, and Paste the chunks.
  • The Run button on the ribbon is to execute the code of a chunk.
  • The Stop button is to stop running code. You normally use this button if your code has been running for a while with no output.
  • The Restart button wipes the slate clean; it removes all of the variables you have defined so you can start over.
  • Finally, the Restart & Run button restarts the kernel and runs all of the chunks of code in the Jupyter Notebook files.

There is more to the Jupyter Notebook, such as useful short keys to speed up development and specific Markdown syntax to format the text under Markdown chunks. However, the introduction here is just enough for you to start meaningfully analyzing data using Python through the Jupyter Notebook UI.

You have been reading a chapter from
Hands-On Data Preprocessing in Python
Published in: Jan 2022
Publisher: Packt
ISBN-13: 9781801072137
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime