test2023h5's picture
Upload 180 files
d95db82 verified
raw
history blame contribute delete
347 Bytes
import pandas as pd
def main():
df = pd.read_csv("raw/attention.csv")
df = pd.melt(df, ["subidr", "attnr"], var_name="solutions", value_name="score")
df.solutions = df.solutions.str[-1].astype(int)
df.columns = ["subject", "attention", "solutions", "score"]
df.to_csv("attention.csv")
if __name__ == "__main__":
main()