Skip to content

Commit 5bba007

Browse files
committed
upd column order
Signed-off-by: Anton Kukushkin <[email protected]>
1 parent 22b3e51 commit 5bba007

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

awswrangler/_utils.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -898,7 +898,11 @@ def list_to_arrow_table(
898898
if not schema:
899899
names = []
900900
if mapping:
901-
names = list({k for row in mapping for k in row.keys()})
901+
names = list(mapping[0].keys())
902+
for row in mapping:
903+
for k in row.keys():
904+
if k not in names:
905+
names.append(k)
902906
for n in names:
903907
v = [row[n] if n in row else None for row in mapping]
904908
arrays.append(v)

0 commit comments

Comments
 (0)