ENH: df.to_parquet() should return bytes #37105
Labels
API - Consistency
Internal Consistency of API/Behavior
Enhancement
IO Parquet
parquet, feather
Needs Discussion
Requires discussion from core team before further action
Milestone
Is your feature request related to a problem?
I find it useful to write a parquet to a
bytes
object for some unit tests. The code that I currently use to do this is quite verbose.To provide some background,
df.to_csv()
(w/o args) just works. It returns astr
object as is expected. In the same vein,df.to_parquet()
(w/o args) should return abytes
object.More precisely, the current behavior is:
Describe the solution you'd like
The requested behavior is:
Other uses of
df.to_parquet
should obviously remain unaffected.API breaking implications
It won't break the documented API.
Describe alternatives you've considered
I currently use this verbose code to get what I want:
This workaround is too effortful.
The text was updated successfully, but these errors were encountered: