100% found this document useful (1 vote)
3K views

Instant Access to Pandas Cookbook Recipes for Scientific Computing Time Series Analysis and Data Visualization using Python 1st Edition Theodore Petrou ebook Full Chapters

Series

Uploaded by

akagboblohm
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)
3K views

Instant Access to Pandas Cookbook Recipes for Scientific Computing Time Series Analysis and Data Visualization using Python 1st Edition Theodore Petrou ebook Full Chapters

Series

Uploaded by

akagboblohm
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/ 65

Download Full Version ebook - Visit ebookmeta.

com

Pandas Cookbook Recipes for Scientific Computing


Time Series Analysis and Data Visualization using
Python 1st Edition Theodore Petrou

https://ebookmeta.com/product/pandas-cookbook-recipes-for-
scientific-computing-time-series-analysis-and-data-
visualization-using-python-1st-edition-theodore-petrou/

OR CLICK HERE

DOWLOAD NOW

Discover More Ebook - Explore Now at ebookmeta.com


Instant digital products (PDF, ePub, MOBI) ready for you
Download now and discover formats that fit your needs...

Start reading on any device today!

Python Data Analytics Data Analysis and Science Using


Pandas Matplotlib and the Python Programming Language 1st
Edition Nelli Fabio
https://ebookmeta.com/product/python-data-analytics-data-analysis-and-
science-using-pandas-matplotlib-and-the-python-programming-
language-1st-edition-nelli-fabio/
ebookmeta.com

Python Data Analytics Data Analysis and Science Using


Pandas Matplotlib and the Python Programming Language 1st
Edition Nelli Fabio
https://ebookmeta.com/product/python-data-analytics-data-analysis-and-
science-using-pandas-matplotlib-and-the-python-programming-
language-1st-edition-nelli-fabio-2/
ebookmeta.com

Python Data Analytics Data Analysis and Science Using


Pandas Matplotlib and the Python Programming Language 1st
Edition Nelli Fabio
https://ebookmeta.com/product/python-data-analytics-data-analysis-and-
science-using-pandas-matplotlib-and-the-python-programming-
language-1st-edition-nelli-fabio-3/
ebookmeta.com

Academy for Misfit Witches Books 1-3 1st Edition Tara West

https://ebookmeta.com/product/academy-for-misfit-witches-
books-1-3-1st-edition-tara-west/

ebookmeta.com
Doing Business in Kenya Opportunities and Challenges 1st
Edition Wakiuru Wamwara

https://ebookmeta.com/product/doing-business-in-kenya-opportunities-
and-challenges-1st-edition-wakiuru-wamwara/

ebookmeta.com

Coins of England and the United Kingdom 2019 1st Edition


Emma Howard

https://ebookmeta.com/product/coins-of-england-and-the-united-
kingdom-2019-1st-edition-emma-howard/

ebookmeta.com

The Bank War and the Partisan Press Stephen W. Campbell

https://ebookmeta.com/product/the-bank-war-and-the-partisan-press-
stephen-w-campbell/

ebookmeta.com

The Ultimate Spanish Review and Practice, Premium 5th


Edition Ronni Gordon

https://ebookmeta.com/product/the-ultimate-spanish-review-and-
practice-premium-5th-edition-ronni-gordon/

ebookmeta.com

A Guide to Reciting the Combination of Buddhist Scriptures


- Little House 1st Edition Jun Hong Lu ■■■

https://ebookmeta.com/product/a-guide-to-reciting-the-combination-of-
buddhist-scriptures-little-house-1st-edition-jun-hong-
lu-%e5%8d%a2%e5%86%9b%e5%ae%8f/
ebookmeta.com
The Wedding of the Dead Ritual Poetics and Popular Culture
in Transylvania Gail Kligman

https://ebookmeta.com/product/the-wedding-of-the-dead-ritual-poetics-
and-popular-culture-in-transylvania-gail-kligman/

ebookmeta.com
Pandas Cookbook

Recipes for Scientific Computing, Time Series Analysis and Data


Visualization using Python

Theodore Petrou

BIRMINGHAM - MUMBAI
Pandas Cookbook
Copyright © 2017 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored


in a retrieval system, or transmitted in any form or by any means,
without the prior written permission of the publisher, except in the
case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure
the accuracy of the information presented. However, the information
contained in this book is sold without warranty, either express or
implied. Neither the author, nor Packt Publishing, and its dealers and
distributors will be held liable for any damages caused or alleged to
be caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information


about all of the companies and products mentioned in this book by
the appropriate use of capitals. However, Packt Publishing cannot
guarantee the accuracy of this information.

First published: October 2017

Production reference: 1181017

Published by Packt Publishing Ltd.


Livery Place
35 Livery Street
Birmingham
B3 2PB, UK.

ISBN 978-1-78439-387-8

www.packtpub.com
Credits
Author
Copy Editor
Theodore Petrou Tasneem Fatehi

Reviewers

Sonali Dayal
Project Coordinator
Kuntal Ganguly
Manthan Patel
Shilpi Saxena

Commissioning Editor Proofreader

Veena Pagare Safis Editing


Acquisition Editor Indexer

Tushar Gupta Tejal Daruwale Soni


Content Development Editor
Graphics
Snehal Kolte Tania Dutta

Technical Editor Production Coordinator


Sayli Nikalje
Deepika Naik
About the Author
Theodore Petrou is a data scientist and the founder of Dunder
Data, a professional educational company focusing on exploratory
data analysis. He is also the head of Houston Data Science, a
meetup group with more than 2,000 members that has the primary
goal of getting local data enthusiasts together in the same room to
practice data science. Before founding Dunder Data, Ted was a data
scientist at Schlumberger, a large oil services company, where he
spent the vast majority of his time exploring data.

