Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- TypeError: not all arguments converted during string formatting
- import pandas as pd
- import psycopg2
- from psycopg2 import sql
- import xlsxwriter
- def func(input):
- db_details = conn.cursor() # set DB Cursor
- db_details.execute(sql.SQL("""select name from store where name = (%s)"""), (input))
- names = dwh_cursor.fetchall()
- df = pd.DataFrame(names,columns=[desc[0] for desc in dwh_cursor.description])
Add Comment
Please, Sign In to add comment