Seddryck/NBi

Column-aware transformations

Opened this issue · 0 comments

Some transformations are requiring that you know more than just the current value of a column. You also need to be aware of some values such as the min/max/avg/median of the column.

Such alterations of a column include:

  • normalize is comparing the current value to the minimum and the maximum value of this column. If the value is equal to the minimum then the normalization returns 0. When the value is equal to the maximum then the normalization returns 1. Any other value will be represented as (Value-Min)/(Max-Min). If max and min are equal then the result is 1.
  • rank returns the rank of each row. The rank of a row is one plus the number of ranks that come before the row in question. It provides the same numeric value for ties.
  • row-number returns the rank of each row. The rank of a row is one plus the number of ranks that come before the row in question. It provides distinct numeric value for ties.
  • dense-rank is identical to rank with no gaps in the ranking values after some ties.
  • ntile is distributing the rows in an ordered partition into a specified number of groups. The groups are numbered, starting at one. For each row, NTILE returns the number of the group to which the row belongs.