Some of his projects included using targeted sentiment analysis to


discover the root cause of part failure from engineer text, developing
customized client/server dashboarding applications, and real-time
web services to avoid the mispricing of sales items. Ted received his
masters degree in statistics from Rice University, and used his
analytical skills to play poker professionally and teach math before
becoming a data scientist. Ted is a strong supporter of learning
through practice and can often be found answering questions about
pandas on Stack Overflow.
Acknowledgements
I would first like to thank my wife, Eleni, and two young children,
Penelope, and Niko, who endured extended periods of time without
me as I wrote.

I’d also like to thank Sonali Dayal, whose constant feedback helped
immensely in structuring the content of the book to improve its
effectiveness. Thank you to Roy Keyes, who is the most exceptional
data scientist I know and whose collaboration made Houston Data
Science possible. Thank you to Scott Boston, an extremely skilled
pandas user for developing ideas for recipes. Thank you very much
to Kim Williams, Randolph Adami, Kevin Higgins, and Vishwanath
Avasarala, who took a chance on me during my professional career
when I had little to no experience. Thanks to my fellow coworker at
Schlumberger, Micah Miller, for his critical, honest, and instructive
feedback on anything that we developed together and his constant
pursuit to move toward Python.

Thank you to Phu Ngo, who critically challenges and sharpens my


thinking more than anyone. Thank you to my brother, Dean Petrou,
for being right by my side as we developed our analytical skills
through poker and again through business. Thank you to my sister,
Stephanie Burton, for always knowing what I’m thinking and making
sure that I’m aware of it. Thank you to my mother, Sofia Petrou, for
her ceaseless love, support, and endless math puzzles that
challenged me as a child. And thank you to my father, Steve Petrou,
who, although no longer here, remains close to my heart and
continues to encourage me every day.
About the Reviewers
Sonali Dayal is a masters candidate in biostatistics at the University
of California, Berkeley. Previously, she has worked as a freelance
software and data science engineer for early stage start-ups, where
she built supervised and unsupervised machine learning models as
well as data pipelines and interactive data analytics dashboards. She
received her bachelor of science (B.S.) in biochemistry from Virginia
Tech in 2011.

Kuntal Ganguly is a big data machine learning engineer focused


on building large-scale data-driven systems using big data
frameworks and machine learning. He has around 7 years of
experience building several big data and machine learning
applications.

Kuntal provides solutions to AWS customers in building real-time


analytics systems using managed cloud services and open source
Hadoop ecosystem technologies such as Spark, Kafka, Storm, Solr,
and so on, along with machine learning and deep learning
frameworks such as scikit-learn, TensorFlow, Keras, and BigDL. He
enjoys hands-on software development, and has single-handedly
conceived, architectured, developed, and deployed several large
scale distributed applications. He is a machine learning and deep
learning practitioner and very passionate about building intelligent
applications.

Kuntal is the author of the books: Learning Generative Adversarial


Network and R Data Analysis Cookbook - Second Edition, Packt
Publishing.

Shilpi Saxena is a seasoned professional who leads in


management with an edge of being a technology evangelist--she is
an engineer who has exposure to a variety of domains (machine-to-
machine space, healthcare, telecom, hiring, and manufacturing). She
has experience in all aspects of the conception and execution of
enterprise solutions. She has been architecturing, managing, and
delivering solutions in the big data space for the last 3 years,
handling high performance geographically distributed teams of elite
engineers. Shilpi has around 12+ years (3 years in the big data
space) experience in the development and execution of various
facets of enterprise solutions, both in the product/services
dimensions of the software industry. An engineer by degree and
profession who has worn various hats--developer, technical leader,
product owner, tech manager--and has seen all the flavors that the
industry has to offer. She has architectured and worked through
some of the pioneer production implementation in big data on Storm
and Impala with auto scaling in AWS. LinkedIn: http://in.linkedin.com/pu
b/shilpi-saxena/4/552/a30
www.PacktPub.com
For support files and downloads related to your book, please visit ww
w.PacktPub.com . Did you know that Packt offers eBook versions of
every book published, with PDF and ePub files available? You can
upgrade to the eBook version at www.PacktPub.com and as a print book
customer, you are entitled to a discount on the eBook copy. Get in
touch with us at [email protected] for more details. At www.PacktPub.
com , you can also read a collection of free technical articles, sign up
for a range of free newsletters and receive exclusive discounts and
offers on Packt books and eBooks.

https://www.packtpub.com/maptGet the most in-demand software skills


