[Ebooks PDF] download Pandas cookbook theodore petrou [ted petrou] full chapters

Page 1


https://ebookgate.com/product/pandas-cookbooktheodore-petrou-ted-petrou/

Download more ebook from https://ebookgate.com

More products digital (pdf, epub, mobi) instant download maybe you interests ...

Next Generation Artificial Vision Systems Reverse

Engineering the Human Visual System 1st Edition Maria Petrou

https://ebookgate.com/product/next-generation-artificial-visionsystems-reverse-engineering-the-human-visual-system-1st-editionmaria-petrou/

Next Generation Artificial Vision Systems Reverse

Engineering the Human Visual System Artech House Series

Bioinformatics Biomedical Imaging 1st Edition Maria Petrou

https://ebookgate.com/product/next-generation-artificial-visionsystems-reverse-engineering-the-human-visual-system-artech-houseseries-bioinformatics-biomedical-imaging-1st-edition-mariapetrou/

Giant Pandas Biology and Conservation 1st Edition Donald Lindburg

https://ebookgate.com/product/giant-pandas-biology-andconservation-1st-edition-donald-lindburg/

Spymaster Theodore Shackley

https://ebookgate.com/product/spymaster-theodore-shackley/

Lsd Marihuana Yoga and Hypnosis

Theodore Barber

https://ebookgate.com/product/lsd-marihuana-yoga-and-hypnosistheodore-barber/

The Nazi Movement 1st Edition Theodore Abel

https://ebookgate.com/product/the-nazi-movement-1st-editiontheodore-abel/

Fitzpatrick s War 1st Edition Theodore Judson

https://ebookgate.com/product/fitzpatrick-s-war-1st-editiontheodore-judson/

Combinatorics An Introduction 1st Edition Theodore G. Faticoni

https://ebookgate.com/product/combinatorics-an-introduction-1stedition-theodore-g-faticoni/

Self Ligation in Orthodontics 1st Edition Theodore Eliades

https://ebookgate.com/product/self-ligation-in-orthodontics-1stedition-theodore-eliades/

Cookbook Pandas

Recipes for Scientific Computing, Time Series Analysis and Data Visualization using Python

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

Author

Theodore Petrou

Reviewers

Sonali Dayal

Kuntal Ganguly

Shilpi Saxena

Commissioning Editor

Veena Pagare

Acquisition Editor Tushar Gupta

Content Development Editor

Snehal Kolte

Technical Editor

Sayli Nikalje

Copy Editor Tasneem Fatehi

Project Coordinator Manthan Patel

Credits

Proofreader Safis Editing

Indexer Tejal Daruwale Soni

Graphics Tania Dutta

Production Coordinator 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/pub/shilpi-saxena/4/552/a30

www.PacktPub.com

For support files and downloads related to your book, please visit www.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/mapt Get 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!

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.

Preface

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/stable/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

Preface

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:

Another random document with no related content on Scribd:

DustBoxes.—Dust boxes are necessary during the winter months to keep the chickens from wallowing in the dirt, as this is the method used by them to cleanse themselves. A box four feet by four feet will be large enough to accommodate fifty chickens. Fine, light, dry dust should be kept in these boxes, and they should be placed in the sunlight and where they may be easily reached by the chickens.

DrinkingVessel.—Should be large enough to hold sufficient water to last twenty-four hours. They must be elevated in some way to keep the dirt from getting into them. A practical drinking vessel is made of a Mason glass jar. Make perforations in the top of the jar with a nail and tack two strips of wood across the top crosswise to raise the jar from the saucer or plate. This allows the water to flow freely from the jar as fast as the chickens can drink it from the saucer, and the covered jar keeps the drinking water clean.

Brooder . A simple and convenient chicken brooder may be made of an old wooden tub which is turned upside down on a platform with the bottom of the tub knocked out, and a covering placed over the top. This, with windows cut in the sides of the tub, gives a better

ventilation for the chickens. A door through which the chickens enter is cut in the front. Outside of the brooder and on one end of the platform is a simple watering device supplying the chickens with fresh water.

CHAPTER VI DAIRY DEVICES

SHOWING USE OF BUTTER-MAKING EQUIPMENT

The economic value of farm butter made from the product of a few cows is of much more importance than is commonly supposed. For this reason the fundamental principles underlying the making of good butter should be practised as much by the farm woman, making butter in small quantities for the market or the consumption in the home, as by the operator of a large creamery establishment. The quality of butter made on the average farm shows that cleanliness and the proper attention to the simplest details in the making of good butter have been neglected.

