100% found this document useful (1 vote)
25 views

Web App Development and Real-Time Web Analytics with Python: Develop and Integrate Machine Learning Algorithms into Web Apps Nokeri download

The document is a comprehensive guide on web app development and real-time web analytics using Python, authored by Tshepo Chris Nokeri. It covers the integration of machine learning algorithms into web applications and includes detailed chapters on data tabulation, charting, and the use of Python web frameworks. Additionally, it provides practical examples and resources for further learning.

Uploaded by

sekohporato
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
25 views

Web App Development and Real-Time Web Analytics with Python: Develop and Integrate Machine Learning Algorithms into Web Apps Nokeri download

The document is a comprehensive guide on web app development and real-time web analytics using Python, authored by Tshepo Chris Nokeri. It covers the integration of machine learning algorithms into web applications and includes detailed chapters on data tabulation, charting, and the use of Python web frameworks. Additionally, it provides practical examples and resources for further learning.

Uploaded by

sekohporato
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

Web App Development and Real-Time Web Analytics

with Python: Develop and Integrate Machine


Learning Algorithms into Web Apps Nokeri pdf
download
https://ebookmeta.com/product/web-app-development-and-real-time-
web-analytics-with-python-develop-and-integrate-machine-learning-
algorithms-into-web-apps-nokeri/

Download more ebook from https://ebookmeta.com


We believe these products will be a great fit for you. Click
the link to download now, or visit ebookmeta.com
to discover even more!

Real-Time Twilio and Flybase. Build Real-Time Web Apps


Using Twilio and Flybase with Node.js 1st Edition Roger
Stringer

https://ebookmeta.com/product/real-time-twilio-and-flybase-build-
real-time-web-apps-using-twilio-and-flybase-with-node-js-1st-
edition-roger-stringer/

Web Development with Clojure Build Bulletproof Web Apps


with Less Code 3rd Edition Dmitri Sotnikov Scot Brown

https://ebookmeta.com/product/web-development-with-clojure-build-
bulletproof-web-apps-with-less-code-3rd-edition-dmitri-sotnikov-
scot-brown/

Web Application Development with Streamlit: Develop and


Deploy Secure and Scalable Web Applications to the
Cloud Using a Pure Python Framework 1st Edition
Mohammad Khorasani
https://ebookmeta.com/product/web-application-development-with-
streamlit-develop-and-deploy-secure-and-scalable-web-
applications-to-the-cloud-using-a-pure-python-framework-1st-
edition-mohammad-khorasani/

Leadership Team Coaching in Practice Case Studies on


Developing High Performing Teams 2nd Edition Peter
Hawkins

https://ebookmeta.com/product/leadership-team-coaching-in-
practice-case-studies-on-developing-high-performing-teams-2nd-
edition-peter-hawkins/
Codename Dweeb Friends to Lovers Christmas Military
Romance 1st Edition Mazzy King

https://ebookmeta.com/product/codename-dweeb-friends-to-lovers-
christmas-military-romance-1st-edition-mazzy-king/

Machinability and Tribological Performance of Advanced


Alloys 2nd Edition George Pantazopoulos

https://ebookmeta.com/product/machinability-and-tribological-
performance-of-advanced-alloys-2nd-edition-george-pantazopoulos/

Budgeting For Dummies Athena Valentine Lent

https://ebookmeta.com/product/budgeting-for-dummies-athena-
valentine-lent/

Vultures First Edition Dalpat Chauhan

https://ebookmeta.com/product/vultures-first-edition-dalpat-
chauhan/

ESP32 Formats and Communication: Application of


Communication Protocols with ESP32 Microcontroller 1st
Edition Neil Cameron

https://ebookmeta.com/product/esp32-formats-and-communication-
application-of-communication-protocols-with-
esp32-microcontroller-1st-edition-neil-cameron/
Toddlers Parents and Culture 1st Edition Maria A.
Gartstein

https://ebookmeta.com/product/toddlers-parents-and-culture-1st-
edition-maria-a-gartstein/
Web App Development
and Real-Time Web
Analytics with Python
Develop and Integrate Machine Learning
Algorithms into Web Apps

Tshepo Chris Nokeri
Web App Development
and Real-Time Web
Analytics with Python
Develop and Integrate Machine
Learning Algorithms into Web Apps

Tshepo Chris Nokeri


Web App Development and Real-Time Web Analytics with Python: Develop and
Integrate Machine Learning Algorithms into Web Apps

Tshepo Chris Nokeri


Pretoria, South Africa

ISBN-13 (pbk): 978-1-4842-7782-9 ISBN-13 (electronic): 978-1-4842-7783-6


https://doi.org/10.1007/978-1-4842-7783-6

Copyright © 2022 by Tshepo Chris Nokeri


This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the
material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation,
broadcasting, reproduction on microfilms or in any other physical way, and transmission or information
storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now
known or hereafter developed.
Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with
every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an
editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the
trademark.
The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not
identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to
proprietary rights.
While the advice and information in this book are believed to be true and accurate at the date of publication,
neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or
omissions that may be made. The publisher makes no warranty, express or implied, with respect to the
material contained herein.
Managing Director, Apress Media LLC: Welmoed Spahr
Acquisitions Editor: Celestin Suresh John
Development Editor: James Markham
Coordinating Editor: Mark Powers
Cover designed by eStudioCalamar
Cover image by Andrew Kliatskyi on Unsplash (www.unsplash.com)
Distributed to the book trade worldwide by Apress Media, LLC, 1 New York Plaza, New York, NY 10004,
U.S.A. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail orders-ny@springer-sbm.com, or visit www.
springeronline.com. Apress Media, LLC is a California LLC and the sole member (owner) is Springer Science
+ Business Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation.
For information on translations, please e-mail booktranslations@springernature.com; for reprint,
paperback, or audio rights, please e-mail bookpermissions@springernature.com.
Apress titles may be purchased in bulk for academic, corporate, or promotional use. eBook versions and
licenses are also available for most titles. For more information, reference our Print and eBook Bulk Sales
web page at http://www.apress.com/bulk-sales.
Any source code or other supplementary material referenced by the author in this book is available to
readers on GitHub via the book’s product page, located at www.apress.com/9781484277829. For more
detailed information, please visit http://www.apress.com/source-­code.
Printed on acid-free paper
I would like dedicate this book to my family, friends, and
anyone who played a pivotal role in any aspect of my life,
including the Apress team for the continous support.
Table of Contents
About the Author����������������������������������������������������������������������������������������������������� xi

About the Technical Reviewer������������������������������������������������������������������������������� xiii


Acknowledgments���������������������������������������������������������������������������������������������������xv

Chapter 1: Tabulating Data and Constructing Static 2D and 3D Charts�������������������� 1


Tabulating the Data����������������������������������������������������������������������������������������������������������������������� 1
2D Charting����������������������������������������������������������������������������������������������������������������������������������� 4
Box-Whisker Plot��������������������������������������������������������������������������������������������������������������������� 6
Histogram�������������������������������������������������������������������������������������������������������������������������������� 7
Line Plot����������������������������������������������������������������������������������������������������������������������������������� 8
Scatter Plot������������������������������������������������������������������������������������������������������������������������������ 9
Density Plot��������������������������������������������������������������������������������������������������������������������������� 10
Violin Plot������������������������������������������������������������������������������������������������������������������������������� 11
Regression Plot��������������������������������������������������������������������������������������������������������������������� 13
Joint Plot������������������������������������������������������������������������������������������������������������������������������� 13
Heatmap�������������������������������������������������������������������������������������������������������������������������������� 14
3D Charting��������������������������������������������������������������������������������������������������������������������������������� 17
Conclusion���������������������������������������������������������������������������������������������������������������������������������� 19

Chapter 2: Interactive Tabulation and Charting������������������������������������������������������ 21


Plotly������������������������������������������������������������������������������������������������������������������������������������������� 21
Tabulating the Data with Plotly��������������������������������������������������������������������������������������������������� 22
Interactive Charting��������������������������������������������������������������������������������������������������������������������� 23
2D Charting��������������������������������������������������������������������������������������������������������������������������������� 23
Box Plot��������������������������������������������������������������������������������������������������������������������������������� 26
Violin Plot������������������������������������������������������������������������������������������������������������������������������� 27
Histogram������������������������������������������������������������������������������������������������������������������������������ 28

v
Table of Contents

