Книги и журналы » Компьютерная литература » Программирование (книги)
Python for Agriculturists / Python для агрономовГод издания: 2025
Автор: Muhammad Azhar Iqbal
Издательство: Springer
ISBN: 978-3-032-01441-2
Язык: Английский
Формат: PDF/EPUB
Качество: Издательский макет или текст (eBook)
Интерактивное оглавление: Да
Количество страниц: 311
Описание: This book aims to introduce agriculturists, particularly those with non-computing backgrounds, to the Python programming language. Python's simplicity, versatility, and extensive library support make it an ideal tool for addressing data science and machine learning challenges. This book focuses on the application of Python in various agricultural fields such as Agronomy, Entomology, Plant Pathology, Forestry, Horticulture, Food Technology, Farm Machinery, and Animal Sciences. It underscores the significance of programming skills in empowering agriculturists to analyze data, optimize resources, and automate routine tasks, thereby enhancing productivity and contributing to sustainable agricultural practices. By bridging the gap between traditional agricultural knowledge and modern computing techniques, this book serves as a valuable resource for agriculturists aiming to advance their careers and improve agricultural outcomes.
Цель этой книги — познакомить специалистов в области сельского хозяйства, особенно тех, кто не имеет опыта работы с компьютером, с языком программирования Python. Простота, универсальность и обширная библиотечная поддержка Python делают его идеальным инструментом для решения задач в области науки о данных и машинного обучения. В книге основное внимание уделяется применению Python в различных отраслях сельского хозяйства, таких как агрономия, энтомология, фитопатология, лесоводство, садоводство, пищевые технологии, сельскохозяйственная техника и зоотехника. В ней подчеркивается важность навыков программирования для предоставления агрономам возможности анализировать данные, оптимизировать ресурсы и автоматизировать рутинные задачи, тем самым повышая производительность и способствуя внедрению устойчивых методов ведения сельского хозяйства. Соединяя традиционные знания в области сельского хозяйства и современные компьютерные технологии, эта книга служит ценным ресурсом для агрономов, стремящихся к карьерному росту и улучшению результатов в сельском хозяйстве.
[spoiler="Примеры страниц (скриншоты)"]





