You are here

Resources to help you transition to teaching online

Instructors: To support your transition to online learning, please see our resources and tools page whether you are teaching in the UK, or teaching outside of the UK.

Introduction to Python Programming for Business and Social Science Applications
Share

Introduction to Python Programming for Business and Social Science Applications



October 2020 | 420 pages | SAGE Publications, Inc

Would you like to gather big datasets, analyze them, and visualize the results, all in one program? If this describes you, then Introduction to Python Programming for Business and Social Science Applications is the book for you. Authors Frederick Kaefer and Paul Kaefer walk you through each step of the Python package installation and analysis process, with frequent exercises throughout so you can immediately try out the functions you’ve learned. Written in straightforward language for those with no programming background, this book will teach you how to use Python for your research and data analysis. Instead of teaching you the principles and practices of programming as a whole, this application-oriented text focuses on only what you need to know to research and answer social science questions. The text features two types of examples, one set from the General Social Survey and one set from a large taxi trip dataset from a major metropolitan area, to help readers understand the possibilities of working with Python. Chapters on installing and working within a programming environment, basic skills, and necessary commands will get you up and running quickly, while chapters on programming logic, data input and output, and data frames help you establish the basic framework for conducting analyses. Further chapters on web scraping, statistical analysis, machine learning, and data visualization help you apply your skills to your research. More advanced information on developing graphical user interfaces (GUIs) help you create functional data products using Python to inform general users of data who don’t work within Python.


 First there was IBM® SPSS®, then there was R, and now there's Python. Statistical software is getting more aggressive - let authors Frederick Kaefer and Paul Kaefer help you tame it with Introduction to Python Programming for Business and Social Science Applications.

 
Chapter 1: Introduction to Python
Learning Objectives

 
Introduction

 
Brief introduction to Python and programming

 
Setting up a Python development environment

 
Executing Python code in the IDLE shell window

 
Executing Python code in files

 
Package managers

 
Data sets used throughout the book

 
Chapter Summary

 
Glossary

 
End of Chapter Exercises

 
References

 
 
Chapter 2: Building blocks of programming
Learning Objectives

 
Introduction

 
Good programming practice

 
Basic elements of Python code

 
Python code statements

 
Errors

 
Functions

 
Using modules of Python Code

 
Chapter Summary

 
Glossary

 
End of Chapter Exercises

 
References

 
 
Chapter 3: Further foundations of Python programming
Learning Objectives

 
Introduction

 
Compound data types

 
Lists

 
String Objects

 
Sequence operations

 
Tuples

 
Dictionaries

 
Example using tuples and dictionaries

 
Chapter Summary

 
Glossary

 
End of Chapter Exercises

 
References

 
 
Chapter 4: Control logic and loops
Learning Objectives

 
Introduction

 
Conditions

 
Conditional logic

 
Loops

 
Error handling

 
Chapter Summary

 
Glossary

 
End of Chapter Exercises

 
References

 
 
Chapter 5: Reading and Writing to Files using Python
Learning Objectives

 
Introduction

 
Data Input/Output: Using files

 
CSV Files

 
Exporting Our Results

 
Working with database files

 
Developing an interactive application using a Database

 
Chapter Summary

 
Glossary

 
End of Chapter Exercises

 
Discussion questions

 
References

 
 
Chapter 6: Preparing and working with data using Pandas
Learning Objectives

 
Introduction

 
NumPy

 
Pandas data structures

 
Cleaning and preparing data using Pandas

 
Creating dummy variables

 
Chapter Summary

 
Glossary

 
Discussion questions

 
End of Chapter Exercises

 
References

 
 
Chapter 7: Obtaining data from the Web using Python
Learning Objectives

 
Introduction

 
HTML: The Language of the Web

 
Using Python to read from HTML files

 
Obtaining GSS data from the web: a more complicated process

 
Ethical Issues: Inappropriate use of web resources

 
Beautiful Soup

 
JSON: obtaining Well-Structured Data

 
REST API Queries: A Standardized Way to Access Well-Structured Data

 
Chapter Summary

 
Glossary

 
Discussion questions

 
End of Chapter Exercises

 
References

 
 
Chapter 8: Statistical calculations using Python
Learning Objectives

 
Introduction

 
Ethical Issues: Considerations when working with statistics and building models

 
Basic statistics

 
Using statistical modules

 
Pandas features

 
SciPy stats module

 
statsmodels module for multiple regression

 
statsmodels module for logistic regression

 
Chapter Summary

 
Glossary

 
End of Chapter Exercises

 
References

 
 
Chapter 9: Data Visualization using Python
Learning Objectives

 
Introduction

 
Data Visualization

 
matplotlib: A Python library to visualize your data

 
Customizing matplotlib plots

 
Creating 3D plots

 
Using seaborn package for statistical data visualization

 
Chapter Summary

 
Glossary

 
End of Chapter Exercises

 
References

 
 
Chapter 10: Machine Learning and Text Mining
Learning Objectives

 
Introduction

 
Machine Learning

 
Supervised learning

 
Unsupervised learning

 
Using Python for Text Mining

 
Chapter Summary

 
Glossary

 
End of Chapter Exercises

 
References

 
 
Chapter 11: Developing Graphical User Interfaces with Tkinter
Learning Objectives

 
Introduction

 
Tkinter background

 
Tkinter Widgets

 
Tkinter Layout Manager

 
Examples placing different widgets

 
Writing Python code to work with tkinter Widgets

 
Example program using three tkinter windows

 
GUI-based Database application

 
Chapter Summary

 
Glossary

 
End of Chapter Exercises

 
References

 

“The text explains how to set up and program in Python language from the very basic in an easy-to-read manner with lots of graphical illustrations and example-based approaches. Clear learning objectives in the beginning of each chapter with tips and know-hows, concluding with the chapter exercises and references are very well structured for the first-time programmers without scientific backgrounds.”

Dr. David Han
The University of Texas at San Antonio

?“The organization is good, and the range of topics is very adaptable to courses.”

Giovanni Vincenti
University of Baltimore

“Explains the code line by line, great examples, code is simple and clear, coverage is relevant.”

Neba Nfonsang
University of Denver

“Practical examples, content organized around practical use, clear and non-technical language.”

Hakan Islamoglu
Recep Tayyip Erdogan University

Preview this book

Select a Purchasing Option


Paperback
ISBN: 9781544377445
£48.00