Skip to content

Instantly share code, notes, and snippets.

@mdefende
mdefende / postgres.py
Last active March 23, 2023 23:05
Easy functions to interface with a postgres database
from io import StringIO, BytesIO
import pickle
import pandas as pd
import psycopg2
# Postgres connector functions
def connect(params_dic):
""" Connect to the PostgreSQL database server
params_dic should be a parameter dictionary with the following fields: