In [4]:
from sqlalchemy import create_engine

engine = create_engine('postgresql:///to_open_data')

In [5]:
import pandas as pd

df = pd.read_sql_query('select * from "locations"', con=engine)

In [6]:
df.head()


Out[6]:
type_code type_desc code description name address phone location
0 COOL_LOCN Cooling Location LIBRARY Library Agincourt 155 Bonis Ave 416-396-8943 (-79.291554,43.786126)
1 COOL_LOCN Cooling Location COMM_CNTR Community Centre Agincourt RC 31 Glen Watford Dr 416-395-4037 (-79.276244,43.788047)
2 COOL_LOCN Cooling Location LIBRARY Library Albert Campbell 496 Birchmount Rd 416-396-8890 (-79.268637,43.708233)
3 COOL_LOCN Cooling Location LIBRARY Library Albion 1515 Albion Rd 416-394-5170 (-79.583958,43.739821)
4 COOL_LOCN Cooling Location LIBRARY Library Alderwood 2 Orianna Dr 416-394-5310 (-79.546536,43.601512)

In [ ]: