Reading data file (.csv)
I am a newbie to python and pythonista with a very small experience on programming. I wrote a very simple python program that can read a .csv file that is located in my computer. Now, I would like to implement it in pythonista, so my question is: where will be the best place to locate that (csv) file so it can be read from pythonista? Should I use the dropbox module or there is better option for this. Thanks.
In the Pythonista editor, create a new
"Plain Text File"and name it
my_file.csvand paste your csv content into it.
import csv with open('my_file.csv') as in_file: for row in csv.reader(in_file): print ', '.join(row)