I have a sample dataset as below and looking to automate the output using Python.
df = pd.DataFrame({\'C1\':[\'VAL1\',\'VAL1\',\'VAL1\',\'VAL1\',\'VAL2\',\'VA