Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 csv 文件,如下所示:
s555555,7 s333333,10 s666666,9 s111111,10 s999999,9
当我在 python 中打开它时,它应该看起来像:
[[’s555555’, ’7’], [’s333333’, ’10’], [’s666666’, ’9’], [’s111111’, ’10’], [’s999999’, ’9’]]
我需要为此使用什么代码?
谢谢,任何帮助将不胜感激!!
检查csv模块。(http://docs.python.org/library/csv.html)
csv