[/spoiler]
[spoiler="Оглавление"]
Python for Agriculturists
Preface
Contents
About the Author
1. Preliminaries
1.1 Overview of Digital Agriculture
1.1.1 Definition and Scope of Digital Agriculture
1.1.2 Digital Agriculture Ecosystem
1.1.3 Data Processing in Digital Agriculture Ecosystem
1.1.3.1 Data Acquisition
1.1.3.2 Data Transmission
1.1.3.3 Data Storage
1.1.3.4 Data Analytics
1.2 Significance of Computing Knowledge in Digital Agriculture
1.2.1 Farm Management Software
1.2.2 Automation of Farm Machinery
1.2.3 Data Collection and Analysis
1.2.4 Artificial Intelligence (AI) and Machine/Deep Learning (ML/DL) Applications
1.2.5 Supply Chain and Blockchain Technology
1.2.6 Mobile and Web-Based Applications
1.2.7 Integration of Internet of Things (IoT) Devices
1.2.8 Smart and Precision Agriculture
1.2.9 Sustainability and Environmental Impact
1.2.10 Global Competitiveness
1.3 Fundamentals of Computer Programming
1.3.1 Software and Computer Program
1.3.2 Computer Programming Languages
1.4 Python Programming Language: History and Importance
1.4.1 Features of Python Programming Language
1.4.1.1 Free and Open-Source
1.4.1.2 Interpreted Language
1.4.1.3 Platform Independent
1.4.1.4 Easy to Use
1.4.1.5 Versatile
1.4.1.6 Powerful
1.4.1.7 Multiprogramming Paradigm Support
1.4.1.8 Strong Community Support and Well-Maintained Documentation
1.5 Getting Started with Python
1.5.1 Installing Python
1.5.2 Launching Python in Command Prompt
1.5.2.1 Writing/Running Python Statements in Command Prompt
1.5.2.2 Executing Python Scripts using Command Prompt
1.5.3 IDEs for Python Programming
1.5.3.1 IDLE
1.5.3.2 VS Code
1.5.3.3 PyCharm
1.6 Relationship Between Digital Agriculture Ecosystem and Python
1.7 Exercises
2. Basic Structure and Elementary Components of Python Programs
2.1 Introduction
2.2 Python Statements and Programming Style
2.2.1 Appropriate Comments
2.2.2 Well-Structured Python Executable Statements
2.3 Elementary Components
2.3.1 Identifiers
2.3.2 Variable, Constant, and Data Types
2.3.2.1 Variable
2.3.2.2 Constant
2.3.2.3 Data Types
2.3.3 Assignment Statement
2.3.3.1 Basic Assignment
2.3.3.2 Multiple Assignments
2.3.3.3 Parallel Assignments
2.3.3.4 Simultaneous/Parallel Assignments with Iterable Unpacking
2.3.3.5 Compound or Augmented Assignments
2.3.4 Arithmetic Operators and Precedence
2.3.5 Expression
2.3.6 Getting User Input and Displaying Output in Python Programs
2.3.6.1 Getting Input from the User
2.3.6.1.1 For Text Input
2.3.6.1.2 For Numerical Input
2.3.6.2 Displaying Output
2.3.6.2.1 Printing Sequence of Characters (Known as String)
2.3.6.2.2 Print Special Characters (Use of Escape Sequence)
2.3.6.2.3 Print Subset of a Sequence of Characters (Use of Indexing and Slicing)
2.3.6.2.4 Print with Separator Parameter
2.3.6.2.5 Print with End Parameter
2.3.6.2.6 Print Mathematical Expressions
2.3.6.2.7 Printing Multiple Items in a Single Print Statement
2.3.6.2.8 Printing by Specifying Decimal Places
2.4 Programming Errors and Error Handling
2.4.1 Types of Programming Errors
2.4.2 Exception Handling
2.5 Control Flow Structures (Selection and Iteration)
2.5.1 Sequential Flow Control
2.5.2 Selection Flow Control
2.5.3 Iteration Control Flow
2.5.4 Jump Flow Control
2.6 Python Functions, Methods, and Modules
2.7 Python Data Structures
2.8 File Handling
2.9 Python Packages and Libraries
2.10 Case Studies
2.11 Exercises
3. Control Flow Structures/Statements
3.1 Introduction
3.2 Comparison Operators and Logical Operators
3.3 Boolean Expressions
3.4 Conditional (Selection or Decision) Control Structures
3.4.1 if Conditional Control Structure
3.4.2 if-else Conditional Control Structure
3.4.3 Nested if-else Conditional Control Structure
3.4.4 if-elif-else Conditional Control Structure
3.4.5 Comparison of if-elif-else vs nested if-else
3.4.6 Ternary Conditional Control Structure
3.4.7 Common Indentation Errors in Conditional Statements
3.5 Iterative Flow Control Structures
3.5.1 The While Loop
3.5.2 The for Loop
3.6 Jump Flow Control Statements
3.6.1 The Break Statement
3.6.2 The Continue Statement
3.6.3 The Pass Statement
3.6.4 The Return statement
3.7 Exercises
4. Python Functions, Methods, and Modules
4.1 Python Function and Method
4.2 Benefits of Using Function/Method
4.3 Python Functions and Control Flow
4.4 Types of Functions in Python
4.4.1 User-Defined Functions
4.4.1.1 Defining a User-Defined Function
4.4.1.2 User-Defined Function Calling
4.4.1.3 Types of Argument Passing in User-Defined Functions
4.4.1.3.1 Argument Passing by Value
4.4.1.3.2 Argument Passing by Reference
4.4.1.4 User-Defined Functions with Return Statement
4.4.1.5 User-Defined Functions and Variable Scope
4.4.1.5.1 Local Scope
4.4.1.5.2 Global Scope
4.4.1.5.3 Enclosing (Nonlocal) Scope
4.4.1.5.4 Built-in Scope
4.4.2 Built-in Functions
4.4.2.1 The input() Function
4.4.2.2 Built-in Output (print()) Function
4.4.2.2.1 Formatting in print() Function
4.4.2.3 Built-in (Data) Type Conversion Functions
4.4.2.4 Built-in Mathematical Functions
4.4.2.5 Built-in String Functions
4.5 Python Module
4.5.1 User-Defined Python Modules
4.5.1.1 Creation of Python Module
4.5.1.2 Using Python Module
4.5.1.3 Use of__name__
4.6 Built-in Modules
4.6.1 Python Random Module
4.6.1.1 random() and randint(start_number, stop_number) Methods
4.6.1.2 The seed() Method
4.6.2 Python Datetime Module
4.6.3 The Math Module
4.7 Exercises
5. Python Data Structures
5.1 Introduction
5.2 List
5.2.1 List Creation
5.2.1.1 Creating List using Square Brackets [ ]
5.2.1.2 Creating List using List Class Constructors
5.2.1.3 List creation with Multiplication Operator
5.2.1.4 Creating List Using List Comprehensions
5.2.2 Common List Operations
5.2.2.1 Accessing List Element(s)
5.2.2.2 Traversing (All or Specified) List Elements
5.2.2.3 Membership Testing of List Element
5.2.2.4 Use of len(), min(), max(), sum() Built-in Functions
5.2.2.5 Use of + and * Operators with Python Lists
5.2.2.6 Use of Comparison Operator with Python List
5.2.2.7 Use of Assignment Operator with Python List
5.2.3 Methods for List Manipulation
5.2.3.1 Adding Data Elements
5.2.3.2 Removing Data Elements
5.2.3.3 List Processing Methods
5.2.4 Two-Dimensional Lists
5.2.4.1 Creating and Accessing a Two-Dimensional (2D) List
5.2.4.2 Accessing 2D List Element(s)
5.2.4.3 Traversing 2D List Elements
5.2.4.4 Membership Testing of 2D List Element
5.2.4.5 Common Operations on 2D List
5.3 Tuple
5.3.1 Tuple Creation
5.3.2 Accessing Tuple Data Elements
5.3.3 Common Operations and Tuple Methods
5.4 Set
5.4.1 Set Creation
5.4.2 Accessing Set Data Elements
5.4.3 Adding Elements to Python Set
5.4.4 Removing Elements from Python Set
5.4.5 Operations on Python Sets
5.5 Python Dictionary
5.5.1 Python Dictionary Creation and Accessing Data Elements
5.5.2 Common Dictionary Operations
5.5.3 Membership Testing, Adding, and Removal of Dictionary Elements
5.6 Exercises
6. File Handling in Python
6.1 File Handling
6.2 File Operations
6.2.1 File Existence Check
6.2.2 File Opening and Closing in Python
6.2.3 Text File Reading in Python
6.2.4 Reading Binary Files in Python
6.2.5 File Writing in Python
6.2.6 File Deletion in Python
6.2.6.1 Deleting File Using os.remove() Method
6.2.6.2 Deleting File Using send2trash() Method
6.2.6.3 Deleting Empty Directory Using os.rmdir() Method
6.2.6.4 Deleting Non-empty Directory Using rmtree() Method
6.3 Examples: File Handling in Agricultural Context
6.3.1 Example 1: Reviewing Crop Yield Data
6.3.2 Example 2: Storing Rainfall Data
6.3.3 Example 3: Appending New Records in Rainfall Data
6.3.4 Example 4: Copying of Soil Test Records
6.3.5 Example 5: Copying of Binary Files
6.3.5.1 Example 1: Copying of Small Binary Files
6.3.5.2 Example 2: Copying of Large Binary Files
6.3.5.3 Example 3: Use of copyfile(), copy(), and copy2() methods
6.4 Exercises
7. Data Science and Python Packages
7.1 Introduction to Data Science
7.2 Python Packages
7.3 Python NumPy Package
7.3.1 Benefits of Python NumPy Package
7.3.1.1 Memory Efficient
7.3.1.2 Fast
7.3.1.3 Convenient
7.3.2 Benefits of Using NumPy for Agricultural Data
7.3.2.1 Creation of NumPy Arrays
7.3.2.2 Arithmetic Operations on NumPy Arrays
7.3.2.3 Comparison Operations on NumPy Arrays
7.3.2.4 Indexing and Slicing
7.3.2.5 Boolean Indexing and Aggregation Functions
7.3.2.6 NumPy Array Broadcasting
7.3.2.7 Reshaping and Resizing NumPy Arrays
7.3.2.8 Use of loadtxt() and genfromtxt() Methods of NumPy Package
7.3.2.9 Case Study 7.1: Selection of High-Yielding Varieties Using Trait Data
7.4 Pandas
7.4.1 Types of Pandas Data Structures
7.4.2 Benefits of Using Pandas for Agricultural Data
7.4.2.1 Creation and Use of Python Pandas Series
7.4.2.2 Creation and Use of Python Pandas DataFrame
7.4.2.3 Common Operations on Python Pandas DataFrames
7.4.2.4 Customized Filtering in Pandas DataFrames
7.4.2.5 Sorting and Ranking Operations on Pandas DataFrames
7.4.2.6 Merging and Joining Pandas DataFrames
7.4.2.7 Aggregation and Grouping of Pandas DataFrames
7.5 Exercises
8. Data Science and Python Libraries
8.1 Introduction to Python Libraries
8.2 Python Matplotlib Library
8.2.1 Plot Line Graphs with Matplotlib Using Python Data Structures and DataFrames
8.2.1.1 Line Graph Using Python List Data
8.2.1.2 Line Graph Using Python Tuple Data
8.2.1.3 Line Graph Using Python Dictionary Data
8.2.1.4 Line Graph Using Python Set Data
8.2.1.5 Line Graph Using Python Pandas DataFrames
8.2.1.6 Twin Line Graph
8.2.2 Plotting Bar Graphs with Matplotlib
8.2.2.1 Plotting Vertical Bar Graph
8.2.2.2 Plotting Horizontal Bar Graph
8.2.2.3 Plotting Stacked Bar Graph
8.2.2.4 Plotting Multiple Bars in a Bar Graph
8.2.3 Plotting Multiple Graphs in Single Plot
8.2.4 Plotting Pie Graphs
8.2.5 Plotting Scatter Graph
8.2.6 Plotting Histogram Graph
8.3 Scikit-learn Python Library
8.3.1 Key Steps for Scikit-learn Machine Learning Project
8.3.2 Case Study 8.1: Predicting Crop Yield Using Environmental and Agricultural Inputs
8.3.2.1 Step 1: Setting Up the Environment
8.3.2.2 Step 2(a) Data Preparation: Loading/Reading the Dataset
8.3.2.3 Step 2(b) – Exploring the dataset using Pandas’ and Matplotlib’s built-in methods
8.3.2.4 Step 2(c) Data Preparation: Dataset Cleaning
8.3.2.4.1 Dataset Cleaning by Handling Missing Values
8.3.2.4.2 Dataset Cleaning by Detecting and Treating Outliers
8.3.2.4.3 Dataset Cleaning by Resolving Inconsistencies
8.3.2.5 Step 2(c) Data Preparation: Preprocessing
8.3.2.5.1 Scaling Numerical Values
8.3.2.6 Step 2(d) Data Preparation: Splitting Dataset
8.3.2.7 Step 3: Model Selection, Training, and Predictions
8.3.2.8 Step 4: Model Evaluation
8.3.2.9 Step 5: Saving the Trained Model
8.4 Exercises
Index
[/spoiler]