上下文
我正在为数据科学学习python,并使用Foursquare API探索坐标附近的场地。它返回一个JSON文件,所以我创建了一个函数,使用'Foursquare'包从Foursquare结果返回Pandas DataFrame(github.com/mLewisLogic/foursquare)然后提取并将数据附加到一个数据帧。在
这个函数在我的Jupyter笔记本中工作(你可以在这里查看这个函数https://github.com/dacog/foursquare_api_tools/blob/master/foursquare_api_tools/foursquare_api_tools.py),我想让其他人更容易使用它,并试图创建一个可以直接从github使用pip安装的包。我成功地创建了一个包并将其发布到github进行测试,但是当我尝试使用它返回的函数时NameError: name 'pd' is not defined
试用软件包的步骤
^{pr2}$
我得到了NameError Traceback (most recent call last)
in ()
3 import pandas as pd
4
----> 5 ft.venues_explore(client,lat='40.7233',lng='-74.0030',limit=100)
/opt/conda/envs/DSX-Python35/lib/python3.5/site-packages/foursquare_api_tools/foursquare_api_tools.py in venues_explore(client, lat, lng, limit)
3 This returns a pandas dataframe wi