You need to import numpy as well in your first block of code. It’s because squeeze() function is used when we want to remove 1-D entries from an array.
import numpy as np
Now, you have to make a slight changes where you are calling your “make_dashboard” function. Don’t pass the attributes as int, float or list. You have to pass it as an array.
make_dashboard(x=np.array(x),gap_change=np.array(gap_change),unemployment=np.array(unemployment), title=title, file_name=file_name)
This should run the program.
1
solved AttributeError: ‘int’ object has no attribute ‘squeeze’