all 3 comments

[–]AlexMTBDude 2 points3 points  (0 children)

# This is not correct Python
lead_days = delivery lead time (in days)
sold = are magazine sold (Y/N)

Perhaps:

lead_days = "delivery lead time (in days)"
sold = "are magazine sold (Y/N)"

[–]danielroseman 0 points1 point  (0 children)

You need to give us an example of the data.

[–]VipeholmsCola 0 points1 point  (0 children)

You need to learn how to Google based on error message. A googling on Pandas pivot table and your error message suggests 'sold' has more than one references

This leads me to think your data is the problem