with Mapt. Mapt gives you full access to all Packt books and video
courses, as well as industry-leading tools to help you plan your
personal development and advance your career.
Why subscribe?
Fully searchable across every book published by Packt
Copy and paste, print, and bookmark content
On demand and accessible via a web browser
Customer Feedback
Thanks for purchasing this Packt book. At Packt, quality is at the
heart of our editorial process. To help us improve, please leave us an
honest review on this book's Amazon page at https://www.amazon.com/
dp/1784393878 . If you'd like to join our team of regular reviewers,
you can email us at [email protected] . We award our
regular reviewers with free eBooks and videos in exchange for their
valuable feedback. Help us be relentless in improving our products!
Table of Contents
Preface
What this book covers
What you need for this book
Running a Jupyter Notebook
Who this book is for
How to get the most out of this book
Conventions
Assumptions for every recipe
Dataset Descriptions
Sections
Getting ready
How to do it...
How it works...
There's more...
See also
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
1. Pandas Foundations
Introduction
Dissecting the anatomy of a DataFrame
Getting ready
How to do it...
How it works...
There's more...
See also
Accessing the main DataFrame components
Getting ready
How to do it...
How it works...
There's more...
See also
Understanding data types
Getting ready
How to do it...
How it works...
There's more...
See also
Selecting a single column of data as a Series
Getting ready
How to do it...
How it works...
There's more...
See also
Calling Series methods
Getting ready
How to do it...
How it works...
There's more...
See also
Working with operators on a Series
Getting ready
How to do it...
How it works...
There's more...
See also
Chaining Series methods together
Getting ready
How to do it...
How it works...
There's more...
Making the index meaningful
Getting ready
How to do it...
How it works...
There's more...
See also
Renaming row and column names
Getting ready
How to do it...
How it works...
There's more...
Creating and deleting columns
Getting ready
How to do it...
How it works...
There's more...
See also
2. Essential DataFrame Operations
Introduction
Selecting multiple DataFrame columns
Getting ready
How to do it...
How it works...
There's more...
Selecting columns with methods
Getting ready
How it works...
How it works...
There's more...
See also
Ordering column names sensibly
Getting ready
How to do it...
How it works...
There's more...
See also
Operating on the entire DataFrame
Getting ready
How to do it...
How it works...
There's more...
Chaining DataFrame methods together
Getting ready
How to do it...
How it works...
There's more...
See also
Working with operators on a DataFrame
Getting ready
How to do it...
How it works...
There's more...
See also
Comparing missing values
Getting ready
How to do it...
How it works...
There's more...
Transposing the direction of a DataFrame operation
Getting ready
How to do it...
How it works...
There's more...
See also
Determining college campus diversity
Getting ready
How to do it...
How it works...
There's more...
See also
3. Beginning Data Analysis
Introduction
Developing a data analysis routine
Getting ready
How to do it...
How it works...
There's more...
Data dictionaries
See also
Reducing memory by changing data types
Getting ready
How to do it...
How it works...
There's more...
See also
Selecting the smallest of the largest
Getting ready
How to do it...
How it works...
There's more...
Selecting the largest of each group by sorting
Getting ready
How to do it...
How it works...
There's more...
Replicating nlargest with sort_values
Getting ready
How to do it...
How it works...
There's more...
Calculating a trailing stop order price
Getting ready
How to do it...
How it works...
There's more...
See also
4. Selecting Subsets of Data
Introduction
Selecting Series data
Getting ready
How to do it...
How it works...
There's more...
See also
Selecting DataFrame rows
Getting ready
How to do it...
How it works...
There's more...
See also
Selecting DataFrame rows and columns simultaneously
Getting ready
How to do it...
How it works...
There's more...
Selecting data with both integers and labels
Getting ready
How to do it...
How it works...
There's more...
See also
Speeding up scalar selection
Getting ready
How to do it...
How it works...
There's more...
Slicing rows lazily
Getting ready
How to do it...
How it works...
There's more...
Slicing lexicographically
Getting ready
How to do it...
How it works...
There's more...
5. Boolean Indexing
Introduction
Calculating boolean statistics
Getting ready
How to do it...
How it works...
There's more...
See also
Constructing multiple boolean conditions
Getting ready
How to do it...
How it works...
There's more...
See also
Filtering with boolean indexing
Getting ready
How to do it...
How it works...
There's more...
See also
Replicating boolean indexing with index selection
Getting ready
How to do it...
How it works...
There's more...
Selecting with unique and sorted indexes
Getting ready
How to do it...
How it works...
There's more...
See also
Gaining perspective on stock prices
Getting ready
How to do it...
How it works...
There's more...
See also
Translating SQL WHERE clauses
Getting ready
How to do it...
How it works...
There's more...
See also
Determining the normality of stock market returns
Getting ready
How to do it...
How it works...
There's more...
See also
Improving readability of boolean indexing with the query method
Getting ready
How to do it...
How it works...
There's more...
See also
Preserving Series with the where method
Getting ready
How to do it...
How it works...
There's more...
See also
Masking DataFrame rows
Getting ready
How to do it...
How it works...
There's more...
See also
Selecting with booleans, integer location, and labels
Getting ready
How to do it...
How it works...
There's more...
See also
6. Index Alignment
Introduction
Examining the Index object
Getting ready
How to do it...
How it works...
There's more...
See also
Producing Cartesian products
Getting ready
How to do it...
How it works...
There's more...
See also
Exploding indexes
Getting ready
How to do it...
How it works...
There's more...
Filling values with unequal indexes
Getting ready
How to do it...
How it works...
There's more...
Appending columns from different DataFrames
Getting ready
How to do it...
How it works...
There's more...
See also
Highlighting the maximum value from each column
Getting ready
How to do it...
How it works...
There's more...
See also
Replicating idxmax with method chaining
Getting ready
How to do it...
How it works...
There's more...
Finding the most common maximum
Getting ready
How to do it...
How it works...
There's more...
7. Grouping for Aggregation, Filtration, and Transformation
Introduction
Defining an aggregation
Getting ready
How to do it...
How it works...
There's more...
See also
Grouping and aggregating with multiple columns and functions
Getting ready
How to do it...
How it works...
There's more...
Removing the MultiIndex after grouping
Getting ready
How to do it...
How it works...
There's more...
Customizing an aggregation function
Getting ready
How to do it...
How it works...
There's more...
Customizing aggregating functions with *args and **kwargs
Getting ready
How to do it...
How it works...
There's more...
See also
Examining the groupby object
Getting ready
How to do it...
How it works...
There's more...
See also
Filtering for states with a minority majority
Getting ready
How to do it...
How it works...
There's more...
See also
Transforming through a weight loss bet
Getting ready
How to do it...
How it works...
There's more...
See also
Calculating weighted mean SAT scores per state with apply
Getting ready
How to do it...
How it works...
There's more...
See also
Grouping by continuous variables
Getting ready
How to do it...
How it works...
There's more...
See also
Counting the total number of flights between cities
Getting ready
How to do it...
How it works...
There's more...
See also
Finding the longest streak of on-time flights
Getting ready
How to do it...
How it works...
There's more...
See also
8. Restructuring Data into a Tidy Form
Introduction
Tidying variable values as column names with stack
Getting ready
How to do it...
How it works...
There's more...
See also
Tidying variable values as column names with melt
Getting ready
How to do it...
How it works...
There's more...
See also
Stacking multiple groups of variables simultaneously
Getting ready
How to do it...
How it works...
There's more...
See also
Inverting stacked data
Getting ready
How to do it...
How it works...
There's more...
See also
Unstacking after a groupby aggregation
Getting ready
How to do it...
How it works...
There's more...
See also
Replicating pivot_table with a groupby aggregation
Getting ready
How to do it...
How it works...
There's more...
Renaming axis levels for easy reshaping
Getting ready
How to do it...
How it works...
There's more...
Tidying when multiple variables are stored as column names
Getting ready...
How to do it...
How it works...
There's more...
See also
Tidying when multiple variables are stored as column values
Getting ready
How to do it...
How it works...
There's more...
See also
Tidying when two or more values are stored in the same cell
Getting ready...
How to do it..
How it works...
There's more...
Tidying when variables are stored in column names and values
Getting ready
How to do it...
How it works...
There's more...
Tidying when multiple observational units are stored in the same table
Getting ready
How to do it...
How it works...
There's more...
See also
9. Combining Pandas Objects
Introduction
Appending new rows to DataFrames
Getting ready
How to do it...
How it works...
There's more...
Concatenating multiple DataFrames together
Getting ready
How to do it...
How it works...
There's more...
Comparing President Trump's and Obama's approval ratings
Getting ready
How to do it...
How it works...
There's more...
See also
Understanding the differences between concat, join, and merge
Getting ready
How to do it...
How it works...
There's more...
See also
Connecting to SQL databases
Getting ready
How to do it...
How it works...
There's more...
See also
10. Time Series Analysis
Introduction
Understanding the difference between Python and pandas date tools
Getting ready
How to do it...
How it works...
There's more...
See also
Slicing time series intelligently
Getting ready
How to do it...
How it works...
There's more...
See also
Using methods that only work with a DatetimeIndex
Getting ready
How to do it...
How it works...
There's more...
See also
Counting the number of weekly crimes
Getting ready
How to do it...
How it works...
There's more...
See also
Aggregating weekly crime and traffic accidents separately
Getting ready
How to do it...
How it works...
There's more...
Measuring crime by weekday and year
Getting ready
How to do it...
How it works...
There's more...
See also
Grouping with anonymous functions with a DatetimeIndex
Getting ready
How to do it...
How it works...
There's more...
See also
Grouping by a Timestamp and another column
Getting ready
How to do it...
How it works...
There's more...
Finding the last time crime was 20% lower with merge_asof
Getting ready
How to do it...
How it works...
There's more...
11. Visualization with Matplotlib, Pandas, and Seaborn
Introduction
Getting started with matplotlib
Getting ready
Object-oriented guide to matplotlib
How to do it...
How it works...
There's more...
See also
Visualizing data with matplotlib
Getting ready
How to do it...
How it works...
There's more...
See also
Plotting basics with pandas
Getting ready
How to do it..
How it works...
There's more...
See also
Visualizing the flights dataset
Getting ready
How to do it...
How it works...
See also
Stacking area charts to discover emerging trends
Getting ready
How to do it...
How it works...
There's more...
Understanding the differences between seaborn and pandas
Getting ready
How to do it...
How it works...
See also
Doing multivariate analysis with seaborn Grids
Getting ready
How to do it...
How it works...
There's more...
Uncovering Simpson's paradox in the diamonds dataset with seaborn
Getting ready
How to do it...
How it works...
There's more...
Preface
The popularity of data science has skyrocketed since it was called
The Sexiest Job of the 21st Century by the Harvard Review in 2012.
It was ranked as the number one job by Glassdoor in both 2016 and
2017. Fueling this skyrocketing popularity for data science is the
demand from industry. Several applications have made big splashes
in the news, such as Netflix making better movie recommendations,
IBM Watson defeating humans at Jeopardy, Tesla building self-driving
cars, Major League Baseball teams finding undervalued prospects,
and Google learning to identify cats on the internet.

