<SYSTEM_TASK:>
Given the following text problem statement, write Python code to implement the functionality described below in problem statement
<END_TASK>
<USER_TASK:>
Problem:
Given a pandas DataFrame, how does one convert several binary columns (where 1 denotes the value exists, 0 denotes it doesn't) into a single categorical column? 
<ASSISTANT_TASK:>
Python Code:
import pandas as pd
df = pd.DataFrame({'A': [1, 0, 0, 0, 1, 0],
                   'B': [0, 1, 0, 0, 0, 1],
                   'C': [0, 0, 1, 0, 0, 0],
                   'D': [0, 0, 0, 1, 0, 0]})
df["category"] = df.idxmax(axis=1)
<END_TASK>