Scatter Plot���������������������������������������������������������������������������������������������������������������������������� 32
Density Plot��������������������������������������������������������������������������������������������������������������������������� 34
Bar Chart������������������������������������������������������������������������������������������������������������������������������� 36
Pie Chart�������������������������������������������������������������������������������������������������������������������������������� 38
Sunburst�������������������������������������������������������������������������������������������������������������������������������� 38
Choropleth Map��������������������������������������������������������������������������������������������������������������������������� 41
Heatmap�������������������������������������������������������������������������������������������������������������������������������� 42
3D Charting��������������������������������������������������������������������������������������������������������������������������������� 43
Indicators������������������������������������������������������������������������������������������������������������������������������������ 44
Conclusion���������������������������������������������������������������������������������������������������������������������������������� 45

Chapter 3: Containing Functionality and Styling for Interactive Charts����������������� 47


Updating Graph Layout���������������������������������������������������������������������������������������������������������������� 47
Updating Plotly Axes�������������������������������������������������������������������������������������������������������������� 48
Including Range Slider���������������������������������������������������������������������������������������������������������� 48
Including Buttons to a Graph������������������������������������������������������������������������������������������������� 49
Subplots�������������������������������������������������������������������������������������������������������������������������������������� 51
Styling Charts������������������������������������������������������������������������������������������������������������������������������ 56
Altering Color Schemes��������������������������������������������������������������������������������������������������������� 57
Color Sequencing������������������������������������������������������������������������������������������������������������������ 57
Customizing Traces���������������������������������������������������������������������������������������������������������������� 59
Conclusion���������������������������������������������������������������������������������������������������������������������������������� 61

Chapter 4: Essentials of HTML�������������������������������������������������������������������������������� 63


Communication Between a Web Browser and a Web Server������������������������������������������������������ 63
URL Structure������������������������������������������������������������������������������������������������������������������������������ 63
Domain Hosting��������������������������������������������������������������������������������������������������������������������������� 64
Shared Web Hosting�������������������������������������������������������������������������������������������������������������� 64
Managed Web Hosting����������������������������������������������������������������������������������������������������������� 65
Web Servers�������������������������������������������������������������������������������������������������������������������������� 66
HyperText Markup Language������������������������������������������������������������������������������������������������������ 66
HTML Elements��������������������������������������������������������������������������������������������������������������������� 67

vi
Table of Contents

Meta Tag������������������������������������������������������������������������������������������������������������������������������������� 75
Practical Example����������������������������������������������������������������������������������������������������������������������� 75
Viewing Web Page Source���������������������������������������������������������������������������������������������������������� 78
Conclusion���������������������������������������������������������������������������������������������������������������������������������� 78

Chapter 5: Python Web Frameworks and Apps������������������������������������������������������ 79


Web Frameworks������������������������������������������������������������������������������������������������������������������������ 79
Web Apps������������������������������������������������������������������������������������������������������������������������������������ 80
Flask������������������������������������������������������������������������������������������������������������������������������������������� 80
WSGI�������������������������������������������������������������������������������������������������������������������������������������� 80
Werkzeug������������������������������������������������������������������������������������������������������������������������������� 80
Jinja��������������������������������������������������������������������������������������������������������������������������������������� 81
Installing Flask���������������������������������������������������������������������������������������������������������������������� 81
Initializing a Flask Web App��������������������������������������������������������������������������������������������������� 81
Flask App Code���������������������������������������������������������������������������������������������������������������������� 82
Deploy a Flask Web App�������������������������������������������������������������������������������������������������������� 82
Dash�������������������������������������������������������������������������������������������������������������������������������������������� 82
Installing Dash Dependencies����������������������������������������������������������������������������������������������� 83
Initializing a Dash Web App��������������������������������������������������������������������������������������������������� 83
Dash Web App Code��������������������������������������������������������������������������������������������������������������� 83
Deploy a Dash Web App��������������������������������������������������������������������������������������������������������� 84
Jupyter Dash������������������������������������������������������������������������������������������������������������������������������� 84
Conclusion���������������������������������������������������������������������������������������������������������������������������������� 85

Chapter 6: Dash Bootstrap Components����������������������������������������������������������������� 87


Number Input������������������������������������������������������������������������������������������������������������������������������ 88
Text Area������������������������������������������������������������������������������������������������������������������������������������� 89
Select������������������������������������������������������������������������������������������������������������������������������������������ 89
Radio Items��������������������������������������������������������������������������������������������������������������������������������� 90
Checklist������������������������������������������������������������������������������������������������������������������������������������� 91
Switches������������������������������������������������������������������������������������������������������������������������������������� 92
Tabs��������������������������������������������������������������������������������������������������������������������������������������������� 93

