I am using the module sqlite3 to make SQL queries using Pandas's .read_sql_query() method. As its second argument, that method needs a connection to the database. This is easily stored in a variable:
con = sqlite3.connect('PATH/TO/DATABASE')
However, when calling the method, it's quite tedious to have to keep typing in "con" as the second argument (e.g., df = pd.read_sql_query('SQL QUERY HERE', con)). Can I specify at the top of my script that I automatically want the second argument to be "con" every time? So I can just specify the query and not have to type con every time? Does Python have this functionality? (For the record, this second parameter is officially called con, per pandas's documentation.)
Thanks for your help!