format: black formating
This commit is contained in:
parent
00c2681823
commit
98fa768541
@ -17,7 +17,7 @@ def try_replace(x, old, new):
|
|||||||
|
|
||||||
|
|
||||||
def extract_students(df, no_student_columns=NO_ST_COLUMNS.values()):
|
def extract_students(df, no_student_columns=NO_ST_COLUMNS.values()):
|
||||||
""" Extract the list of students from df
|
"""Extract the list of students from df
|
||||||
|
|
||||||
:param df: the dataframe
|
:param df: the dataframe
|
||||||
:param no_student_columns: columns that are not students
|
:param no_student_columns: columns that are not students
|
||||||
@ -30,7 +30,7 @@ def extract_students(df, no_student_columns=NO_ST_COLUMNS.values()):
|
|||||||
def flat_df_students(
|
def flat_df_students(
|
||||||
df, no_student_columns=NO_ST_COLUMNS.values(), postprocessing=True
|
df, no_student_columns=NO_ST_COLUMNS.values(), postprocessing=True
|
||||||
):
|
):
|
||||||
""" Flat the dataframe by returning a dataframe with on student on each line
|
"""Flat the dataframe by returning a dataframe with on student on each line
|
||||||
|
|
||||||
:param df: the dataframe (one row per questions)
|
:param df: the dataframe (one row per questions)
|
||||||
:param no_student_columns: columns that are not students
|
:param no_student_columns: columns that are not students
|
||||||
@ -63,7 +63,7 @@ def flat_df_students(
|
|||||||
def flat_df_for(
|
def flat_df_for(
|
||||||
df, student, no_student_columns=NO_ST_COLUMNS.values(), postprocessing=True
|
df, student, no_student_columns=NO_ST_COLUMNS.values(), postprocessing=True
|
||||||
):
|
):
|
||||||
""" Extract the data only for one student
|
"""Extract the data only for one student
|
||||||
|
|
||||||
:param df: the dataframe (one row per questions)
|
:param df: the dataframe (one row per questions)
|
||||||
:param no_student_columns: columns that are not students
|
:param no_student_columns: columns that are not students
|
||||||
@ -88,7 +88,7 @@ def flat_df_for(
|
|||||||
|
|
||||||
|
|
||||||
def postprocess(df):
|
def postprocess(df):
|
||||||
""" Postprocessing score dataframe
|
"""Postprocessing score dataframe
|
||||||
|
|
||||||
- Replace na with an empty string
|
- Replace na with an empty string
|
||||||
- Replace "NOANSWER" with -1
|
- Replace "NOANSWER" with -1
|
||||||
|
Loading…
Reference in New Issue
Block a user