Python Forum

Full Version: csv files
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm new to python. When reading and writing csv files, I want to achieve that the values corresponding to the dialogue column and the values corresponding to utterance are spliced into dia{}_utt{}. Please see the attachement. How to do that? Could you please show some coding or tutorial for me?

[Image: image.png]
dialogue = 0
utterance_id = 1
path_file = f"dia{dialogue}_utt{utterance_id}.csv"
print(path_file)
Output:
dia0_utt1.csv