Skip to main content

Pandas on AWS.

Project description

AWS Data Wrangler

Pandas on AWS

AWS Data Wrangler

An AWS Professional Service open source initiative | aws-proserve-opensource@amazon.com

Release Python Version Code style: black License

Checked with mypy Coverage Static Checking Documentation Status

Source Downloads Installation Command
PyPi PyPI Downloads pip install awswrangler
Conda Conda Downloads conda install -c conda-forge awswrangler

Powered By

Table of contents

Quick Start

Installation command: pip install awswrangler

import awswrangler as wr
import pandas as pd
from datetime import datetime

df = pd.DataFrame({"id": [1, 2], "value": ["foo", "boo"]})

# Storing data on Data Lake
wr.s3.to_parquet(
    df=df,
    path="s3://bucket/dataset/",
    dataset=True,
    database="my_db",
    table="my_table"
)

# Retrieving the data directly from Amazon S3
df = wr.s3.read_parquet("s3://bucket/dataset/", dataset=True)

# Retrieving the data from Amazon Athena
df = wr.athena.read_sql_query("SELECT * FROM my_table", database="my_db")

# Get a Redshift connection from Glue Catalog and retrieving data from Redshift Spectrum
con = wr.redshift.connect("my-glue-connection")
df = wr.redshift.read_sql_query("SELECT * FROM external_schema.my_table", con=con)
con.close()

# Amazon Timestream Write
df = pd.DataFrame({
    "time": [datetime.now(), datetime.now()],   
    "my_dimension": ["foo", "boo"],
    "measure": [1.0, 1.1],
})
rejected_records = wr.timestream.write(df,
    database="sampleDB",
    table="sampleTable",
    time_col="time",
    measure_col="measure",
    dimensions_cols=["my_dimension"],
)

# Amazon Timestream Query
wr.timestream.query("""
SELECT time, measure_value::double, my_dimension
FROM "sampleDB"."sampleTable" ORDER BY time DESC LIMIT 3
""")

Read The Docs

Community Resources

Please send a Pull Request with your resource reference and @githubhandle.

Logging

Enabling internal logging examples:

import logging
logging.basicConfig(level=logging.INFO, format="[%(name)s][%(funcName)s] %(message)s")
logging.getLogger("awswrangler").setLevel(logging.DEBUG)
logging.getLogger("botocore.credentials").setLevel(logging.CRITICAL)

Into AWS lambda:

import logging
logging.getLogger("awswrangler").setLevel(logging.DEBUG)

Who uses AWS Data Wrangler?

Knowing which companies are using this library is important to help prioritize the project internally.

Please send a Pull Request with your company name and @githubhandle if you may.

Amazon SageMaker Data Wrangler?

Amazon SageMaker Data Wrangler is a new SageMaker Studio feature that has a similar name but has a different purpose than the AWS Data Wrangler open source project.

  • AWS Data Wrangler is open source, runs anywhere, and is focused on code.

  • Amazon SageMaker Data Wrangler is specific for the SageMaker Studio environment and is focused on a visual interface.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

awswrangler-2.1.0.tar.gz (122.8 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

awswrangler-2.1.0-py3.6.egg (325.7 kB view details)

Uploaded Egg

awswrangler-2.1.0-py3-none-any.whl (150.6 kB view details)

Uploaded Python 3

File details

Details for the file awswrangler-2.1.0.tar.gz.

File metadata

  • Download URL: awswrangler-2.1.0.tar.gz
  • Upload date:
  • Size: 122.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.6.12

File hashes

Hashes for awswrangler-2.1.0.tar.gz
Algorithm Hash digest
SHA256 be1cda956d804b5fb216737e3a47904895291b768bd2817aad1f959a84ef76ba
MD5 8b6adc6011ff8daa4326b0ffd9d420f8
BLAKE2b-256 463528aefe2c101007c0771e9d0b64e27cb139f2a0e10571b108b67a65ff94bb

See more details on using hashes here.

File details

Details for the file awswrangler-2.1.0-py3.6.egg.

File metadata

  • Download URL: awswrangler-2.1.0-py3.6.egg
  • Upload date:
  • Size: 325.7 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.6.12

File hashes

Hashes for awswrangler-2.1.0-py3.6.egg
Algorithm Hash digest
SHA256 30f61cca0f0fa72e05b6a4f14388433a6c41559bfb44a75428de64982ee88769
MD5 ae658cb52f4e02c8d569adc317215bee
BLAKE2b-256 8af53ada1650561a1629c7c8f5626be1b78f56b1df7960fe96cb6762eaa520ce

See more details on using hashes here.

File details

Details for the file awswrangler-2.1.0-py3-none-any.whl.

File metadata

  • Download URL: awswrangler-2.1.0-py3-none-any.whl
  • Upload date:
  • Size: 150.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.6.12

File hashes

Hashes for awswrangler-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cbe361c837b03c04c0a724655c3ed55533af4e50e625e29ab9a3670644e49b23
MD5 825749bcc4bd20fbae4b15846849f3ba
BLAKE2b-256 aa19859c65e265fc38fa29afbc6f9766a12df1b51d020d68ee3fcc548eae610c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page