How to Use the Binding Variable in pandas.io.sql.read_sql

Asked 2 years ago, Updated 2 years ago, 41 views

I would like to use date as a variable in pandas.io.sql.read_sql('SELECT* FROM database as a where a.date=date). Is there a way?

pandas

2022-09-29 22:14

1 Answers

Variables can be passed to the params argument of pandas.read_sql.

See the official document for more information.
https://pandas.pydata.org/docs/reference/api/pandas.read_sql.html?highlight=read_sql#pandas.read_sql


2022-09-29 22:14

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.