import pandas as pd
df = pd.DataFrame()
with open(filepath, 'r') as f:
    for line in f:
        df = pd.concat([df, pd.DataFrame([tuple(line.strip().split(','))])],
            ignore_index=True)
Handling Variable Number of Columns with Pandas - Python