Error when using multiple character in Python csv module
Question: I'm getting this:

    
    
    with open(filename, 'rb') as csvfile:
        rows = csv.reader(csvfile, delimiter=';;')
    

`delimiter` must be an 1-character string

is it possible to make it work with two characters?


Answer: No you cannot do it with the csv module, you could do update the file and
replace the `;;` with tabs or some common delimiter or you could use
[pandas.read_csv](http://pandas.pydata.org/pandas-
docs/stable/generated/pandas.read_csv.html):

    
    
    import pandas as pd
    
    df = pd.read_csv("test.csv",sep=";;")
    print(df.A)
    print(df.B)
    print(df.C)
    

test.csv:

    
    
    A;;B;;C
    1;;2;;3
    4;;5;;6
    

Output:

    
    
    0    1
    1    4
    Name: A, dtype: int64
    0    2
    1    5
    Name: B, dtype: int64
    0    3
    1    6
    Name: C, dtype: int64
    

To get rows:

    
    
    for _,row in df.iterrows():
        print(row.values)
    [1 2 3]
    [4 5 6]
    

