I’m doing a simple filter which use date_format in the filter in multiline MYSQL query. The query itself runs finely in the database but in python terminal keeps getting error (MySQLdb.ProgrammingError) not enough arguments for format string
. Is it the %
in the query causes it?
...
query = """
SELECT DATE_FORMAT('2024-08-01', '%Y-01-01') AS formatted_date
"""
df = pd.read_sql_query(query, mysql_engine)