Python Fundamentals


  • “Basic data types in Python include integers, strings, and floating-point numbers.”
  • “Use variable = value to 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 of something.”
  • 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 numpy library to work with arrays in Python.”
  • “The expression array.shape gives 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:high to specify a slice that includes the indices from low to high-1.”
  • “Use numpy.mean(array), numpy.max(array), and numpy.min(array) to calculate simple statistics.”
  • “The argopy library can load Argo float data over the internet from the GDAC”

Visualizing Argo Data


  • “Use the pyplot module from the matplotlib library for creating simple visualisations.”
  • “We can give imported modules a short name by using the as keyword after the import.”
  • “Argopy has its own built in visaulisation functions”