Skip to content

Commit

Permalink
Add intro to Python section
Browse files Browse the repository at this point in the history
  • Loading branch information
douglatornell committed Apr 12, 2023
1 parent 7f3fbac commit fb0e0b3
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
1 change: 1 addition & 0 deletions index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ This is documentation by and for members of the MOAD (Mesoscale Ocean and Atmosp
bash_config
conda_pkg_env_mgr
analysis_repo
python
jupyter
github_notebooks_readme
vscode
Expand Down
53 changes: 53 additions & 0 deletions python.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
.. Copyright 2018 – present by The UBC EOAS MOAD Group
.. and The University of British Columbia
..
.. Licensed under a Creative Commons Attribution 4.0 International License
..
.. https://creativecommons.org/licenses/by/4.0/
.. _MOAD-Python:

******
Python
******

Most of the analysis and tools in the Salish Sea MEOPAR project are written in `Python`_,
though Matlab makes occasional guest appearances.

.. _Python: https://www.python.org/

`Python Programming for Data Science (PY4DS)`_ is a good,
grad level,
introduction to Python,
some programming topics,
`NumPy`_,
and `Pandas`_.
Its target audiences are people who know how to program in a language other than Python,
or people who know a little Python and want/need to know more about the language,
good programming practices,
and scientific Python.
It was written by `Tomas Beuzen`_ based on material he and others developed to teach the
“DSCI 511 Python Programming for Data Science” course in the UBC Master of Data Science Program.

.. _Python Programming for Data Science (PY4DS): https://www.tomasbeuzen.com/python-programming-for-data-science/README.html
.. _NumPy: https://numpy.org/
.. _Pandas: https://pandas.pydata.org/
.. _Tomas Beuzen: https://www.tomasbeuzen.com/

Don't worry too much about Anonymous Functions
(aka ``lambda``) in chapter 2,
section 7,
nor about Inheritance and Subclasses in chapter 3,
section 3.

PY4DS goes pretty deep into `Pandas`_.
That's absolutely appropriate for the MDS program,
and some of that depth is relevant for MOAD analyses.
The intro to Pandas is also a good basis for jumping off into `xarray` for working with netCDF datasets because xarray is inspired by and based on Pandas.

.. _xarray: https://docs.xarray.dev/en/stable/

Another good resource for learning about Python is the `Real Python`_ site.

.. _Real Python: https://realpython.com/

0 comments on commit fb0e0b3

Please sign in to comment.