I have a dataframe in Python. Can I write this data to Redshift as a new table? I have successfully created a db connection to Redshift and am able to execute simple sql que
import pandas_redshift as pr
pr.connect_to_redshift(dbname = ,
host = ,
port = ,
user = ,
password = )
pr.connect_to_s3(aws_access_key_id = ,
aws_secret_access_key = ,
bucket = ,
subdirectory = )
# Write the DataFrame to S3 and then to redshift
pr.pandas_to_redshift(data_frame = data_frame,
redshift_table_name = 'gawronski.nba_shots_log')
Details: https://github.com/agawronski/pandas_redshift