issue_comments: 513246124
This data as json
html_url | issue_url | id | node_id | user | created_at | updated_at | author_association | body | reactions | issue | performed_via_github_app |
---|---|---|---|---|---|---|---|---|---|---|---|
https://github.com/simonw/sqlite-utils/issues/42#issuecomment-513246124 | https://api.github.com/repos/simonw/sqlite-utils/issues/42 | 513246124 | MDEyOklzc3VlQ29tbWVudDUxMzI0NjEyNA== | 9599 | 2019-07-19T14:18:35Z | 2019-07-19T14:19:40Z | OWNER | How about the Python version? That should be easier to design. ```python db["dea_sales"].extract( columns=["company_name", "company_address"], to_table="companies" ) ``` If we want to transform the extracted data (e.g. rename those columns) maybe support a `transform=` argument? ```python db["dea_sales"].extract( columns=["company_name", "company_address"], to_table="companies", transform = lambda extracted: { "name": extracted["company_name"], "address": extracted["company_address"], } ) ``` This would create a new "companies" table with three columns: id, name and address. Would also be nice if there was a syntax for saying "... and use the value from this column as the primary key column in the newly created table". | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 470345929 |