Skip to content

uliang/First-steps-with-the-Python-language

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

First-steps-with-the-Python-language

Introduction to base python and programming constructs

This the jupyter notebook for a two day course in Python for Data visualization and analysis. The material here covers basic Python programming concepts.

In the second day, we cover the usage of matplotlib to create scientific visualisations.

Contents

Day 1


Unit 1.1

  1. The print command, Hello world! and a quick walkthough Jupyter Notebooks.
  2. The basic objects of Python: int, str, float and bool. Arithmetic operations and concatenation. The type function.
  3. str objects. Accessing and manipulating strings.
  4. list objects. Slicing and indexing lists. pop and insert methods.

Unit 1.2

  1. The dict data structure. Learning about .keys and .items methods. How to update dictionaries
  2. The if, else and elif construct. Conditionals.
  3. The for construct. Iterating through a list or string. Using break to exit a loop prematurely.

Unit 1.3

  1. Introducing functions. The def keyword. Defining and calling functions. Scope and keyword arguments.
  2. Anonymous functions. The lambda keyword.
  3. Built in Python functions: zip and enumerate.
  4. List comprehension.

Unit 2.1

  1. Series structure, basic operations on series.
  2. Indexing and selecting data, boolean masking.
  3. Delaing with missing values

Unit 2.2

  1. DataFrame structure. Working with rows and columns.
  2. Conditional selection.
  3. A case study: Olympic Games dataset.

Unit 2.3

  1. Using the .groupby method. Split-apply-combine dataframes.
  2. Merging dataframes.
  3. Melting dataframes.

Day 2


Unit 3.1

  1. Introducing basic function of the plot function.
  2. Using plot to create time series plots and scatterplots.
  3. Use matplotlib marker codes to customize our graph.
  4. Case study: Historical exchange rates for OECD and non-OECD countries.

Unit 3.2

  1. Using pyplot.hist to plot barcharts and histograms with matplotlib.
  2. Customizing histograms.
  3. 2D histograms and hexbin plots.
  4. Using and customizing colorbars.

Unit 4.1

  1. Using seaborn.distplot and seaborn.kdeplot.
  2. Visualizing linear relationships.

Unit 4.2

  1. Using stripplot, swarmplot, boxplot, violinplot, countplot, barplot and pointplot.

Unit 4.3

  1. Figure level plots from seaborn: JointGrid and jointplot.
  2. PairGrid, pairplot and FacetGrid.
  3. lmplot for visualizing multiple linear regression.
  4. factorplot for visualising ANNOVA and linear models with categorical inputs.

About

Introduction to base python and programming constructs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published