Pandas Cookbook


Book Description

Over 95 hands-on recipes to leverage the power of pandas for efficient scientific computation and data analysis About This Book Use the power of pandas to solve most complex scientific computing problems with ease Leverage fast, robust data structures in pandas to gain useful insights from your data Practical, easy to implement recipes for quick solutions to common problems in data using pandas Who This Book Is For This book is for data scientists, analysts and Python developers who wish to explore data analysis and scientific computing in a practical, hands-on manner. The recipes included in this book are suitable for both novice and advanced users, and contain helpful tips, tricks and caveats wherever necessary. Some understanding of pandas will be helpful, but not mandatory. What You Will Learn Master the fundamentals of pandas to quickly begin exploring any dataset Isolate any subset of data by properly selecting and querying the data Split data into independent groups before applying aggregations and transformations to each group Restructure data into tidy form to make data analysis and visualization easier Prepare real-world messy datasets for machine learning Combine and merge data from different sources through pandas SQL-like operations Utilize pandas unparalleled time series functionality Create beautiful and insightful visualizations through pandas direct hooks to Matplotlib and Seaborn In Detail This book will provide you with unique, idiomatic, and fun recipes for both fundamental and advanced data manipulation tasks with pandas. Some recipes focus on achieving a deeper understanding of basic principles, or comparing and contrasting two similar operations. Other recipes will dive deep into a particular dataset, uncovering new and unexpected insights along the way. The pandas library is massive, and it's common for frequent users to be unaware of many of its more impressive features. The official pandas documentation, while thorough, does not contain many useful examples of how to piece together multiple commands like one would do during an actual analysis. This book guides you, as if you were looking over the shoulder of an expert, through practical situations that you are highly likely to encounter. Many advanced recipes combine several different features across the pandas library to generate results. Style and approach The author relies on his vast experience teaching pandas in a professional setting to deliver very detailed explanations for each line of code in all of the recipes. All code and dataset explanations exist in Jupyter Notebooks, an excellent interface for exploring data.




An Introduction to Python Programming for Scientists and Engineers


Book Description

Python is one of the most popular programming languages, widely used for data analysis and modelling, and is fast becoming the leading choice for scientists and engineers. Unlike other textbooks introducing Python, typically organised by language syntax, this book uses many examples from across Biology, Chemistry, Physics, Earth science, and Engineering to teach and motivate students in science and engineering. The text is organised by the tasks and workflows students undertake day-to-day, helping them see the connections between programming tools and their disciplines. The pace of study is carefully developed for complete beginners, and a spiral pedagogy is used so concepts are introduced across multiple chapters, allowing readers to engage with topics more than once. “Try This!” exercises and online Jupyter notebooks encourage students to test their new knowledge, and further develop their programming skills. Online solutions are available for instructors, alongside discipline-specific homework problems across the sciences and engineering.




Earth Observation Using Python


Book Description

Learn basic Python programming to create functional and effective visualizations from earth observation satellite data sets Thousands of satellite datasets are freely available online, but scientists need the right tools to efficiently analyze data and share results. Python has easy-to-learn syntax and thousands of libraries to perform common Earth science programming tasks. Earth Observation Using Python: A Practical Programming Guide presents an example-driven collection of basic methods, applications, and visualizations to process satellite data sets for Earth science research. Gain Python fluency using real data and case studies Read and write common scientific data formats, like netCDF, HDF, and GRIB2 Create 3-dimensional maps of dust, fire, vegetation indices and more Learn to adjust satellite imagery resolution, apply quality control, and handle big files Develop useful workflows and learn to share code using version control Acquire skills using online interactive code available for all examples in the book The American Geophysical Union promotes discovery in Earth and space science for the benefit of humanity. Its publications disseminate scientific knowledge and provide resources for researchers, students, and professionals. Find out more about this book from this Q&A with the Author




Programming in Python 3


Book Description

