Skip to content

Commit f30499b

Browse files
committed
DOC use read_sql rather than read_frame in io.rst
1 parent ce5faf0 commit f30499b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

doc/source/io.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -3122,25 +3122,25 @@ engine. You can use a temporary SQLite database where data are stored in
31223122
31233123
31243124
Let ``data`` be the name of your SQL table. With a query and your database
3125-
connection, just use the :func:`~pandas.io.sql.read_frame` function to get the
3125+
connection, just use the :func:`~pandas.io.sql.read_sql` function to get the
31263126
query results into a DataFrame:
31273127

31283128
.. ipython:: python
31293129
3130-
sql.read_frame("SELECT * FROM data;", cnx)
3130+
sql.read_sql("SELECT * FROM data;", cnx)
31313131
31323132
You can also specify the name of the column as the DataFrame index:
31333133

31343134
.. ipython:: python
31353135
3136-
sql.read_frame("SELECT * FROM data;", cnx, index_col='id')
3137-
sql.read_frame("SELECT * FROM data;", cnx, index_col='date')
3136+
sql.read_sql("SELECT * FROM data;", cnx, index_col='id')
3137+
sql.read_sql("SELECT * FROM data;", cnx, index_col='date')
31383138
31393139
Of course, you can specify a more "complex" query.
31403140

31413141
.. ipython:: python
31423142
3143-
sql.read_frame("SELECT id, Col_1, Col_2 FROM data WHERE id = 42;", cnx)
3143+
sql.read_sql("SELECT id, Col_1, Col_2 FROM data WHERE id = 42;", cnx)
31443144
31453145
.. ipython:: python
31463146
:suppress:

0 commit comments

Comments
 (0)