You’ll want to use the IPython shell instead of a regular Python shell (which is a pain). Read through the first couple chapters of “Learning IPython for Interactive Computing and Data Visualization”, which is attached. It has great information on the basics of IPython. IPython will be installed along with the Anaconda python distribution. Note that this book also has some good chapters of computing using IPython, but it assumes you already know Python. Therefore, I suggest you move onto step 3 first.
Then start working your way through JR Johanssen’s lectures on Python; PDF is also attached (http://nbviewer.ipython.org/github/jrjohansson/scientific-python-lectures/tree/master/). Chapter 1 gives a nice and concise introduction to Python programming. Subsequent chapters explain how to use Python for data analysis, including Chapter 5 on matplotlib which is the standard graphics package. (For the future, see Chapter 6 on how to easily interface Python with Fortran (and C)).
A) Everything in Python is an “object”, so learn how to query them.
help(object)
dir(object)
B) Learn about the common Python objects.
Integers
Floats
Booleans
Lists (and Tuples)
Dictionaries
Make sure that you understand what Lists and Dictionaries are in Python. (Tuples are very similar to Lists.) These are described in Section 2.6 in Johanssen’s tutorial. These are essential building blocks in Python. For instance, arrays in Numerical Python (numpy) are like Lists, and netCDF files usually behave like Dictionaries. This isn’t very important for you now, but it might be later!
And numpy arrays later !!
C) Parentheses matter in Python; use them to understand what an object is.
Round vs. square vs. “squiggle”
This is quick way to understand what you can do with an object.
D) Also get used to using type(object).
This is an alternative to understanding parentheses.
E) Substitute comprehensions for for loops whenever possible (because they’re compact and slick).
A gallery of interesting Jupyter and IPython notebooks
This is an important utility for converting files in HDF4 format (such as HDF-EOS) to HDF5 format, so that they can be easily read into Python using the h5py or gdal modules.
Make sure that you understand what Lists and Dictionaries are in Python. (Tuples are very similar to Lists.) These are described in Section 2.6 in Johanssen’s tutorial. These are essential building blocks in Python. For instance, arrays in Numerical Python (numpy) are like Lists, and netCDF files usually behave like Dictionaries. This isn’t very important for you now, but it might be later!
And numpy arrays later !!
pandas Series and DataFrames (similar to R)
3) My own tips
A) Everything in Python is an “object”, so learn how to query them.
help(object)
dir(object)
B) Learn (and use) about the common Python objects.
C) Parentheses matter in Python; use them to understand what an object is.
Round vs. square vs. “squiggle”
This is quick way to understand what you can do with an object.
D) Also get used to using type(object).
This is an alternative to understanding parentheses.
E) Substitute comprehensions for for loops whenever possible (because they’re compact and slick).