Guest User

Untitled

a guest
Jul 22nd, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. import pandas as pd
  2. table = pd.read_html("http://www.sharesansar.com/c/today-share-price.html")
  3. dfs = pd.DataFrame(data = table)
  4. print dfs
  5.  
  6. 0 S.No ...
  7.  
  8. for df in dfs:
  9. print df
  10.  
  11. import pandas as pd
  12. import dryscrape
  13.  
  14. s = dryscrape.Session()
  15. s.visit("http://www.sharesansar.com/c/today-share-price.html")
  16. df = pd.read_html(s.body())[5]
  17. df.head()
  18.  
  19. import pandas as pd
  20. import dryscrape
  21.  
  22. dryscrape.start_xvfb()
  23. s = dryscrape.Session()
  24. s.visit("http://www.sharesansar.com/c/today-share-price.html")
  25. # df = pd.read_html(s.body())[5]
  26. # df.head()
  27.  
  28. df = pd.read_html(s.body())[4]
  29. print(df)
Add Comment
Please, Sign In to add comment