Hello,
I have the following code that produces a dictionary:
def gen_dict(a, b, c,d,f,**kwargs):
data=dict()
data.update(Sdate=c)
data.update(Edate=d)
data.update(freq=f)
if kwargs is not None:
data.update(kwargs)
return data
That once given these parameters:
a=['JP3705200008']
b=['TR.CompanyMarketCap']
c='03/21/2017'
d='03/22/2017'
f='D'
The outcome is:
data={'ShType': 'FFL', 'Frq': 'D', 'Edate': '03/22/2017', 'Curn': 'USD', 'Sdate': '03/21/2017'}
When I try to pass that to get_data(a, b, **data) I get errors, but when I hardcode the dictionary into get_data it works well.
How can I pass dictionaries as arguments to get_data function?