Quality.—The method used in the handling of milk or cream and in making butter determines its quality. The sanitation of the utensils in which cream or milk is handled and the conditions surrounding it during ripening are of the utmost importance. A common practice among some farm women is to put the milk in shallow, uncovered pans which are exposed to dust, flies, and the odors which frequent the pantry and kitchen. Such pans are allowed to stand until the milk clabbers and a thick leathery sheet of cream is formed on the top. Good butter cannot be made from milk or cream handled in this manner. A deep, narrow vessel known as a shot-gun can is recommended for use in ripening cream or milk because it is easily handled, washed and can be covered. These can be bought at hardware stores or mail order houses.

Utensils.—Convenient equipment for making butter is essential and very inexpensive. It is customary on many farms to churn the

cream in an earthen jar with a wooden dasher and stick. Earthenware vessels commonly used are porous and often contain blisters or air bubbles, all of which will absorb milk. The milk sours in these places and gives the vessels a characteristic bad odor. These churns are hard to clean and heavy to handle and should never be used. A wooden barrel churn is one of the best types to use because it is easily operated, cleaned, and handled. Churns which contain agitators and gearing of different kinds should not be used.

A dairy thermometer, which can be bought at any local hardware or drug store at a small cost, is necessary to determine the temperature of the cream.

When there are at least four cows milked, a small cream separator will be a good investment. Where a separator cannot be had, hand skimming is advisable if the cream is properly handled.

Ripening ofCream.—The ripening of milk or cream is the natural souring which takes place under proper conditions and which gives butter its characteristic flavor. The quality of butter depends, to a large extent, upon proper ripening. Where hand skimming is practised, set separate milkings in cool, well-ventilated places and allow to stand from twelve to eighteen hours for the cream to rise. Skim the cream off with a cup or large spoon, put it into a can which is kept in a cool place at a temperature of 50 degrees Fahrenheit or below. Skimmings from the different milkings are cooled to the same temperature before being added to this stock can. The contents of this can must be stirred each time after adding the cream. When sufficient cream for a churning has been secured in this way the contents of the stock can are warmed to a temperature of 58 to 60 degrees Fahrenheit and in winter 62 degrees Fahrenheit, then allowed to stand in a clean, well-ventilated place for twelve or eighteen hours to ripen. This warming is done by setting the can in a vessel of hot water. Frequent stirring is necessary during the ripening period. Cream properly ripened has a velvety and glossy appearance, with a mild but pleasant sour taste. When hand skimming is not practised the churning will have to be done more

frequently to prevent the milk from becoming too sour and giving the butter a bad flavor.

Coloring the Butter .—The natural color of butter when the cows can get plenty of nature’s food is a soft, straw yellow. During the winter, if it is necessary to use dry feed alone, the butter will lack color which can be supplied by the addition of a harmless coloring matter. The amount of coloring matter necessary to use varies with the season but usually 8 to 12 drops of harmless vegetable coloring to every pound of butter will be sufficient in the winter time. This coloring matter may be bought at most drug stores.

Churning. When the cream is ready for churning, rinse the churn with scalding water to cleanse it thoroughly and to swell the pores in the wood. Following this, cool the churn with cold water to prevent the raising of the temperature of the cream when put into the churn. The cream should be poured through a strainer into the churn to remove lumps or hard white specks of cream which may have dried to the sides of the can. Gas will form in the churn during the first few minutes of churning which must be let out by removing the cork at the bottom of the churn. It may be necessary to repeat this operation several times. After the churn has been in operation about 20 minutes, the cream becomes thick and shortly after, very small, mealy granules begin to form. At this point the cream begins to break away from the glass in the top of the churn lid. When this stage is reached, after every four or five revolutions the lid should be removed and the size of the granules observed. When these have reached the size of large wheat grains, the churning operation has been completed. At this point the glass in the top appears clear which indicates that the granules slide off instead of sticking to the top. It usually takes at least 25 minutes to churn good butter. If it takes longer, the temperature of the next cream churned should be raised a few degrees.

Washing the Butter .—When churning is completed draw the buttermilk off through a strainer to catch small particles of butter. The butter is washed to remove the buttermilk, to improve the

flavor, and to keep better. Buttermilk is washed out of the butter and not worked out. The temperature of the wash water should be the same as that of the buttermilk and is determined by the use of a thermometer. This temperature depends upon the condition of the butter; if the butter is too soft the water must be colder, and vice versa. In washing butter, water is added and the churn given two or three revolutions so as to turn the butter; after which the water is drawn off and the process repeated several times until the water drawn off is clear.

