Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Streamlit for Data Science - Second Edition

You're reading from  Streamlit for Data Science - Second Edition

Product type Book
Published in Sep 2023
Publisher Packt
ISBN-13 9781803248226
Pages 300 pages
Edition 2nd Edition
Languages
Author (1):
Tyler Richards Tyler Richards
Profile icon Tyler Richards

Table of Contents (15) Chapters

Preface An Introduction to Streamlit Uploading, Downloading, and Manipulating Data Data Visualization Machine Learning and AI with Streamlit Deploying Streamlit with Streamlit Community Cloud Beautifying Streamlit Apps Exploring Streamlit Components Deploying Streamlit Apps with Hugging Face and Heroku Connecting to Databases Improving Job Applications with Streamlit The Data Project – Prototyping Projects in Streamlit Streamlit Power Users Other Books You May Enjoy
Index

Preface

Data scientists and machine learning engineers throughout the 2010s have primarily produced static analyses. We create documents to inform decisions, filled with plots and metrics about our findings or about the models we create. Creating complete web applications that allow users to interact with analyses is cumbersome, to say the least! Enter Streamlit, a Python library for creating web applications built with data folks in mind at every step.

Streamlit shortens the development time for the creation of data-focused web applications, allowing data scientists to create web app prototypes in Python in hours instead of days.

This book takes a hands-on approach to help you learn the tips and tricks that will have you up and running with Streamlit in no time. You’ll start with the fundamentals of Streamlit by creating a basic app and gradually build on this foundation by producing high-quality graphics with data visualization and testing machine learning models. As you advance through the chapters, you’ll walk through practical examples of both personal and work-related data-focused web applications and learn about more complicated topics such as using Streamlit Components, beautifying your apps, and the quick deployment of your new apps.

Who this book is for

This book is for data scientists and machine learning engineers or enthusiasts who want to create web apps using Streamlit. Whether you’re a junior data scientist looking to deploy your first machine learning project in Python to improve your resume or a senior data scientist working full time trying to convince your colleagues with dynamic analyses, this book is for you!

What this book covers

Chapter 1, An Introduction to Streamlit, teaches the very basics of Streamlit by creating your first app.

Chapter 2, Uploading, Downloading, and Manipulating Data, looks at data; data apps need data! You’ll learn how to use data efficiently and effectively in production applications.

Chapter 3, Data Visualization, teaches how to use all your favorite Python visualization libraries in Streamlit apps. There’s no need to learn new visualization frameworks!

Chapter 4, Machine Learning and AI with Streamlit, covers machine learning. Ever wanted to deploy your new fancy machine learning model in a user-facing app in hours? Start here for in-depth examples and tips, including working with Hugging Face and OpenAI models.

Chapter 5, Deploying Streamlit with Streamlit Community Cloud, looks at the one-click deploy feature that Streamlit comes with. You’ll learn how to remove friction in the deployment process here!

Chapter 6, Beautifying Streamlit Apps, looks at the features that Streamlit is chock-full of to make gorgeous web apps. You’ll learn all the tips and tricks in this chapter.

Chapter 7, Exploring Streamlit Components, teaches how to leverage the thriving developer ecosystem around Streamlit through open-source integrations called Streamlit Components. Just like LEGO, only better.

Chapter 8, Deploying Streamlit Apps with Hugging Face and Heroku, teaches how to deploy your Streamlit applications using Hugging Face and Heroku as an alternative to Streamlit Community Cloud.

Chapter 9, Connecting to Databases, will help you add data from production databases into your Streamlit apps, which expands the possible apps you can make.

Chapter 10, Improving Job Applications with Streamlit, will help you to prove your data science chops to employers using Streamlit apps through everything from apps for resume building to apps for take-home sections of interviews.

Chapter 11, The Data Project – Prototyping Projects in Streamlit, covers making apps for the Streamlit community and others, which is both fun and educational. You’ll walk through some examples of projects and learn how to start your own.

