我有一个包含三列的表:A, B和C。每列进一步分为两个子列:Name和Rule。
我需要使用 matplotlib在Name子列中绘制三个饼图,但我不知道如何提取子列。这是我尝试过的,但没有奏效:
chart = df['A'['Name']].value_counts().plot(kind='pie', labels=labels, autopct='%1.1f%%')
python matplotlib pandas
matplotlib ×1
pandas ×1
python ×1