'None of [Int64Index([0, 1], dtype='int64', name='Status')] are in the [columns]

#listing 5-16

data_dow_status = data.groupby(['Sms_Reminder', 'Status'])['Sms_Reminder'].count().unstack('Status').fillna(0)
data_dow_status[[0, 1]].plot.df.loc(kind='bar', stacked=True)
plt.title('Frequency of people showing up and not showing up by number of SMS reminders sent')
plt.xlabel('Number of SMS reminders')
plt.ylabel('Frequency')

KeyError: "None of [Int64Index([0, 1], dtype='int64', name='Status')] are in the [columns]"

may i get help please. i dont know how to fixed



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source