Chapter 12, Streamlit Power Users, provides more information on Streamlit, which is already extensively used for such a young library. Learn from the best with in-depth interviews with the Streamlit founder, data scientists, analysts, and engineers.

Acknowledgment

This book would not have been possible without the help of my technical reviewer, Chanin Nantasenamat. You can find him on X/Twitter at https://twitter.com/thedataprof and on YouTube at https://www.youtube.com/dataprofessor. All mistakes are mine, but all prevented ones are his!

To get the most out of this book

This book assumes that you are at least a Python novice, which means you are comfortable with basic Python syntax and have taken tutorials or classes before in Python. It is also written for users interested in data science, which includes topics such as statistics and machine learning but does not require a data science background. If you know how to make lists and define variables and have written a for loop before, you have enough Python knowledge to get started!

If you are using the digital version of this book, we advise you to type the code yourself or access the code from the book’s GitHub repository (a link is available in the next section). Doing so will help you avoid any potential errors related to the copying and pasting of code.

Download the example code files

You can download the example code files for this book from GitHub at https://github.com/tylerjrichards/Streamlit-for-Data-Science. If there’s an update to the code, it will be updated in these GitHub repositories.

We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Download the color images

We also provide a PDF file that has color images of the screenshots and diagrams used in this book. You can download it here: https://packt.link/6dHPZ.

Conventions used

There are several text conventions used throughout this book:

Code in text: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: “...which will be in the format ec2-10-857-84-485.compute-1.amazonaws.com. I made up those numbers, but yours should be close to this.”

A block of code is set as follows:

import pandas as pd
penguin_df = pd.read_csv('penguins.csv')
print(penguin_df.head())

Any command line input or output is written as follows:

git add .
git commit -m 'added heroku files'
git push

Bold: Indicates a new term, an important word, or words that you see onscreen. For instance, words in menus or dialog boxes appear in bold. Here is an example: “We are going to be using Amazon Elastic Compute Cloud, or Amazon EC2 for short.”

TIPS OR IMPORTANT NOTES

Appear like this.

Get in touch

Feedback from our readers is always welcome.

General feedback: Email feedback@packtpub.com and mention the book’s title in the subject of your message. If you have questions about any aspect of this book, please email us at questions@packtpub.com.

Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you have found a mistake in this book, we would be grateful if you reported this to us. Please visit http://www.packtpub.com/submit-errata, click Submit Errata, and fill in the form.

Piracy: If you come across any illegal copies of our works in any form on the internet, we would be grateful if you would provide us with the location address or website name. Please contact us at copyright@packtpub.com with a link to the material.

If you are interested in becoming an author: If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, please visit http://authors.packtpub.com.

Share your thoughts

Once you’ve read Streamlit for Data Science, Second Edition, we’d love to hear your thoughts! Please click here to go straight to the Amazon review page for this book and share your feedback.

Your review is important to us and the tech community and will help us make sure we’re delivering excellent quality content.

Download a free PDF copy of this book

Thanks for purchasing this book!

Do you like to read on the go but are unable to carry your print books everywhere?

Is your eBook purchase not compatible with the device of your choice?

Don’t worry, now with every Packt book you get a DRM-free PDF version of that book at no cost.

Read anywhere, any place, on any device. Search, copy, and paste code from your favorite technical books directly into your application.

The perks don’t stop there, you can get exclusive access to discounts, newsletters, and great free content in your inbox daily

Follow these simple steps to get the benefits:

  1. Scan the QR code or visit the link below

https://packt.link/free-ebook/9781803248226

  1. Submit your proof of purchase
  2. That’s it! We’ll send your free PDF and other benefits to your email directly
lock icon The rest of the chapter is locked
Next Chapter arrow right
You have been reading a chapter from
Streamlit for Data Science - Second Edition
Published in: Sep 2023 Publisher: Packt ISBN-13: 9781803248226
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 $15.99/month. Cancel anytime}