From 29870f542da6f1ec4dd028a4255143b638f48ba8 Mon Sep 17 00:00:00 2001 From: Christian Kolset Date: Fri, 29 Aug 2025 12:41:42 -0600 Subject: Updated canvas to actually refer to the notes in the vault. This results in the label creation at the top header to reference when showing the block. --- tutorials/module_4/1_importing_scientific_data.md | 40 +++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 tutorials/module_4/1_importing_scientific_data.md (limited to 'tutorials/module_4/1_importing_scientific_data.md') diff --git a/tutorials/module_4/1_importing_scientific_data.md b/tutorials/module_4/1_importing_scientific_data.md new file mode 100644 index 0000000..b51558b --- /dev/null +++ b/tutorials/module_4/1_importing_scientific_data.md @@ -0,0 +1,40 @@ +# Importing Scientific Data using Pandas + +^8eb966 + +[Introduction text] + + +Pandas is a library that is built on top of NumPy and is there for customarily to import both when working with Pandas. + +```python +import numpy as np +import pandas as pd +``` + + +DataFrame + +A `DataFrame` in pandas is a two-dimensional data structure like table with rows and columns. + + + +```python +# Tensile test data +data = { + "Force (N)": [10, 15, 20, 25], + "Displacement (mm)": [1.2, 1.8, 2.5, 3.0], + "Stress (MPa)": [2.6, 3.9, 5.2, 6.5], +} +``` + + + +Object Creation + +```python +# Create DataFrame with row labels +df = pd.DataFrame(data, index=["Test1", "Test2", "Test3", "Test4"]) + +print(df) +``` \ No newline at end of file -- cgit v1.2.3