Introduction to Python Programming for Business and Social Science Applications. Frederick Kaefer

Чтение книги онлайн.

Читать онлайн книгу Introduction to Python Programming for Business and Social Science Applications - Frederick Kaefer страница 4

Introduction to Python Programming for Business and Social Science Applications - Frederick Kaefer

Скачать книгу

      Brief Introduction to Python and Programming

      Guido van Rossum first conceived the Python programming language in December 1989 with the idea that it should be easy to read and that it should let users create their own packages of special-purpose coding modules that others could use (Anonymous, 2018). Python’s first release was in 1991, and it combines simple syntax, abundant online resources, and a rich ecosystem of scientifically focused toolkits with a heavy emphasis on community (Perkel, 2015). Syntax is a set of rules that dictate how to specify instructions in a programming language. Packages are libraries of code modules that other programming code can access and use. As of January 2020, there are more than 212,000 projects with packages available for download from the Python Package Index (PyPI), a repository of packages for the Python programming language (Python Software Foundation, 2020). In addition, Python was the most popular introductory language at American universities in 2014, but the teaching of it is generally limited to those studying science, technology, engineering, and mathematics (Anonymous, 2018). The intended audience for this textbook is students and researchers in business and the social sciences. There is prolific use of Python today in both business and the social sciences to develop applications for data analytics. In addition to statistical analysis, we can use Python for web scraping, text mining, machine learning, and developing applications with graphical user interfaces (all of which we cover in this book). Although we can accomplish each of these individually with other programming languages (such as R) and software packages (such as SAS and Tableau), learning Python enables you do all these things and much more.

      Python’s Use in Education, Research, and the Corporate World

      The development of the Internet has both made large amounts of information available to users, as well as enabled users to create large amounts of information and make it available to the rest of the world. Data are manipulated and processed using computer programming by both business and the social sciences to gain insights that would be too difficult to obtain otherwise. The Python programming language has been the most popular introductory programming language taught at American universities for good reasons. The explosive growth of “big data” in disciplines such as bioinformatics, neuroscience, and astronomy has made programming know-how ever more crucial, in that researchers who can write code in Python can manage their data sets and work more efficiently on research-related tasks, including analyzing and visualizing data (Perkel, 2015). The corporate world also recognizes the importance of analyzing data to gain insights about current and potential customers. In addition, corporations are developing business applications using Python for numerous purposes, including developing strategic information systems, including enterprise resource planning (ERP), customer relationship management (CRM), and ecommerce applications (Smets, 2019).

      Several advantages that Python has compared to commercial packages such as SPSS and SAS are that Python is open source and can run on many platforms. Users are free to make copies, distribute, and even change the software. Python is perfect for teaching statistics in a data-rich environment and has simplified debugging for the programmer using its built-in debugging feature (Ozgur, Colliau, Rogers, Hughes, & Myer-Tyson, 2017). Like Python, the R programming language is also an open-source programming language used for data analytics. There is prolific use of both R and Python in the business world and for academic and research purposes. We focus on Python because we see a need for a text that presents Python programming specifically for those in the fields of social sciences and business to develop applications for data analytics. Whereas some may prefer R for statistical analysis and plotting charts, Python is a general-purpose scripting language used to develop applications with graphical user interfaces (GUIs) and may be favored when working with text-based data.

      Python Is Free, Open-Source Software (FOSS)

      Perhaps the most important reason for the rapid growth in the usage of Python in business and the social sciences is that Python is free open-source software (FOSS). FOSS is an inclusive term that covers both free software and open-source software (Marsan, Pare, & Beaudry, 2012). The definition of free software is that the users have the freedom to run, copy, distribute, study, change, and improve the software (Free Software Foundation, 2019). Open-source software requires that the license to use the software shall not restrict any party from selling or giving away the software as a component of a larger software distribution (Open Source Initiative, 2007). As a result, organizations not only are free to use and change Python but also can create and sell commercial applications using Python.

      Being FOSS is a true advantage that Python has over other commercially available packages, as it is continually improved. Software development peers iteratively develop, incrementally release, review, and refine FOSS projects in an ongoing agile manner (Scacchi, 2004b, referenced in Goth, 2007). FOSS communities develop software that is extremely valuable, generally reliable, globally distributed, made available for acquisition at little or no cost, and readily used in its associated community (Scacchi, 2004a).

      User Community and Python Resources

      You can find many Python resources at the Python website, https://www.python.org. You can download the latest version of Python from https://www.python.org/downloads/ (Version 3.8.0 as of October 14, 2019). Python is platform independent, software that can run on most if not all the latest operating systems/computing platforms. A platform is the combination of a physical device and an operating system. You can run the latest version of Python on Windows, Linux/Unix, Mac OS X, and other operating systems. You can find documentation for the latest version of Python (as well as for older versions) at https://docs.python.org/dev/. Table 1.1 lists the most recent versions of Python documentation that were available on the Python website as of November 22, 2019. Previous versions of documentation remain available online as well. The Python Package Index is a repository of software for the Python programming language located at https://pypi.org/.

      Lessons learned: In this section, we learned that Python is free and open-source software (FOSS) and that there are now more than 212,000 projects with packages written in Python that are available to use and modify in the Python Package Index. The goal of this book is to teach Python programming to those in the fields of social sciences and business to develop applications using Python packages for data analytics.

      Setting Up a Python Development Environment

      One way to set up a Python development environment on a computing device is to connect to the Python download webpage (https://www.python.org/downloads/), as shown in Figure 1.1. Once on that webpage, if you are running Windows, simply click on the Download Python button (for the latest version). If you are not running Windows, select the link that corresponds to the operating system you are using (found immediately below that download button) and follow the instructions found on the corresponding webpage. Note that we will be using the Windows operating system for illustrating Python throughout the book, so if you are using Mac OS or another operating system, you will have some variations in the appearance and detailed workings of Python.

      A screenshot displays the Python download webpage for downloading the software.Description

      Figure 1.1 Python Download Webpage

      The lower half of the Python download webpage shown in Figure 1.1 lists the release

Скачать книгу