Tagged Questions
4
votes
2answers
1k views
What's the most efficient way to covert MySQL output into a NumPy array in Python?
I'm using MySQLdb and Python. I have some basic queries such as this:
c=db.cursor()
c.execute("SELECT id, rating from video")
results = c.fetchall()
I need "results" to be a NumPy array, and I'm ...
0
votes
1answer
708 views
Moving large SQL query to NumPy
I have a very large MySQL query in my web app that looks like this:
query =
SELECT video_tag.video_id, (sum(user_rating.rating) * video.rating_norm) as score
FROM video_tag
JOIN user_rating ON ...