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.

Best Way of Using HoloViews

Comments

  1. DataFrame.hvplot (via the Python package hvplot) is the most convenient way to use HoloViews.

  2. If you want to use HoloViews directly, it is better to create a HoloViews.Dataset object and use it for visualization.

  3. The groupby option generates a plot with a dropdown list for interactively showing plots of different groups. You can overlay plots of different groups together on the same plot simplify by calling the .overlay()

Tips on Rust

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

https://lib.rs/

Rust Blessed is an unofficial guide to the Rust ecosystem.

Installation

Please refer to Tips on rustup for installing Rust using rustup (the recommended way for most users …