madlib-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmcquillan99 <...@git.apache.org>
Subject [GitHub] madlib issue #234: Create lower case column name in encode_categorical_varia...
Date Wed, 21 Feb 2018 23:53:36 GMT
Github user fmcquillan99 commented on the issue:

    https://github.com/apache/madlib/pull/234
  
    ```
    DROP TABLE IF EXISTS abalone_out, abalone_out_dictionary;
    SELECT madlib.encode_categorical_variables (
            'abalone',                   -- Source table
            'abalone_out',               -- Output table
            'height>.10'               -- Categorical columns
            );
    SELECT * FROM abalone_out ORDER BY id;
    ```
    produces
    ```
    id | sex | length | diameter | height | rings | height>.10_false | height>.10_true

    ----+-----+--------+----------+--------+-------+------------------+-----------------
      1 | M   |  0.455 |    0.365 |  0.095 |    15 |                1 |               0
      2 | M   |   0.35 |    0.265 |   0.09 |     7 |                1 |               0
      3 | F   |   0.53 |     0.42 |  0.135 |     9 |                0 |               1
      4 | M   |   0.44 |    0.365 |  0.125 |    10 |                0 |               1
      5 | I   |   0.33 |    0.255 |   0.08 |     7 |                1 |               0
      6 | I   |  0.425 |      0.3 |  0.095 |     8 |                1 |               0
      7 | F   |   0.53 |    0.415 |   0.15 |    20 |                0 |               1
      8 | F   |  0.545 |    0.425 |  0.125 |    16 |                0 |               1
      9 | M   |  0.475 |     0.37 |  0.125 |     9 |                0 |               1
     10 |     |   0.55 |     0.44 |   0.15 |    19 |                0 |               1
     11 | F   |  0.525 |     0.38 |   0.14 |    14 |                0 |               1
     12 | M   |   0.43 |     0.35 |   0.11 |    10 |                0 |               1
     13 | M   |   0.49 |     0.38 |  0.135 |    11 |                0 |               1
     14 | F   |  0.535 |    0.405 |  0.145 |    10 |                0 |               1
     15 | F   |   0.47 |    0.355 |    0.1 |    10 |                1 |               0
     16 | M   |    0.5 |      0.4 |   0.13 |    12 |                0 |               1
     17 | I   |  0.355 |     0.28 |  0.085 |     7 |                1 |               0
     18 | F   |   0.44 |     0.34 |    0.1 |    10 |                1 |               0
     19 | M   |  0.365 |    0.295 |   0.08 |     7 |                1 |               0
     20 |     |   0.45 |     0.32 |    0.1 |     9 |                1 |               0
    (20 rows)
    ```
    which looks fine.
    



---

Mime
View raw message