I have a column in a DataFrame that contains the ids of records I want to return from a query.
This is what I have so far:
query = """select * from frames where recording_id in (%d) """ % (data['recording_id'].values)
mydata = pandas.read_sql(query, db_conn)
This returns a type error:
TypeError: %d format: a number is required, not numpy.ndarray
so I also tried using .tolist() instead of values but I have the same problem.
What is the proper way to pass these values?
",".join(list(data["recording_id"]))",".join.TypeError: sequence item 0: expected string, numpy.int64 foundbut I think I can figure this out