vii
Table of Contents

Button����������������������������������������������������������������������������������������������������������������������������������������� 94
Table������������������������������������������������������������������������������������������������������������������������������������������� 95
Conclusion���������������������������������������������������������������������������������������������������������������������������������� 97

Chapter 7: Styling and Theming a Web App����������������������������������������������������������� 99


Styling����������������������������������������������������������������������������������������������������������������������������������������� 99
Cascade Styling Sheet�������������������������������������������������������������������������������������������������������������� 100
Bootstrap���������������������������������������������������������������������������������������������������������������������������������� 102
Dash Bootstrapping������������������������������������������������������������������������������������������������������������������� 103
Dash Core Components������������������������������������������������������������������������������������������������������� 104
Dash Bootstrap Components����������������������������������������������������������������������������������������������� 104
Implementing Dash Bootstrap Components Theming��������������������������������������������������������� 104
Dash HTML Components����������������������������������������������������������������������������������������������������� 106
Dash Web Application Layout Design���������������������������������������������������������������������������������� 106
Responsive Grid System����������������������������������������������������������������������������������������������������������� 107
Conclusion�������������������������������������������������������������������������������������������������������������������������������� 109

Chapter 8: Building a Real-Time Web App������������������������������������������������������������ 111


Dash App Structure������������������������������������������������������������������������������������������������������������������� 112
Importing Key Dependencies���������������������������������������������������������������������������������������������������� 112
Loading an External CSS File����������������������������������������������������������������������������������������������� 115
Loading the Bootstrap Icons Library����������������������������������������������������������������������������������������� 116
Initializing a Web App���������������������������������������������������������������������������������������������������������� 116
Navigation Bars������������������������������������������������������������������������������������������������������������������������� 116
Top Navigation Bar�������������������������������������������������������������������������������������������������������������� 117
Specifying the Responsive Side Navigation Bar������������������������������������������������������������������ 121
Specifying the Web App CSS Code�������������������������������������������������������������������������������������������� 123
Side Navigation Bar Menus and Submenus������������������������������������������������������������������������������ 124
Search Functionality����������������������������������������������������������������������������������������������������������������� 127
Creating Interactive Charts�������������������������������������������������������������������������������������������������� 129
Containing an Interactive Table and Allowing Generating a Report and
Enabling Download�������������������������������������������������������������������������������������������������������������� 131

viii
Table of Contents

Specifying the App Layout�������������������������������������������������������������������������������������������������������� 134


Specifying a Callback Function������������������������������������������������������������������������������������������������� 135
Callback for a Responsive Side Navigation Bar������������������������������������������������������������������� 136
Callback for URL Routing����������������������������������������������������������������������������������������������������� 137
Specifying a Callback Function for Unhiding Content��������������������������������������������������������� 138
Specifying a Callback Function for Interactive Charts��������������������������������������������������������� 139
Specifying a Callback Function for Unhiding an Interactive Table��������������������������������������� 141
Specifying a Callback Function for an Interactive Table������������������������������������������������������ 142
Specifying a Callback Function for Callback for Data Download����������������������������������������� 143
Run the Dash App���������������������������������������������������������������������������������������������������������������������� 143
Conclusion�������������������������������������������������������������������������������������������������������������������������������� 144

Chapter 9: Basic Web App Authentication������������������������������������������������������������ 145


Authentication with Dash Auth�������������������������������������������������������������������������������������������������� 145
Authentication with Flask��������������������������������������������������������������������������������������������������������� 148
Login Form�������������������������������������������������������������������������������������������������������������������������������� 150
Login on Home Page����������������������������������������������������������������������������������������������������������������� 155
Conclusion�������������������������������������������������������������������������������������������������������������������������������� 158

Chapter 10: Dash into a Full Website�������������������������������������������������������������������� 159


