Reading from Postgres SQL in a Jupyter Notebook I am trying to read data directly from Postgres to my python environment with the below:

import psycopg2 as pg
import pandas.io.sql as psql
conn = pg.connect(database="abcd",user="postgres", password="xxxx")
df = pd.read_sql('SELECT * "xyz"', conn)
df.head()


But I get the below error when reading:


  DatabaseError: Execution failed on sql 'SELECT * "xyz"': syntax error at or near ""xyz""
  LINE 1: SELECT * "trans"
You didn't specify important keyword "FROM":

df = pd.read_sql('SELECT * "xyz"', conn)


so the right one is:

df = pd.read_sql('SELECT * FROM "xyz"', conn)