Python 3 is the best version of the language yet: It is more powerful, convenient, consistent, and expressive than ever before. Now, leading Python programmer Mark Summerfield demonstrates how to write code that takes full advantage of Python 3’s features and idioms. The first book written from a completely “Python 3” viewpoint, Programming in Python 3 brings together all the knowledge you need to write any program, use any standard or third-party Python 3 library, and create new library modules of your own. Summerfield draws on his many years of Python experience to share deep insights into Python 3 development you won’t find anywhere else. He begins by illuminating Python’s “beautiful heart”: the eight key elements of Python you need to write robust, high-performance programs. Building on these core elements, he introduces new topics designed to strengthen your practical expertise—one concept and hands-on example at a time. This book’s coverage includes Developing in Python using procedural, object-oriented, and functional programming paradigms Creating custom packages and modules Writing and reading binary, text, and XML files, including optional compression, random access, and text and XML parsing Leveraging advanced data types, collections, control structures, and functions Spreading program workloads across multiple processes and threads Programming SQL databases and key-value DBM files Utilizing Python’s regular expression mini-language and module Building usable, efficient, GUI-based applications Advanced programming techniques, including generators, function and class decorators, context managers, descriptors, abstract base classes, metaclasses, and more Programming in Python 3 serves as both tutorial and language reference, and it is accompanied by extensive downloadable example code—all of it tested with the final version of Python 3 on Windows, Linux, and Mac OS X.




Principles of Planetary Climate


Book Description

This book introduces the reader to all the basic physical building blocks of climate needed to understand the present and past climate of Earth, the climates of Solar System planets, and the climates of extrasolar planets. These building blocks include thermodynamics, infrared radiative transfer, scattering, surface heat transfer and various processes governing the evolution of atmospheric composition. Nearly four hundred problems are supplied to help consolidate the reader's understanding, and to lead the reader towards original research on planetary climate. This textbook is invaluable for advanced undergraduate or beginning graduate students in atmospheric science, Earth and planetary science, astrobiology, and physics. It also provides a superb reference text for researchers in these subjects, and is very suitable for academic researchers trained in physics or chemistry who wish to rapidly gain enough background to participate in the excitement of the new research opportunities opening in planetary climate.




Statistical Methods for Climate Scientists


Book Description

An accessible introduction to statistical methods for students in the climate sciences.




Global Warming Science


Book Description

A quantitative, broad, hands-on introduction to the cutting-edge science of global warming This textbook introduces undergraduates to the concepts and methods of global warming science, covering topics that they encounter in the news, ranging from the greenhouse effect and warming to ocean acidification, hurricanes, extreme precipitation, droughts, heat waves, forest fires, the cryosphere, and more. This book explains each of the issues based on basic statistical analysis, simple ordinary differential equations, or elementary chemical reactions. Each chapter explains the mechanisms behind an observed or anticipated change in the climate system and demonstrates the tools used to understand and predict them. Proven in the classroom, Global Warming Science also includes “workshops” with every chapter, each based on a Jupyter Python notebook and an accompanying small data set, with supplementary online materials and slides for instructors. The workshop can be used as an interactive learning element in class and as a homework assignment. Provides a clear, broad, quantitative yet accessible approach to the science of global warming Engages students in the analysis of climate data and models, examining predictions, and dealing with uncertainty Features workshops with each chapter that enhance learning through hands-on engagement Comes with supplementary online slides, code, and data files Requires only elementary undergraduate-level calculus and basic statistics; no prior coursework in science is assumed Solutions manual available (only to instructors)




Earth Observation Using Python


Book Description

Learn basic Python programming to create functional and effective visualizations from earth observation satellite data sets Thousands of satellite datasets are freely available online, but scientists need the right tools to efficiently analyze data and share results. Python has easy-to-learn syntax and thousands of libraries to perform common Earth science programming tasks. Earth Observation Using Python: A Practical Programming Guide presents an example-driven collection of basic methods, applications, and visualizations to process satellite data sets for Earth science research. Gain Python fluency using real data and case studies Read and write common scientific data formats, like netCDF, HDF, and GRIB2 Create 3-dimensional maps of dust, fire, vegetation indices and more Learn to adjust satellite imagery resolution, apply quality control, and handle big files Develop useful workflows and learn to share code using version control Acquire skills using online interactive code available for all examples in the book The American Geophysical Union promotes discovery in Earth and space science for the benefit of humanity. Its publications disseminate scientific knowledge and provide resources for researchers, students, and professionals. Find out more about this book from this Q&A with the Author




Object-oriented Programming in Python


Book Description

This book presents a balanced and flexible approach to the incorporation of object-oriented principles in introductory courses using Python. Familiarizes readers with the terminology of object-oriented programming, the concept of an object's underlying state information, and its menu of available behaviors. Includes an exclusive, easy-to-use custom graphics library that helps readers grasp both basic and more advanced concepts. Lays the groundwork for transition to other languages such as Java and C++. For those interested in learning more about object-oriented programming using Python.




Recent Books