Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct documentation for chunksize=True #2087

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions awswrangler/athena/_read.py
Original file line number Diff line number Diff line change
Expand Up @@ -807,9 +807,11 @@ def read_sql_query( # pylint: disable=too-many-arguments,too-many-locals

There are two batching strategies:

- If **chunksize=True**, a new DataFrame will be returned for each file in the query result.
- If **chunksize=True**, depending on the size of the data, one or more data frames will be
returned per each file in the query result.
Unlike **chunksize=INTEGER**, rows from different files will not be mixed in the resulting data frames.

- If **chunksize=INTEGER**, awswrangler will iterate on the data by number of rows igual the received INTEGER.
- If **chunksize=INTEGER**, awswrangler will iterate on the data by number of rows egual the received INTEGER.

`P.S.` `chunksize=True` is faster and uses less memory while `chunksize=INTEGER` is more precise
in number of rows for each Dataframe.
Expand Down Expand Up @@ -1110,9 +1112,11 @@ def read_sql_table(

There are two batching strategies:

- If **chunksize=True**, a new DataFrame will be returned for each file in the query result.
- If **chunksize=True**, depending on the size of the data, one or more data frames will be
returned per each file in the query result.
Unlike **chunksize=INTEGER**, rows from different files will not be mixed in the resulting data frames.

- If **chunksize=INTEGER**, awswrangler will iterate on the data by number of rows igual the received INTEGER.
- If **chunksize=INTEGER**, awswrangler will iterate on the data by number of rows egual the received INTEGER.

`P.S.` `chunksize=True` is faster and uses less memory while `chunksize=INTEGER` is more precise
in number of rows for each Dataframe.
Expand Down
4 changes: 3 additions & 1 deletion awswrangler/redshift.py
Original file line number Diff line number Diff line change
Expand Up @@ -1122,7 +1122,9 @@ def unload(

There are two batching strategies on awswrangler:

- If **chunked=True**, a new DataFrame will be returned for each file in your path/dataset.
- If **chunked=True**, depending on the size of the data, one or more data frames will be
returned per each file in the path/dataset.
Unlike **chunked=INTEGER**, rows from different files will not be mixed in the resulting data frames.

- If **chunked=INTEGER**, awswrangler will iterate on the data by number of rows (equal to the received INTEGER).

Expand Down
14 changes: 9 additions & 5 deletions awswrangler/s3/_read_parquet.py
Original file line number Diff line number Diff line change
Expand Up @@ -600,9 +600,11 @@ def read_parquet(

There are two batching strategies on awswrangler:

- If **chunked=True**, a new DataFrame will be returned for each file in your path/dataset.
- If **chunked=True**, depending on the size of the data, one or more data frames will be
returned per each file in the path/dataset.
Unlike **chunked=INTEGER**, rows from different files will not be mixed in the resulting data frames.

- If **chunked=INTEGER**, awswrangler will iterate on the data by number of rows igual the received INTEGER.
- If **chunked=INTEGER**, awswrangler will iterate on the data by number of rows egual the received INTEGER.
LeonLuttenberger marked this conversation as resolved.
Show resolved Hide resolved

`P.S.` `chunked=True` if faster and uses less memory while `chunked=INTEGER` is more precise
in number of rows for each Dataframe.
Expand Down Expand Up @@ -652,7 +654,7 @@ def read_parquet(
chunked : Union[int, bool]
If passed will split the data in a Iterable of DataFrames (Memory friendly).
If `True` awswrangler iterates on the data by files in the most efficient way without guarantee of chunksize.
If an `INTEGER` is passed awswrangler will iterate on the data by number of rows igual the received INTEGER.
If an `INTEGER` is passed awswrangler will iterate on the data by number of rows egual the received INTEGER.
LeonLuttenberger marked this conversation as resolved.
Show resolved Hide resolved
dataset: bool
If `True` read a parquet dataset instead of simple file(s) loading all the related partitions as columns.
categories: Optional[List[str]], optional
Expand Down Expand Up @@ -830,10 +832,12 @@ def read_parquet_table(

There are two batching strategies on awswrangler:

- If **chunked=True**, a new DataFrame will be returned for each file in your path/dataset.
- If **chunked=True**, depending on the size of the data, one or more data frames will be
returned per each file in the path/dataset.
Unlike **chunked=INTEGER**, rows from different files will not be mixed in the resulting data frames.

- If **chunked=INTEGER**, awswrangler will paginate through files slicing and concatenating
to return DataFrames with the number of row igual the received INTEGER.
to return DataFrames with the number of rows egual the received INTEGER.
LeonLuttenberger marked this conversation as resolved.
Show resolved Hide resolved

`P.S.` `chunked=True` if faster and uses less memory while `chunked=INTEGER` is more precise
in number of rows for each Dataframe.
Expand Down