I have the following code:
import pandas as pd
from pandas_datareader import data as web
import numpy as np
from scipy.stats import nbinom
import matplotlib.pyplot as plt
import datetime
data = web.get_data_yahoo('^GSPC', start, end)
data.plot(y='Close')
plt.title("newtitle " +start) <--- I want a string and pass a variable to the title
I want to be able to pass a variable and text at the same time in the label fields but for some reason i can pass either a variable or a string but not both. Is there anyway it is possible for me to be able to pass both?