Nearly every industry is finding ways to use data science to build new
technology or provide deeper insights. Due to such noteworthy
successes, an ever-present aura of hype seems to encapsulate data
science. Most of the scientific progress backing this hype stems from
the field of machine learning, which produces the algorithms that
make the predictions responsible for artificial intelligence.

The fundamental building block for all machine learning algorithms is,
of course, data. As companies have realized this, there is no shortage
of it. The business intelligence company, Domo, estimates that 90%
of the world's data has been created in just the last two years.
Although machine learning gets all the attention, it is completely
reliant on the quality of the data that it is fed. Before data ever
reaches the input layers of a machine learning algorithm, it must be
prepared, and for data to be prepared properly, it needs to be
explored thoroughly for basic understanding and to identify
inaccuracies. Before data can be explored, it needs to be captured.

To summarize, we can cast the data science pipeline into three


stages--data capturing, data exploration, and machine learning.
There are a vast array of tools available to complete each stage of
the pipeline. Pandas is the dominant tool in the scientific Python
Discovering Diverse Content Through
Random Scribd Documents
The Project Gutenberg eBook of Terrain
Exercises
This ebook is for the use of anyone anywhere in the United
States and most other parts of the world at no cost and with
almost no restrictions whatsoever. You may copy it, give it away
or re-use it under the terms of the Project Gutenberg License
included with this ebook or online at www.gutenberg.org. If you
are not located in the United States, you will have to check the
laws of the country where you are located before using this
eBook.

