From 68789e511dde642d9d7154d775752836b6ce2d24 Mon Sep 17 00:00:00 2001 From: laughingman7743 Date: Sun, 4 Apr 2021 22:17:05 +0900 Subject: [PATCH] Update README (fix #222) --- README.rst | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index 0d8649dd..cccc9af6 100644 --- a/README.rst +++ b/README.rst @@ -150,7 +150,7 @@ Pandas As DataFrame ^^^^^^^^^^^^ -You can use the `pandas.read_sql`_ to handle the query results as a `DataFrame object`_. +You can use the `pandas.read_sql_query`_ to handle the query results as a `DataFrame object`_. .. code:: python @@ -159,9 +159,11 @@ You can use the `pandas.read_sql`_ to handle the query results as a `DataFrame o conn = connect(s3_staging_dir="s3://YOUR_S3_BUCKET/path/to/", region_name="us-west-2") - df = pd.read_sql("SELECT * FROM many_rows", conn) + df = pd.read_sql_query("SELECT * FROM many_rows", conn) print(df.head()) +NOTE: `Poor performance when using pandas.read_sql #222 `_ + The ``pyathena.pandas.util`` package also has helper methods. .. code:: python @@ -178,7 +180,7 @@ The ``pyathena.pandas.util`` package also has helper methods. If you want to use the query results output to S3 directly, you can use `PandasCursor`_. This cursor fetches query results faster than the default cursor. (See `benchmark results`_.) -.. _`pandas.read_sql`: https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_sql.html +.. _`pandas.read_sql_query`: https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_sql_query.html .. _`benchmark results`: benchmarks/README.rst To SQL