Best for
Repeatable calculations
Use Python when calculations need version control, automation, plotting, or reusable scripts.
Engineering coding guide
Search Python libraries, functions, and code patterns used for engineering calculations, data analysis, plotting, automation, and simulation.
Code lookup
Filter by library, function, calculation task, data workflow, or example syntax.
Best for
Use Python when calculations need version control, automation, plotting, or reusable scripts.
Watch out
Package versions, virtual environments, and units can change results or break scripts.
Searchable reference
| Category | Command / Function | Purpose | Example / Use |
|---|---|---|---|
| Core | math.sqrt | Compute square root for scalar values | math.sqrt(25) |
| Core | pathlib.Path | Build readable file paths | Path("data") / "run.csv" |
| NumPy | np.linspace | Create evenly spaced samples | np.linspace(0,1,101) |
| NumPy | np.linalg.solve | Solve a linear system | x = np.linalg.solve(A,b) |
| pandas | pd.read_csv | Load tabular CSV data | df = pd.read_csv("test.csv") |
| pandas | DataFrame.groupby | Summarize data by category | df.groupby("material").mean() |
| SciPy | solve_ivp | Solve ordinary differential equations | solve_ivp(model,[0,10],y0) |
| SciPy | optimize.minimize | Find a minimum of an objective | minimize(cost,x0) |
| Plotting | plt.plot | Create a line plot | plt.plot(t,y) |
| Symbolic | sympy.solve | Solve symbolic equations | solve(Eq(x**2,4),x) |
| Excel | openpyxl.load_workbook | Open an Excel workbook | load_workbook("calc.xlsx") |
| Testing | assert | Check expected results | assert area > 0 |
How to use
task -> command -> example
Start with the task you need, then check the command, function, or shortcut syntax before using it in a real workflow.
version + module + units
Software behavior can change by version, workspace, add-in, toolbox, shell, or engineering unit system.
example -> small test -> real work
Use the examples as starting patterns and confirm results with a small test file, sample model, or known calculation.
inputs + method + result
Record the inputs, method, version, and assumptions so engineering results can be reviewed later.
Workflow notes
An isolated Python environment that keeps project dependencies separate from other projects.
A structured set of values commonly handled with NumPy for vectorized engineering calculations.
A pandas table used to clean, join, summarize, and export engineering data.
An interactive document that combines code, plots, results, and notes for exploration and reporting.
FAQ
Search by command, function, shortcut, task, or example, then adapt the pattern to your drawing, model, code, spreadsheet, or simulation workflow.
Use them as quick reference patterns. Validate syntax, units, versions, and outputs before using the result in production engineering work.
Search is faster than scanning long documentation when you know the task but need the exact command, function, or syntax reminder.
Related
AutoCAD command reference for drafting and modeling.
C++ function reference for technical programming.
Excel functions and shortcuts for engineering work.
LaTeX command reference for technical documents.
Linux command reference for engineering workflows.
MATLAB functions for engineering and numerical analysis.
OpenFOAM command and function reference.
SolidWorks keyboard shortcuts and workflow reference.
Tell us what would make EngLab more useful for your engineering work.