Title: Terrain Exercises

Author: William H. Waldron

Release date: July 4, 2020 [eBook #62552]

Language: English

Credits: Produced by Richard Tonsing, Tim Lindell and the


Online
Distributed Proofreading Team at
https://www.pgdp.net (This
file was produced from images generously made
available
by The Internet Archive/American Libraries.)

*** START OF THE PROJECT GUTENBERG EBOOK TERRAIN


EXERCISES ***
Terrain Exercises

By

Lt. Col. William H. Waldron


Infantry, U. S. Army

Washington
United States Infantry Association
1923
Copyright, 1923 By
United States Infantry Association

HAYWORTH PUBLISHING HOUSE, WASHINGTON, D. C.


Table of Contents
Page
Introduction 5

Terrain Exercise No. 1

Attack of Strong Point—Rifle Company 11

Terrain Exercise No. 2

Approach March and Deployment 51

Terrain Exercise No. 3

Defensive Position 107

Terrain Exercise No. 4

A Machine Gun Company in Attack 141

Terrain Exercise No. 5

An Advance Guard 169

Terrain Exercise No. 6

A Flank Guard 221

Terrain Exercise No. 7


Posting an Outpost 255

Terrain Exercise No. 8

A Visiting Patrol 299

Terrain Exercise No. 9

A Reconnoitering Patrol 337


Introduction

Terrain Exercises are those military exercises in which the students


carry on the operations of imaginary bodies of troops over the actual
terrain. As these exercises involve the study of the utilization of the
ground itself and the application of tactical formations and methods
to it, they are the best means, aside from practical field work with
troops, of giving officers and non-commissioned officers practice in
carrying out the duties that fall to them in war.
In the Terrain Exercise is found the logical step in tactical training,
between the theory and practice of the classroom and the practical
training with troops. This method of training is suited to all arms and
services, and in view of its practical value is constantly employed by
unit commanders in the training of their officers and non-
commissioned officers.
Any class of military operations may be practiced, such as the
operations of covering troops—advance guards, flank guards and
outposts; the operations of the various kinds of patrols; combat—
attack and defense; approach march and deployment, and the
tactical cooperation of all special arms.
The Director
The smooth working and success of the Terrain Exercise depends
almost entirely on the ability and tactical knowledge of the Director,
the care he devotes to the selection of the ground, the preparation
of the problem, and his own personal preparation for the conduct of
the Terrain Exercise. To this end a study should be made of the
tactical training it is desired to impart. A problem designed to bring
out these points should be drawn up and fitted to the ground. The
successive special situations must follow in logical sequence.
The Director must have in his mind a solution of the various
situations of the problem and must familiarize himself with all of its
phases to the extent that he will be able to make reasonable answer
to any question that may be propounded.
He must receive all the ideas presented by the members of the
class; take out the good and tactfully discard the poor and
indifferent. He must take care that he does not unduly criticize the
members of the class when they make mistakes and faulty
dispositions. Above all, he must never hold up a solution to ridicule.
Preparation of the Problem
Having determined upon the tactical subject to be studied, the
next essential is a problem, clearly and tersely stated, logically
drawn and easily understood. The several tactical situations should
follow one another in their natural sequence. Each should bring out
the tactical points that it is desired to impress upon the members of
the class. Long and complex situations, difficult for the average man
to grasp, should be avoided. Situations should be interesting and
instructive, natural and simple.
The next step is to fit the problem to a particular section of the
terrain that may be available. In this connection it is well to draw up
a tentative problem with its several situations. Then go out on the
ground and fit the problem to it.
The Director should carefully work out on the ground beforehand
the several situations that he desires to develop. He should work out
the details of all possible solutions and prepare himself to discuss
the advantages and disadvantages of measures that may be
proposed by members of the class and to state the solution that he,
himself, prefers, with the reasons therefor.
A sufficient number of copies of the initial problem, together with
the special situations, should be prepared so that a copy may be
available for each member of the class. This is a more satisfactory
method than the Director explaining them verbally. Time is saved
and misunderstandings avoided. The special situations are numbered
serially and issued at the proper time, as the Exercise progresses. It
is a good idea to have an envelope in which to carry the cards or
slips of paper bearing each special situation.
General Conduct of a Terrain Exercise
The problem will ordinarily consist of a general situation and
several situations.
Take the class to the point where the Exercise is to begin.
Distribute copies of the problem and allow a few minutes for the
members of the class to look over the problem and the terrain. The
Director then reads the problem aloud and points out the
topographical features and places that are referred to. The members
of the class follow from the copies in their possession.
Questions are asked by the Director. One or more members of the
class are required to make a brief statement of the problem, the
idea being to make certain that every man is entirely familiar with
the tactical situation under consideration. This insures a solid
foundation on which the succeeding situations may be developed.
The first situation is then handed to members of the class. The
Director cautions them that each man is to consider himself as being
the commander of the unit whose operations are to be considered.
The solution of the situation is then proceeded with. This solution
may be required to be reduced to writing; it may be given orally; or
a combination of the two systems may be employed.
For example: The situation involves the preparation of a verbal
field order. The Director proceeds step by step with the details of the
matter to be included in each successive paragraph, arriving at a
decision as to just what the wording should be.
1. Information of the enemy and our supporting troops.
2. Plan of the commander.
3. Distribution of troops and tactical order for each element.
4. Administration arrangements, where applicable.
5. Place of commander or where messages are to be sent.
Having determined upon the wording of each paragraph, the
members of the class are required to write out the body of the order.
Where the members of the class have sufficiently progressed in
their tactical training some of the preliminary discussion and solution
may be omitted and the men be required to write out the body of
the order based on the tactical situation. The written solutions are
collected by the Director and redistributed to the class, taking care
that no man receives his own solution back again. This is productive
of good results, for if a man knows that his work is to be seen by
another he will put forth his best effort and be more careful with his
work. Again, the entire solution may be given orally and nothing
reduced to writing. In this case the Director brings out the elements
by questions and discussion, and in the end one or more members
of the class are called upon to state the contents of the body of the
order. This method is excellent for the training of officers in the
giving of verbal tactical orders.
The solution having been completed, the subject is opened up for
discussion. The members of the class are encouraged to ask
questions and express their views on the various elements under
consideration.
The class is then conducted to the place where the next special
situation is to be taken up for solution, and here the same procedure
as outlined above is taken. The Terrain Exercise concludes with a
short conference, in which the Director makes a résumé of the
problems, discusses the several lessons of the day, and shows the
application of tactical principles to them.
General Rules
The following general rules should be observed as far as
practicable:
a. Weather and climatic conditions should be accepted as they
actually exist on the day of the Exercise.
b. Interest is best maintained by bringing up a succession of
instructive situations, each designed to teach some tactical lesson,
dealing with each one concisely but thoroughly, and promptly
passing on to the next. Long discussion and personal arguments
between members of the class are to be avoided. Unimportant
phases are passed over quickly, thus allowing the requisite amount
of time to be devoted to those that are really worth while.
c. Ordinarily four or five situations are about all that may be
profitably included in one Terrain Exercise.
d. All members of the class should be equipped with blank paper
of uniform size (to facilitate the handling of written solutions),
message blanks, pencils, sketching equipment for making rough
sketches on which tactical depositions may be shown.
e. Ordinarily large scale maps should not be used. One of the
valuable features of the Terrain Exercise is that all tactical decisions
and dispositions are based on a study of the ground itself. If the
members of the class are allowed to have large scale maps, the
exercise may resolve itself into the solution of a map problem
whereby the advantage of the study of the ground itself is detracted
from.
However, sheets of the United States Geological Survey maps
should, if practicable, be obtained and issued, as it is desirable to
accustom officers and non-commissioned officers to work with small
scale maps and to familiarize them with this particular map.
f. The number of men in a class should be limited to the number
that one director is able to handle.
Terrain Exercise No. 1.
Attack of Strong Point—Rifle Company

