Handling a feature with multiple categorical values for the same instance value
One possible approach is to perform an encoding, where each level of the feature2 corresponds to a new feature (column).
This way you may describe the 1:N relation between the feature 1 and 2

Here a small example in R

&gt; table1  &lt;- data.frame(id = c(1,2),  feature1 = c("xyz","abc"), predict = c(T,T))
&gt; table2  &lt;- data.frame(id = c(1,1,1,2), feature2 = c("class1", "class2", "class3", "class2"))
&gt; 
&gt; ## encoding
&gt; table(table2)
   feature2
id  class1 class2 class3
  1      1      1      1
  2      0      1      0


The new object contains the (now unique) id and setting of the feature2.
You need only to merge (join) the result to the table1 (basically same task a DB join - which variance: inner, outer or full depends on your requirements).