Ben Chuanlong Du's Blog

It is never too late to learn.

Pivot Table in pandas DataFrame

DataFrame.pivot vs pandas.pivot_table

  1. Both DataFrame.pivot and pandas.pivot_table can generate pivot tables. pandas.pivot_table aggregate values while DataFrame.pivot not.

Loops in Java

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

  1. The condition(s) in a regular for or while loop is recomputed before each iteration. Not only the change of loop variables but also other variables involved in the loop condition …

Arrays in Java

Comments

  1. An array in Java is not an Iterable (due to design reasons). There is no super class of array and Iterable either in Java. If you want a method to support both array and Iterable as the parameter, you need to overload it (for both array and Iterable.) It is the same situation in Kotlin as Kotlin is mostly Java.