General Situation:
The (a) forms the boundary between hostile States. An invading
Red force was counter attacked by Blue troops and after severe
fighting the Reds have retired. The Blue advance has been
stubbornly contested.
Special Situation—Blue:
The Blue advance was resumed this morning. The 1st Infantry
advancing on the extreme right of the Blue line, has been held up.
After a short delay, the 2nd battalion resumed its forward
movement, but attempts of the assault waves of companies A and B
(on its right) to advance beyond (b) were stopped by fire from the
front and especially by enfilading machine gun fire from (c).
Heavy firing—artillery and small arms—can be heard along the line
to the left. Shells fall occasionally within and in front of the area
occupied by the 1st battalion.
Lieutenant Colonel X, commanding the 1st battalion, has arrived at
this point (d) accompanied by a part of his staff; Captain C,
commanding the support company C; Captain D, commanding the
machine gun company; and Lieutenant Z, commanding a platoon of
the Howitzer company, which organization has been attached to the
battalion.
After studying the situation in his front Lieutenant Colonel X
summoned Captains A and B, commanding the assault companies,
and issued verbal orders for continuing the attack.

Explanation of Letter Symbols

(a) In designating the boundary line some natural topographical


feature should be selected, such as a river, creek, canal, crest of
ridge, etc. In this problem it may be assumed that the Red invading
force has advanced several miles into Blue territory before its
advance was checked by the counter-attack.
(b) The general front occupied by the 1st battalion where it is held
up by the fire from the front and that from the enemy strong point
to the right front. In fitting this problem to the ground care will have
to be taken to get all the features properly coordinated. The line of
departure for Company C may be selected first and the general line
of the 1st battalion prolonged to the left. Then select the location of
the strong point with reference to the line of departure of Company
C. Cover for the deployment of the company should be available.
(c) Location of the enemy strong point. This should be some
topographical feature that might be logically occupied as a strong
point by the enemy and from which the advance of the 1st battalion
might be interfered with.
(d) This point should be near the center of the front covered by
the 1st battalion and should command a view of the front. There
should be reasonable cover for the battalion commander and his
staff. In other words, it should not be so exposed to enemy fire that
the battalion commander could not go there to make his personal
reconnaissance.

Procedure

The class will be assembled at (d) where the Terrain Exercise is to


begin.
The Director distributes the sheets containing the problem
(General Situation and Special Situation—Blue). A few minutes are
allowed the members of the class to read over the problem after
which the Director will read it aloud and point out the places of
importance. One or more members of the class will be called upon
to state his understanding of the tactical situation.
Care will be taken to indicate the right of the line occupied by
Company A and the location of the enemy strong point will be
accurately pointed out.