Home Page�������������������������������������������������������������������������������������������������������������������������������� 159
Footer Navigation Bar���������������������������������������������������������������������������������������������������������� 168
Banner��������������������������������������������������������������������������������������������������������������������������������� 173
Callback to Collapse the Navigation for Small Screens������������������������������������������������������� 175
Home Page�������������������������������������������������������������������������������������������������������������������������������� 176
Contact Us��������������������������������������������������������������������������������������������������������������������������������� 176
Billing/Checkout������������������������������������������������������������������������������������������������������������������������ 183
Conclusion�������������������������������������������������������������������������������������������������������������������������������� 188

Chapter 11: Integrating a Machine Learning Algorithm into a Web App�������������� 189
An Introduction to Linear Regression���������������������������������������������������������������������������������������� 189
An Introduction to sklearn��������������������������������������������������������������������������������������������������������� 190
Preprocessing��������������������������������������������������������������������������������������������������������������������������� 191

ix
Table of Contents

Splitting Data into Training and Test Data���������������������������������������������������������������������������� 192


Standardization������������������������������������������������������������������������������������������������������������������� 192
Training an Algorithm���������������������������������������������������������������������������������������������������������������� 192
Predictions��������������������������������������������������������������������������������������������������������������������������� 193
Integrating an Algorithm to a Web App������������������������������������������������������������������������������������� 194
Initializing a Web App���������������������������������������������������������������������������������������������������������� 195
Navigation Bars������������������������������������������������������������������������������������������������������������������������� 195
Search Functionality������������������������������������������������������������������������������������������������������������ 200
Containing Interactive Tables for Results���������������������������������������������������������������������������� 201
Specifying the App Layout and Callbacks for Responsive Side Menus and
URL Routing������������������������������������������������������������������������������������������������������������������������� 203
Specifying a Callback to Load Independent Variables Values���������������������������������������������� 206
Specifying a Callback for Loading the Dependent Variable Values�������������������������������������� 206
Specifying a Callback for Descriptive Statistics����������������������������������������������������������������������� 207
Specifying a Callback for Correlation Analysis Results������������������������������������������������������� 208
Specifying a Callback for an Algorithm’s Predictions���������������������������������������������������������� 209
Specifying a Callback for an Algorithm’s Intercept and Coefficients����������������������������������� 210
Specifying a Callback for an Algorithm’s Evaluation Results���������������������������������������������� 211
Running the Dash App��������������������������������������������������������������������������������������������������������� 213
Conclusions������������������������������������������������������������������������������������������������������������������������������� 213

Chapter 12: Deploying a Web App on the Cloud��������������������������������������������������� 215


Integrated Development Environment�������������������������������������������������������������������������������������� 215
PyCharm������������������������������������������������������������������������������������������������������������������������������ 215
Virtual Environment������������������������������������������������������������������������������������������������������������������� 216
File Structure���������������������������������������������������������������������������������������������������������������������������� 218
Integrating Innumerable Python Files��������������������������������������������������������������������������������������� 219
Hosting Web Apps��������������������������������������������������������������������������������������������������������������������� 219
Dash Enterprise������������������������������������������������������������������������������������������������������������������� 219
Heroku��������������������������������������������������������������������������������������������������������������������������������� 219
Conclusion�������������������������������������������������������������������������������������������������������������������������������� 221

Index��������������������������������������������������������������������������������������������������������������������� 223
x
About the Author
Tshepo Chris Nokeri harnesses advanced analytics and
artificial intelligence to foster innovation and optimize
business performance. He delivers complex solutions to
companies in the mining, petroleum, and manufacturing
industries. He received a bachelor’s degree in information
management. He graduated with honours in business
science from the University of the Witwatersrand,
Johannesburg, on a Tata Prestigious Scholarship and a
Wits Postgraduate Merit Award. He was unanimously awarded the Oxford University
Press Prize. Tshepo has authored three books: Data Science Revealed (Apress, 2021),
Implementing Machine Learning in Finance (Apress, 2021), and Econometrics and Data
Science (Apress, 2022).

xi
About the Technical Reviewer
Brij Kishore Pandey works as a software engineer, architect,
and strategist at ADP. He has a wide interest in software
development using cutting-edge tools/technologies in
cloud computing, data engineering, data science, artificial
intelligence, and machine learning. He has 12 years of
experience working with global corporate leaders, including
JP Morgan Chase, American Express, 3M Company, Alaska
Airlines, Cigna Healthcare, and ADP.

