You probably want to be using client.set(key, doc)
rather than client.publish(key, doc)
.
Publish has a totally different meaning from set, which is more likely what you want.
Edit
(thanks for accepting, I'm just editing this to make it the actual solution to your problem)
The first parameter of client.publish
is the channel you're publishing to. It sounds like in your case you're publishing to 'csv_filename:first_entry_of_rowwhen really you want to be publishing to just
csv_filename`.
Try changing the line key = "xyzxyz:%s" % (row[0],)
to just key = "xyzxyz"
.