Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

athena connector python

from pyathena import connect
from pyathena.util import as_pandas

cursor = connect(aws_access_key_id="YOUR_ACCESS_KEY_ID",
                 aws_secret_access_key="YOUR_SECRET_ACCESS_KEY",
                 s3_staging_dir="s3://YOUR_S3_BUCKET/path/to/",
                 region_name="us-west-2").cursor()
cursor.execute("SELECT * FROM many_rows")
df = as_pandas(cursor)
print(df.describe())
Comment

PREVIOUS NEXT
Code Example
Python :: np load csv 
Python :: what is my python working directory 
Python :: find allurl in text python 
Python :: python slice an array 
Python :: nan float python 
Python :: binary search tree iterator python 
Python :: how to find csrf token python 
Python :: sort value_counts output 
Python :: python enumerate start at 1 
Python :: mad scipy 
Python :: pyplot bar plot colur each bar custom 
Python :: date to day python 
Python :: python get random character from string 
Python :: turn list of tuples into list 
Python :: remove outliers in dataframe 
Python :: remove character python 
Python :: confusion matrix python code 
Python :: django dumpdata 
Python :: pyqt5 line edit password input 
Python :: python- find multiple values in a column 
Python :: python unzip list 
Python :: hotkey python 
Python :: python code to remove vowels from a string 
Python :: count values pandas 
Python :: read excel file spyder 
Python :: fibonacci sequence python 
Python :: pandas to_csv no index 
Python :: pandas append index ignore 
Python :: change working directory python 
Python :: 2d array python3 
ADD CONTENT
Topic
Content
Source link
Name
4+1 =