Python Fundamentals
- “Basic data types in Python include integers, strings, and floating-point numbers.”
- “Use
variable = valueto assign a value to a variable in order to record it in memory.” - “Variables are created on demand whenever a value is assigned to them.”
- “Use
print(something)to display the value ofsomething.” - Functions take zero or more parameters that send a value or variable to the code in the function to use.
- “Built-in functions are always available to use.”
Loading and Analyzing Argo Float Data
- “Import a library into a program using
import libraryname.” - “Use the
numpylibrary to work with arrays in Python.” - “The expression
array.shapegives the shape of an array.” - “Use
array[x, y]to select a single element from a 2D array.” - “Array indices start at 0, not 1.”
- “Use
low:highto specify aslicethat includes the indices fromlowtohigh-1.” - “Use
numpy.mean(array),numpy.max(array), andnumpy.min(array)to calculate simple statistics.” - “The
argopylibrary can load Argo float data over the internet from the GDAC”
Visualizing Argo Data
- “Use the
pyplotmodule from thematplotliblibrary for creating simple visualisations.” - “We can give imported modules a short name by using the
askeyword after the import.” - “Argopy has its own built in visaulisation functions”