code: public String seriesToString(double[] series, NumberFormat df) {
      StringBuffer sb = new StringBuffer();
      sb.append('[');
      for (double d : series) {
        sb.append(df.format(d)).append(',');
      }
      sb.delete(sb.length() - 2, sb.length() - 1).append("]");
      return sb.toString();
    }
docs: Prettyfies the timeseries for screen output.
  
  @param series the data.
  @param df the number format to use.
  
  @return The timeseries formatted for screen output.