Getting “newline inside string” while reading the csv file in Python?

后端 未结 3 1572
时光说笑
时光说笑 2021-01-02 13:14

I have this utils.py file in Django Architecture:

def range_data(ip):
    r = []
    f = open(os.path.join(settings.PROJECT_ROOT, \'static\', \'csv \', 
             


        
3条回答
  •  执笔经年
    2021-01-02 13:51

    had similar problem earlier today, there was an end quote missing from a line and the solution is by instructing reader to perform no special processing of quote characters (quoting=csv.QUOTE_NONE).

提交回复
热议问题