DOUBT IN FDS#113 STACKED BAR PLOT
in the module FDS#113 stacked bar plot
while I am executing the code FOR STACKED BAR PLOT
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import urllib.request
import json
#STACKED BAR PLOT
df=pd.read_json("data.json")
with open("data.json") as f:
data=json.load(f)
data=data["states_daily"]
df=pd.json_normalize(data)
df=df.tail(3)
df.drop('date',axis=1,inplace=True)
df.drop('dateymd',axis=1,inplace=True)
df.drop('tt',axis=1,inplace=True)
df.set_index('status',inplace=True)
df=df.T#states on rows on decesed ,recovered ,confirmed in cols
df.apply(pd.to_numeric)
#plt.bar(df.index,df.Confirmed)
plt.bar(df.index,df.Deceased,bottom=df.Confirmed+df.Recovered)
plt.xticks(rotation=90)
I am getting an error =only size-1 arrays can be converted to Python scalars
PLEASE HELP