File tree 1 file changed +5
-5
lines changed
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
3122
3122
3123
3123
3124
3124
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
3126
3126
query results into a DataFrame:
3127
3127
3128
3128
.. ipython :: python
3129
3129
3130
- sql.read_frame (" SELECT * FROM data;" , cnx)
3130
+ sql.read_sql (" SELECT * FROM data;" , cnx)
3131
3131
3132
3132
You can also specify the name of the column as the DataFrame index:
3133
3133
3134
3134
.. ipython :: python
3135
3135
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' )
3138
3138
3139
3139
Of course, you can specify a more "complex" query.
3140
3140
3141
3141
.. ipython :: python
3142
3142
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)
3144
3144
3145
3145
.. ipython :: python
3146
3146
:suppress:
You can’t perform that action at this time.
0 commit comments