issue_comments
13 rows where issue = 1160182768 sorted by updated_at descending
This data as json, CSV (advanced)
Suggested facets: reactions, created_at (date), updated_at (date)
issue 1
- Optional Pandas integration · 13 ✖
id | html_url | issue_url | node_id | user | created_at | updated_at ▲ | author_association | body | reactions | issue | performed_via_github_app |
---|---|---|---|---|---|---|---|---|---|---|---|
1155364367 | https://github.com/simonw/sqlite-utils/issues/412#issuecomment-1155364367 | https://api.github.com/repos/simonw/sqlite-utils/issues/412 | IC_kwDOCGYnMM5E3XYP | simonw 9599 | 2022-06-14T15:36:28Z | 2022-06-14T15:36:28Z | OWNER | Here's as far as I got with my initial prototype, in ```python from .db import Database as _Database, Table as _Table, View as _View import pandas as pd from typing import ( Iterable, Union, Optional, ) class Database(_Database): def query( self, sql: str, params: Optional[Union[Iterable, dict]] = None ) -> pd.DataFrame: return pd.DataFrame(super().query(sql, params))
class PandasQueryable: def rows_where( self, where: str = None, where_args: Optional[Union[Iterable, dict]] = None, order_by: str = None, select: str = "*", limit: int = None, offset: int = None, ) -> pd.DataFrame: return pd.DataFrame( super().rows_where( where, where_args, order_by=order_by, select=select, limit=limit, offset=offset, ) ) class Table(PandasQueryable, _Table): pass class View(PandasQueryable, _View): pass ``` |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Optional Pandas integration 1160182768 | |
1059652834 | https://github.com/simonw/sqlite-utils/issues/412#issuecomment-1059652834 | https://api.github.com/repos/simonw/sqlite-utils/issues/412 | IC_kwDOCGYnMM4_KQTi | zaneselvans 596279 | 2022-03-05T02:14:40Z | 2022-03-05T02:14:40Z | NONE | We do a lot of |
{ "total_count": 2, "+1": 2, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Optional Pandas integration 1160182768 | |
1059652538 | https://github.com/simonw/sqlite-utils/issues/412#issuecomment-1059652538 | https://api.github.com/repos/simonw/sqlite-utils/issues/412 | IC_kwDOCGYnMM4_KQO6 | simonw 9599 | 2022-03-05T02:13:17Z | 2022-03-05T02:13:17Z | OWNER |
Shows a DateFrame``` |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Optional Pandas integration 1160182768 | |
1059651306 | https://github.com/simonw/sqlite-utils/issues/412#issuecomment-1059651306 | https://api.github.com/repos/simonw/sqlite-utils/issues/412 | IC_kwDOCGYnMM4_KP7q | simonw 9599 | 2022-03-05T02:10:49Z | 2022-03-05T02:10:49Z | OWNER | I could teach |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Optional Pandas integration 1160182768 | |
1059651056 | https://github.com/simonw/sqlite-utils/issues/412#issuecomment-1059651056 | https://api.github.com/repos/simonw/sqlite-utils/issues/412 | IC_kwDOCGYnMM4_KP3w | simonw 9599 | 2022-03-05T02:09:38Z | 2022-03-05T02:09:38Z | OWNER | OK, so reading results from existing How about writing a DataFrame to a database table? That feels like it could a lot more useful. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Optional Pandas integration 1160182768 | |
1059650190 | https://github.com/simonw/sqlite-utils/issues/412#issuecomment-1059650190 | https://api.github.com/repos/simonw/sqlite-utils/issues/412 | IC_kwDOCGYnMM4_KPqO | simonw 9599 | 2022-03-05T02:04:43Z | 2022-03-05T02:04:54Z | OWNER | To be honest, I'm having second thoughts about this now mainly because the idiom for turning a generator of dicts into a DataFrame is SO simple:
|
{ "total_count": 2, "+1": 2, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Optional Pandas integration 1160182768 | |
1059649803 | https://github.com/simonw/sqlite-utils/issues/412#issuecomment-1059649803 | https://api.github.com/repos/simonw/sqlite-utils/issues/412 | IC_kwDOCGYnMM4_KPkL | simonw 9599 | 2022-03-05T02:02:41Z | 2022-03-05T02:02:41Z | OWNER | It looks like the existing ``` ... import pandas as pd pd.read_sql_query(db.conn, "select * from articles") ImportError: Using URI string without sqlalchemy installed.``` |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Optional Pandas integration 1160182768 | |
1059649213 | https://github.com/simonw/sqlite-utils/issues/412#issuecomment-1059649213 | https://api.github.com/repos/simonw/sqlite-utils/issues/412 | IC_kwDOCGYnMM4_KPa9 | simonw 9599 | 2022-03-05T02:00:10Z | 2022-03-05T02:00:10Z | OWNER | Requested feedback on Twitter here :https://twitter.com/simonw/status/1499927075930578948 |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Optional Pandas integration 1160182768 | |
1059649193 | https://github.com/simonw/sqlite-utils/issues/412#issuecomment-1059649193 | https://api.github.com/repos/simonw/sqlite-utils/issues/412 | IC_kwDOCGYnMM4_KPap | simonw 9599 | 2022-03-05T02:00:02Z | 2022-03-05T02:00:02Z | OWNER | Yeah, I imagine there are plenty of ways to do this with Pandas already - I'm opportunistically looking for a way to provide better integration with the rest of the Pandas situation from the work I've done in Might be that this isn't worth doing at all. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Optional Pandas integration 1160182768 | |
1059647114 | https://github.com/simonw/sqlite-utils/issues/412#issuecomment-1059647114 | https://api.github.com/repos/simonw/sqlite-utils/issues/412 | IC_kwDOCGYnMM4_KO6K | eyeseast 25778 | 2022-03-05T01:54:24Z | 2022-03-05T01:54:24Z | CONTRIBUTOR | I haven't tried this, but it looks like Pandas has a method for this: https://pandas.pydata.org/docs/reference/api/pandas.read_sql_query.html |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Optional Pandas integration 1160182768 | |
1059646645 | https://github.com/simonw/sqlite-utils/issues/412#issuecomment-1059646645 | https://api.github.com/repos/simonw/sqlite-utils/issues/412 | IC_kwDOCGYnMM4_KOy1 | simonw 9599 | 2022-03-05T01:53:10Z | 2022-03-05T01:53:10Z | OWNER | I'm not an experienced enough Pandas user to know if this design is right or not. I'm going to leave this open for a while and solicit some feedback. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Optional Pandas integration 1160182768 | |
1059646543 | https://github.com/simonw/sqlite-utils/issues/412#issuecomment-1059646543 | https://api.github.com/repos/simonw/sqlite-utils/issues/412 | IC_kwDOCGYnMM4_KOxP | simonw 9599 | 2022-03-05T01:52:47Z | 2022-03-05T01:52:47Z | OWNER | I built a prototype of that second option and it looks pretty good: Here's the ```python from .db import Database as _Database, Table as _Table, View as _View import pandas as pd from typing import ( Iterable, Union, Optional, ) class Database(_Database): def query( self, sql: str, params: Optional[Union[Iterable, dict]] = None ) -> pd.DataFrame: return pd.DataFrame(super().query(sql, params))
class PandasQueryable: def rows_where( self, where: str = None, where_args: Optional[Union[Iterable, dict]] = None, order_by: str = None, select: str = "*", limit: int = None, offset: int = None, ) -> pd.DataFrame: return pd.DataFrame( super().rows_where( where, where_args, order_by=order_by, select=select, limit=limit, offset=offset, ) ) class Table(PandasQueryable, _Table): pass class View(PandasQueryable, _View): pass ``` |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Optional Pandas integration 1160182768 | |
1059646247 | https://github.com/simonw/sqlite-utils/issues/412#issuecomment-1059646247 | https://api.github.com/repos/simonw/sqlite-utils/issues/412 | IC_kwDOCGYnMM4_KOsn | simonw 9599 | 2022-03-05T01:51:03Z | 2022-03-05T01:51:03Z | OWNER | I considered two ways of doing this. First, have methods such as Second, have a compatibility class that is imported separately such as:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Optional Pandas integration 1160182768 |
Advanced export
JSON shape: default, array, newline-delimited, object
CREATE TABLE [issue_comments] ( [html_url] TEXT, [issue_url] TEXT, [id] INTEGER PRIMARY KEY, [node_id] TEXT, [user] INTEGER REFERENCES [users]([id]), [created_at] TEXT, [updated_at] TEXT, [author_association] TEXT, [body] TEXT, [reactions] TEXT, [issue] INTEGER REFERENCES [issues]([id]) , [performed_via_github_app] TEXT); CREATE INDEX [idx_issue_comments_issue] ON [issue_comments] ([issue]); CREATE INDEX [idx_issue_comments_user] ON [issue_comments] ([user]);
user 3