-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Support str param type for partition_cols in to_parquet function #27984
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
Changes from all commits
3995d5a
93c4613
afd10c4
ec927c3
dde77c3
209eb7e
270e2c5
d200305
84ae85b
22075e7
1d4c3d0
c30029e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2156,16 +2156,22 @@ def to_parquet( | |
|
||
.. versionadded:: 0.24.0 | ||
|
||
partition_cols : list, optional, default None | ||
Column names by which to partition the dataset | ||
Columns are partitioned in the order they are given | ||
partition_cols : list or string, optional, default None | ||
Column names by which to partition the dataset. | ||
Columns are partitioned in the order they are given. | ||
String identifies a single column to be partitioned. | ||
|
||
.. versionadded:: 0.24.0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you add a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think I added it correctly. This is my first contribution so bear with me please :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can put the |
||
|
||
**kwargs | ||
Additional arguments passed to the parquet library. See | ||
:ref:`pandas io <io.parquet>` for more details. | ||
|
||
.. versionchanged:: 1.0.0 | ||
|
||
partition_cols | ||
Added ability to pass in a string for a single column name | ||
|
||
See Also | ||
-------- | ||
read_parquet : Read a parquet file. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would also try to make it a bit clearer to say that a string for a single column name is now also accepted instead of a list
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we really want to accept a sting here (and not a list)? i think we would rather be strict about this; though i suppose this is convenient as a partition col is often a single str