Ben Chuanlong Du's Blog

It is never too late to learn.

Diversified Investment

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

  1. Index funds, ETFs and mutual funds are some popular ways of diversified investment. A mutual fund is actively managed (by a portfolio manager) while an index fund or ETF is passive …

`ifelse` on Pandas Series

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Series.apply + Lambda Function

DataFrame.apply + Lambda Function

axis=1: apply the lambda function on each row

List Comprehension

numpy.where

numpy.where is vectorized ifelse.

Tips on GitHub Actions

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Tips and Traps

  1. You can use sudo without password in Linux and macOS when running GitHub Actions.

  2. GitHub Actions supports manual triggers with workflow_dispatch. Workflow parameters are supported in manually triggers …