When you replace index of a series, in the beginning of the article, you should use dot notation to assign it to your series: data.index = ['a','b','c','d']
instead of: index = ['a','b','c','d']
The next: data[data["StockCode"] == 71053]["Quantity"].hist() only works if you quote the StockCode value: data[data["StockCode"] == "71053"]["Quantity"].hist()
And these 2 histograms only show the result as on your webpage if you use the original "data" data frame without omissions of negative revenues
Read more… (73 words)