1
>>> df = pd.DataFrame(data = ['a','b','b','c'],index=['day1','day1','day2','day2'],columns=['name'])
name
day1 a
day1 b
day2 b
day2 c
我怎麼能轉換DF與布爾值的二維數據幀像如何使用布爾值將一維DataFrame展開爲二維DataFrame?
a b c
day1 1 1 0
day2 0 1 1