Recent Python posts

Effective Python Projects

2022-04-05 | Effective Python, Python, pandas, data

The best way to learn Python is to use it to solve a real-life problem you face. I’m often asked to suggest example projects that are good for

View post

Effective Python Dates

2022-02-20 | Effective Python, Python, dates

Problems arise when computers interact with the real world. You step out of a controlled environment into one with user inputs, paper jams, invalid filenames, and dates. Dates are on the

View post

Effective Python Files

2022-02-10 | Effective Python, Python, path

If you write a program of any length, then you have to manipulate files and filenames. Common tasks include:

View post

Effective Python R Style Regression

2022-02-09 | R, regression, Python, Effective Python, matplotlib, statsmodels

I use R, but I love Python. However, let’s face it, basic linear regression in R is very straightforward. A few clear and intuitive lines of R code

View post

Effective Python Outline

2022-01-20 | programming, Python, Effective Python

General Python About, goals and objectives; leverage the work of others, use established libraries String manipulation and slicing Lists and slicing Dictionaries Sets Strings and Unicode,

View post

Effective Python Zip Enumerate and Iter

2022-02-15 | Effective Python, Python, iterables, enumerate, iter, zip

This short post looks at three built-in Python functions: zip, enumerate, and iter.

View post

Effective Python Strings and Unicode

2022-02-15 | Effective Python, Python, strings

What the �—±?† ? Ever cut and paste text between applications and get unexpected results? Particularly when the source is a webpage? For example, the sentence1

View post

Effective Python Introspection With Pandas

2022-02-15 | Effective Python, Python, pandas, introspection

TBD.

View post

Cartograms

2022-02-02 | cartograms, Python

sadf TODO Global cartos using Penn World Tables Use gridded data LP approach to shape placement

View post

Code Snippets

2022-02-02 | programming, code, Python

Computer Setup Add to PATH variable: single location (\S\bin) for personal scripts includes publish.bat script Add to PYTHONPATH variable: current projects

View post

The Aggregate Package

2022-01-28 | programming, Python, aggregate, aggregate loss distributions

The aggregate Python package makes working with aggregate loss distributions easy.

View post

Regular Expressions

2022-01-28 | programming, Python, regular expressions

Regular expressions are a wonderful shorthand way to select and manipulate strings.

View post