ezoic

Friday, January 5, 2018

connect python to redshift

connect python to redshift

import psycopg2
import os
import pandas as pd
import operator
import re
from sqlalchemy import create_engine
import numpy as np

engine = create_engine(postgresql+psycopg2://USername:Password@analytics-rs.cmt1xypzh9sm.us-west-1.redshift.amazonaws.com:5439/consumerdata')

campaign_table = pd.read_sql_query("select * from stg.dcm2_campaigns",engine)

campaign_table[:20]


R is not a simple programming language, and it does better on reading excel files than python

R is not a simple programming language, and it does better on reading excel files than python . tried to read excel files to python and R. i...