Skip to content

Commit 281ad53

Browse files
committed
Adding support for Pandas 1.1.0.
1 parent 56c6362 commit 281ad53

File tree

7 files changed

+17
-8
lines changed

7 files changed

+17
-8
lines changed

awswrangler/athena/_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def _fetch_txt_result(query_metadata: _QueryMetadata, keep_files: bool, boto3_se
127127
na_values=[],
128128
use_threads=False,
129129
boto3_session=boto3_session,
130-
names=query_metadata.dtype.keys(),
130+
names=list(query_metadata.dtype.keys()),
131131
sep="\t",
132132
)
133133
if keep_files is False:

awswrangler/s3/_write_parquet.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,8 @@ def to_parquet( # pylint: disable=too-many-arguments,too-many-locals
149149
https://github.com/awslabs/aws-data-wrangler/blob/master/tutorials/022%20-%20Writing%20Partitions%20Concurrently.ipynb
150150
mode: str, optional
151151
``append`` (Default), ``overwrite``, ``overwrite_partitions``. Only takes effect if dataset=True.
152+
For details check the related tutorial:
153+
https://aws-data-wrangler.readthedocs.io/en/latest/stubs/awswrangler.s3.to_parquet.html#awswrangler.s3.to_parquet
152154
catalog_versioning : bool
153155
If True and `mode="overwrite"`, creates an archived version of the table catalog before updating it.
154156
database : str, optional

awswrangler/s3/_write_text.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,8 @@ def to_csv( # pylint: disable=too-many-arguments,too-many-locals
147147
https://github.com/awslabs/aws-data-wrangler/blob/master/tutorials/022%20-%20Writing%20Partitions%20Concurrently.ipynb
148148
mode : str, optional
149149
``append`` (Default), ``overwrite``, ``overwrite_partitions``. Only takes effect if dataset=True.
150+
For details check the related tutorial:
151+
https://aws-data-wrangler.readthedocs.io/en/latest/stubs/awswrangler.s3.to_parquet.html#awswrangler.s3.to_parquet
150152
catalog_versioning : bool
151153
If True and `mode="overwrite"`, creates an archived version of the table catalog before updating it.
152154
database : str, optional

requirements-dev.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ flake8==3.8.3
77
mypy==0.782
88
pydocstyle==5.0.2
99
doc8==0.8.1
10-
tox==3.18.0
10+
tox==3.18.1
1111
pytest==5.4.3
1212
pytest-cov==2.10.0
13-
pytest-xdist==1.33.0
13+
pytest-xdist==1.34.0
1414
scikit-learn==0.23.1
1515
cfn-lint==0.34.0
1616
cfn-flip==1.2.3
1717
twine==3.2.0
1818
sphinx==3.1.2
1919
sphinx_bootstrap_theme==0.7.1
2020
moto==1.3.14
21-
jupyterlab~=2.2.0
21+
jupyterlab~=2.2.2

requirements.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
set -ex
33

44
pip install --upgrade pip
5-
pip install --upgrade --requirement requirements-dev.txt
6-
pip install --upgrade --editable .
5+
pip install --upgrade --upgrade-strategy eager --requirement requirements-dev.txt
6+
pip install --upgrade --upgrade-strategy eager --editable .

requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ botocore>=1.15.49,<2.0.0
33
numpy>=1.18.0,<1.20.0
44
pymysql>=0.9.0,<0.11.0
55
sqlalchemy-redshift>=0.7.0,<0.9.0
6+
pandas>=1.0.0,<1.2.0
67
SQLAlchemy~=1.3.10
7-
pandas~=1.0.0
88
pyarrow~=1.0.0
9-
s3fs~=0.4.2
109
psycopg2-binary~=2.8.0
10+
s3fs==0.4.2

tests/test_athena.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -765,3 +765,8 @@ def test_parse_describe_table():
765765
parsed_df = wr.athena._utils._parse_describe_table(df)
766766
assert parsed_df["Partition"].to_list() == [False, False, False, True, True]
767767
assert parsed_df["Column Name"].to_list() == ["iint8", "iint16", "iint32", "par0", "par1"]
768+
769+
770+
def test_describe_table(path, glue_database, glue_table):
771+
wr.catalog.create_parquet_table(database=glue_database, table=glue_table, path=path, columns_types={"c0": "int"})
772+
assert wr.athena.describe_table(database=glue_database, table=glue_table).shape == (1, 4)

0 commit comments

Comments
 (0)