url scraping error
```
pd.show_versions()

INSTALLED VERSIONS
------------------
commit: None
python: 2.7.10.final.0
python-bits: 64
OS: Linux
OS-release: 4.2.0-34-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_IN

pandas: 0.18.0
nose: None
pip: 8.1.1
setuptools: 20.3.1
Cython: 0.23.5
numpy: 1.11.0
scipy: 0.17.0
statsmodels: 0.6.1
xarray: None
IPython: 4.1.2
sphinx: None
patsy: 0.4.1
dateutil: 2.5.2
pytz: 2016.3
blosc: None
bottleneck: 1.0.0
tables: None
numexpr: 2.5.1
matplotlib: 1.5.1
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: 4.4.1
html5lib: 0.999
httplib2: 0.9
apiclient: None
sqlalchemy: 1.0.12
pymysql: None
psycopg2: None
jinja2: 2.8
boto: None
```

```
from nsepy import get_history
from datetime import date
import pandas as pd
import requests
from io import BytesIO 
import certifi
from dateutil.relativedelta import relativedelta
#import numpy as np
#import matplotlib.pyplot as plt
import datetime
import numpy as np
import matplotlib.colors as colors
import matplotlib.finance as finance
import matplotlib.dates as mdates
import matplotlib.ticker as mticker
import matplotlib.mlab as mlab
import matplotlib.pyplot as plt
import matplotlib.font_manager as font_manager
import requests
from nsepy.archives import html_to_rows
from bs4 import BeautifulSoup
import pandas as pd
import numpy as np
import matplotlib as plt
'''
import sys


reload(sys)  
sys.setdefaultencoding('Cp1252')
'''
url1 = 'http://www.nseindia.com/live_market/dynaContent/live_watch/option_chain/optionKeys.jsp?segmentLink=17&instrument=OPTIDX&symbol=NIFTY&date=26MAY2016'
def dataFromHtmlInPy(url):

    headers = { 'Accept' : '*/*',
                'User-Agent' : 'Mozilla/5.0',
                'Refers' : 'http://www.nseindia.com',
                'Connection' : 'keep-alive'
              }

    getContents = requests.get(url,headers=headers).text
    #dataFromHtm=pd.read_html(BytesIO(getContents))
        dataFromHtm = BeautifulSoup(getContents, "lxml")
        return dataFromHtm

data=pd.DataFrame(dataFromHtmlInPy(url=url1))
print(data.head())
```

I am new to panda and python.however I need dataframe as the same in the url1.
few info i need to scrapped from there. i need to calculate daily PCR. 
i encounter an error like:

```

Traceback (most recent call last):
  File "dataFromNsePage.py", line 46, in <module>
    data=pd.DataFrame(dataFromHtmlInPy(url=url1))
  File "/usr/local/lib/python2.7/dist-packages/pandas/core/frame.py", line 282, in __init__
    raise TypeError("data argument can't be an iterator")
TypeError: data argument can't be an iterator 
```
