Title: Can I pass a list to headers? · Issue #2 · zackdever/python-tabulate · GitHub
Open Graph Title: Can I pass a list to headers? · Issue #2 · zackdever/python-tabulate
X Title: Can I pass a list to headers? · Issue #2 · zackdever/python-tabulate
Description: Summary: I want to pass a list of dicts as the data, and a list of keys for headers. I don't want to full list of keys in the data as headers, I want a shorter list, in a different order. In the documentation: The following tabular data ...
Open Graph Description: Summary: I want to pass a list of dicts as the data, and a list of keys for headers. I don't want to full list of keys in the data as headers, I want a shorter list, in a different order. In the do...
X Description: Summary: I want to pass a list of dicts as the data, and a list of keys for headers. I don't want to full list of keys in the data as headers, I want a shorter list, in a different order. In th...
Opengraph URL: https://github.com/zackdever/python-tabulate/issues/2
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Can I pass a list to headers?","articleBody":"Summary: I want to pass a list of dicts as the data, and a list of keys for headers. I don't want to full list of keys in the data as headers, I want a shorter list, in a different order.\r\n\r\nIn the documentation:\r\n\u003e The following tabular data types are supported:\r\n\u003e ...\r\n\u003e dict of iterables (keys as columns)\r\n\u003e ...\r\n\r\nThe headers parameter requires either a special keyword (e.g., \"keys\"), or a dict of column keys. I already have a list of column keys. (In a bizarre complication, the code converts this dict of column keys to a list? But doesn't support a list of column keys directly? WTF?) [I agree, it's _nice_ that the header dict is converted to a list for me.)\r\n\r\nMy header list is not always the full list of column keys, as the full data is collected first, then a decision is made on which columns to output.\r\n\r\nA workaround is to convert my list of column keys to a dict, so the code can convert it back? ","author":{"url":"https://github.com/qm64","@type":"Person","name":"qm64"},"datePublished":"2024-01-22T16:08:58.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/2/python-tabulate/issues/2"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:626f9945-9fed-df3f-82ec-d68d4377be72 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D326:B7A48:1164F0:161BB2:697FC808 |
| html-safe-nonce | 713a0382c2829634307c90e7a26c4e8e65d2e30900f16da152ce58ed5f3f2f76 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMzI2OkI3QTQ4OjExNjRGMDoxNjFCQjI6Njk3RkM4MDgiLCJ2aXNpdG9yX2lkIjoiMzAyOTE3Mzc2MDU2NjQ3ODg1NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 7c60ed4e142e37876172c9abb46169a668cace24b0dd0798db27b8d3ac5b38a9 |
| hovercard-subject-tag | issue:2094252903 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/zackdever/python-tabulate/2/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0f6d334e47e0c817f5a556f57b769e6eb8beb7f221a70e9d2b7a7fbe54324803/zackdever/python-tabulate/issues/2 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0f6d334e47e0c817f5a556f57b769e6eb8beb7f221a70e9d2b7a7fbe54324803/zackdever/python-tabulate/issues/2 |
| og:image:alt | Summary: I want to pass a list of dicts as the data, and a list of keys for headers. I don't want to full list of keys in the data as headers, I want a shorter list, in a different order. In the do... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | qm64 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 60279d4097367e16897439d16d6bbe4180663db828c666eeed2656988ffe59f6 |
| turbo-cache-control | no-preview |
| go-import | github.com/zackdever/python-tabulate git https://github.com/zackdever/python-tabulate.git |
| octolytics-dimension-user_id | 1067088 |
| octolytics-dimension-user_login | zackdever |
| octolytics-dimension-repository_id | 58687781 |
| octolytics-dimension-repository_nwo | zackdever/python-tabulate |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 58687781 |
| octolytics-dimension-repository_network_root_nwo | zackdever/python-tabulate |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7c85641c598ad130c74f7bcc27f58575cac69551 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width