I have a pandas dataframe in which one column of text strings contains multiple comma-separated values. I want to split each field and create a new row per entry only where the number of commas is equal to 2. My entire dataframe has only values with either no. of commas =1 or 2.
For example, a should become b:

```
In [7]: a
Out[7]: 
    var1   var2   var3
0  a,b,c     1     X
1  d,e,f     2     Y
2  g,h       3     Z

```

```
In [8]: b
Out[8]: 
     var1  var2   var3
0    a,c     1     X
1    b,c     1     X
2    d,f     2     Y
3    e,f     2     Y
4    g,h     3     Z

```