Overview

Colcalc - is simple column calculator. It operates on textual data in
tabular form.

  Usage
  =====
 
> colcalc [options] files

colcalc uses following options:

  -h, --help            show this help message and exit
  -e EXPR, --expr=EXPR  expression to evaluate. Can be separated by commas
  -x EXPRESSION, --exact=EXPRESSION
                        exact option (not separated by commas)
  -f FILTER, --filter=FILTER
                        Row printed only when it evaluates to True
  -p, --preserve        Preserve empty and commented lines
  --print               Print expression row by row [default]
  --sum                 Print sum of each column
  --mean                Print mean of each column
  --max                 print maximum value for each row
  --min                 print minimum value for each row

 
 Expression syntax
 =================

Following variables are defined. Variable is defined only if
correcponding column is present. E.g. for 2-column data variables x,
y, x1 and x2 are defined whereas z, x3, x4... are not

 * x,y,z - first, second and third columnt respectively.
 * x#    - where # stays for number e.g. x1,x4. Nth column.
 * N     - line number. Empty lines and comments are not counted.

Available functions and symbolic constants:

 * pi = 3.14159....
 * e  = 2.71828....

 * float     - convert to float
 * int       - convert to int (truncate)
 * round     - round number 

 * degrees   - radian to degrees
 * radians   - degrees to radians

 * sin       - sine
 * cos       - cosine
 * tan,tg    - tangens
  
 * asin      - arcsine
 * acos      - arccosine
 * atan      - 
 * atan2     -

 * sinh,sh   - hypebolic sine
 * cosh,ch   - hypebolic sine
 * tanh,th   - hypebolic tangens

 * exp         - exponent 
 * log(x,base) - logarithm, default base - e
 * ln          - same as log
 * log10       - decimal logarithm
 * pow(x,y)    - x to yth power

 * fabs        - Absolute value


  Examples 
  ========

print first column without changes and divide second by third in two variants:

> $ colcalc data -e 'x1, x2/x3' 
> $ colcalc data -e 'x, y/z'