Salting the Butter . The butterworker, paddles, and mold or printer are scalded and cooled in the same way as the churn and for the same reasons. The churn is then drawn near the worker and the butter granules removed with paddle or ladle and placed on worker. The hands must never touch butter for sanitary reasons and because they will give the butter a greasy appearance. As soon as the butter is placed on the worker, one ounce of fine, clean salt to a pound of butter is sprinkled uniformly over the butter.

Working the Butter.—Butter should then be worked well to distribute the salt through it and to expel the excess water. Butter is salted to improve the flavor, to serve the market purposes and to some degree to act as a preservative. In working the butter, the pile of granules is pressed flat with the lever, and the flattened mass of butter turned over about 12 or 14 times until the edges of butter, when broken, have a granular appearance similar to a broken halfbaked potato. Too much working destroys the grain and the edges when broken apart will have a slightly stringy appearance, while too little working gives a streaked or mottled butter.

Printing and Wrapping the Butter .—The printer is removed from the water as soon as the working has been completed and with both hands it is pressed on the mass of butter until it is packed full. That remaining over the edge is then cut off with a paddle and the print pushed out on a sheet of parchment paper and neatly wrapped. The printing and wrapping of butter cannot be emphasized too strongly, for a good appearance is fundamental to obtaining good markets for

the butter. It is very much easier to get a good market for butter packed neatly in parchment paper than it is for that wrapped in a cloth as is the case in so many country homes. It is very important that a good grade of parchment paper should be used for wrapping butter and this can be bought from firms handling dairy supplies or it may be ordered by mail. The brick-shaped mold is used because prints can be handled with convenience and such prints are a standard on the market. A mold of this kind can be purchased from local hardware stores or mail order houses for from $1.50 to $5.00. The placing of the wrapped print in a pasteboard box or carton not only protects the butter from the finger prints but also from dust and dirt. These cartons may be bought from any firm handling dairy supplies. Butter put up in this manner is convenient to handle, attractive in appearance, and is also an advertisement.

MarketingtheButter .—The appearance of the package determines to a large extent the selling price of butter and every effort should be made to make it as neat, attractive, and convenient to handle as possible. The ultimate end in the making of farm butter is to supply a delicate food for the family and to obtain a profit from the surplus. To do this, it is necessary to create a demand by giving satisfaction to your customers. This can be done by putting up butter superior in quality and attractive in appearance.

BUTTER WORKER

A very useful appliance, and easily operated, making the butter into a close-grained mass without injuring the texture of it. It is made of poplar, triangular in shape, with a corrugated roller. This roller fits in a hole made in a piece of metal which is put across the smaller end of the worker. This worker may be operated by putting it on the kitchen table, or it may be placed on adjustable legs.

MATERIALS:

13’ maple for bottom, sides, and battens.

3’ 1⅜” × 2” × 5” for roller.

10 No. 14 screws, 3” to fasten the sides on bottom.

8 No. 14 screws, 3” to fasten battens on bottom.

1 piece 28-gauge zinc 4¾” wide × 16” long, for front piece.

8 four-penny box nails to fasten zinc across the front.

1 pan 2” deep × 12” wide × 14” long, to place under worker in small end to catch drippings from butter.

Wood glue to fasten handle on roller.

DIMENSIONS:

Bottom: 1 piece 1¼” thick × 30” wide in front, 4” wide in back × 26” long.

Sides: 2 pieces 1¼” thick × 6” wide, × 30” long.

Battens: 1 piece 1¼” thick × 4” wide × 30” long.

1 piece ¼” thick × 2” wide × 2” long.

Roller: 1 piece 4” thick × 4” wide × 36” long.

Handle: 1 piece 5” long.

Taking temperature of cream    Straining the cream into the churn    Churning operation complete

Moulding and packing the butter

DIRECTIONS:

Taper the bottom piece at one end, using a radius of 31”. Screw the battens (1¼” × 4” × 30”) (1¼” × 2” × 2”) on the bottom, making the holes large enough to fit the heads of the screws. Taper the two sides and nail them to the bottom. The roller is made 36” long and 2” in diameter, measuring ¼” from the end to round the corners. Bore a hole in the end and put the handle on it. Put a small metal pin in the end of roller to hold handle in place. Tack the piece of zinc across narrow end of the worker, making a hole in the centre to fit end of roller. Sandpaper when completed.

Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.