xiii
Acknowledgments
Writing a single-authored book is demanding, but I received firm support and active
encouragement from my family and dear friends. Many heartfelt thanks to the Apress
team for their backing throughout the writing and editing process. And my humble
thanks to all of you for reading this; I earnestly hope you find it helpful.

xv
CHAPTER 1

Tabulating Data and


Constructing Static 2D
and 3D Charts
This chapter introduces the basics of tabulating data and constructing static graphical
representations. It begins by demonstrating an approach to extract and tabulate data
by implementing the pandas and SQLAlchemy libraries. Subsequently, it reveals two
prevalent 2D and 3D charting libraries: Matplotlib and seaborn. It then describes a
technique for constructing basic charts (i.e., box-whisker plot, histogram, line plot,
scatter plot, density plot, violin plot, regression plot, joint plot, and heatmap).

T abulating the Data


The most prevalent Python library for tabulating data comprising rows and columns
is pandas. Ensure that you install pandas in your environment. To install pandas in a
Python environment, use pip install pandas. Likewise, in a conda environment, use
conda install -c anaconda pandas.
The book uses Python version 3.7.6 and pandas version 1.2.4. Note that examples in
this book also apply to the latest versions.
Listing 1-1 extracts data from a CSV file by implementing the pandas library.

Listing 1-1. Extracting a CSV File Using Pandas

import pandas as pd
df = pd.read_csv(r"filepath\.csv")

1
© Tshepo Chris Nokeri 2022
T. C. Nokeri, Web App Development and Real-Time Web Analytics with Python,
https://doi.org/10.1007/978-1-4842-7783-6_1
Chapter 1 Tabulating Data and Constructing Static 2D and 3D Charts

Listing 1-2 extracts data from an Excel file by implementing pandas.

Listing 1-2. Extracting an Excel File Using Pandas

df = pd.read_excel(r"filepath\.xlsx")

Notice the difference between Listings 1-1 and 1-2 is the file extension (.csv for
Listing 1-1 and .xlsx for Listing 1-2).
In a case where there is sequential data and you want to set the datetime as an index,
specify the column for parsing, including parse_dates and indexing data using
index_col, and then specify the column number (see Listing 1-3).

Listing 1-3. Sparse and Index pandas DataFrame

df = pd.read_csv(r"filepath\.csv", parse_dates=[0], index_col=[0])

Alternatively, you may extract the data from a SQL database.


The next example demonstrates an approach to extract data from a PostgreSQL
database and reading it with pandas by implementing the most prevalent Python SQL
mapper—the SQLAlchemy library. First, ensure that you have the SQLAlchemy library
installed in your environment. To install it in a Python environment, use pip install
SQLAlchemy. Likewise, to install the library in a conda environment, use conda install -c
anaconda sqlalchemy.
Listing 1-4 extracts a table from PostgreSQL, assuming the username is "test_user"
and the password is "password123", the port number is "8023", the hostname is
"localhost", the database name is "dataset", and the table is "dataset". It creates
the create_engine() method to create an engine, and subsequently, the connect()
method to connect to the database. Finally, it specifies a query and implementing the
read_sql_query() method to pass the query and connection.

Listing 1-4. Extracting a PostgreSQL Using SQLAlchemy and Pandas

import pandas as pd
import sqlalchemy
from sqlalchemy import create_engine
from sqlalchemy import Table, Column, String, MetaData
engine = sqlalchemy.create_engine(
    sqlalchemy.engine.url.URL(
        drivername="postgresql",

2
Other documents randomly have
different content
credit card donations. To donate, please visit:
www.gutenberg.org/donate.

Section 5. General Information About


Project Gutenberg™ electronic works
Professor Michael S. Hart was the originator of the Project
Gutenberg™ concept of a library of electronic works that could
be freely shared with anyone. For forty years, he produced and
distributed Project Gutenberg™ eBooks with only a loose
network of volunteer support.

Project Gutenberg™ eBooks are often created from several


printed editions, all of which are confirmed as not protected by
copyright in the U.S. unless a copyright notice is included. Thus,
we do not necessarily keep eBooks in compliance with any
particular paper edition.

Most people start at our website which has the main PG search
facility: www.gutenberg.org.

This website includes information about Project Gutenberg™,


including how to make donations to the Project Gutenberg
Literary Archive Foundation, how to help produce our new
eBooks, and how to subscribe to our email newsletter to hear
about new eBooks.

You might also like