File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff 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
31263126query 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:
You can’t perform that action at this time.
0 commit comments