title: Check whether a data frame comma separated column value is present in a list and based on that create final data frame
body: <p>I have below data frame -</p>
  <pre><code>Id  value
  A   1,2,3
  B   3,4
  C   5,6
  </code></pre>
  <p>I want to check if the &quot;value&quot; are present in below list -</p>
  <pre><code>B=[1,3]
  </code></pre>
  <p>and based on that, I want to create below resultant data frame -</p>
  <pre><code>Id  value_inscope   value_outofscope
  A      1,3                 2
  B      3                   4
  C                        5,6
  </code></pre>
  <p>I have tried filtering or looping through the data frame. Can anyone please suggest a step forward?</p>