I imported pandas as pd.
>>>import pandas as pd
Assigned Series variables 'city_names' and 'population'
>>> city_names=pd.Series(['San Fransisco','San Jose','Sacromento'])
>>> population=pd.Series([8964,91598,034892])
Created DataFrame
>>> pd.DataFrame=({'City Name': city_names, 'Population':population})
While assigning DataFrame to the variable 'cities',
>>> cities=pd.DataFrame({'City Name ' : city_names, 'Population' : population})
I am getting the following error :
Traceback (most recent call last):
File "<pyshell#17>", line 1, in <module>
cities=pd.DataFrame({'City Name ' : city_names, 'Population' : population})
TypeError: 'dict' object is not callable
Also aware that 'dict' is a dictionary with (key,value) pairs! please let me know why this error occurs. I looked into other questions as well but could'nt find help.