Qualtrics is a fairly popular survey platform. You can download your survey data as CSV files. There are a couple of quirks about Qualtrics CSV files:
- The begin with the BOM character
- They include an extra row of information to explain what the variables are
- They frequently included parentheses and periods in column names.
I've been able to deal with #1 and #2 with the following code:
import pandas as pd
df = pd.read_csv('qualtrics_survey.csv', skiprows=[1], encoding='utf-8-sig')
I run the following code, I see a list of all columns, includeing parentheses and period.
list(df.columns.values)
There is a column called turk.1. However, I cannot run:
df.turk.1
I'm not sure what the best way is to load the files. I'd be fine removing all parenthesis, and replacing periods with dashes or something.