100% found this document useful (1 vote)
579 views

Pandas Cookbook Recipes for Scientific Computing Time Series Analysis and Data Visualization using Python 1st Edition Theodore Petrou - Download the ebook now to never miss important content

The document provides information about various eBooks available for download at ebookmeta.com, including titles focused on data analysis and scientific computing using Python, such as 'Pandas Cookbook' by Theodore Petrou. It also highlights additional recommended digital products and offers links for instant downloads. Furthermore, it includes details about the author and contributors of the 'Pandas Cookbook' along with acknowledgments and a brief overview of the book's content structure.

Uploaded by

uzedaevtim
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
579 views

Pandas Cookbook Recipes for Scientific Computing Time Series Analysis and Data Visualization using Python 1st Edition Theodore Petrou - Download the ebook now to never miss important content

The document provides information about various eBooks available for download at ebookmeta.com, including titles focused on data analysis and scientific computing using Python, such as 'Pandas Cookbook' by Theodore Petrou. It also highlights additional recommended digital products and offers links for instant downloads. Furthermore, it includes details about the author and contributors of the 'Pandas Cookbook' along with acknowledgments and a brief overview of the book's content structure.

Uploaded by

uzedaevtim
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 73

Read Anytime Anywhere Easy Ebook Downloads at 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 EBOOK

Visit and Get More Ebook Downloads Instantly at https://ebookmeta.com


Recommended digital products (PDF, EPUB, MOBI) that
you can download immediately if you are interested.

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

The Junkyard Druid Box Set 2 Book 5 8 2nd Edition M D


Massey Et El

https://ebookmeta.com/product/the-junkyard-druid-box-
set-2-book-5-8-2nd-edition-m-d-massey-et-el/

ebookmeta.com
The Ritual 1st Edition Anya Merchant

https://ebookmeta.com/product/the-ritual-1st-edition-anya-merchant/

ebookmeta.com

Health Literacy New Directions in Research Theory and


Practice 1st Edition R.A. Logan

https://ebookmeta.com/product/health-literacy-new-directions-in-
research-theory-and-practice-1st-edition-r-a-logan/

ebookmeta.com

First Bites A First in Series Collection 1st Edition Skye


Alder

https://ebookmeta.com/product/first-bites-a-first-in-series-
collection-1st-edition-skye-alder/

ebookmeta.com

Handbook of Algal Biofuels Mostafa El-Sheekh

https://ebookmeta.com/product/handbook-of-algal-biofuels-mostafa-el-
sheekh/

ebookmeta.com

Big Data and Mobility as a Service 1st Edition Haoran


Zhang

https://ebookmeta.com/product/big-data-and-mobility-as-a-service-1st-
edition-haoran-zhang/

ebookmeta.com
An Analysis of David C Kang s China Rising Peace Power and
Order in East Asia 1st Edition Matteo Dian

https://ebookmeta.com/product/an-analysis-of-david-c-kang-s-china-
rising-peace-power-and-order-in-east-asia-1st-edition-matteo-dian/

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 service@packtpub.com 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 customerreviews@packtpub.com . 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
ecosystem for data exploration and analysis. It is tremendously
capable of inspecting, cleaning, tidying, filtering, transforming,
aggregating, and even visualizing (with some help) all types of data.
It is not a tool for initially capturing the data, nor is it a tool to build
machine learning models.

For many data analysts and scientists who use Python, the vast
majority of their work will be done using pandas. This is likely
because the initial data exploration and preparation tend to take the
most time. Some entire projects consist only of data exploration and
have no machine learning component. Data scientists spend so much
time on this stage that a timeless lore has arisen--Data scientists
spend 80% of their time cleaning the data and the other 20%
complaining about cleaning the data.

Although there is an abundance of open source and free


programming languages available to do data exploration, the field is
currently dominated by just two players, Python and R. The two
languages have vastly different syntax but are both very capable of
doing data analysis and machine learning. One measure of popularity
is the number of questions asked on the popular Q&A site, Stack
Overflow (https://insights.stackoverflow.com/trends ):
While this is not a true measure of usage, it is clear that both Python
and R have become increasingly popular, likely due to their data
science capabilities. It is interesting to note that the percentage of
Python questions remained constant until the year 2012, when data
science took off. What is probably most astonishing about this graph
is that pandas questions now make up a whopping one percent of all
the newest questions on Stack Overflow.

One of the reasons why Python has become a language of choice for
data science is that it is a fairly easy language to learn and develop,
and so it has a low barrier to entry. It is also free and open source,
able to run on a variety of hardware and software, and a breeze to
get up and running. It has a very large and active community with a
substantial amount of free resources online. In my opinion, Python is
one of the most fun languages to develop programs with. The syntax
is so clear, concise, and intuitive but like all languages, takes quite a
long time to master.

As Python was not built for data analysis like R, the syntax may not
come as naturally as it does for some other Python libraries. This
actually might be part of the reason why there are so many Stack
Overflow questions on it. Despite its tremendous capabilities, pandas
code can often be poorly written. One of the main aims of this book
is to show performant and idiomatic pandas code.

For all its greatness, Stack Overflow, unfortunately perpetuates


misinformation and is a source for lots of poorly written pandas. This
is actually not the fault of Stack Overflow or its community. Pandas is
an open source project and has had numerous major changes, even
recently, as it approaches its tenth year of existence in 2018. The
upside of open source, though, is that new features get added to it
all the time.

The recipes in this book were formulated through my experience


working as a data scientist, building and hosting several week-long
data exploration bootcamps, answering several hundred questions on
Stack Overflow, and building tutorials for my local meetup group. The
recipes not only offer idiomatic solutions to common data problems,
but also take you on journeys through many real-world datasets,
where surprising insights are often discovered. These recipes will also
help you master the pandas library, which will give you a gigantic
boost in productivity. There is a huge difference between those who
have only cursory knowledge of pandas and those who have it
mastered. There are so many interesting and fun tricks to solve your
data problems that only become apparent if you truly know the
library inside and out. Personally, I find pandas to be a delightful and
fun tool to analyze data with, and I hope you enjoy your journey
along with me . If you have questions, please feel free to reach out
to me on Twitter: @TedPetrou .
What this book covers
Chapter 1 , Pandas Foundations, covers the anatomy and vocabulary
used to identify the components of the two main pandas data
structures, the Series and the DataFrame. Each column must have
exactly one type of data, and each of these data types is covered.
You will learn how to unleash the power of the Series and the
DataFrame by calling and chaining together their methods.

Chapter 2 , Essential DataFrame Operations , focuses on the most


crucial and common operations that you will perform during data
analysis.

Chapter 3, Beginning Data Analysis , helps you develop a routine to


get started after reading in your data. Other interesting discoveries
will be made.

Chapter 4, Selecting Subsets of Data , covers the many varied and


potentially confusing ways of selecting different subsets of data.

Chapter 5, Boolean Indexing , covers the process of querying your


data to select subsets of it based on Boolean conditions.

Chapter 6 , Index Alignment , targets the very important and often


misunderstood index object. Misuse of the Index is responsible for
lots of erroneous results, and these recipes show you how to use it
correctly to deliver powerful results.

Chapter 7, Grouping for Aggregation, Filtration, and Transformation ,


covers the powerful grouping capabilities that are almost always
necessary during a data analysis. You will build customized functions
to apply to your groups.
Chapter 8, Restructuring Data into Tidy Form , explains what tidy
data is and why it’s so important, and then it shows you how to
transform many different forms of messy datasets into tidy ones.

Chapter 9, Combining Pandas Objects , covers the many available


methods to combine DataFrames and Series vertically or horizontally.
We will also do some web-scraping to compare President Trump's
and Obama's approval rating and connect to an SQL relational
database.

Chapter 10, Time Series Analysis , covers advanced and powerful time
series capabilities to dissect by any dimension of time possible.

Chapter 11 , Visualization with Matplotlib, Pandas, and Seaborn ,


introduces the matplotlib library, which is responsible for all of the
plotting in pandas. We will then shift focus to the pandas plot
method and, finally, to the seaborn library, which is capable of
producing aesthetically pleasing visualizations not directly available
in pandas.
What you need for this book
Pandas is a third-party package for the Python programming
language and, as of the printing of this book, is on version 0.20.
Currently, Python has two major supported releases, versions 2.7
and 3.6. Python 3 is the future, and it is now highly recommended
that all scientific computing users of Python use it, as Python 2 will
no longer be supported in 2020. All examples in this book have been
run and tested with pandas 0.20 on Python 3.6.

In addition to pandas, you will need to have the matplotlib version


2.0 and seaborn version 0.8 visualization libraries installed. A major
dependence for pandas is the NumPy library, which forms the basis
of most of the popular Python scientific computing libraries.

There are a wide variety of ways in which you can install pandas and
the rest of the libraries mentioned on your computer, but by far the
simplest method is to install the Anaconda distribution. Created by
Continuum Analytics, it packages together all the popular libraries for
scientific computing in a single downloadable file available on
Windows, Mac OSX, and Linux. Visit the download page to get the
Anaconda distribution (https://www.anaconda.com/download ).

In addition to all the scientific computing libraries, the Anaconda


distribution comes with Jupyter Notebook, which is a browser-based
program for developing in Python, among many other languages. All
of the recipes for this book were developed inside of a Jupyter
Notebook and all of the individual notebooks for each chapter will be
available for you to use.

It is possible to install all the necessary libraries for this book without
the use of the Anaconda distribution. For those that are interested,
visit the pandas Installation page (http://pandas.pydata.org/pandas-docs/st
able/install.html ).
Running a Jupyter Notebook
The suggested method to work through the content of this book is to
have a Jupyter Notebook up and running so that you can run the
code while reading through the recipes. This allows you to go
exploring on your own and gain a deeper understanding than by just
reading the book alone.

Assuming that you have installed the Anaconda distribution on your


machine, you have two options available to start the Jupyter
Notebook:

Use the program Anaconda Navigator


Run the jupyter notebook command from the Terminal/Command
Prompt

The Anaconda Navigator is a GUI-based tool that allows you to find


all the different software provided by Anaconda with ease. Running
the program will give you a screen like this:
As you can see, there are many programs available to you. Click
Launch to open the Jupyter Notebook. A new tab will open in your
browser, showing you a list of folders and files in your home
directory:

Instead of using the Anaconda Navigator, you can launch Jupyter


Notebook by opening up your Terminal/Command Prompt and
running the jupyter notebook command like this:

It is not necessary to run this command from your home directory.


You can run it from any location, and the contents in the browser will
reflect that location.

Although we have now started the Jupyter Notebook program, we


haven't actually launched a single individual notebook where we can
start developing in Python. To do so, you can click on the New button
on the right-hand side of the page, which will drop down a list of all
the possible kernels available for you to use. If you just downloaded
Anaconda, then you will only have a single kernel available to you
(Python 3). After selecting the Python 3 kernel, a new tab will open in
the browser, where you can start writing Python code:

You can, of course, open previously created notebooks instead of


beginning a new one. To do so, simply navigate through the
filesystem provided in the Jupyter Notebook browser home page and
select the notebook you want to open. All Jupyter Notebook files end
in .ipynb . For instance, when you navigate to the location of the
notebook files for this book, you will see all of them like this:
Who this book is for
This book contains nearly 100 recipes, ranging from very simple to
advanced. All recipes strive to be written in clear, concise, and
modern idiomatic pandas code. The How it works... sections contain
extremely detailed descriptions of the intricacies of each step of the
recipe. Often, in the There's more... section, you will get what may
seem like an entirely new recipe. This book is densely packed with
an extraordinary amount of pandas code.

As a generalization, the recipes in the first six chapters tend to be


simpler and more focused on the fundamental and essential
operations of pandas than the last five chapters, which focus on
more advanced operations and are more project-driven. Due to the
wide range of complexity, this book can be useful to both the novice
and everyday user alike. It has been my experience that even those
who use pandas regularly will not master it without being exposed to
idiomatic pandas code. This is somewhat fostered by the breadth
that pandas offers. There are almost always multiple ways of
completing the same operation, which can have users get the result
they want but in a very inefficient manner. It is not uncommon to
see an order of magnitude or more performance difference between
two sets of pandas solutions to the same problem.

The only real prerequisite for this book is fundamental knowledge of


Python. It is assumed that the reader is familiar with all the common
built-in data containers in Python, such as lists, sets, dictionaries,
and tuples.
Exploring the Variety of Random
Documents with Different Content
afterward were erected not farre from that place the Armes of
England ingraven in lead, and infixed upon a pillar of wood.”
The next step was to grant in fee farms, or parcels of land, lying
by the waterside on this and neighbouring harbours, the grantees
covenanting to pay a certain rent and service to Sir Humphrey, his
heirs and assigns, and yearly to maintain possession by themselves
or their assigns. Thus the grantees were assured of grounds
convenient to dress and dry their fish, which had not previously
been enjoyed, the first comers into these harbours in the fishing
season taking possession of the available places.
While this business was going forward by the chiefs the men of
the company were divided into groups and each group assigned to a
particular work. One group were set at repairing and trimming the
ships; another at the collection of supplies and provisions. Others
were delegated to search the commodities and “singularities” of the
region and report to the general all they could learn either from their
own observations or from those who had longest frequented this
coast. Another group were to obtain the elevation of the pole, and to
draw plats of the country “exactly graded.”
Meanwhile Sir Humphrey and his principal men were being right
royally entertained by the fishing-ship owners and masters, who,
with their crews, constituted the European population of the place
during the fishing season. It was the rule to choose the “admirals,”
practically the governors of the community, anew each week, or
rather they succeeded in orderly course, and to solemnize the
change with a weekly “admirals’ feast.” The general and the captains
and masters of his fleet were not only guests at this feast, but they
were continually invited to other banquets. Even with the
“abundance at home” in England, such entertainment as they
received would have been delightful, says the chronicler: but here, in
this “desolate corner of the world, where at other times of the yeare
wild beasts and birds have only the fruition of all those countries,” it
was more acceptable to them and of greater “contentation.” Also the
supplies furnished them for their ships, for which all the fishermen in
the harbours, “strangers” as well as English, were taxed, were
unexpectedly rich and abundant. The Portuguese fishermen were
the most liberal contributors. Wines were received in generous
quantity; marmalades, “most fine ruske or biskit, sweet oyles, and
sundry delicacies.” There were, too, brought them daily quantities of
salmon, trout, lobsters, and other fish.
The group assigned to inquire into the “singularities” of the region
were directed among other things to look for metals, and the
mineral man and refiner was particularly charged by Sir Humphrey
to be diligent in the search for ore. This expert was a “Saxon borne,
honest and religious, named Daniel,” upon whose conservative
judgment Sir Humphrey relied. Daniel first came upon “some sort of
Ore seeming rather to be yron than other metall.” The next find was
more important and was displayed by him to Sir Humphrey with “no
small shew of contentment.” Indeed, so sure was he that his
specimens were evidences of silver in abundance that he was ready
to pledge his life, which was “as deere unto him as the Crowne of
England unto her Majesty,” if it should not fall out accordingly. If
silver were the thing that would satisfy the general and his
associates in England, Daniel advised him to seek no farther. The
rich thing was here. Sir Humphrey would have acted upon his advice
if his “private humour” only was to be satisfied. But the promise to
his friends, and the “necessitie to bring the South countreys within
compasse of the patent nearly expired, as they had already done in
these North parts,” made it imperative for him to continue on his
course as originally planned. So he had the samples secretly placed
on board of one of the ships, and cautioned those who knew of the
find to say nothing about it while they remained at St. John’s lest the
“foreigners” there—the “Portugals, Biscanes, and Frenchmen”—
should learn of it; when they were again safe at sea the ore should
be tested, and if it were then desired he would bring the company
back to St. John’s.
By this time disorder had appeared among the rougher elements
of the company, and some were plotting mischief. A number were
discovered scheming to steal the ships at an opportune moment
when the general and captains were on shore, and make off with
them, perhaps on a buccaneering cruise. But this happily was nipped
in the bud. Others banding together seized a fishing bark full laden
in a neighbouring harbour and set the fishermen ashore. A larger
number hid themselves in the woods, intending to return home by
such shipping as daily left the coast. Many of the loyal members fell
sick and several died. Numbers in ill health were licensed by the
general to return to England as best they could. Thus by one means
and another the company were much diminished, and when it was
decided to start for the voyage southward there were scarcely
enough sound men to furnish the ships.
In this dilemma Sir Humphrey thought it better to drop the
“Swallow” out of the fleet and send her home to England with the
sick members. The captain of the “Delight” was assigned to take
charge of her, while her own captain and crew (including the fellows
who had indulged in piracy on the high seas) were shifted to the
“Delight.” The captain of the “Squirrel” was also relieved of his
command to return on the “Swallow.”
The remainder of the fleet, the “Delight,” the “Golden Hind,” and
the “Squirrel,”—supplied as generously as if they had been in a
“countrey or some Citie populous and plentiful of all things,” besides
necessities in fresh and dried fish and rusk, having rich stocks of
wines, marmalades, figs, lemons, and other delicacies, nets and lines
for fishing, and pinnaces “fit for discovery,”—set sail for the
continuance of the voyage on the twentieth of August, seventeen
days after their first arrival in St. John’s harbour: never to return to
this port. Sir Humphrey chose to sail in the “Squirrel” instead of in
the flagship, the smaller vessel being the more convenient for
exploring the coast and searching harbours and creeks. Accordingly
she was supplied from one of the other ships with additional
ordnance for protection in case of trouble, and so was overweighted,
which in the end wrought her ruin, as we shall presently see.
The course was taken toward Cape Breton with the intent to reach
the mainland of North America. Eight days were spent in this
navigation, all the time out of sight of land, the ships being hindered
by the current. On the seventh day they fell “into such flats and
dangers” that all barely escaped wreck, and two days later the
flagship,—the “Delight,”—went down with most of her men and all of
her cargo.
Now the narrative becomes tragic. “The maner how our Admirall
was lost” is thus circumstantially described, with due note of
“portents” that foreran the disaster.
"Upon Tuesday the 27 of August, toward the evening, our Generall
caused them in his frigat [the "Squirrel"] to sound, who found white
sande at 35 fadome, being then in latitude about 44 degrees.
"Wednesday toward night the wind came South and wee [the
"Golden Hind"] bare with the land all that night, Westnorthwest,
contrary to the mind of Master Cox [the “Golden Hind’s” master];
nevertheless we followed the Admirall deprived of power to prevent
a mischiefe, which by no contradiction could be brought to hold
other course, alleaging they could not make the ship to work better
nor to lie otherwaies.
"The evening was faire and pleasant, yet not without token of
storme to ensue, and most part of this Wednesday night, like the
Swanne that singeth before her death, they in the Admirall, or
Delight, continued a sounding of Trumpets, with Drummes, and
Fifes; also winding the Cornets, Haughtboyes; and in the end of their
jolitie, left with the battell and ringing of doleful knels.
"Towards the evening also we caught in the Golden Hinde a
mighty Porpose, with a harping yron, having first striken divers of
them, and brought away part of their flesh, sticking upon the yron,
but could recover onely that one. These also passing the Ocean in
heardes did portend storme. I omit to recite frivilous reportes by
them in the Frigat of strange voyces, the same night, which scarred
some from the helme.
"Thursday the 29 of August, the wind rose, and blew vehemently
at South and by East, bringing with all raine, and thick mist, so that
we could not see a cable length before us. And betimes in the
morning we were altogither runne and folded in amongst flats and
sands, amongst which we found shoale and deepe in every three or
four shippes length, after we began to sound: but first we were
upon them unawares, till master Cox looking out discerned (in his
judgement) white cliffes, crying (land) withall, though we could not
afterward descrie any land, it being very likely the breaking of the
sea white, which seemed to be white cliffes through the haze and
thicke weather.
"Immediately tokens were given unto the Delight to cast about to
seaward, which, being the greater ship and of burden 120 tunnes,
was yet foremost upon the beach, keeping so ill watch that they
knew not the danger before they felt the same, too late to recover
it: for presently the Admirall strooke a ground, and had soone after
her sterne and hinder partes beaten in pieces: whereupon the rest
(that is to say the Frigat on which was the Generall and the Golden
Hinde) cast about Eastnortheast, bearing to the South, even for our
lives into the windes eye, because that way caried us to the
seaward. Making out from this danger, we sounded one while seven
fadome, then five fadome, then foure fadome and lesse, againe
deeper, immediately foure fadome, then but three fadome, the sea
going mightily and high.
“At last we recovered (God be thanked) in some despaire, to sea
roome enough. In this distresse wee had vigilant eye unto the
Admirall, whom we saw cast away, without power to give the men
succour, neither could we espie of the men that leaped overboord to
save themselves, either in the same Pinnesse, or Cocke, or upon
rafters, and such like meanes, presenting themselves to men in
those extremities: for we desired to save the men by every possible
meanes. But all in vaine, sith God had determined their ruine: yet all
that day, and part of the next, we beat up and downe as neere unto
the wracke as was possible for us, looking out, if by good hap we
might espie any of them.”
In this wreck perished almost a hundred men. Among them was
Stephanus Parmenius, a learned Hungarian, who was to have been
the historian of the voyage. He had written a Latin poem, a few
years before, extolling Sir Humphrey’s achievements, which is
preserved in the Principal Navigations. While at St. John’s he wrote a
letter to the elder Richard Hakluyt, of the Middle Temple, briefly
recounting the events of the voyage to that time, which was
probably despatched on the returning “Swallow.” This letter Hakluyt
gives with the literature of this expedition. Daniel, the Saxon, was
another of the lost, and with him perished most of his evidences of
“inestimable riches” in silver at Newfoundland. Also went down with
this ship “cards and plats” that the draughtsmen had drawn, with
the due gradation of the harbours, bays, and capes. Captain Brown
stood by his ship to the last, refusing to take to the pinnace running
at her stern. He chose “rather to die then [than] to incurre infamie
by forsaking his charge, which then might be thought to have
perished through his default.” So, when all hope of saving her was
passed, exhorting his men “not to despair but strive to save what
they could,” he “mounted upon the highest decke where hee
attended imminent death and unavoidable.”
Fourteen escaped in the pinnace, and “committed themselves to
God’s mercy amiddest the storme and rage of sea and windes,
destitute of foode, not so much as a droppe of fresh water.” The little
boat was overloaded for such foul weather, and to lighten her one of
her company, Edward Headly, a “valiant soldier,” proposed that they
should cast lots, those upon whom the lots fell to be thrown
overboard, and offered himself with the first “content to take his
adventure gladly.” But Richard Clark, the master of their lost
“Delight,” who was of the number, protested, advising them “to
abide Gods pleasure, who was able to save all as well as a few.” So
they held together, and after six days and nights in the open ocean,
carried before the wind, they arrived on the coast of Newfoundland,
weak and famished, all save two,—the valiant soldier Headly, and a
sailor called “Brazil,” because of his travels in that country. Later they
were taken off by some kindly French fishermen, and ultimately
reached their homes by way of France.
The “Golden Hind” and the “Squirrel” continued for two days
“beating the sea up and downe,” expecting when the weather
cleared to bear in with the land which it was judged was not far off,
“either the continent or some Island.” But it remained thick and
blustering with increase of cold, and the men began to lose courage.
“The Leeside of us lay full of flats and dangers inevitable, if the wind
blew hard at South. Some againe doubted we were ingulfed in the
Bay of S. Lawrence, and coast full of dangers, and unto us
unknowen. But above all, provisions waxed scant, and hope of
supply was gone with losse of our Admirall. Those of the Frigat were
already pinched with spare allowance, and want of clothes chiefly.”
Thereupon the “Squirrel’s” men besought the general to head for
England before they all perished. “And to them of the Golden Hinde
they made signes of their distresse, pointing to their mouthes, and
to their clothes thinne and ragged: then immediately they of the
Golden Hinde grew to be of the same opinion and desire to return
home.”
Finally the return was agreed upon. Sir Humphrey expressed
himself satisfied with what he had seen and knew already, and
promised to set them forth again “right royally” the next spring if
“God sent them safe home.”
So in the afternoon of Saturday the thirty-first of August they
changed their course for the homeward run. At that very instant,
“even in the winding about,” a wondrous thing met their astonished
gaze.
Between them and toward the land they were now forsaking there
passed along a strange monster of the sea: a “very lion” to their
seeming, “in shape, hair, and colour, swimming after the maner of a
beast by mooving of his feete, but rather sliding upon the water with
his whole body (excepting the legs) in sight, neither yet diving
under, and againe rising above the water, as the maner is of Whales,
Dolphins, Tunise, Porposes, and all other fish: but confidently
shewing himselfe above water without hiding: Notwithstanding we
presented ourselves in open view and gesture to amase him, as all
creatures will be commonly at a sudden gaze and sight of men. Thus
he passed along turning his head to and fro, yawning and gaping
wide, with ougly demonstration of long teeth, and glaring eies, and
to bidde us farewell (comming right against the Hinde) he sent forth
a horrible voyce, roaring or bellowing as doeth a lion, which
spectacle wee all beheld so farre as we were able to discerne the
same, as men prone to wonder at every strange thing, as this
doubtless was, to see a lion in the Ocean sea, or fish in shape of a
lion. What opinion others had thereof, and chiefly the Generall
himselfe, I forbeare to deliver; but he took it for Bonum Omen,
rejoycing that he was to warre against such an enemie, if it were the
devill.”
The wind was “large” for England at the start but very high, and
the sea rough, insomuch that the “Squirrel” was almost swallowed
up. On Monday the general came aboard the “Golden Hind” to have
her surgeon dress his foot, which he had hurt by treading upon a
nail on the “Squirrel’s” deck. While here he and the “Hind’s” officers
“comforted ech other with hope of hard successe to be all past, and
of the good to come.” It was agreed that both ships should show
their lights always by night that they might keep together. The
general was entreated to remain on the “Hind,” where he would be
far safer than on the little “Squirrel,” but refused. Immediately after
his return to the “Squirrel” a sharp storm arose, but this both ships,
though in much peril, happily “overpassed.”
A morning or two later, the weather having at last become fair, the
general again came aboard the “Golden Hind” to “make merie
together with the Captaine, Master and company.” This was their last
meeting with him. He remained with them throughout the day till
nightfall. Their talk fell upon “affaires past and to come.” Sir
Humphrey lamented much the loss of the “Delight”: "more of the
men, but most of all of his bookes and notes," and of something else
which he avoided mentioning, but for which he was “out of measure
grieved.” This something the narrator gathered “by circumstance” to
be the ore specimens which had gone down with Daniel the Saxon.
“Whatsoever it was,” the narrator noted, “the remembrance touched
him so deepe as, not able to containe himselfe, he beat his boy [the
cabin boy] in great rage even at the same time so long after the
miscarying of the great ship, because upon a faire day, when wee
were becalmed upon the coast of the New found land, ... he [had]
sent his boy aboord the Admirall to fetch certaine things: amongst
which this [the ore] being chiefe was yet forgotten and left behind.
After which time he could never conveniently send againe aboord
the great ship, much lesse hee doubted her ruine so neere at hand.”
That Daniel the Saxon’s find and the existence of rich mines in
Newfoundland, which it seemed to warrant, had wrought a radical
change in Sir Humphrey’s plans, had become apparent in his actions
and in this last talk. Says the narrator, “Whereas the generall had
never before good conceit of these North parts of the world: now his
mind was wholly fixed upon the New found land. And as before he
refused not to grant assignments liberally to them that required the
same into these Northern parts, now he became contrarily affected,
refusing to make any so large grants especially in S. Johns.... Also
his expression of a determination in the Spring following for
disposing of his voyage then to be reattempted: he assigned the
captaine and master of the Golden Hind unto the South discovery,
and reserved unto himself the North, affirming that this voyage had
wonne his heart from the South, and that he was now become a
Northerne man altogether.”
Again he was vehemently entreated by the captain, master, and
others of his “well willers” to stay on the “Golden Hind” for the
remainder of the voyage. They dwelt on the preciousness of his life
and the dangerous condition of the “Squirrel” with her decks
overcharged with guns, small artillery, nettings “too cumbersome for
so small a boate that was to pass through the Ocean sea at that
season of the yere,” when much foul weather was to be expected.
But these entreaties were in vain as before. All were swept aside
with his final answer, “I will not forsake my little company going
homeward with whom I have passed so many stormes and perils.”
Since he would not “bend to reason,” such provisions as were
wanting on the “Squirrel” were furnished from the “Hind,” and then,
committing him to “God’s protection,” he was reluctantly and
sorrowfully set aboard his pinnace.
The ships were by this time more than three hundred leagues
onward of their way home. They had brought the Azores south of
them: but were then keeping much to the North to get into “the
height and elevation” of England. This attained they met with very
bad weather and terrible seas breaking short and high, “Pyramid
wise.”
Then came the final catastrophe.
"Munday the ninth of September, in the afternoone, the Frigat was
neere cast away, oppressed by waves, yet at that time recovered:
and giving forth signes of joy, the Generall sitting abaft with a booke
in his hand, cried out to us in the Hind (so oft as we did approach
within hearing), We are as neere to heaven by sea as by land.
Reiterating the same speech, well beseeming a souldier, resolute in
Jesus Christ, as I can testifie he was.
“The same Monday night, about twelve of the clocke, or not long
after, the Frigat being ahead of us in the Golden Hinde, suddenly her
lights were out, whereof as it were in a moment, we lost the sight,
and withall our watch cryed, the Generall was cast away, which was
too true. For in that moment the Frigat was devoured and swallowed
up of the Sea.”
All that night the “Golden Hinde” kept up a constant lookout
hoping to sight her again. But not a fragment of her could be seen
or a single survivor.
Then the “Hind” continued on the course alone, still maintaining
the lookout. At length, after “great torment of weather and perill of
drowning,” she came safely to a home port, with her doleful tale of
disaster, arriving at Falmouth on the twenty-second of September—a
Sunday.
XIX
FOOTPRINTS OF COLONIZATION

U pon the lamentable death of Sir Humphrey Gilbert, and the


consequent failure of his scheme of colonization, Walter Raleigh
immediately took up the cause energetically, with a view of
attempting a settlement on the continent in the milder southern
clime; and within nineteen months, or about a year and a half, after
the return home of the forlorn remnant of Sir Humphrey’s
expedition, Raleigh’s first company of American colonists sailed out
of Plymouth bound for the salubrious country then comprised in
“Virginia.”
Raleigh’s patent, obtained from Queen Elizabeth in March, 1584, in
the securing of which, as we have seen, Hakluyt’s writings were so
influential, constituted him a lord proprietary with almost unlimited
jurisdiction over a vast region indefinitely defined. Its provisions
were similar to those of Gilbert’s patent but more ample. It licensed
him, his heirs and assigns, to “discover, search, find out, and view
such remote, heathen, and barbarous lands, countries, and
territories not actually possessed by any Christian prince, nor
inhabited by Christian people,” as to him, his heirs and assigns,
should seem good; and to hold, occupy, and enjoy such lands and
regions with all “prerogatives, commodities, jurisdictions, royalties,
priviledges, franchises, and pre-eminences thereto or thereabouts
both by sea and land, whatsoever” the queen by her letters-patent
might grant, and as she or “any of our noble projectors” had
heretofore granted to “any person or persons, bodies politique or
corporate”: the proviso, as in Gilbert’s patent, being made that a
fifth part of all the “oare of golde and silver” that should be obtained
be reserved for the queen. Powers to make laws for the government
of a colony were conferred, these ordinances to be, as near as
conveniently might be, agreeable to the English form of statutes,
and not against the faith professed by the Church of England. They
were to be in force over all who should from time to time
“advantage themselves in the said journeis or voyages,” or that
should at any time inhabit “any such lands, countries or territories
aforesaid,” or that should abide within two hundred leagues of the
place or places that Raleigh’s companies should inhabit within six
years from the date of the patent. Raleigh might make grants from
his territory at his pleasure.
Hakluyt gives the text of the patent in the Principal Navigations
under this title: “The letters patents granted by the Queenes
Majestie to M. Walter Ralegh, now Knight, for the discovering and
planting of new lands and Countries, to continue the space of 6
yeeres and no more.”
SIR WALTER RALEIGH AT THE AGE OF 34.

From a Photograph, copyrighted by Walker &


Cockerell, of the portrait attributed to Federigo
Zuccaro in the National Portrait Gallery.

Raleigh was now high in the queen’s favor, and with large
influence at court. He was in or about his thirty-second year, of
rugged manhood, handsome, and debonair. The son of a country
gentleman, well connected through his father’s three marriages with
families of prominence, and taking young to adventure, he was early
concerned in lively affairs. He was born about the year 1552, at
Hayes, near Budlegh Salterton, South Devonshire, the second son of
his father’s third wife, who was the widow of Otho Gilbert and the
mother of Sir Humphrey Gilbert. Through his father’s first wife, who
was Joan Drake, he was related to Sir Francis Drake. His own
brother was Sir Carew Raleigh, who was concerned with him in
Gilbert’s first expedition of 1578. As a boy he became interested in
seamanship and the life of the sea from talks with sailors returned
from distant voyages. At fifteen he was at Oxford, entered in Oriel
College. At seventeen he was serving as a volunteer in the French
Huguenot army. He remained in France through the next five years.
Back in London in 1576, he was variously employed. The next year,
or early in 1578, he was warring in the Low Countries under Sir John
Norris. Later in September he was at Dartmouth, busied with
Humphrey Gilbert in fitting out the fleet for that year’s venture, in
which he sailed in command of the “Falcon.” In 1580 he was serving
in Ireland as captain of a company, and he had part in the awful and
cruel massacre at Somerwich in November of that year. Toward the
end of 1581 he was sent home to England with despatches from the
new governor of Münster. Coming to the court he attracted the fancy
of the queen by his manly presence, bearing, and gallantry, and he
rose instantly into the royal favor. With this time is dated the
tradition of his spreading his new plush coat over a muddy way for
the queen to walk upon. He was granted lucrative monopolies,
particularly the “wine licenses,” the profits of which enabled him
liberally to prosecute the schemes of Western adventure he was
then developing.
Raleigh’s patent received the royal signature on the twenty-fifth
day of March, 1584, and only a month later, as we have seen
(Chapter I), his preliminary expedition, comprising his two barks
under the experienced captains Amadas and Barlow, charged to
investigate, hasten back, and report, had sailed off; and under the
inspiration of the warm-coloured story that these captains told upon
their return in September, the first colonization band was formed.
This fascinating narrative, therefore, is the prologue to the epic of
true English colonization in America, culminating in the permanent
settlement at Jamestown.
It appears in full in the Principal Navigations with this caption:
“The first voyage made to the coasts of America with two barks,
where in were Captaines M. Philip Amidas, and M. Arthur Barlowe,
who discovered part of the Countrey now called Virginia, Anno 1584.
Written by one of the said Captaines, and sent to sir Walter Ralegh
knight, at whose charge and direction the said voyage was set
forth.” Barlow was the author.
The captains set sail on the twenty-seventh of April, taking the
southern course by the West Indies toward the coast of Florida.
Their landfall, now reckoned to have been shoals out from Capes
Fear and Hatteras, was made on the fourth of July. Their approach
was propitious, for as they struck shoal water two days before, by
which they were assured that land was not far off, they “smelt so
sweet and so strong a smel as if we had bene in the midst of some
delicate garden abounding in all kinds of odoriferous flowers.” They
first supposed the coast they saw to be that of a continent and
“firme land.” They ranged along it northward some “hundred and
twentie English miles,” seeking an opening. At length they came to
an inlet which they entered, “not without some difficultie,” and
dropped anchor “about three harquebuz-shot” within the haven’s
mouth. Just where this inlet was has been a matter of long
discussion by historical investigators. Some have confidently
identified it with Ocracoke, now Oregon Inlet: others with New Inlet.
A later authority (Talcott Williams) designated it as a passage long
ago closed by the drifting sands, north of Roanoke Island, and near
Collington Island. After giving thanks to God for their safe arrival
thither, they manned their small boats and went ashore on the
“island of Wocokon” (identified as Collington Island); and here
forthwith performed the ceremony of taking possession of the region
“in the right of the Queenes most excellent Majestie, as rightful
Queene and Princesse of the same,” and for Raleigh under his
patent.
This ceremony over they viewed the land about them. While sandy
and low by the waterside it soon rose into fair little hills. Close by the
water’s edge were masses of grape vines. So “full of grapes” indeed
was the place that “the very beating and surging of the Sea
overflowed them.” There was such plenty “as well there as in all
places else, both on the sand and on the greene soile on the hils, as
in the plaines, as well as every little shrubb, as also climing towardes
the tops of high Cedars,” that the narrator thought that in all the
world the “like abundance” was not to be found: and he was a
much-travelled man. Ascending one of the little hills they saw the
place to be an island and not the main. Below them they beheld
valleys “replenished with goodly Cedar trees.” Upon discharging their
“harquebuz-shot” such a flock of cranes, mostly white ones, rose
that their cry “redoubled by many echoes” was “as if an armie of
men had showted together.” The island was seen to be rich in “many
goodly woodes full of Deere, Conies, Hares, and Fowle, even in the
middest of Summer in incredible abundance.” The woods contained
“the highest and reddest Cedars of the world ... Pynes, Cypres,
Sarsaphras, the Lentisk, or the tree that beareth the Masticke, the
tree that beareth the vine of blacke Sinamon, of which Master
Winter [of Drake’s fleet that entered the Pacific] brought from the
straights of Magellan, and many other of excellent smel and
qualitie.”
They remained at this island for two whole days before they had
sight of any natives. On the third day when on ship-board they
espied a canoe paddling toward them with three Indians in it. When
it had come within “foure harquebuz-shot” of their ships it put into
the point of land nearest to them. Two of its three occupants went
up into the island, while the other walked to and fro along the point,
viewing the ships with evident interest. Then the two captains and a
few others rowed to the shore to meet him. As they approached he
made no shew of “feare or doubt.” After he had spoken with them
“of many things” which they could not understand, he was invited by
gestures to visit the ships, which he showed was quite to his liking.
On board he was entertained with a taste of their wine and their
bread, which he “liked very much,” and was given a shirt, a hat, and
some other things. When he had viewed both barks to his
satisfaction, he was sent back ashore. Again taking his canoe which
he had left in a creek he fell a-fishing not far from the ships, and in
less than half an hour he had laden his boat “as deepe as it could
swimme.” Then returning to the point of land nearest the ships he
here divided his fish into two parts, pointing one part to one of the
ships and one to the other. And so, “as much as he might,” requiting
the benefits he had received from the Englishmen, he departed from
their sight.
The next day a considerable body of natives appeared and
formally made the Englishmen welcome:
"There came unto us divers boates, and in one of them the king’s
brother, accompanied with fortie or fiftie men, very handsome and
goodly people, and in their behaviour as mannerly and civill as any
of Europe. His name was Granganimeo, and the king is called
Wingina, the countrey Wingandacoa. The maner of his comming was
in this sort: hee left his boates altogether, as the first man did a little
from the shippes by the shore, and came along to the place over
against the shippes followed with fortie men.
"When he came to the place his servants spread a long matte
upon the ground on which he sate downe, and at the other ende of
the matte foure others of his companie did the like, the rest of his
men stood round about him, somewhat afarre off: when we came to
the shore to him with our weapons, hee never moved from his place,
nor any of the other foure, nor never mistrusted any harme to be
offred from us, but sitting still he beckoned us to come and sit by
him, which we performed: and being set hee made all signes of joy
and welcome, striking on his head and his breast and afterwardes on
ours, to shew wee were all one, smiling and making shew the best
he could of all love and familiaritie.
“After he had made a long speech unto us, wee presented him
with divers things, which he received very joyfully and thankfully.
None of the companie durst speake one worde all the time: onely
the foure which were at the other ende, spake one in the others
eare very softly.”
The king himself, it was explained, could not appear, for he was
lying at the chief town of the country, six days’ journey off, sore
wounded from a fight with the king of “the next countrie.”
A day or two after this welcoming meeting the Englishmen fell to
trade with the natives, exchanging various trinkets for “chamoys,
buffe, and Deere skinnes.” A bright tin dish had more attractions
than anything else in their packet of merchandise. One of the
natives “clapt” it on his breast and making a hole in the rim hung it
about his neck as a shield, with gestures to indicate that it would
defend him against his enemies’ arrows. The dish was exchanged for
twenty skins worth twenty English crowns. A copper kettle was
traded for fifty skins worth as many crowns. The natives offered
good exchange for hatchets, axes, and knives, and would have given
anything for swords: but with these the Englishmen would not part.
The king’s brother took a special fancy to the Englishmen’s armor. He
offered to lay a great box of pearls in gage for a suit, together with a
sword and a few other things. His offer was declined for the reason
that the captains did not want him to know how highly they prized
the pearls till they had learned in “what places the pearls grew.”
They afterward apparently satisfied themselves on this point, when,
in an exploration of a neighbouring river, they found “great store of
Muskles in which there are pearles.”
After a few days Granganimeo came aboard the ships and was
entertained like the first visitor, with wine, meat, and bread, to his
great pleasure. Another day he brought his wife, daughter, and two
or three children aboard. The wife was of small stature, “very well
favoured, and very bashful.” She was attired in a long cloak of skin
with the fur inwards. Her forehead was adorned with a band of
white coral. From her ears depended “bracelets” of pearls, each
pearl, of the size of a pea, extending to her waist. Her women
attendants, who remained on the shore, some forty of them, during
her visit, had pendants of copper in their ears, and some of
Granganimeo’s children and those of other “noble” men wore five or
six in each ear. Granganimeo’s apparel was a cloak like his wife’s,
and on his head was a broad plate of gold or copper. The women
wore their hair long on both sides, the men on but one. These
natives were of a yellowish colour and generally with black hair.
Their boats were made out of whole trees, either pine or pitch
trees. Their manner of constructing them was thus: “They burne
downe some great tree or take such as are winde fallen, and putting
gumme and rosen on one side thereof they set fire unto it, and
when it hath burnt it hollow, they cut out the coale with their shels,
and even where they would burne it deeper or wider they lay on
gummes which burne away the timber, and by this meanes they
fashion very fine boates, and such as will transport twentie men.”
Their oars were “like scoopes,” and “many times they set with long
pooles as the depth serveth.”
The king’s brother was very just in keeping his promises and
generous with supplies. Every day he sent to the ships a brace or
two of fat “Bucks, Conies, Hares, Fish the best of the world.” Also
“divers kindes of fruites, Melons, Walnuts, Cucumbers, Gourdes,
Pease, and divers roots,” and of their “countrey corne, which is very
white, faire, and well tasted, and groweth three times in five
moneths.” The Englishmen “proved” the soil, putting some pease
into the ground; in less than ten days, the narrator averred, they
were of “fourteene ynches high.” The natives also raised beans “very
faire of divers colours and wonderful plentie: some growing
naturally, and some in their gardens”; and both wheat and oats. The
soil was declared to be “the most plentifull, sweete, fruitfull and
wholesome of all the worlde.” There were counted fourteen or more
different “sweete smeling” timber trees. The most part of the
underwoods were “Bayes and such like.” There were oaks like those
of England, but “farre greater and better.”
The narrator with seven others went “twentie miles into the river
that runneth towarde the citie of Skiwak [Indian village], which river
they [the natives] call Occam, and in the evening following ... came
to an island which they call Roanoak.” At the north end of this island
was a village of nine houses built of cedar and fortified round with
sharp trees to keep out their enemies, the entrance being “made like
a turne pike very artificially.” This village was the home of
Granganimeo. As they neared it his wife came running down to the
waterside to meet them. Granganimeo was not then in the village,
and his spouse did the honours of host most graciously. She bade
some of her people to draw the Englishmen’s boat through the
beating billows to the shore; others to carry the visitors on their
backs to the dry ground; others to take their oars to her house lest
the boat might be stolen. After they were come into her dwelling, a
hut of five rooms, they were sat by a great fire while their wet
garments were washed and dried by her women, she herself in the
meantime taking “great paines to see all things ordered in the best
maner shee could,” and “making great haste to dress some meat”
for their supper. When they had comfortably dried themselves they
were conducted into an inner room where, “on the board standing
along the house,” a tempting banquet of venison, fruits, and wheat
foods was spread. The whole entertainment was marked by “all love
and kindnesse, and with as much bountie (after their maner) as they
could possibly devise.” Here, as in their other experiences, the
Englishmen found the people “most gentle, loving, and faithful,
voide of all guile and treason, and such as live after the maner of
the golden age.”
Throughout the visit at Roanoke their hostess was assiduous for
their welfare. This was most energetically displayed in an incident
while they were at supper. “There came in at the gates two or three
men with their bowes and arrowes from hunting, whom when wee
espied we beganne to looke one towardes another, and offered to
reach our weapons: but assoone as she espied our mistrust shee
was very much mooved, and caused some of her men to runne out,
and take away their bowes and arrowes and breake them and withall
beate the poore fellowes out of the gate againe.” When as the
evening waned the Englishmen made ready to return to their boats,
declining the hospitality of the village over night, she had the viands
left over from the supper, “pottes and all,” carried to their craft.
When they embarked and rowed off a “prettie” distance from the
shore, there to lie through the night, she was much grieved at this
evidence of mistrust, and again entreated them to rest in the houses
of the village. And when they still declined, she sent “divers men and
thirtie women to sit all night on the banke side” opposite them; and
as rain began to fall mats were sent out to them for protection
against the storm. The narrator explained that they were thus
cautious because they were “fewe men,” and if they had “miscaried”
the expedition would have been in great danger, so they “durst not
adventure any thing.” Yet they had no cause to doubt the sincerity of
these natives, “for a more kinde and loving people there can not be
founde in the worlde, as farre as we have hitherto had trial.”
On other days further explorations were made around Albemarle
Sound, and information more or less authentic was gathered from
the natives as to Indian towns, and relations between the tribes and
the several kings of the region round about. They found that beyond
the islands lay the mainland. They were told of the greatest Indian
city called “Scicoak,” on the “River Occam”: of another great town on
a tributary of this river, under a “free lord,” independent of
neighbouring kings; and another, four days’ journey southwest of
Roanoke, called “Sequotan,” or “Secotan.” The friendship of the
natives increased in warmth on closer intercourse with the
Englishmen. Their interest in the English ships was unbounded.
Whenever a gun was discharged, “were it but a hargubuz,” they
would tremble “for the strangeness of the same.” Their own
weapons were principally slender bows and arrows. The arrows were
small canes headed with a sharp shell or a fish’s tooth, but
“sufficient ynough to kill a naked man.” They used swords of
hardened wood, and a sort of club with the sharp horns of a stag
fastened at the heavy end. They wore wooden breastplates for
defence. When they went to war they carried with them “their idol of
whom they aske counsel as the Romans were woont of the Oracle of
Apollo.” They sang songs as they marched forth to battle instead of
sounding drums and trumpets. Their wars were “very cruel and
bloody.” For this reason, and as a result of civil dissensions that had
happened among them in recent years, the people of the region
were “marvellously wasted, and in some places the countrey [was]
left desolate.”
When the reconnoitering captains finally set sail for the return to
England they carried with them two of the natives, “lustie men,”
Wanchese and Manteo by name. Manteo afterward became of
considerable service to the first two colonies, and rose to the
distinction of a native American baron—the “Lord of Roanoak,” as
will duly appear with the development of the story of colonization in
the following chapters.
XX
“VIRGINIA”

T he country to which Queen Elizabeth gave the name “Virginia,”


upon the return of Raleigh’s reconnoitering captains in
September, 1584, with their flattering report, comprehended vaguely
the whole of the seaboard of North America above Florida to a point
toward Newfoundland, and inland indefinitely. In the following
Spring Raleigh’s first company of intended colonists were ready to
depart for the fruitful region, the attractions of which Captains
Amadas and Barlow had set forth so enchantingly.
This pioneer band comprised gentlemen of standing, experienced
navigators, younger sons of noble houses or gentry seeking
adventure, restless spirits with an eye for pelf, hardy sailors. Ralph
Lane at the head as governor, was a sailor-soldier of merit, and
when invited by Raleigh to this post was serving in Ireland. Captain
Amadas, of the reconnoitering expedition, was Lane’s deputy,
afterward designated “admiral of the country”—Virginia. Thomas
Hariot, or Harriot, named as surveyor, and also to be the historian of
the colony, had been Raleigh’s tutor: he became in after years
distinguished as a mathematician and astronomer, and materially
advanced the science of algebra. John White, to be the principal
draughtsman, was a man of affairs as well as a painter of some
note, and was later to become governor of Raleigh’s second colony
and grandfather of the first English child born in North America—
Virginia Dare; and in his drawings, with those of the artist Le Moine,
of the Huguenot colony in Florida, 1562–1566 (afterward in London
a “servant” of Raleigh’s), we have the first accurate knowledge of
the North American Indian and of the natural history of the country.
Sir Richard Grenville, a cousin of Raleigh’s, a British naval hero, was
the general of the fleet assembled to carry the company out. Captain
Thomas Cavendish, navigator and freebooter, soon to
circumnavigate the globe, was commander of one of the ships. The
two Indians, Wanchese and Manteo, whom Amadas and Barlow
brought home with them, were joined to the company as guides.
The fleet comprised seven sail: the “Tiger,” admiral or flagship, of
one hundred and forty tons; a “Flie-boat called the Roe-bucke, of the
like burden”; the “Lyon,” one hundred tons, “or thereabouts”; the
“Elizabeth,” fifty tons; the “Dorithie,” a small bark; and two small
pinnaces. They weighed anchor and sailed out of Plymouth harbour
on the ninth of April, 1585. The outward voyage was a leisurely one,
with stops at Porto Rico, Hispaniola, and other places, and with
seizures of Spanish prizes along the way, so that their destination at
Wocokon and Roanoke Island was not reached till the end of June.
Their sometimes exciting adventures on this passage are summarily
related in the diary of one of the company, which Hakluyt gives with
this unusually brief caption: “The voiage made by Sir Richard
Greenvile for Sir Walter Ralegh to Virginia in the yeere 1585.”
The longest stop was made off Porto Rico, at the “Island of S.
John de Porto Rico.” Here a temporary fort was erected close to the
seaside, and backed by woods, and within it a pinnace was built
from timber, some of which was cut three miles up the land and
brought upon trucks to the fort, the few Spaniards on the island “not
daring to make or offer resistance.” One day while they were at this
work eight horsemen appeared out of the woods about a quarter of
a mile back, and there halting, stood silently gazing upon them for
half an hour; then, a company of ten of their men being started out
in marching order, the horsemen disappeared in the woods. Another
day a sail was seen afar off approaching their haven. Supposing her
to be either a Spanish or a French warship, the “Tiger” was made
ready and went out to meet her. As the strange craft was neared,
however, she was discovered to be Captain Cavendish’s ship of their
own fleet, which had been separated from them at sea in a storm.
Thereat there was rejoicing instead of a fight, and the ships’ guns
were discharged in mutual peaceful salutes. Again, on another day, a
second and a larger band of horsemen appeared, and nearer the
fort. Twenty footmen and two horsemen, the latter mounted on
Spanish horses that had been seized, were sent against them. When
the Englishmen were within hailing distance the Spaniards displayed
a flag of truce, and made signs for a parley. Two from each side
accordingly came together on the sands between the two lines. The
Spanish representatives offered “very great salutations” to the
English, but expostulated against the Englishmen’s coming and
fortifying in their country. The English representatives assured them
that their company were here only to furnish themselves with water,
victuals, and other necessities of which they stood in need. They
hoped the Spaniards would yield these to them “with faire and
friendly meanes”; but if this were not done they were resolved to
“practice force” and relieve themselves by the sword. At this the
Spaniards, with “all courtesie and great favour,” expressed their
readiness to render every assistance, and promised a supply of
provisions. And so the parley ended graciously.
THE ARRIVAL OF THE ENGLISHMEN IN VIRGINIA.
From a drawing by John White, of Raleigh’s first colony, 1585.

The very next day the pinnace was finished and launched. Then
the general, with his captains and gentlemen, marched up into the
country to meet the Spaniards with the promised provisions. But the
Spaniards came not. Whereupon the general fired the woods
roundabout, and his party marched back to their fort. Later, the
same day, they fired their fort and all embarked to sail the next
morning on their course. In the meantime Ralph Lane, taking a
Spanish frigate that they had captured, with a Spanish pilot, had
made a successful venture with twenty of his men to “Roxo bay, on
the southwest side of S. John,” after a cargo of salt. He threw up
entrenchments about a salt hut here, and quietly loaded the frigate
while “two or three troupes of [Spanish] horsemen” stood off and
“gave him the looking,” but offered no resistance. When the fleet
sailed from St. John most of the company were itching from the
stings of swarms of “muskitos” which they had got on shore.
That night at sea they took a Spanish frigate whose crew had
abandoned her upon sight of the fleet. Early next morning another
was captured: this a more profitable prize, having a “good and riche
freight and divers Spaniards of account in her.” The Spaniards were
afterward ransomed “for good round summes” and were landed at
St. John.
The next call was made at Hispaniola. Here there was much
impressive exchange of courtesies between the Spaniards and their
uninvited guests. The fleet anchored at Isabella on the first of June.
Upon his arrival, apparently, the general entertained some local
grandees on his ship. For on the third of June the “governor of
Isabella and captaine of Port de Plata,” having heard that there were
“many brave and gallant gentlemen” in the fleet, sent a “gentle
commendation” to Sir Richard with a promise shortly to make him an
official call. On the appointed day the governor appeared at the
landing off which the fleet lay, accompanied by a “lustie Fryer” and
twenty other Spaniards with their servants and Negroes. Thereupon
Sir Richard and his chief men, “every man appointed and furnished
in the best sort,”—in briefer phrase, wearing his best clothes,—took
the shipboats and were rowed forth in fine feather to meet them.
The reception was most cordial on both sides. The Spanish governor
received the English general “very courteously,” while the Spanish
gentlemen saluted the English gentlemen, and “their inferior sort did
also salute our Souldiers and Sea men, liking our men and likewise
their qualities.”
Then followed a sylvan banquet: “In the meane time while our
English Generall and the Spanish Governour discussed betwixt them
of divers matters, and of the state of the Countrey, the multitude of
the Townes and people, and the commodities of the Iland, our men
provided two banquetting houses covered with greene boughes, the
one for the Gentlemen, the other for the servants, and a sumptuous
banquet was brought in served by us all in plate, with the sound of
trumpets, and consort of musicke, wherewith the Spaniards were
delighted.” The feast ended, the Spaniards in their turn, in
recompense of the English courtesies, provided a bull fight, or hunt,
for them. “They caused a great heard of white buls, and kyne to be
brought together from the mountaines, and appoynted for every
Gentleman and Captaine that would ride, a horse ready sadled, and
then singled out three of the best of them to be hunted by
horsemen after their maner, so that the pastime grewe very pleasant
for space of three houres, wherein all three of the beasts were killed,
whereof one tooke the Sea and was slain with a musket.” After this
brutal sport rare presents were exchanged. The next day the thrifty
Englishmen “played the Marchants in bargaining with them by way
of trucke and exchange of divers of their commodities, as horses,
mares, kine, buls, goates, swine, sheepe, bull-hides, sugar, ginger,
pearle, tobacco, and such like commodities of the Iland.”
On the seventh of June they departed, with great good will, from
these Spaniards and Hispaniola. “But,” the diarist shrewdly observed,
“the wiser sort doe impute this great shew of friendship and
courtesie used towards us by the Spaniards rather to the force that
wee were of, and the vigilancie and watchfulnesse that was amongst
us, then [than] to any heartie good will or sure friendly
intertainement: for doubtless if they had been stronger then wee,
wee might have looked for no better courtesie at their handes then
Master John Haukins received at Saint John de Ullua, or John Oxnam
neere the streights of Dariene, and divers others of our
Countreymen in other places.”
Resuming the voyage, short stops were made at some of the
Bahama Islands, and on the twentieth of June they fell in with the
mainland of Florida. On the twenty-third they were in great danger
of wreck “on a beach called the Cape of Feare,” so first named by
these voyagers. The next day they came to anchor in a harbour
where they caught “in one tyde so much fish as would have yeelded
us twentie pounds in London.” Here they made their first landing on
the continent. Two days afterward they had arrived at Wocokon.
In entering the shallow harbour three days later the flagship
struck aground and, according to the diarist, “sunk,” but she was not
lost. On the third of July word of their arrival at Wocokon was sent
by Manteo to king Wingina at Roanoke Island. And ultimately the
company went up to Roanoke Island and began their settlement
there.
Grenville remained with them for about two months and then
returned with the ships to England, promising to come back with
supplies by the next Easter. The month was spent mostly in
explorations of the neighbouring waters and country; while one
harsh and ill-judged act was committed by Sir Richard’s orders
against the Indians, whom Amadas and Barlow had found so friendly
and hospitable, which had evil results in fostering conspiracies
against the new comers. The first exploration, with visits to Indian
towns, was made in state soon after the arrival, and occupied eight
days. Sir Richard, Master John Arundel, and “divers other
gentlemen,” led in the “tilt-boat”; Governor Lane, Captain Cavendish,
Heriot, and twenty others, followed in the “new pinnace,” which had
been built at St. John; Captains Amadas and Clarke, with ten others,
in one shipboat, and White, the artist, with Francis Broke in another.
They crossed the southern part of Pamlico Sound to the mainland
and discovered three Indian towns—Pomejok, Aquascogoc, and
Secotan. On the next day Pomejok was visited; on the next,
Aquascogoc, and two days after, Secotan, where they were well
entertained. The next day was marked by the harsh act of large
consequences. They had returned to Secotan and thence “one of our
boates with the Admirall was sent to Aquasogok to demand a silver
cup which one of the Savages had stolen from us, and not receiving
it according to his promise, wee burnt and spoyled their corne, and
Towne, all the people being fled.”
The fleet left Wocokon on the twenty-first of July for Hastorask,
where they arrived and anchored on the twenty-seventh. Soon after,
the courteous receiver of Amadas and Barlow on their first coming,
King Wingina’s brother Granganimeo, came aboard the flagship with
Manteo, and paid his respects to Sir Richard.
The colony being finally established at Roanoke Island, the ships
weighed anchor on August the twenty-fifth and Grenville was off on
his return to England. When less than a week at sea he came upon a
fine Spanish ship of three hundred tons, and forthwith took her, with
a rich cargo. In this performance a reckless show of bravery was
made, Sir Richard boarding her “with a boate made with boards of
chests, which fell asunder and sunke at the ship’s side, assoone as
ever he and his men were out of it.” Afterward Sir Richard took
charge of the prize and completed the voyage in her, arriving at
Plymouth on the eighteenth of September. As was natural with this
plunder, he was “courteously received by divers of his worshipfull
friends.” The “Tiger,” of which he had lost sight in foul weather on
the tenth, had previously arrived at Falmouth.
How fared the colony in “Virginia” after Sir Richard had left with
the ships is told in Ralph Lane’s report to Raleigh: “An account of the
particularities of the imployments of the English men left in Virginia
by Sir Richard Greenevill under the charge of Master Ralph Lane
Generall of the same, from the 17 of August 1585 until the 18 of
June 1586 at which time they departed the Countrey: sent and
directed to Sir Walter Ralegh.”
There were in all one hundred and eight men of the company
remaining in the colony. They finished the building of a fort on
Roanoke Island, which had apparently been begun before Grenville
left; and set up their houses, presumably of logs, the best of these

You might also like