title: PySpark - Unpivot data frame using regex expressions
body: <p>I have the below dataframe that has results after few calculations.</p>
  
  <pre><code>+------+--------+------------+------------+------------+-----------+-----------------+------------+-----------+-----------------+
  | label| machine|value1_count|value2_count|value1_score|value1_band|value1_band_score|value2_score|value2_band|value2_band_score|
  +------+--------+------------+------------+------------+-----------+-----------------+------------+-----------+-----------------+
  |label1|machine1|           2|           0|       91.67|        low|               70|       100.0|     normal|              100|
  |label1|machine2|           1|           1|       95.83|        low|               70|       95.83|        low|               70|
  |label2|machine3|           3|           2|        87.5|        low|               70|       91.67|        low|               70|
  |label2|machine4|           1|           1|       95.83|        low|               70|       95.83|        low|               70|
  +------+--------+------------+------------+------------+-----------+-----------------+------------+-----------+-----------------+
  </code></pre>
  
  <p>Data frame can have _count, _score, _band, _band_score columns for value3, value4 etc. Now, I want to unpivot this data so that I can get data in the below format:</p>
  
  <pre><code>+------+--------+----------+-----+-----+------+----------+
  | label| machine|value_type|count|score|  band|band_score|
  +------+--------+----------+-----+-----+------+----------+
  |label1|machine1|    value1|    2|91.67|   low|        70|
  |label1|machine1|    value2|    0|  100|normal|       100|
  |label1|machine2|    value1|    1|95.83|   low|        70|
  |label1|machine2|    value2|    1|95.83|   low|        70|
  |label2|machine3|    value1|    3| 87.5|   low|        70|
  |label2|machine3|    value2|    2|91.67|   low|        70|
  |label2|machine4|    value1|    1|95.83|   low|        70|
  |label2|machine4|    value2|    1|95.83|   low|        70|
  +------+--------+----------+-----+-----+------+----------+
  </code></pre>
  
  <p>I think unpivot with regex will be useful here, but I'm not able to achieve that. Can someone please help me on this?</p>
  
  <p>Thanks in advance</p>