Rust Lesson 4: Structs and Enums
Model data with structs and impl blocks, enums with data, and match to handle every case β the patterns behind most Rust programs.
Read article βExcel, SAP, Oracle & automation tips β plus wacky facts
Start-to-finish programming for people who work with data: Python, SQL, Java, R, JavaScript, Rust and PowerShell.
Model data with structs and impl blocks, enums with data, and match to handle every case β the patterns behind most Rust programs.
Read article βRustβs core idea explained simply: each value has one owner, moves, borrowing with & and &mut, and why this removes whole classes of bugs.
Read article βRust variables are immutable by default: let and let mut, integer and float types, casting with as, string slices vs String, and formatted printing.
Read article βInstall Rust with rustup, create a project with cargo new, build and run with cargo run, and understand Cargo.toml and src/main.rs.
Read article βFinal project: read every monthly CSV in a folder, combine, enrich with products and customers, compute KPIs and write a multi-sheet Excel report withβ¦
Read article βTurn a script into a reusable tool with options and help text using argparse, and run it from a batch file or Windows Taskβ¦
Read article βRead and write JSON, call a REST API with requests, check status codes and handle errors, and convert rupees to other currencies from anβ¦
Read article βWrite Excel files people like to open: several sheets, live formulas, header styles, number formats, frozen panes and a chart, all from Python withβ¦
Read article βUse Python regex with named groups to parse UPI bank narrations and validate GSTIN, PAN and phone numbers, with patterns explained piece by piece.
Read article βClean types with to_datetime and to_numeric, merge three tables, use named aggregations in groupby and build pivot tables, avoiding the duplicate-column trap.
Read article βParse and format dates with strptime and strftime, compute FY labels and quarters, add working days with holidays and find month ends with datetime.
Read article βProcess files with bad rows without crashing: catch specific exceptions, log what was skipped and why, and use finally for clean-up.
Read article βBones are stronger than steel of the same weight.
Weight for weight, bone is remarkably strong, especially under compression, because of its mix of collagen and mineral.