Python Automation

  1. Working with Common Data Formats
    1. Plain Text Files
      1. Opening Files
        1. File Modes
          1. Encoding Considerations
          2. Reading from Files
            1. Reading Entire Files
              1. Reading Line by Line
                1. Reading Specific Amounts
                2. Writing to Files
                  1. Overwriting Files
                    1. Appending to Files
                      1. Writing Multiple Lines
                      2. File Context Managers
                        1. Using with Statements
                          1. Automatic File Closing
                          2. File Iteration
                            1. Handling Large Files
                            2. CSV Files
                              1. Understanding CSV Format
                                1. The csv Module
                                  1. Reading CSV Data
                                    1. csv.reader
                                      1. Reading Rows as Lists
                                        1. Handling Headers
                                          1. Custom Delimiters
                                            1. Handling Quotes and Escaping
                                            2. Writing CSV Data
                                              1. csv.writer
                                                1. Writing Rows
                                                  1. Writing Headers
                                                    1. Custom Delimiters and Quoting
                                                    2. Dictionary-Based CSV Operations
                                                      1. DictReader
                                                        1. DictWriter
                                                          1. Working with Column Names
                                                          2. Handling CSV Dialects
                                                            1. Error Handling in CSV Processing
                                                            2. JSON Data
                                                              1. Understanding JSON Format
                                                                1. The json Module
                                                                  1. Reading JSON Data
                                                                    1. json.load for Files
                                                                      1. json.loads for Strings
                                                                        1. Handling JSON Arrays and Objects
                                                                        2. Writing JSON Data
                                                                          1. json.dump for Files
                                                                            1. json.dumps for Strings
                                                                              1. Formatting and Indentation
                                                                                1. Sorting Keys
                                                                                2. Handling Complex Data Types
                                                                                  1. Custom Serialization
                                                                                    1. Date and Time Objects
                                                                                    2. JSON Schema Validation
                                                                                      1. Error Handling in JSON Processing
                                                                                      2. Excel Spreadsheets
                                                                                        1. Understanding Excel File Formats
                                                                                          1. The openpyxl Library
                                                                                            1. Installing openpyxl
                                                                                              1. Opening Workbooks
                                                                                                1. Accessing Worksheets
                                                                                                  1. Reading Cell Values
                                                                                                    1. Reading Ranges of Cells
                                                                                                      1. Writing Data to Cells
                                                                                                        1. Creating New Worksheets
                                                                                                          1. Creating New Workbooks
                                                                                                            1. Modifying Cell Formatting
                                                                                                              1. Working with Formulas
                                                                                                                1. Saving Workbooks
                                                                                                                  1. Closing Workbooks
                                                                                                                  2. Alternative Libraries
                                                                                                                    1. xlrd for Reading
                                                                                                                      1. xlwt for Writing
                                                                                                                        1. pandas for Data Analysis
                                                                                                                      2. PDF Documents
                                                                                                                        1. Understanding PDF Structure
                                                                                                                          1. The PyPDF2 Library
                                                                                                                            1. Installing PyPDF2
                                                                                                                              1. Opening PDF Files
                                                                                                                                1. Extracting Text from Pages
                                                                                                                                  1. Extracting Metadata
                                                                                                                                    1. Merging PDF Files
                                                                                                                                      1. Splitting PDF Documents
                                                                                                                                        1. Rotating Pages
                                                                                                                                          1. Adding Watermarks
                                                                                                                                          2. Alternative PDF Libraries
                                                                                                                                            1. pdfplumber
                                                                                                                                              1. PyMuPDF
                                                                                                                                              2. Limitations of PDF Text Extraction
                                                                                                                                              3. Word Documents
                                                                                                                                                1. Understanding Word Document Structure
                                                                                                                                                  1. The python-docx Library
                                                                                                                                                    1. Installing python-docx
                                                                                                                                                      1. Opening Documents
                                                                                                                                                        1. Reading Document Content
                                                                                                                                                          1. Paragraphs
                                                                                                                                                            1. Runs
                                                                                                                                                              1. Tables
                                                                                                                                                              2. Adding Content
                                                                                                                                                                1. Text
                                                                                                                                                                  1. Headings
                                                                                                                                                                    1. Lists
                                                                                                                                                                      1. Tables
                                                                                                                                                                        1. Images
                                                                                                                                                                        2. Modifying Formatting
                                                                                                                                                                          1. Creating New Documents
                                                                                                                                                                            1. Saving Documents
                                                                                                                                                                            2. Working with Document Properties
                                                                                                                                                                              1. Handling Document Styles