Table1:
=======

```
class   male    female
1   2   1
2   0   2
3   2   0

```

table2:
=======

```
class   gender
1   m
1   f
1   m
2   f
2   f
3   m
3   m

```

Using spark-scala take the data from table1 and dump into another table in the format of table2 as given.Also please do vice-versa

Please help me in this guys.

Thanks in Advance