Skip to content

Instantly share code, notes, and snippets.

@IanCal
Created September 16, 2022 13:27
Show Gist options
  • Save IanCal/a9c2593b677623f90c8fab906b3e9036 to your computer and use it in GitHub Desktop.
Save IanCal/a9c2593b677623f90c8fab906b3e9036 to your computer and use it in GitHub Desktop.
from pyarrow import csv
import pyarrow.parquet as pq
table = csv.read_csv("BasicCompanyDataAsOneFile-2022-09-01.csv")
sorted_table = table.sort_by([("CompanyName", "ascending")])
pq.write_table(sorted_table, "basic_company_data_sorted.parquet")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment