Notes of using Python for Data Analytics

Chapter 0: Foundations of Python Basic syntax Data types, indexing, and slicing Flow control and looping Functions Object-oriented programming List comprehensions Regular expression Data input and output Chapter 1: Essential libraries Numpy Pandas Basic data visualization Scatter Plots Histograms Cumulative Frequencies Error-bars Box plots Pie Charts Chapter 2: Statistics brief review Descriptive statistics Distribution center…

Python: Flow control and looping

If…else statement can be found in most mainstream programming languages to control the flow of your program’s execution. With your predescribed conditions, your program is capable of handling different circumstances by corresponding treatment. The basic syntax is: if condition_expression: statement(s) elif condition_expression: statement(s) else: statement(s) Both elif and else are optional and mul tiple elif is…

Data types, indexing, and slicing

In this article, I would like to briefly review the native data types in Python, comparing with those well-known data types provided by libraries, e.g., NumPy and Pandas, and focus on their essential usages. List of common data types in Python: bool int、float、complex string list tuple dict set bool int, float, and complex These are…

Python-basic syntax

Python is a modern, easy-to-learn, object-oriented programming language. It has a powerful set of built-in data types and easy-to-use control constructs. Please note that all contents in this series of notes are using Python 3. In Python interpreter, try the following command to check the version you installed: Variables play the key roles in any…

Some features in Gurobi Python interface

In order to provide a better modeling experience, Gurobi provides a few tailored objects and functions for building up optimization models. This post is a quick review of them. Gurobi tuplelist This is a subclass of list to store lists of tuples, for example: select is a very efficient way to select elements in a tuplelist….