Skip to main content
added 12 characters in body
Source Link
Ilja Everilä
  • 53.4k
  • 9
  • 137
  • 141

Consider you have the following code:
import pandas as pd pd.read_sql("SELECT * FROM foo_schema.run_info WHERE id=:param order by run_id desc", s.bind, **{'param':5})

import pandas as pd
pd.read_sql("SELECT * FROM foo_schema.run_info WHERE id=:param order by run_id desc", s.bind, **{'param':5})

Whereas s.bind is sqlchemy's engine object.

I get the following error:
{TypeError}read_sql() got an unexpected argument 'param'

{TypeError}read_sql() got an unexpected argument 'param'

what is wrong with my function call?

Consider you have the following code:
import pandas as pd pd.read_sql("SELECT * FROM foo_schema.run_info WHERE id=:param order by run_id desc", s.bind, **{'param':5})

Whereas s.bind is sqlchemy's engine object.

I get the following error:
{TypeError}read_sql() got an unexpected argument 'param'

what is wrong with my function call?

Consider you have the following code:

import pandas as pd
pd.read_sql("SELECT * FROM foo_schema.run_info WHERE id=:param order by run_id desc", s.bind, **{'param':5})

Whereas s.bind is sqlchemy's engine object.

I get the following error:

{TypeError}read_sql() got an unexpected argument 'param'

what is wrong with my function call?

Source Link
JavaSa
  • 6.3k
  • 19
  • 82
  • 130

Usage error in pandas.read_sql with sqlalchemy

Consider you have the following code:
import pandas as pd pd.read_sql("SELECT * FROM foo_schema.run_info WHERE id=:param order by run_id desc", s.bind, **{'param':5})

Whereas s.bind is sqlchemy's engine object.

I get the following error:
{TypeError}read_sql() got an unexpected argument 'param'

what is wrong with my function call?