judahrand commented on code in PR #39506:
URL: https://github.com/apache/arrow/pull/39506#discussion_r1511077524
##########
python/pyarrow/table.pxi:
##########
@@ -5217,6 +5533,13 @@ def record_batch(data, names=None, schema=None,
metadata=None):
if isinstance(data, (list, tuple)):
return RecordBatch.from_arrays(data, names=names, schema=schema,
metadata=metadata)
+
+ elif isinstance(data, dict):
+ if names is not None:
+ raise ValueError(
+ "The 'names' argument is not valid when passing a dictionary")
+ return RecordBatch.from_pydict(data, schema=schema, metadata=metadata)
Review Comment:
I've pulled those changes in given that I'd already had most of it:
https://github.com/apache/arrow/pull/39506/commits/666b8e0ae7ff2fdbb72860237f14a783d1c06c22
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]