Download Lecture notes - Columbia Applied Data Science
Transcript
Contents I Programming Prerequisites 1 Unix 1.1 History and Culture . . . . 1.2 The Shell . . . . . . . . . . 1.3 Streams . . . . . . . . . . . 1.3.1 Standard streams . . 1.3.2 Pipes . . . . . . . . 1.4 Text . . . . . . . . . . . . . 1.5 Philosophy . . . . . . . . . 1.5.1 In a nutshell . . . . 1.5.2 More nuts and bolts 1.6 End Notes . . . . . . . . . . 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 2 3 5 6 7 9 10 10 10 11 2 Version Control with Git 2.1 Background . . . . . . . . . . . . . . . . . . . . . 2.2 What is Git . . . . . . . . . . . . . . . . . . . . . 2.3 Setting Up . . . . . . . . . . . . . . . . . . . . . . 2.4 Online Materials . . . . . . . . . . . . . . . . . . 2.5 Basic Git Concepts . . . . . . . . . . . . . . . . . 2.6 Common Git Workflows . . . . . . . . . . . . . . 2.6.1 Linear Move from Working to Remote . . 2.6.2 Discarding changes in your working copy 2.6.3 Erasing changes . . . . . . . . . . . . . . 2.6.4 Remotes . . . . . . . . . . . . . . . . . . . 2.6.5 Merge conflicts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 13 13 14 14 15 15 16 17 17 17 18 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Building a Data Cleaning Pipeline with Python 19 3.1 Simple Shell Scripts . . . . . . . . . . . . . . . . . . . . . . . 19 3.2 Template for a Python CLI Utility . . . . . . . . . . . . . . . 21 i