Instant download Data Science at the Command Line: Obtain, Scrub, Explore, and Model Data with Unix Power Tools 2nd Edition Jeroen Janssens pdf all chapter
Instant download Data Science at the Command Line: Obtain, Scrub, Explore, and Model Data with Unix Power Tools 2nd Edition Jeroen Janssens pdf all chapter
com
https://ebookmeta.com/product/data-science-at-the-command-
line-obtain-scrub-explore-and-model-data-with-unix-power-
tools-2nd-edition-jeroen-janssens/
OR CLICK HERE
DOWLOAD NOW
https://ebookmeta.com/product/python-data-science-handbook-essential-
tools-for-working-with-data-2nd-edition-jake-vanderplas/
ebookmeta.com
https://ebookmeta.com/product/python-data-science-handbook-essential-
tools-for-working-with-data-2nd-edition-jake-vanderplas-2/
ebookmeta.com
https://ebookmeta.com/product/the-rough-guide-to-andalucia-10th-
ed-2023-10th-edition-rough-guides/
ebookmeta.com
Doing Good in the World The Inspiring Story of The Rotary
Foundation s First 100 Years 1st Edition David Forward
https://ebookmeta.com/product/doing-good-in-the-world-the-inspiring-
story-of-the-rotary-foundation-s-first-100-years-1st-edition-david-
forward/
ebookmeta.com
https://ebookmeta.com/product/my-eyes-are-black-holes-1st-edition-
logan-ryan-smith/
ebookmeta.com
https://ebookmeta.com/product/cross-technology-communication-for-
internet-of-things-fundamentals-and-key-technologie-1st-edition-
xiuzhen-guo/
ebookmeta.com
https://ebookmeta.com/product/complete-checkers-2-revised-edition-
richard-pask/
ebookmeta.com
https://ebookmeta.com/product/iot-and-ai-technologies-for-sustainable-
living-a-practical-handbook-1st-edition-abid-hussain/
ebookmeta.com
Praise for Data Science at the Command Line
Traditional computer and data science curricula all too often
mistake the command line as an obsolete relic instead of teaching
it as the modern and vital toolset that it is. Only well into my
career did I come to grasp the elegance and power of the
command line for easily exploring messy datasets and even
creating reproducible data pipelines for work. The first edition of
Data Science at the Command Line was one of the most
comprehensive and clear references when I was a novice in the
art, and now with the second edition, I’m again learning new tools
and applications from it.
—Dan Nguyen, data scientist, former news
application developer at ProPublica, and former Lorry
I. Lokey Visiting Professor in Professional Journalism
at Stanford University
The Unix philosophy of simple tools, each doing one job well, then
cleverly piped together, is embodied by the command line. Jeroen
expertly discusses how to bring that philosophy into your work in
data science, illustrating how the command line is not only the
world of file input/output, but also the world of data manipulation,
exploration, and even modeling.
—Chris H. Wiggins, associate professor in the
department of applied physics and applied
mathematics at Columbia University, and chief data
scientist at The New York Times
This book explains how to integrate common data science tasks
into a coherent workflow. It’s not just about tactics for breaking
down problems, it’s also about strategies for assembling the
pieces of the solution.
—John D. Cook, consultant in applied mathematics,
statistics, and technical computing
Despite what you may hear, most practical data science is still
focused on interesting visualizations and insights derived from flat
files. Jeroen’s book leans into this reality, and helps reduce
complexity for data practitioners by showing how time-tested
command-line tools can be repurposed for data science.
—Paige Bailey, principal product manager code
intelligence at Microsoft, GitHub
It’s amazing how fast so much data work can be performed at the
command line before ever pulling the data into R, Python, or a
database. Older technologies like sed and awk are still incredibly
powerful and versatile. Until I read Data Science at the Command
Line, I had only heard of these tools but never saw their full
power. Thanks to Jeroen, it’s like I now have a secret weapon for
working with large data.
—Jared Lander, chief data scientist at Lander
Analytics, organizer of the New York Open Statistical
Programming Meetup, and author of R for Everyone
The command line is an essential tool in every data scientist’s
toolbox, and knowing it well makes it easy to translate questions
you have of your data to real-time insights. Jeroen not only
explains the basic Unix philosophy of how to chain together single-
purpose tools to arrive at simple solutions for complex problems,
but also introduces new command-line tools for data cleaning,
analysis, visualization, and modeling.
—Jake Hofman, senior principal researcher at
Microsoft Research, and adjunct assistant professor
in the department of applied mathematics at
Columbia University
Data Science at the Command
Line
SECOND EDITION
Jeroen Janssens
Data Science at the Command Line
by Jeroen Janssens
Copyright © 2021 Jeroen Janssens. All rights reserved.
Printed in the United States of America.
Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North,
Sebastopol, CA 95472.
O’Reilly books may be purchased for educational, business, or sales
promotional use. Online editions are also available for most titles
(http://oreilly.com). For more information, contact our
corporate/institutional sales department: 800-998-9938 or
[email protected].
Tim O’Reilly
May 2021
Preface
Data science is an exciting field to work in. It’s also still relatively
young. Unfortunately, many people, and many companies as well,
believe that you need new technology to tackle the problems posed
by data science. However, as this book demonstrates, many things
can be accomplished by using the command line instead, and
sometimes in a much more efficient way.
During my PhD program, I gradually switched from using Microsoft
Windows to using Linux. Because this transition was a bit scary at
first, I started with having both operating systems installed next to
each other (known as a dual-boot). The urge to switch back and
forth between Microsoft Windows and Linux eventually faded, and at
some point I was even tinkering around with Arch Linux, which
allows you to build up your own custom Linux machine from scratch.
All you’re given is the command line, and it’s up to you what to
make of it. Out of necessity, I quickly became very comfortable using
the command line. Eventually, as spare time got more precious, I
settled down with a Linux distribution known as Ubuntu because of
its ease of use and large community. However, the command line is
still where I’m spending most of my time.
It actually wasn’t too long ago that I realized that the command line
is not just for installing software, configuring systems, and searching
files. I started learning about tools such as cut, sort, and sed.
These are examples of command-line tools that take data as input,
do something to it, and print the result. Ubuntu comes with quite a
few of them. Once I understood the potential of combining these
small tools, I was hooked.
After earning my PhD, when I became a data scientist, I wanted to
use this approach to do data science as much as possible. Thanks to
a couple of new, open source command-line tools including
xml2json, jq, and json2csv, I was even able to use the
command line for tasks such as scraping websites and processing
lots of JSON data.
In September 2013, I decided to write a blog post titled “7
Command-Line Tools for Data Science”. To my surprise, the blog post
got quite some attention, and I received a lot of suggestions of other
command-line tools. I started wondering whether the blog post
could be turned into a book. I was pleased that, some 10 months
later, and with the help of many talented people (see the
acknowledgments), the answer was yes.
I am sharing this personal story not so much because I think you
should know how this book came about, but because I want to you
know that I had to learn about the command line as well. Because
the command line is so different from using a graphical user
interface, it can seem scary at first. But if I could learn it, then you
can as well. No matter what your current operating system is and no
matter how you currently work with data, after reading this book
you will be able to do data science at the command line. If you’re
already familiar with the command line, or even if you’re already
dreaming in shell scripts, chances are that you’ll still discover a few
interesting tricks or command-line tools to use for your next data
science project.
Constant width
Used for code and commands, as well as within paragraphs to
refer to command-line tools and their options.
Der Inhalt eines Begriffes zerfällt nach den Merkmalen, die in ihm
enthalten sind, in einen Inhalt im engeren und im weiteren Sinne.
Der Inhalt im e n g e r e n Sinne oder k o n s t i t u i e r e n d e Inhalt ist der
Inbegriff der Merkmale eines Gegenstandes, ohne die dieser
schlechthin nicht gedacht werden kann, weil sie ihm seinem Wesen
nach als bestimmend und darum notwendig zugehören (wesentliche
oder notwendige Merkmale); der Inhalt im w e i t e r e n Sinne oder
auch mögliche Inhalt ist der Inbegriff derjenigen Merkmale, die dem
Gegenstande seinem Wesen nach zukommen k ö n n e n , aber nicht
notwendig zukommen müssen (mögliche oder unwesentliche
Merkmale). Insofern nun alles, was von einem Gegenstand
urteilsmäßig ausgesagt werden kann, entweder dem Inhalt im
engeren oder dem Inhalt im weiteren Sinne angehören muß, nennt
man den Inbegriff dieser beiden auch den p r ä d i k a t i v e n
(aussagbaren) Inhalt eines Begriffes.
Diese Scheidung sei durch ein Beispiel verdeutlicht. Unter dem Begriff „Uhr“
versteht man ganz allgemein eine von Menschen geschaffene Einrichtung, deren
Zweck es ist, entsprechend der Einteilung des Tages in 24 Stunden, der Stunde in
60 Minuten usw. die Zeit anzugeben. Diese beiden Eigenheiten (1. Einrichtung
durch den Menschen und 2. zeitmessender Zweck) bilden die w e s e n t l i c h e n
Merkmale des Begriffes „Uhr“, die dessen konstituierenden Inhalt ausmachen,
ganz gleich, ob es sich um eine Sonnenuhr, Sanduhr, Pendeluhr oder Federwerkuhr
handelt. Der m ö g l i c h e Inhalt des Begriffes ist dahingegen unendlich viel reicher.
Man kann je nach den besonderen Umständen von der Uhr aussagen, daß sie ein
nützliches oder wertloses Geschenk für die Menschheit sei; daß sie als
zeitmessendes Instrument ein zweckmäßiges oder unzweckmäßiges Zahlensystem
als Einteilungsmaßstab zu ihrer Voraussetzung habe, daß sie aus Gold, Silber,
Kupfer, Stahl gefertigt sei u. a. m. Kurzum: der mögliche Inhalt des Begriffes
umfaßt alle Merkmale, die ihm unter Umständen zukommen können, d. h. mit
seinen wesentlichen Merkmalen v e r t r ä g l i c h sind.
Inhalt und Umfang haben in ihrer Größe sowohl nach oben wie
nach unten hin Grenzen. Da ein Begriff ohne Inhalt nicht denkbar
ist, so bildet ein einziges konstituierendes Merkmal den k l e i n s t e n
Inhalt eines Begriffes. Diese inhaltsärmsten Begriffe mit nur einem
einzigen konstituierenden Merkmal haben den g r ö ß t e n Umfang.
Also: der Umfang eines Begriffes kann nie größer werden, als wenn
sein Inhalt bei dem Minimum „e i n Merkmal“ angekommen ist. Und
umgekehrt: die Begriffe mit dem ä r m s t e n Umfang, also diejenigen,
die sich nur noch auf einen einzigen raum-zeitlich bestimmten
Gegenstand beziehen (z. B. auf die blaue Grotte bei Capri in dem
Augenblicke ihrer Entdeckung durch Kopisch im Jahre 1826; auf
Cäsar im Augenblicke seiner Ermordung; auf den ersten
geschichtlich bekannten Ausbruch des Vesuvs im Jahre 79 v. Chr.)
haben den r e i c h s t e n Inhalt, den ein Begriff haben kann. Dem
ärmsten Inhalt (= 1) entspricht demnach der reichste Umfang; dem
ärmsten Umfang (= 1) der reichste Inhalt. Oder: zwischen Inhalt
und Umfang eines Begriffes besteht eine Beziehung, die wir in einer
1
Formel ausgedrückt schreiben können: = maximum, wobei 1
maximum 1
= minimum ist.
Damit ist für die Frage nach dem Wesen des Urteils zunächst so
viel gewonnen, daß jedes Urteil seinem logischen Aufbau nach aus
zwei materialen Gliedern bestehe, die im Urteilsakt in eine
bestimmte Beziehung zueinander gerückt werden. Diese Beziehung
zwischen Subjekt und Prädikat, d. i. die eigentlich p r ä d i k a t i v e
(aussagende) Beziehung oder F o r m des Urteils ihrem Wesen nach zu
bestimmen, ist die weitere Aufgabe der logischen Analyse des
Urteils.
Sieht man von allen Besonderheiten psychologisierender oder
grammatisierender Urteilstheorien ab[7], so kann man die bisher
entwickelten Auffassungen in zwei Gruppen scheiden. Die eine
glaubt, die I n h a l t s -, die andere die U m f a n g s beziehungen zwischen
dem Subjekts- und dem Prädikatsbegriff als die für die Theorie des
Urteils maßgebenden betrachten zu müssen. Die ersteren werden
danach als I n h a l t s t h e o r i e n , die zweiten als U m f a n g s t h e o r i e n
bezeichnet. Der Gegensatz dieser Auffassungen ist ein so weit
reichender, daß sich im Anschluß daran geradezu von verschiedenen
R i c h t u n g e n der Logik sprechen läßt, deren eine als I n h a l t s l o g i k ,
deren andere als U m f a n g s l o g i k anzusprechen ist.
Zu den U m f a n g s t h e o r i e n gehört die älteste und verbreitetste Annahme
über das Wesen des Urteils, die sog. S u b s u m t i o n s t h e o r i e (vertreten durch
Aristoteles, Lambert, Kant, Hegel). Sie deutet die Urteilsbeziehung zwischen
Subjekt und Prädikat so, daß der Umfang des Subjektsbegriffes unter den Umfang
des Prädikatsbegriffes s u b s u m i e r t sei. Das Subjekt werde also als A r t zu dem
Prädikat als G a t t u n g gedacht. In dem Urteil „Kunst bringt Gunst“ z. B. sei „das
Gunst-bringende“ G a t t u n g s b e g r i f f gegenüber dem Begriff „Kunst“ als einer