title: How to set new list value based on condition in dataframe in Pyspark?
body: <p>I have a DataFrame like below.</p>
  
  <pre><code>+---+------------------------------------------+
  |id |features                                  |
  +---+------------------------------------------+
  |1  |[6.629056, 0.26771536, 0.79063195,0.8923] |
  |2  |[1.4850719, 0.66458416, -2.1034079]       |
  |3  |[3.0975454, 1.571849, 1.9053307]          |
  |4  |[2.526619, -0.33559006, -1.4565022]       |
  |5  |[-0.9286196, -0.57326394, 4.481531]       |
  |6  |[3.594114, 1.3512149, 1.6967168]          |
  +---+------------------------------------------+
  </code></pre>
  
  <p>I want to set some of my features value based on my where condition like below. I.e. where <code>id=1</code>, <code>id=2</code> or <code>id=6</code>.</p>
  
  <p>I want to set new  features value where <code>id=1</code>, I current features value is <code>[6.629056, 0.26771536, 0.79063195,0.8923]</code>, but I want to set <code>[0,0,0,0]</code>.</p>
  
  <p>I want to set new  features value where <code>id=2</code>, I current features value is <code>[1.4850719, 0.66458416, -2.1034079]</code>, but I want to set <code>[0,0,0]</code>.</p>
  
  <p>My final out put will be:</p>
  
  <pre><code>+------+-----------------------------------+
  |id  | features                            |
  +-----+---------------------------------- -+
  |1  | [0, 0, 0, 0]                          |
  |2  | [0,0,0]                              |
  |3  | [3.0975454, 1.571849, 1.9053307]     |
  |4  | [2.526619, -0.33559006, -1.4565022]  |
  |5  | [-0.9286196, -0.57326394, 4.481531]  |
  |6  | [0,0,0]                              |
  +-----+------------------------------------+
  </code></pre>