i am new to python .. i have my data in redshift and i want to process data faster in python. i am using python because i want to run various algorithms and also do various calculations on these data and this is not possible in redshift . i saw tutorials but its taking too much time everytime to load in python. here is my code:
import psycopg2
con=psycopg2.connect(dbname = "xxxx", host="redshifttest-icp.cooqucvshoum.us-west-2.redshift.amazonaws.com", port= "5439", user="xxxx", password= "xxxx")
cur = con.cursor()
a = "select * from xxxx ;"
import pandas as pd
df = pd.read_sql(a,con)
df = df.fillna(0)
df2=df2.fillna(0)
this is working perfectly well, but i want some method which could help me to process data faster.. can anyone please help me ?