We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
!pip install --user psycopg2
import psycopg2
import pandas as pd
conn = psycopg2.connect("dbname=mimic user=mimic password=Mimic@4@plhi")
cur = conn.cursor()
def create_pandas_table(sql_query, database = conn): table = pd.read_sql_query(sql_query, database) return table
def create_pandas_table(sql_query, database = conn):
table = pd.read_sql_query(sql_query, database)
return table
df = create_pandas_table("select * from mimic_core.patients")
df