title: Transform categorical column into dummy columns using Power Query M
body: <p>Using Power Query "M" language, how would you transform a categorical column containing discrete values into multiple "dummy" columns? I come from the Python world and there are several ways to do this but one way would be below:</p>
  
  <pre><code>&gt;&gt;&gt; import pandas as pd
  &gt;&gt;&gt; dataset = pd.DataFrame(list('ABCDACDEAABADDA'),
                 columns=['my_col'])
  &gt;&gt;&gt; dataset
     my_col
  0       A
  1       B
  2       C
  3       D
  4       A
  5       C
  6       D
  7       E
  8       A
  9       A
  10      B
  11      A
  12      D
  13      D
  14      A
  &gt;&gt;&gt; pd.get_dummies(dataset)
      my_col_A  my_col_B  my_col_C  my_col_D  my_col_E
  0          1         0         0         0         0
  1          0         1         0         0         0
  2          0         0         1         0         0
  3          0         0         0         1         0
  4          1         0         0         0         0
  5          0         0         1         0         0
  6          0         0         0         1         0
  7          0         0         0         0         1
  8          1         0         0         0         0
  9          1         0         0         0         0
  10         0         1         0         0         0
  11         1         0         0         0         0
  12         0         0         0         1         0
  13         0         0         0         1         0
  14         1         0         0         0         0
  </code></pre>