Explanation
The Director: “Before going further into the problem it is
necessary for every member of the class to have an accurate
understanding of the formation in which the first battalion is
advancing. It is necessary for you to visualize the situation just as it
would appear if the operation were actually taking place.”
The battalion is advancing in attack formation with two companies
as assault companies (Company A is on the right and Company B on
the left) and one company (C) as battalion reserve. The front
covered is about 750 yards. The right of Company A is at (indicate).
Company C is marching about the center of the battalion sector and
about 500 yards in rear of the front lines of the assault companies.
The 1st battalion, being on the right of the Blue line has a combat
patrol of one squad from the battalion reserve covering the right
flank. This patrol is advancing about 150 yards to the right and rear
of the assault echelon. A connecting group of two or three men also
from the reserve company, maintains communication with the 2nd
battalion on the left. As the reserve company may be called into
action at any moment, these detachments are taken from the
support platoon of the company, the 3rd. The battalion commander
and his staff march between the assault echelon and the reserve
company.
When the battalion was held up by the enemy, information of this
fact was sent back to Lieutenant Colonel X by the commanders of
the assault companies and it was also brought back by the battalion
intelligence scouts who are with the assault companies. On receipt
of the information Lieutenant Colonel X came forward to this point to
ascertain the situation and by a personal reconnaissance, see it for
himself. Accompanying him were his staff officers Bn-2; Bn-3,
Captains C and D; and Lieutenant Z. This is the situation in which we
find the battalion commander at the beginning of this Terrain
Exercise. I hope every member of the class understands this
formation and all the details of it. If there are any doubts about it
now is the time to clear them up. If there are no questions we will
proceed.
Procedure

The Director will now distribute the sheets bearing Situation No. 1.
The Problem
Situation No. 1:
You, Captain C, commanding Company C, the battalion reserve,
took down the following notes from the battalion commander’s
orders:
“The 1st battalion will resume its advance, attacking the enemy in front and
enveloping his left, including the strong point.”
“Time of attack—signal from battalion commander.”
“Line of departure—present front line.”
“Companies A and B make frontal attack covering present front of 750
yards. Company A, Base Company.”
“Company C will attack the strong point, enveloping its left.”
“One platoon company D and the 1st platoon Howitzer Company will
support the attack of Company C. Captain D and Lieutenant Z will confer with
Captain C regarding the assistance to be rendered.”
“Captain C will notify the battalion commander when he is ready to attack.”
“The attack will be pushed hard.”
You, Captain C, have with you three platoon runners and two
company runners.
Required:
Your action and orders during the next 20 minutes.

Procedure

A few minutes are allowed the members of the class to look over
the situation. It is then read aloud and the necessary explanations
made.
The Director: “Lieutenant Williams, what is the formation of
Company C, at the time the battalion commander’s order is received
by Captain C?”
Lieutenant Williams: “The formation would depend upon the cover
available, the distance from the front line and the class of fire it is
being subjected to. In this case I should say that the company will
be in dispersed formation either in squad columns or platoon
columns. I would prefer the platoon columns because they are more
easily controlled. I think I would have each platoon in a platoon
column. The first and second platoons would march abreast with an
interval of at least 40 yards with the third platoon marching about 50
yards to the rear and opposite the interval between the first and
second. Company headquarters would be in the lead.”
The Director: “That seems to be a very good formation under the
circumstances.”
(Note.—The Director should prepare an answer to this question based on
the lay of the ground.)
“How do you arrive at the interval of 40 yards between the two
leading platoons?”
Lieutenant Williams: “That is about the minimum distance to avoid
casualties in more than one column from the burst of one shell and
it is about the maximum distance for control and visibility in the
woods.”

Solution

The Director: “Captain Hastings, let us assume that you are


