Skip to content
Snippets Groups Projects
Commit c85465cc authored by Hees, L.J.H. (Laurens)'s avatar Hees, L.J.H. (Laurens)
Browse files

improved filereader docstring

parent 11fa4707
No related branches found
No related tags found
1 merge request!132Sc 187/cleanup and docstrings
......@@ -17,19 +17,19 @@ class FileReader (ABC):
"""Take the relevant data out of the imported data.
Args:
data: Dataframe of imported data
data: DataFrame of imported data
Returns:
extraction: Dataframe of only the relevant data
extraction: DataFrame of only the relevant data
"""
pass
@staticmethod
def df_to_words(df, type_code='source'):
"""Convert the rows in a dataframe to word instances
"""Convert the rows in a DataFrame to Word instances.
Args:
df: Dataframe with the onset, offset and string of a Word
df: DataFrame with the onset, offset and string of a Word
type_code: Role of files ('source' or 'shadow')
Returns:
......@@ -76,10 +76,10 @@ class CSVReader(FileReader):
data.
Args:
data: Dataframe of imported .csv data
data: DataFrame of imported .csv data
Returns:
extraction: Dataframe of only the relevant data
extraction: DataFrame of only the relevant data
"""
extraction = data.iloc[:, 5:8]
extraction = extraction.copy()
......@@ -130,8 +130,7 @@ class CSVWriter(FileWriter):
Args:
path: Path to save location
results: Results to write to file
result_type: Type of the results
('mistakes.csv' or delay.csv')
result_type: Type of the results ('mistakes.csv' or delay.csv')
"""
results.sort_values(by=['participant', 'video', 'condition'],
inplace=True)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment