Loading tutorials
sqlite3 connection and a SQLAlchemy engine.3 min readSELECT, WHERE, GROUP BY). It also assumes you have a connection to a database, as covered in the previous chapter. Here you will run a query and get a DataFrame back.3 min readpd.read_sql_query call, you know what a connection object is, and you know simple SQL WHERE clauses. The examples use the orders table and the conn sqlite3 connection from the earlier chapters.3 min readpd.read_sql_query against a sqlite3 connection, as covered earlier, and that you know what a DataFrame index and a dtype are. It shows how to make the DataFrame come back with the right index and column types, instead of fixing them afterwards.3 min readpd.read_sql_query against a connection and pass params, as covered in the earlier chapters. You should also know GROUP BY and the pandas groupby method.3 min readread_sql_query against a sqlite3 connection or a SQLAlchemy engine, and that you know basic pandas aggregation. It uses the shop.db database with the orders table from the earlier chapters.3 min readread_sql_query against a SQLAlchemy engine and that you know what index_col and parse_dates do. If not, review the earlier chapters on connections and type handling first.3 min readSELECT statement. It also assumes you have read the earlier chapters on connections, read_sql_query and read_sql_table. Here you will see how pandas.read_sql chooses between those two functions, and when to call it3 min readsqlite3 or a SQLAlchemy engine, call read_sql_query with params, and read a traceback. Most failures in pandas.read_sql_* come from a few causes: the wrong connection type, the wrong placeholder style, a closed connection, or surprising dtypes. Each 3 min read