aws/aws-sdk-pandas

change the name of "mode" argument to awswrangler.s3.to_csv

開放

#2,409 建立於 2023年7月25日

 (5 則留言) (0 個反應) (1 位負責人)Python (630 個分叉)batch import
enhancementhelp wantedinvestigating

倉庫指標

星標
 (3,560 顆星)
PR 合併指標
 (平均合併 6天 23小時) (30 天內合併 37 個 PR)

描述

Describe the bug

The method (awswrangler.s3.to_csv) supports a "mode" argument and **pandas_kwargs. The "mode" argument is not passed through to Pandas, but consumed in the awswrangler method, which also expects dataset=True to use "mode". In some cases, it would be useful to pass this argument through to Pandas.

If there is already a way to pass "mode" to Pandas, a documentation update would resolve this issue:

How to Reproduce

import awswrangler as wr

...

load a DataFrame and name it df

...

Pandas "mode"

wr.s3.to_csv(df, "some_test_file_name", mode="a", header=False)

awswrangler expects mode="append", dataset=True

Expected behavior

No response

Your project

No response

Screenshots

No response

OS

AWS Lambda x86_64 Architecture

Python version

3.10

AWS SDK for pandas version

3.2.0

Additional context

No response

貢獻者指南