Captain C. You have received the orders of the battalion commander.
What is your mission?”
Captain Hastings: “To attack the enemy’s strong point enveloping
its left.”
The Director: “In sizing up the situation what points would you
consider?”
Captain Hastings: “I would consider the enemy’s position, and if
possible, go to a point where I can make a personal reconnaissance
of it. I would consider the route by which I can get my company up
to the point where I can make the attack and select the line of
departure for the company. I will then decide upon my plan of
maneuver and the formation of the company for attack.”
The Director: “In other words, you will make an Estimate of the
Situation and upon this you will base your decision and in turn your
orders?”
Captain Hastings: “Yes, sir. That is the idea.”
The Director: “I want to emphasize the necessity for this process
of sizing up the situation on the part of all officers charged with a
tactical operation. If you come to a decision without doing so you
may be right and you may be wrong. The chances are greatly in
favor of the latter. If you stop and consider the elements of the
problem as outlined by Captain Hastings the chances are that you
will be right. In any event you have the odds on your side.
Lieutenant Wallace, what troops have been designated to support
your company?”
Lieutenant Wallace: “A part of the machine gun company and a
howitzer platoon.”
The Director: “You will note that these two units have been
ordered to support your attack. They are not attached to your
company. What do you understand to be the difference between a
supporting unit and an attached unit?”
Lieutenant Wallace: “An attached unit becomes an integral part of
the force and is subject to its commander’s orders. A supporting unit
receives its orders, not from the commander of the force being
supported, but from another source, usually a common superior.”
The Director: “That is right. I hope you all note the distinction. It
is the rule, however, that the supporting unit must work with the
unit that it is supporting in every way possible so as to insure
teamwork in the accomplishment of the common mission.”
“Lieutenant Ralston, how would you get your instructions to your
platoon leaders, who are back with the company?”
Lieutenant Ralston: “I have a runner with me from each of the
three platoons. I would send these runners back to their respective
platoons to tell the platoon commanders to report to me at
___________” (Lieutenant Ralston would indicate where the platoon
commanders are to report.)
The Director: “Let us assume that you are Captain C. Just what
would you say to the runners?”
Lieutenant Ralston: “I would call the platoon runners to me and
say:
“‘Do you see that ___________?’ (Designating a tree or other well defined
object.) ‘Each platoon runner will deliver this message to his platoon leader—
Platoon leaders will join Captain C at once at ___________ (Place). Repeat
the message.’”
The Director: “All right. Now let us assume that the platoon
runners have started back to their platoons, what would you do
now?”
Lieutenant Ralston: “I would go over to the right to make a
personal reconnaissance of the enemy strong point, select my line of
departure for the attack and get the ‘line-up’ of the supporting
weapons.”
The Director: “That would seem to be the reasonable thing to do.”
The Class is now conducted over to the right, to a point about the
center of the line of departure for the attack.
The Director: “Captain Harvey, let us assume that you have come
to this point. You have with you the commanders of the machine
gun company, Captain D, and the Howitzer platoon, Lieutenant Z.
You decide that the line of departure for your attack shall be along
here (indicating). What instructions would you give to Captain D and
Lieutenant Z?”
Captain Harvey: “I would indicate to them where I want the
machine guns, light mortars, and one-pounders to be located to
support the attack.”
The Director: “You would tell exactly where to place the weapons,
would you?”
Captain Harvey: “Yes, sir.”
The Director: “Captain Hodges, do you agree with that solution to
the problem?”
Captain Hodges: “No, sir, I do not. It seems to me that it would be
better for Captain C to indicate to Captain D and Lieutenant Z the
dispositions that he proposes to make—where the line of departure
is to be and the direction of the attack. Then to leave it up to those
officers to select the firing positions for the weapons. I think Captain
C would verify the positions selected, but he would at least give the
men who are supposed to be the experts an opportunity to use their
knowledge of the subject.”
The Director: “I think you are right. I believe in requiring every
man to do his job. These officers have been ordered to support the
attack. It is up to them to select the position where they can get the
best fire effect with their weapons and to get them into position
ready to do business.”
“What precautions would you take to indicate the place where the
platoon leaders are to assemble, Captain James?”
Captain James: “I would send one of my company runners to the
assembly point and order him to tell the platoon leaders to wait
there for me.”
The Director: “I think that is a wise precaution. You do not want
to take a chance on anything going wrong and failing to effect an
assembly of the platoon leaders.”
“Now, let us consider how the attack is to be made. What would
be your tactical dispositions, Captain James?”
Captain James: “I would attack with one Platoon (the first),
advancing directly against the enemy strong point, and another (the
second) working around the enemy’s left flank and enveloping it. I
would hold the remaining platoon (the third) as company support.”
The Director: “Where is your line of departure?”
Captain James: “My line of departure would be along here. The
right of the first platoon would be (indicate). The left of the second
platoon will be (indicate). Each platoon will cover about 150 yards of
front. The third platoon will follow in rear of the second platoon as
company support.”
The Director: “That seems to be a logical disposition. Now having
decided all of this you should give the information to Captain D and
Lieutenant X so they can go about the task of selecting positions for
their weapons. How would you do this, Lieutenant Baker?”
Lieutenant Baker: “Assuming that Lieutenant Z and Captain D
have been with me all the while, I would say:
“‘My first platoon will attack with its right about (indicate). The second
platoon with its left about (indicate). Each will cover a front of about 150
yards. Select your firing positions to cover the attack.’
“That is all that should be required. Before issuing final orders for
the attack I would verify the positions selected.”

Explanation

The Director: I hope you have all followed the process that we
have gone through during the 20 minutes, in order to arrive at a
decision and the point where Captain C is ready to issue his orders
for the attack. Let us review them briefly:
1. Send for the platoon commanders to come to the front.
2. Accompanied by Captain D and Lieutenant Z, and two runners,
make a personal reconnaissance of the enemy’s position and the
terrain and determine:
(a) The line of departure.
(b) The tactical formation.
(c) Direction of the attack.
(d) The position of the supporting weapons.
3. Arrange for a rendezvous where the attack order can be issued.
From all of this you will appreciate that there are many things that
must be done before an attack of this kind can be launched.
Battalion and other commanders should appreciate that it takes time
to do all of these things and should have patience with the officers
whom he has ordered to do it.
Attack of Strong Point
Card No. 1
Director’s Key
1. Assemble class at initial point where the Terrain Exercise is to begin.
2. Distribute sheets containing the general situation and special
situation Blue. Read and explain. Have members of class state
understanding of situation.
3. Formation of battalion for attack—Assault companies, reserve
company, covering patrol on right, connecting patrol on left.
4. Information system.
5. Distribute Situation No. 1. Read and discuss.
6. Formation of Company C.
7. Mission of Company C. Personal Reconnaissance. Estimate of the
situation. Attached and supporting units.
8. Message to platoon commanders.
9. Proceed to right and make personal reconnaissance. Firing position
for the auxiliary weapons.
10. Mark assembly point for platoon commanders.
11. Tactical dispositions. Line of departure. Instructions to Captain D
and Lieutenant Z.
12. Resumé of what has taken place.
The Problem
Situation No. 2:
The platoon commanders have assembled at the appointed
rendezvous. You, Captain C, have come to a decision to attack the
enemy strong point with two platoons and hold the third as company
support.
Required:
The orders that you would issue for the attack.

Procedure

The Director distributes the sheets bearing Situation No. 2, reads


it aloud and makes such explanation as may be necessary.

Explanation

The Director: “Before going further with the problem I desire to


again call your attention to the five paragraph field order that we
use in our service. This form of field order was evolved before the
war and used in our service schools. It is prescribed by our Field
Service Regulations. When we entered the war and our troops went
to France we found on both the British and French fronts a system
of field orders that did not agree with our American ideas. The
orders were most voluminous. They went into every detail of
procedure and left little to the initiative of the commanders of
tactical units. The consequence was that many of these commanders
lost their initiative. When their orders ran out and nothing further
had been prescribed for them to do, they just naturally did not know
what to do and stopped until more orders were sent up to them. I
am not so sure but what this system was responsible in the

You might also like