title: NameError: name 'pd' is not defined when calling a function in custom package
body: <p><strong>Context</strong></p>
  
  <p>I'm learning python for Data Science and I'm using Foursquare API to explore venues near a coordinate. It returns a JSON file, so I created a function to return a Pandas DataFrame from Foursquare results using 'foursquare' package (github.com/mLewisLogic/foursquare) and then extract append the data to a DataFrame.</p>
  
  <p>The function works in my Jupyter Notebook (you can check the function here <a href="https://github.com/dacog/foursquare_api_tools/blob/master/foursquare_api_tools/foursquare_api_tools.py" rel="nofollow noreferrer">https://github.com/dacog/foursquare_api_tools/blob/master/foursquare_api_tools/foursquare_api_tools.py</a>), and I though about making it easier for others and tried to create a package which could be installed using pip directly from github. I successfully created a package and published it to github to test it, but when I'm trying to use the function it returns </p>
  
  <pre><code>NameError: name 'pd' is not defined
  </code></pre>
  
  <p><strong>Steps to try the package</strong></p>
  
  <pre><code>!pip install git+https://github.com/dacog/foursquare_api_tools.git#egg=foursquare_api_tools
  
  # @hidden_cell
  CLIENT_ID = 'Secret' # your Foursquare ID
  CLIENT_SECRET = 'Secret' # your Foursquare Secret
  VERSION = '20180605' # Foursquare API version
  
  from foursquare_api_tools import foursquare_api_tools as ft
  
  ft.venues_explore(client,lat='40.7233',lng='-74.0030',limit=100)
  </code></pre>
  
  <p>and I get </p>
  
  <pre><code>NameError                                 Traceback (most recent call last)
  &lt;ipython-input-47-0a062ed9d667&gt; in &lt;module&gt;()
        3 import pandas as pd
        4 
  ----&gt; 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 with name, city ,country, lat, long, postal code, address and main category as columns'''
        4         # creata a dataframe
  ----&gt; 5         df_a = pd.DataFrame(columns=['Name', 'City', 'Latitude','Longitude','Category','Postal Code', 'Address'])
        6         ll=lat+','+lng
        7         #get venues using client https://github.com/mLewisLogic/foursquare
  
  NameError: name 'pd' is not defined
  </code></pre>
  
  <p>I tried <code>import pandas as pd</code> in the main notebook, inside the function, in __init__.py always with the same result.</p>
  
  <p>You can check the code at <a href="https://github.com/dacog/foursquare_api_tools" rel="nofollow noreferrer">https://github.com/dacog/foursquare_api_tools</a></p>
  
  <p>It's the first time I'm creating a package and pretty new to python, so any help will be greatly appreciated.</p>
  
  <p><strong>UPDATES</strong>
  Pandas is working fine in the environment when I'm doing the tests.
  <a href="https://i.stack.imgur.com/zJ3rG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zJ3rG.png" alt="enter image description here"></a></p>
  
  <p>The installed Python versions are:</p>
  
  <pre><code>!which python --&gt; /home/jupyterlab/conda/bin/python
  
  !whereis python
  /usr/bin/python /usr/bin/python2.7 /usr/lib/python2.7 /etc/python /etc/python2.7
  /usr/local/lib/python2.7 /usr/share/python
  /home/jupyterlab/conda/bin/python /home/jupyterlab/conda/bin/python3.6
  /home/jupyterlab/conda/bin/python3.6-config /home/jupyterlab/conda/bin/python3.6m /home/jupyterlab/conda/bin/python3.6m-config /usr/share/man/man1/python.1.gz
  </code></pre>