Skip to content

Commit 289cf0b

Browse files
committed
Add Quick Start section in the Docs
1 parent 19df7c1 commit 289cf0b

File tree

4 files changed

+62
-65
lines changed

4 files changed

+62
-65
lines changed

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,32 @@
1616
| **PyPi** | [![PyPI Downloads](https://img.shields.io/pypi/dm/awswrangler.svg)](https://pypi.org/project/awswrangler/) | [Link](https://pypi.org/project/awswrangler/) | `pip install awswrangler` |
1717
| **Conda** | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/awswrangler.svg)](https://anaconda.org/conda-forge/awswrangler) | [Link](https://anaconda.org/conda-forge/awswrangler) | `conda install -c conda-forge awswrangler` |
1818

19+
## Quick Start
20+
21+
Install the Wrangler with: ```pip install awswrangler```
22+
23+
```py3
24+
import awswrangler as wr
25+
import pandas as pd
26+
27+
df = pd.DataFrame({"id": [1, 2], "value": ["foo", "boo"]})
28+
29+
# Storing data on Data Lake
30+
wr.s3.to_parquet(
31+
df=df,
32+
path="s3://bucket/dataset/",
33+
dataset=True,
34+
database="my_db",
35+
table="my_table"
36+
)
37+
38+
# Retrieving the data directly from Amazon S3
39+
df = wr.s3.read_parquet("s3://bucket/dataset/", dataset=True)
40+
41+
# Retrieving the data from Amazon Athena
42+
df = wr.athena.read_sql_query("SELECT * FROM my_table", database="my_db")
43+
```
44+
1945
## [Read The Docs](https://aws-data-wrangler.readthedocs.io/en/dev-1.0.0/index.html)
2046

2147
- [**What is AWS Data Wrangler?**](https://aws-data-wrangler.readthedocs.io/en/dev-1.0.0/what.html)

docs/source/index.rst

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,32 @@
1-
.. role:: raw-html(raw)
2-
:format: html
1+
Quick Start
2+
-----------
33

4-
AWS Data Wrangler
5-
=================
6-
*Pandas on AWS*
4+
>>> pip install awswrangler
75

8-
.. image:: _static/logo_transparent.png
9-
:width: 40%
10-
:alt: AWS Data Wrangler
6+
.. code-block:: py3
7+
8+
import awswrangler as wr
9+
import pandas as pd
10+
11+
df = pd.DataFrame({"id": [1, 2], "value": ["foo", "boo"]})
12+
13+
# Storing data on Data Lake
14+
wr.s3.to_parquet(
15+
df=df,
16+
path="s3://bucket/dataset/",
17+
dataset=True,
18+
database="my_db",
19+
table="my_table"
20+
)
21+
22+
# Retrieving the data directly from Amazon S3
23+
df = wr.s3.read_parquet("s3://bucket/dataset/", dataset=True)
24+
25+
# Retrieving the data from Amazon Athena
26+
df = wr.athena.read_sql_query("SELECT * FROM my_table", database="my_db")
27+
28+
Read The Docs
29+
-------------
1130

1231
.. toctree::
1332
:maxdepth: 2

docs/source/install.rst

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -66,29 +66,25 @@ SageMaker kernels (`Reference <https://github.com/aws-samples/amazon-sagemaker-n
6666
set -e
6767
6868
# OVERVIEW
69-
# This script installs a single pip package in all SageMaker conda environments, apart from the JupyterSystemEnv which is a
70-
# system environment reserved for Jupyter.
71-
# Note this may timeout if the package installations in all environments take longer than 5 mins, consider using "nohup" to run this
72-
# as a background process in that case.
69+
# This script installs a single pip package in all SageMaker conda environments, apart from the JupyterSystemEnv which
70+
# is a system environment reserved for Jupyter.
71+
# Note this may timeout if the package installations in all environments take longer than 5 mins, consider using
72+
# "nohup" to run this as a background process in that case.
7373
74-
sudo -u ec2-user -i <<EOF
74+
sudo -u ec2-user -i <<'EOF'
7575
7676
# PARAMETERS
7777
PACKAGE=awswrangler
7878
7979
# Note that "base" is special environment name, include it there as well.
8080
for env in base /home/ec2-user/anaconda3/envs/*; do
8181
source /home/ec2-user/anaconda3/bin/activate $(basename "$env")
82-
8382
if [ $env = 'JupyterSystemEnv' ]; then
84-
continue
83+
continue
8584
fi
86-
8785
nohup pip install --upgrade "$PACKAGE" &
88-
8986
source /home/ec2-user/anaconda3/bin/deactivate
9087
done
91-
9288
EOF
9389
9490
EMR

tutorials/03 - Amazon S3.ipynb

Lines changed: 3 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@
4242
"\t* [4.2 Reading multiple FWF files](#4.2-Reading-multiple-FWF-files)\n",
4343
"\t\t* [4.2.1 Reading FWF by list](#4.2.1-Reading-FWF-by-list)\n",
4444
"\t\t* [4.2.2 Reading FWF by prefix](#4.2.2-Reading-FWF-by-prefix)\n",
45-
"* [5. List objects](#5.-List-objects)\n",
46-
"* [6. Delete objects](#6.-Delete-objects)\n"
45+
"* [5. Delete objects](#6.-Delete-objects)\n"
4746
]
4847
},
4948
{
@@ -1143,41 +1142,7 @@
11431142
"cell_type": "markdown",
11441143
"metadata": {},
11451144
"source": [
1146-
"# 5. List objects"
1147-
]
1148-
},
1149-
{
1150-
"cell_type": "code",
1151-
"execution_count": 19,
1152-
"metadata": {},
1153-
"outputs": [
1154-
{
1155-
"data": {
1156-
"text/plain": [
1157-
"['s3://aws-data-wrangler-test-bucket-98ohux1n29m8/csv/file1.csv',\n",
1158-
" 's3://aws-data-wrangler-test-bucket-98ohux1n29m8/csv/file2.csv',\n",
1159-
" 's3://aws-data-wrangler-test-bucket-98ohux1n29m8/fwf/file1.txt',\n",
1160-
" 's3://aws-data-wrangler-test-bucket-98ohux1n29m8/fwf/file2.txt',\n",
1161-
" 's3://aws-data-wrangler-test-bucket-98ohux1n29m8/json/file1.json',\n",
1162-
" 's3://aws-data-wrangler-test-bucket-98ohux1n29m8/json/file2.json',\n",
1163-
" 's3://aws-data-wrangler-test-bucket-98ohux1n29m8/parquet/file1.parquet',\n",
1164-
" 's3://aws-data-wrangler-test-bucket-98ohux1n29m8/parquet/file2.parquet']"
1165-
]
1166-
},
1167-
"execution_count": 19,
1168-
"metadata": {},
1169-
"output_type": "execute_result"
1170-
}
1171-
],
1172-
"source": [
1173-
"wr.s3.list_objects(f\"s3://{bucket}/\")"
1174-
]
1175-
},
1176-
{
1177-
"cell_type": "markdown",
1178-
"metadata": {},
1179-
"source": [
1180-
"# 6. Delete objects"
1145+
"# 5. Delete objects"
11811146
]
11821147
},
11831148
{
@@ -1207,17 +1172,8 @@
12071172
"nbconvert_exporter": "python",
12081173
"pygments_lexer": "ipython3",
12091174
"version": "3.6.5"
1210-
},
1211-
"pycharm": {
1212-
"stem_cell": {
1213-
"cell_type": "raw",
1214-
"metadata": {
1215-
"collapsed": false
1216-
},
1217-
"source": []
1218-
}
12191175
}
12201176
},
12211177
"nbformat": 4,
12221178
"nbformat_minor": 4
1223-
}
1179+
}

0 commit comments

Comments
 (0)