Method constructing a series from a given question ID should set the name of the index column
I would like to suggest to set the name of the index column series.index.name = "id"
in method as_series
in class question
like this:
def as_series(self) -> Series:
"""
Obtain the answers to this question as a pandas.Series.
The series' index are the participant IDs, while data for the
indices are the respective answers.
The series will be named with the question's full ID.
Returns:
A pandas.Series representing the answers for each participant
"""
series = Series(self._answers)
series.name = self.full_id
series.index.name = "id"
return series
A resulting DataFrame would then look something like this:
Q002/SQ001 Q003/SQ001
id
1 Option1 123
2 Option2 456
3 Option3 789
Relates to #111 (closed).