Skip to content

Commit

Permalink
Fix doc
Browse files Browse the repository at this point in the history
  • Loading branch information
xzdandy committed Oct 7, 2023
1 parent 2ba8f97 commit 874525a
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions evadb/interfaces/relational/relation.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ def cross_apply(self, expr: str, alias: str) -> "EvaDBQuery":
return self

def df(self, drop_alias: bool = True) -> pandas.DataFrame:
"""Execute and fetch all rows as a pandas DataFrame
"""
Execute and fetch all rows as a pandas DataFrame
Args:
drop_alias (bool): whether to drop the table name in the output dataframe. Default: True.
Expand All @@ -111,13 +112,13 @@ def df(self, drop_alias: bool = True) -> pandas.DataFrame:
pandas.DataFrame:
Example:
Runs a SQL query and get a panda Dataframe
Runs a SQL query and get a panda Dataframe.
>>> cursor.query("SELECT * FROM MyTable;").df()
col1 col2
0 1 2
1 3 4
2 5 6
col1 col2
0 1 2
1 3 4
2 5 6
"""
batch = self.execute(drop_alias=drop_alias)
assert batch.frames is not None, "relation execute failed"
Expand Down

0 comments on commit 874525a

Please sign in to comment.